Function: cancel-debug-on-variable-change

cancel-debug-on-variable-change is an autoloaded, interactive and byte-compiled function defined in debug.el.gz.

Signature

(cancel-debug-on-variable-change &optional VARIABLE)

Documentation

Undo effect of M-x debug-on-variable-change (debug-on-variable-change) on VARIABLE.

If VARIABLE is nil, cancel debug-on-variable-change for all variables. When called interactively, prompt for VARIABLE in the minibuffer. To specify a nil argument interactively, exit with an empty minibuffer.

Key Bindings

Aliases

cancel-debug-watch

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/debug.el.gz
;;;###autoload
(defun cancel-debug-on-variable-change (&optional variable)
  "Undo effect of \\[debug-on-variable-change] on VARIABLE.
If VARIABLE is nil, cancel `debug-on-variable-change' for all variables.
When called interactively, prompt for VARIABLE in the minibuffer.
To specify a nil argument interactively, exit with an empty minibuffer."
  (interactive
   (list (let ((name
                (completing-read
                 "Cancel debug on set for variable (default all variables): "
                 (mapcar #'symbol-name (debug--variable-list)) nil t)))
           (when name
             (unless (string= name "")
               (intern name))))))
  (if variable
      (remove-variable-watcher variable #'debug--implement-debug-watch)
    (message "Canceling debug-watch for all variables")
    (mapc #'cancel-debug-watch (debug--variable-list))))