aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2007-12-05 21:59:12 +0000
committerMichael Albinus2007-12-05 21:59:12 +0000
commit7b760f0a0fc25f31365bdcaf0165b600d2b9002c (patch)
tree23998ab4c67cc27e61c15ded2e63451174842e0c
parent96faeb40c26817d67713c6c2fdbaca695ea1e7c0 (diff)
downloademacs-7b760f0a0fc25f31365bdcaf0165b600d2b9002c.tar.gz
emacs-7b760f0a0fc25f31365bdcaf0165b600d2b9002c.zip
* net/dbus.el (dbus-hash-table=): Allow nil as wildcard in the
interface and member fields.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/dbus.el19
2 files changed, 19 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c6b9997ea77..c334edd6001 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-12-05 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/dbus.el (dbus-hash-table=): Allow nil as wildcard in the
4 interface and member fields.
5
12007-12-05 Glenn Morris <rgm@gnu.org> 62007-12-05 Glenn Morris <rgm@gnu.org>
2 7
3 * eshell/em-alias.el (pcomplete-stub): Define for compiler. 8 * eshell/em-alias.el (pcomplete-stub): Define for compiler.
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 8dd17bfea4c..9221c52a082 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -55,15 +55,24 @@ See `dbus-registered-functions-table' for a description of the hash table."
55 (and 55 (and
56 (listp x) (listp y) 56 (listp x) (listp y)
57 ;; Bus symbol, either :system or :session. 57 ;; Bus symbol, either :system or :session.
58 (symbolp (car x)) (symbolp (car y)) (equal (car x) (car y)) 58 (symbolp (car x)) (symbolp (car y)) (equal (car x) (car y))
59 ;; Interface. 59 ;; Interface.
60 (stringp (cadr x)) (stringp (cadr y)) (string-equal (cadr x) (cadr y)) 60 (or
61 (null (cadr x)) (null (cadr y)) ; wildcard
62 (and
63 (stringp (cadr x)) (stringp (cadr y)) (string-equal (cadr x) (cadr y))))
61 ;; Member. 64 ;; Member.
62 (stringp (caddr x)) (stringp (caddr y)) (string-equal (caddr x) (caddr y)))) 65 (or
66 (null (caddr x)) (null (caddr y)) ; wildcard
67 (and
68 (stringp (caddr x)) (stringp (caddr y))
69 (string-equal (caddr x) (caddr y))))))
63 70
64(define-hash-table-test 'dbus-hash-table-test 71(define-hash-table-test 'dbus-hash-table-test 'dbus-hash-table= 'sxhash)
65 'dbus-hash-table= 'sxhash)
66 72
73;; When we assume that interface and and member are always strings in
74;; the key, we could use `equal' as test function. But we want to
75;; have also `nil' there, being a wildcard.
67(setq dbus-registered-functions-table 76(setq dbus-registered-functions-table
68 (make-hash-table :test 'dbus-hash-table-test)) 77 (make-hash-table :test 'dbus-hash-table-test))
69 78