Mercurial > emacs
changeset 101525:5951f5343bb5
* net/dbus.el (dbus-event-error-hooks): New variable.
(dbus-handle-event): Use it.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Mon, 26 Jan 2009 20:26:10 +0000 |
parents | 58326376a152 |
children | 99e57e3dc2ab |
files | lisp/net/dbus.el |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/net/dbus.el Mon Jan 26 20:23:49 2009 +0000 +++ b/lisp/net/dbus.el Mon Jan 26 20:26:10 2009 +0000 @@ -97,6 +97,11 @@ (put 'dbus-ignore-errors 'edebug-form-spec '(form body)) (font-lock-add-keywords 'emacs-lisp-mode '("\\<dbus-ignore-errors\\>")) +(defvar dbus-event-error-hooks nil + "Functions to be called when a D-Bus error happens in the event handler. +Every function must accept one argument, the error variable +catched in `condition-case' by `dbus-error'.") + ;;; Hash table of registered functions. @@ -374,6 +379,7 @@ (dbus-method-error-internal (nth 1 event) (nth 3 event) (nth 4 event) (cadr err)))) ;; Propagate D-Bus error messages. + (run-hook-with-args 'dbus-event-error-hooks err) (when (or dbus-debug (= dbus-message-type-error (nth 2 event))) (signal (car err) (cdr err))))))