From 12a3c28c787e23801f40ea557a5c00b538968a52 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 2 Oct 2009 00:02:02 +0000 Subject: [PATCH] * image-mode.el (image-toggle-display): * emacs-lisp/elp.el (elp-instrument-function): * emacs-lisp/advice.el (ad-make-advised-definition): * emacs-lisp/easy-mmode.el (define-minor-mode): * net/browse-url.el (browse-url-maybe-new-window): * progmodes/sh-script.el (sh-learn-buffer-indent): Pass new argument 'any to `called-interactively-p'. --- lisp/ChangeLog | 10 ++++++++++ lisp/emacs-lisp/advice.el | 2 +- lisp/emacs-lisp/easy-mmode.el | 2 +- lisp/emacs-lisp/elp.el | 2 +- lisp/image-mode.el | 4 ++-- lisp/net/browse-url.el | 2 +- lisp/progmodes/sh-script.el | 2 +- 7 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ae14be4b980..741ac123d28 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2009-10-02 Juanma Barranquero + + * image-mode.el (image-toggle-display): + * emacs-lisp/elp.el (elp-instrument-function): + * emacs-lisp/advice.el (ad-make-advised-definition): + * emacs-lisp/easy-mmode.el (define-minor-mode): + * net/browse-url.el (browse-url-maybe-new-window): + * progmodes/sh-script.el (sh-learn-buffer-indent): + Pass new argument 'any to `called-interactively-p'. + 2009-10-01 Juanma Barranquero * international/uni-bidi.el: diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 8342f14ec5b..8979f9dfa10 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -3087,7 +3087,7 @@ in any of these classes." (not advised-interactive-form)) ;; Check whether we were called interactively ;; in order to do proper prompting: - `(if (called-interactively-p) + `(if (called-interactively-p 'any) (call-interactively ',origname) ,(ad-make-mapped-call advised-arglist orig-arglist diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 12458f3a6b9..def270cbc6d 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -234,7 +234,7 @@ With zero or negative ARG turn mode off. ,@body ;; The on/off hooks are here for backward compatibility only. (run-hooks ',hook (if ,mode ',hook-on ',hook-off)) - (if (called-interactively-p) + (if (called-interactively-p 'any) (progn ,(if globalp `(customize-mark-as-set ',mode)) ;; Avoid overwriting a message shown by the body, diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 5fede8243c0..1664a769835 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -269,7 +269,7 @@ FUNSYM must be a symbol of a defined function." (setq newguts (append newguts `((elp-wrapper (quote ,funsym) ,(when (commandp funsym) - '(called-interactively-p)) + '(called-interactively-p 'any)) args)))) ;; to record profiling times, we set the symbol's function ;; definition so that it runs the elp-wrapper function with the diff --git a/lisp/image-mode.el b/lisp/image-mode.el index b7516522670..2da94d0bba5 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -429,7 +429,7 @@ and showing the image as an image." (setq image-type "text") (if (eq major-mode 'image-mode) (setq mode-name "Image[text]")) - (if (called-interactively-p) + (if (called-interactively-p 'any) (message "Repeat this command to go back to displaying the image"))) ;; Turn the image data into a real image, but only if the whole file ;; was inserted @@ -472,7 +472,7 @@ and showing the image as an image." (setq image-type type) (if (eq major-mode 'image-mode) (setq mode-name (format "Image[%s]" type))) - (if (called-interactively-p) + (if (called-interactively-p 'any) (message "Repeat this command to go back to displaying the file as text"))))) ;;; Support for bookmark.el diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 6f180341f36..a0813a052d8 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -669,7 +669,7 @@ for use in `interactive'." ;; this macro. We use that rather than interactive-p because ;; use in a keyboard macro should not change this behavior. (defmacro browse-url-maybe-new-window (arg) - `(if (or noninteractive (not (called-interactively-p))) + `(if (or noninteractive (not (called-interactively-p 'any))) ,arg browse-url-new-window-flag)) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 1adea78c2f5..47eec4ee13f 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -3210,7 +3210,7 @@ This command can often take a long time to run." ))) ;; Are abnormal hooks considered bad form? (run-hook-with-args 'sh-learned-buffer-hook learned-var-list) - (and (called-interactively-p) + (and (called-interactively-p 'any) (or sh-popup-occur-buffer (> num-diffs 0)) (pop-to-buffer out-buffer))))) -- 2.11.4.GIT