aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2009-01-28 16:07:33 +0000
committerMichael Albinus2009-01-28 16:07:33 +0000
commit74fc50477b4ee46026a4418d3682c30187130efe (patch)
tree8ac3f69c8dac7bb8400bb66c27a2537baca6e4ce
parent8372c367bd2829d8c8a45d95c5446dfd915f6495 (diff)
downloademacs-74fc50477b4ee46026a4418d3682c30187130efe.tar.gz
emacs-74fc50477b4ee46026a4418d3682c30187130efe.zip
* dbus.texi (Errors and Events): Fix typos. Describe second parameter
of hook functions.
-rw-r--r--doc/misc/ChangeLog5
-rw-r--r--doc/misc/dbus.texi22
2 files changed, 21 insertions, 6 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 0155df5acd2..7f6b4c3f325 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,8 @@
12009-01-28 Michael Albinus <michael.albinus@gmx.de>
2
3 * dbus.texi (Errors and Events): Fix typos. Describe second parameter
4 of hook functions.
5
12009-01-28 Carsten Dominik <dominik@science.uva.nl> 62009-01-28 Carsten Dominik <dominik@science.uva.nl>
2 7
3 * org.texi (TODO dependencies): New section. 8 * org.texi (TODO dependencies): New section.
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index a6d042a8500..c012647144e 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -1525,11 +1525,11 @@ Returns the object path of the D-Bus object @var{event} is coming from.
1525@end defun 1525@end defun
1526 1526
1527@defun dbus-event-interface-name event 1527@defun dbus-event-interface-name event
1528Returns the interface name of of the D-Bus object @var{event} is coming from. 1528Returns the interface name of the D-Bus object @var{event} is coming from.
1529@end defun 1529@end defun
1530 1530
1531@defun dbus-event-member-name event 1531@defun dbus-event-member-name event
1532Returns the member name of of the D-Bus object @var{event} is coming 1532Returns the member name of the D-Bus object @var{event} is coming
1533from. It is either a signal name or a method name. 1533from. It is either a signal name or a method name.
1534@end defun 1534@end defun
1535 1535
@@ -1541,17 +1541,27 @@ handled by a hook function.
1541@defvar dbus-event-error-hooks 1541@defvar dbus-event-error-hooks
1542This hook variable keeps a list of functions, which are called when a 1542This hook variable keeps a list of functions, which are called when a
1543D-Bus error happens in the event handler. Every function must accept 1543D-Bus error happens in the event handler. Every function must accept
1544one argument, the error variable catched in @code{condition-case} by 1544two arguments, the event and the error variable catched in
1545@code{dbus-error}. Example: 1545@code{condition-case} by @code{dbus-error}.
1546
1547Such functions can be used the adapt the error signal to be raised.
1548Example:
1546 1549
1547@lisp 1550@lisp
1548(defun my-dbus-event-error-handler (err) 1551(defun my-dbus-event-error-handler (event error)
1549 (message "my-dbus-event-error-handler: %S" (cadr err))) 1552 (when (string-equal (concat dbus-service-emacs ".FileManager")
1553 (dbus-event-interface-name event))
1554 (message "my-dbus-event-error-handler: %S %S" event error)
1555 (signal 'file-error (cdr error))))
1550 1556
1551(add-hook 'dbus-event-error-hooks 'my-dbus-event-error-handler) 1557(add-hook 'dbus-event-error-hooks 'my-dbus-event-error-handler)
1552@end lisp 1558@end lisp
1553@end defvar 1559@end defvar
1554 1560
1561Hook functions shall take into account, that there might be other
1562D-Bus applications running. Therefore, they shall check carefully,
1563whether a given D-Bus error is related to them.
1564
1555 1565
1556@node GNU Free Documentation License 1566@node GNU Free Documentation License
1557@appendix GNU Free Documentation License 1567@appendix GNU Free Documentation License