summaryrefslogtreecommitdiff
path: root/lisp/notifications.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2012-02-07 10:06:19 +0100
committerMichael Albinus <michael.albinus@gmx.de>2012-02-07 10:06:19 +0100
commit5b77774d024ce0c13b1b071b447a344fe5c70bd7 (patch)
tree39b6ff38cdcbcc1de6ef1c32dde5eb124fd0ebe9 /lisp/notifications.el
parent60d47423d1f05071b96857860a8281b318931bee (diff)
downloademacs-5b77774d024ce0c13b1b071b447a344fe5c70bd7.tar.gz
* notifications.el (notifications-on-closed-signal): Make `reason'
optional. (Bug#10744)
Diffstat (limited to 'lisp/notifications.el')
-rw-r--r--lisp/notifications.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/notifications.el b/lisp/notifications.el
index c3b6c759506..9f7576b3f5d 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -107,9 +107,12 @@
notifications-action-signal
'notifications-on-action-signal))
-(defun notifications-on-closed-signal (id reason)
+(defun notifications-on-closed-signal (id &optional reason)
"Dispatch signals to callback functions from `notifications-on-closed-map'."
- (let ((entry (assoc id notifications-on-close-map)))
+ ;; notification-daemon prior 0.4.0 does not send a reason. So we
+ ;; make it optional, and assume `undefined' as default.
+ (let ((entry (assoc id notifications-on-close-map))
+ (reason (or reason 4)))
(when entry
(funcall (cadr entry)
id (cadr (assoc reason notifications-closed-reason)))