emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115384: Minor changes, detected by test suite.


From: Michael Albinus
Subject: [Emacs-diffs] trunk r115384: Minor changes, detected by test suite.
Date: Thu, 05 Dec 2013 15:30:05 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115384
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Thu 2013-12-05 16:29:59 +0100
message:
  Minor changes, detected by test suite.
  
  * net/dbus.el (dbus-unregister-service)
  (dbus-escape-as-identifier, dbus-unescape-from-identifier):
  Fix docstring.
  (dbus-unregister-service): Skip :serial entries in
  `dbus-registered-objects-table'.
  (dbus-byte-array-to-string): New optional arg MULTIBYTE.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/dbus.el               dbus.el-20091113204419-o5vbwnq5f7feedwu-7962
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-12-04 21:32:05 +0000
+++ b/lisp/ChangeLog    2013-12-05 15:29:59 +0000
@@ -1,3 +1,12 @@
+2013-12-05  Michael Albinus  <address@hidden>
+
+       * net/dbus.el (dbus-unregister-service)
+       (dbus-escape-as-identifier, dbus-unescape-from-identifier):
+       Fix docstring.
+       (dbus-unregister-service): Skip :serial entries in
+       `dbus-registered-objects-table'.
+       (dbus-byte-array-to-string): New optional arg MULTIBYTE.
+
 2013-12-04  Teodor Zlatanov  <address@hidden>
 
        * emacs-lisp/lisp-mnt.el (lm-keywords-list): Trim whitespace

=== modified file 'lisp/net/dbus.el'
--- a/lisp/net/dbus.el  2013-12-04 14:10:09 +0000
+++ b/lisp/net/dbus.el  2013-12-05 15:29:59 +0000
@@ -521,7 +521,7 @@
 The function returns a keyword, indicating the result of the
 operation.  One of the following keywords is returned:
 
-`:released': Service has become the primary owner of the name.
+`:released': We successfully released the service.
 
 `:non-existent': Service name does not exist on this bus.
 
@@ -530,12 +530,13 @@
 
   (maphash
    (lambda (key value)
-     (dolist (elt value)
-       (ignore-errors
-        (when (and (equal bus (cadr key)) (string-equal service (cadr elt)))
-          (unless
-              (puthash key (delete elt value) dbus-registered-objects-table)
-            (remhash key dbus-registered-objects-table))))))
+     (unless (equal :serial (car key))
+       (dolist (elt value)
+        (ignore-errors
+          (when (and (equal bus (cadr key)) (string-equal service (cadr elt)))
+            (unless
+                (puthash key (delete elt value) dbus-registered-objects-table)
+              (remhash key dbus-registered-objects-table)))))))
    dbus-registered-objects-table)
   (let ((reply (dbus-call-method
                bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
@@ -827,12 +828,13 @@
       (dolist (elt (string-to-list string) (append '(:array) result))
        (setq result (append result (list :byte elt)))))))
 
-(defun dbus-byte-array-to-string (byte-array)
+(defun dbus-byte-array-to-string (byte-array &optional multibyte)
   "Transforms BYTE-ARRAY into UTF8 coded string.
 BYTE-ARRAY must be a list of structure (c1 c2 ...), or a byte
-array as produced by `dbus-string-to-byte-array'."
+array as produced by `dbus-string-to-byte-array'.  The resulting
+string is unibyte encoded, unless MULTIBYTE is non-nil."
   (apply
-   'string
+   (if multibyte 'string 'unibyte-string)
    (if (equal byte-array '(:array :signature "y"))
        nil
      (let (result)
@@ -855,7 +857,7 @@
 \"_\".
 
 Returns the escaped string.  Algorithm taken from
-telepathy-glib's `tp-escape-as-identifier'."
+telepathy-glib's `tp_escape_as_identifier'."
   (if (zerop (length string))
       "_"
     (replace-regexp-in-string
@@ -864,8 +866,8 @@
      string)))
 
 (defun dbus-unescape-from-identifier (string)
-  "Retrieve the original string from the encoded STRING.
-STRING must have been coded with `dbus-escape-as-identifier'"
+  "Retrieve the original string from the encoded STRING as unibyte string.
+STRING must have been encoded with `dbus-escape-as-identifier'."
   (if (string-equal string "_")
       ""
     (replace-regexp-in-string


reply via email to

[Prev in Thread] Current Thread [Next in Thread]