emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/xelb 501a95d 5/7: Command for toggling debugging output


From: Chris Feng
Subject: [elpa] externals/xelb 501a95d 5/7: Command for toggling debugging output
Date: Sun, 9 Sep 2018 06:39:56 -0400 (EDT)

branch: externals/xelb
commit 501a95d8068f2af1d4e5b521211be4c3c42bdd63
Author: Adrián Medraño Calvo <address@hidden>
Commit: Adrián Medraño Calvo <address@hidden>

    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.
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]