diff options
| author | Michael Albinus | 2012-02-07 10:06:19 +0100 |
|---|---|---|
| committer | Michael Albinus | 2012-02-07 10:06:19 +0100 |
| commit | 5b77774d024ce0c13b1b071b447a344fe5c70bd7 (patch) | |
| tree | 39b6ff38cdcbcc1de6ef1c32dde5eb124fd0ebe9 | |
| parent | 60d47423d1f05071b96857860a8281b318931bee (diff) | |
| download | emacs-5b77774d024ce0c13b1b071b447a344fe5c70bd7.tar.gz emacs-5b77774d024ce0c13b1b071b447a344fe5c70bd7.zip | |
* notifications.el (notifications-on-closed-signal): Make `reason'
optional. (Bug#10744)
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/notifications.el | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f69b94fdb7b..e04126bf4ee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-02-07 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * notifications.el (notifications-on-closed-signal): Make `reason' | ||
| 4 | optional. (Bug#10744) | ||
| 5 | |||
| 1 | 2012-02-07 Glenn Morris <rgm@gnu.org> | 6 | 2012-02-07 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * emacs-lisp/easy-mmode.el (define-minor-mode): | 8 | * emacs-lisp/easy-mmode.el (define-minor-mode): |
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 @@ | |||
| 107 | notifications-action-signal | 107 | notifications-action-signal |
| 108 | 'notifications-on-action-signal)) | 108 | 'notifications-on-action-signal)) |
| 109 | 109 | ||
| 110 | (defun notifications-on-closed-signal (id reason) | 110 | (defun notifications-on-closed-signal (id &optional reason) |
| 111 | "Dispatch signals to callback functions from `notifications-on-closed-map'." | 111 | "Dispatch signals to callback functions from `notifications-on-closed-map'." |
| 112 | (let ((entry (assoc id notifications-on-close-map))) | 112 | ;; notification-daemon prior 0.4.0 does not send a reason. So we |
| 113 | ;; make it optional, and assume `undefined' as default. | ||
| 114 | (let ((entry (assoc id notifications-on-close-map)) | ||
| 115 | (reason (or reason 4))) | ||
| 113 | (when entry | 116 | (when entry |
| 114 | (funcall (cadr entry) | 117 | (funcall (cadr entry) |
| 115 | id (cadr (assoc reason notifications-closed-reason))) | 118 | id (cadr (assoc reason notifications-closed-reason))) |