diff lisp/emacs-lisp/advice.el @ 105372:bd2966850aac

Use `called-interactively-p' instead of `interactive-p'.
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 02 Oct 2009 03:48:36 +0000
parents 0769a73f1d18
children 1d1d5d9bd884
line wrap: on
line diff
--- a/lisp/emacs-lisp/advice.el	Fri Oct 02 00:02:02 2009 +0000
+++ b/lisp/emacs-lisp/advice.el	Fri Oct 02 03:48:36 2009 +0000
@@ -218,7 +218,7 @@
 ;;  "Make `car' an interactive function."
 ;;   (interactive "xCar of list: ")
 ;;   ad-do-it
-;;   (if (interactive-p)
+;;   (if (called-interactively-p 'interactive)
 ;;       (message "%s" ad-return-value)))
 
 
@@ -2390,7 +2390,7 @@
   (interactive
    (list (ad-read-regexp "Enable advices via regexp")))
   (let ((matched-advices (ad-enable-regexp-internal regexp 'any t)))
-    (if (interactive-p)
+    (if (called-interactively-p 'interactive)
 	(message "%d matching advices enabled" matched-advices))
     matched-advices))
 
@@ -2400,7 +2400,7 @@
   (interactive
    (list (ad-read-regexp "Disable advices via regexp")))
   (let ((matched-advices (ad-enable-regexp-internal regexp 'any nil)))
-    (if (interactive-p)
+    (if (called-interactively-p 'interactive)
 	(message "%d matching advices disabled" matched-advices))
     matched-advices))