From: Julien Danjou Date: Sat, 25 Sep 2010 21:57:02 +0000 (-0700) Subject: * lisp/notifications.el: Call dbus-register-signal only if it is bound. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~47^2~42^2~17 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4234374700a24ff0e5b94bbdb2481ba623c51a32;p=emacs.git * lisp/notifications.el: Call dbus-register-signal only if it is bound. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e001afa8979..4840bc4b13b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-09-25 Julien Danjou + + * notifications.el: Call dbus-register-signal only if it is bound. + 2010-09-25 Glenn Morris * eshell/em-alias.el, eshell/em-banner.el, eshell/em-basic.el: diff --git a/lisp/notifications.el b/lisp/notifications.el index 68db58e54fa..dc4904db4ca 100644 --- a/lisp/notifications.el +++ b/lisp/notifications.el @@ -95,13 +95,14 @@ (funcall (cadr entry) id action) (remove entry 'notifications-on-action-map)))) -(dbus-register-signal - :session - notifications-service - notifications-path - notifications-interface - notifications-action-signal - 'notifications-on-action-signal) +(when (fboundp 'dbus-register-signal) + (dbus-register-signal + :session + notifications-service + notifications-path + notifications-interface + notifications-action-signal + 'notifications-on-action-signal)) (defun notifications-on-closed-signal (id reason) "Dispatch signals to callback functions from `notifications-on-closed-map'." @@ -111,13 +112,14 @@ id (cadr (assoc reason notifications-closed-reason))) (remove entry 'notifications-on-close-map)))) -(dbus-register-signal - :session - notifications-service - notifications-path - notifications-interface - notifications-closed-signal - 'notifications-on-closed-signal) +(when (fboundp 'dbus-register-signal) + (dbus-register-signal + :session + notifications-service + notifications-path + notifications-interface + notifications-closed-signal + 'notifications-on-closed-signal)) (defun notifications-notify (&rest params) "Send notification via D-Bus using the Freedesktop notification protocol.