summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2008-12-11 01:39:26 +0000
committerNeil Jerram <neil@ossau.uklinux.net>2008-12-11 21:40:03 +0000
commit8b0872202395e5f35064eaf6ac6b56977de6dff2 (patch)
treeeb614e29dfc1b2ee53a238330bfb225fc43c43ac
parent55aae983565cd14821d4cdff9f44afc96f8868c1 (diff)
Add a GDS protocol hook, that we can use for testing
* emacs/gds.el (gds-protocol-hook): New hook. (gds-debug-protocol): Run this hook for each received protocol form.
-rw-r--r--emacs/gds.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/emacs/gds.el b/emacs/gds.el
index 7a1486d8d..1275d778b 100644
--- a/emacs/gds.el
+++ b/emacs/gds.el
@@ -138,7 +138,13 @@ listen on to the path that it should bind to for each one.")
;;;; Debugger protocol
+(defcustom gds-protocol-hook nil
+ "Hook called on receipt of a protocol form from the GDS client."
+ :type 'hook
+ :group 'gds)
+
(defun gds-debug-protocol (client form)
+ (run-hook-with-args 'gds-protocol-hook form)
(or (eq client '*)
(let ((proc (car form)))
(cond ((eq proc 'name)