branch: externals/xelb commit 501a95d8068f2af1d4e5b521211be4c3c42bdd63 Author: Adrián Medraño Calvo <adr...@medranocalvo.com> Commit: Adrián Medraño Calvo <adr...@medranocalvo.com>
Command for toggling debugging output * xcb-types.el (xcb:-debug-toggle): New function for toggling debugging output. --- xcb-types.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xcb-types.el b/xcb-types.el index bb95fa7..b844ba6 100644 --- a/xcb-types.el +++ b/xcb-types.el @@ -56,6 +56,16 @@ (eval-when-compile (defvar xcb:debug-on nil "Non-nil to turn on debug.")) +(defun xcb:-debug-toggle (&optional arg) + "Toggle XELB debugging output. +When ARG is positive, turn debugging on; when negative off. When +ARG is nil, toggle debugging output." + (interactive + (list (or current-prefix-arg 'toggle))) + (setq xcb:debug-on (if (eq arg 'toggle) + (not xcb:debug-on) + (> 0 arg)))) + (defmacro xcb:-log (&optional format-string &rest objects) "Emit a message prepending the name of the function being executed.