Commits

Anonymous committed 8cf7e0a

* misc.el (toggle-debug-on-error): New
* misc.el (toggle-debug-on-signal): New
* misc.el (toggle-debug-on-quit): New
Bjorn's patch "toggle-debug.* convenience functions",
<ydy3dhp11db.fsf@pip.hpc2n.umu.se>

Comments (0)

Files changed (2)

+2000-10-15  Björn Torkelsson  <torkel@hpc2n.umu.se>
+
+	* misc.el (toggle-debug-on-error): New
+	* misc.el (toggle-debug-on-signal): New
+	* misc.el (toggle-debug-on-quit): New
+
 2000-10-24  Didier Verna  <didier@xemacs.org>
 
 	* add-log.el (patch-to-change-log): new cl keywords
       (set-buffer standard-output)
       (help-mode))))
 
+;;; convenience functions for turning on and off debug-on varibles
+
+;;;###autoload
+(defun toggle-debug-on-error (&optional arg)
+  "Toggle the status of debug-on-error.
+With arg, set debug-on-error iff arg is positive."
+  (interactive "_P")
+  (setq debug-on-error
+        (if (null arg)
+            (not debug-on-error)
+	  (> (prefix-numeric-value arg) 0))))
+
+;;;###autoload
+(defun toggle-debug-on-signal (&optional arg)
+  "Toggle the status of debug-on-signal.
+With arg, set debug-on-signal iff arg is positive."
+  (interactive "_P")
+  (setq debug-on-signal
+        (if (null arg)
+            (not debug-on-signal)
+	  (> (prefix-numeric-value arg) 0))))
+
+;;;###autoload
+(defun toggle-debug-on-quit (&optional arg)
+  "Toggle the status of debug-on-quit.
+With arg, set debug-on-quit iff arg is positive."
+  (interactive "_P")
+  (setq debug-on-quit
+        (if (null arg)
+            (not debug-on-quit)
+	  (> (prefix-numeric-value arg) 0))))
+
 (provide 'debug)
 
 ;;; debug.el ends here