diff options
| author | Joakim Verona | 2012-02-10 08:29:52 +0100 |
|---|---|---|
| committer | Joakim Verona | 2012-02-10 08:29:52 +0100 |
| commit | db2e8ff4fd52d6a06cef414787fd031cc26d43fa (patch) | |
| tree | c0e6fe54a70be21c9efa1f34040ce08499754e74 /lisp/notifications.el | |
| parent | 8c5c7f5afa968d06efb6788cf680d5463c389d85 (diff) | |
| parent | 667ced3a2d224b0f2ab3f2da26468791252c234a (diff) | |
| download | emacs-db2e8ff4fd52d6a06cef414787fd031cc26d43fa.tar.gz emacs-db2e8ff4fd52d6a06cef414787fd031cc26d43fa.zip | |
upstream
Diffstat (limited to 'lisp/notifications.el')
| -rw-r--r-- | lisp/notifications.el | 7 |
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 @@ | |||
| 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))) |