Function: ad-disable-regexp

ad-disable-regexp is an interactive and byte-compiled function defined in advice.el.gz.

Signature

(ad-disable-regexp REGEXP)

Documentation

Disable all advices with names that contain a match for REGEXP.

All currently advised functions will be considered.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/advice.el.gz
(defun ad-disable-regexp (regexp)
  "Disable all advices with names that contain a match for REGEXP.
All currently advised functions will be considered."
  (interactive
   (list (ad-read-regexp "Disable advices via regexp")))
  (let ((matched-advices (ad-enable-regexp-internal regexp 'any nil)))
    (if (called-interactively-p 'interactive)
	(message "%d matching advices disabled" matched-advices))
    matched-advices))