From 32226619c5e563c384372b566000e5d37d783a61 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 2 Oct 2009 03:48:36 +0000 Subject: [PATCH] Use `called-interactively-p' instead of `interactive-p'. --- lisp/ChangeLog | 122 ++++++++++++++++++++++++++++++++++++++++ lisp/allout.el | 24 ++++---- lisp/apropos.el | 3 +- lisp/bookmark.el | 4 +- lisp/calendar/timeclock.el | 15 ++--- lisp/calendar/todo-mode.el | 2 +- lisp/comint.el | 5 +- lisp/completion.el | 4 +- lisp/descr-text.el | 5 +- lisp/desktop.el | 2 +- lisp/dired-x.el | 4 +- lisp/dired.el | 4 +- lisp/ediff.el | 2 +- lisp/elide-head.el | 4 +- lisp/emacs-lisp/advice.el | 6 +- lisp/emacs-lisp/autoload.el | 2 +- lisp/emacs-lisp/checkdoc.el | 19 ++++--- lisp/emacs-lisp/debug.el | 3 +- lisp/emacs-lisp/easy-mmode.el | 2 +- lisp/emacs-lisp/eieio-opt.el | 5 +- lisp/emacs-lisp/lisp-mnt.el | 2 +- lisp/emacs-lisp/shadow.el | 2 +- lisp/emerge.el | 2 +- lisp/emulation/cua-base.el | 2 +- lisp/emulation/edt.el | 2 +- lisp/emulation/tpu-edt.el | 12 ++-- lisp/emulation/tpu-extras.el | 2 +- lisp/emulation/viper-cmd.el | 6 +- lisp/emulation/viper.el | 3 +- lisp/env.el | 2 +- lisp/eshell/esh-mode.el | 4 +- lisp/face-remap.el | 3 +- lisp/faces.el | 3 +- lisp/ffap.el | 8 +-- lisp/files.el | 5 +- lisp/font-lock.el | 3 +- lisp/help-fns.el | 11 ++-- lisp/help.el | 11 ++-- lisp/hexl.el | 2 +- lisp/hi-lock.el | 4 +- lisp/info.el | 2 +- lisp/international/mule-cmds.el | 8 +-- lisp/international/mule-diag.el | 17 ++++-- lisp/log-edit.el | 6 +- lisp/mail/sendmail.el | 2 +- lisp/menu-bar.el | 2 +- lisp/mouse.el | 3 +- lisp/net/ange-ftp.el | 2 +- lisp/net/browse-url.el | 2 +- lisp/net/eudc.el | 7 ++- lisp/net/quickurl.el | 4 +- lisp/net/rcirc.el | 4 +- lisp/net/xesam.el | 2 +- lisp/newcomment.el | 4 +- lisp/pgg.el | 30 +++++----- lisp/play/5x5.el | 3 +- lisp/play/yow.el | 2 +- lisp/progmodes/ada-mode.el | 2 +- lisp/progmodes/f90.el | 11 ++-- lisp/progmodes/fortran.el | 4 +- lisp/progmodes/js.el | 6 +- lisp/progmodes/python.el | 5 +- lisp/recentf.el | 2 +- lisp/savehist.el | 4 +- lisp/shadowfile.el | 2 +- lisp/simple.el | 10 ++-- lisp/strokes.el | 8 +-- lisp/term/ns-win.el | 2 +- lisp/textmodes/bibtex.el | 8 ++- lisp/textmodes/flyspell.el | 2 +- lisp/textmodes/page-ext.el | 8 +-- lisp/textmodes/table.el | 22 ++++---- lisp/textmodes/tex-mode.el | 2 +- lisp/textmodes/texinfmt.el | 5 +- lisp/time.el | 4 +- lisp/tutorial.el | 4 +- lisp/type-break.el | 12 ++-- lisp/vc.el | 9 ++- lisp/version.el | 4 +- lisp/vt-control.el | 11 ++-- lisp/winner.el | 6 +- 81 files changed, 375 insertions(+), 204 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 741ac123d28..54929a6c0ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,127 @@ 2009-10-02 Juanma Barranquero + * allout.el (allout-init, allout-back-to-current-heading) + (allout-beginning-of-current-entry, allout-ascend-to-depth) + (allout-ascend, allout-up-current-level, allout-end-of-level) + (allout-previous-visible-heading, allout-forward-current-level) + (allout-backward-current-level, allout-show-children): + * apropos.el (apropos-describe-plist): + * bookmark.el (bookmark-maybe-historicize-string, bookmark-bmenu-list): + * comint.el (comint-strip-ctrl-m, comint-goto-process-mark): + * completion.el (add-completion, add-permanent-completion): + * descr-text.el (describe-text-category, describe-char): + * desktop.el (desktop-lazy-abort): + * dired-x.el (dired-omit-expunge, dired-x-bind-find-file): + * dired.el (dired-build-subdir-alist): + * ediff.el (ediff-version): + * elide-head.el (elide-head, elide-head-show): + * emerge.el (emerge-version): + * env.el (getenv): + * face-remap.el (variable-pitch-mode): + * faces.el (describe-face): + * ffap.el (ffap-next-url, find-file-at-point, ffap-at-mouse) + (dired-at-point): + * files.el (find-file-existing, auto-save-mode): + * font-lock.el (font-lock-fontify-buffer): + * help-fns.el (describe-function, describe-variable) + (describe-syntax, describe-categories): + * help.el (view-lossage, describe-bindings, describe-key) + (describe-mode): + * hexl.el (hexl-current-address): + * hi-lock.el (hi-lock-mode, hi-lock-find-patterns): + * info.el (Info-goto-emacs-key-command-node): + * log-edit.el (log-edit-insert-cvs-template) + (log-edit-insert-cvs-rcstemplate): + * menu-bar.el (menu-bar-mode): + * mouse.el (mouse-appearance-menu): + * newcomment.el (comment-indent-new-line): + * pgg.el (pgg-save-coding-system, pgg-encrypt-region) + (pgg-encrypt-symmetric-region, pgg-encrypt-symmetric) + (pgg-encrypt, pgg-decrypt-region, pgg-decrypt, ) + (pgg-sign-region, pgg-sign, pgg-verify-region, pgg-verify): + * recentf.el (recentf-mode): + * savehist.el (savehist-mode, savehist-save): + * shadowfile.el (shadow-copy-files): + * simple.el (kill-ring-save, next-line, previous-line) + (normal-erase-is-backspace-mode): + * strokes.el (strokes-update-window-configuration) + (strokes-load-user-strokes, strokes-prompt-user-save-strokes) + (strokes-xpm-for-stroke): + * time.el (emacs-uptime, emacs-init-time): + * tutorial.el (tutorial--describe-nonstandard-key) + (tutorial--detailed-help): + * type-break.el (type-break-mode) + (type-break-mode-line-message-mode, type-break-query-mode) + (type-break-guesstimate-keystroke-threshold): + * vc.el (vc-version-diff, vc-diff, vc-root-diff): + * version.el (emacs-version): + * vt-control.el (vt-keypad-on, vt-keypad-off, vt-numlock): + * winner.el (winner-mode): + * calendar/timeclock.el (timeclock-in, timeclock-out) + (timeclock-status-string, timeclock-change) + (timeclock-workday-remaining-string) + (timeclock-workday-elapsed-string) + (timeclock-when-to-leave-string): + * calendar/todo-mode.el (todo-add-category): + * emacs-lisp/advice.el (ad-enable-regexp, ad-disable-regexp): + * emacs-lisp/autoload.el (update-file-autoloads): + * emacs-lisp/checkdoc.el (checkdoc-current-buffer) + (checkdoc-start, checkdoc-continue, checkdoc-rogue-spaces) + (checkdoc-message-text, checkdoc-defun): + * emacs-lisp/debug.el (debugger-list-functions): + * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): + * emacs-lisp/eieio-opt.el (eieio-describe-class) + (eieio-describe-generic): + * emacs-lisp/lisp-mnt.el (lm-synopsis): + * emacs-lisp/shadow.el (list-load-path-shadows): + * emulation/cua-base.el (cua-mode): + * emulation/edt.el (edt-set-scroll-margins): + * emulation/tpu-edt.el (tpu-toggle-newline-and-indent) + (tpu-toggle-regexp, tpu-toggle-search-direction) + (tpu-toggle-rectangle, tpu-toggle-control-keys): + * emulation/tpu-extras.el (tpu-set-scroll-margins): + * emulation/viper-cmd.el (viper-set-searchstyle-toggling-macros) + (viper-set-parsing-style-toggling-macro) + (viper-set-emacs-state-searchstyle-macros): + * emulation/viper.el (viper-set-hooks): + * eshell/esh-mode.el (eshell-truncate-buffer): + * international/mule-cmds.el (prefer-coding-system) + (describe-input-method, describe-language-environment): + * international/mule-diag.el (list-character-sets) + (describe-character-set, describe-coding-system) + (describe-fontset, list-fontsets, list-input-methods): + * mail/sendmail.el (mail-signature): + * net/ange-ftp.el (ange-ftp-copy-file): + * net/browse-url.el (browse-url): + * net/eudc.el (eudc-set-server, eudc-get-attribute-list): + * net/quickurl.el (quickurl-add-url): + * net/rcirc.el (names, topic): + * net/xesam.el (xesam-mode): + * play/5x5.el (5x5-new-game): + * play/yow.el (apropos-zippy): + * progmodes/ada-mode.el (ada-mode-version): + * progmodes/f90.el (f90-beginning-of-subprogram, f90-end-of-subprogram) + (f90-end-of-block) + (f90-beginning-of-block): + * progmodes/fortran.el (fortran-end-of-block) + (fortran-beginning-of-block): + * progmodes/js.el (js-syntactic-context, js-gc, js-eval): + * progmodes/python.el (python-describe-symbol, python-shell): + * term/ns-win.el (ns-print-buffer): + * textmodes/bibtex.el (bibtex-end-of-entry, bibtex-url): + * textmodes/flyspell.el (flyspell-mode-on): + * textmodes/page-ext.el (set-page-delimiter, pages-directory) + (pages-directory-for-addresses): + * textmodes/table.el (table-recognize-cell) + (table-query-dimension, table-generate-source) + (table-insert-sequence, table--warn-incompatibility): + * textmodes/tex-mode.el (tex-validate-buffer): + * textmodes/texinfmt.el (texinfmt-version) + (texinfo-format-buffer): + Use `called-interactively-p' instead of `interactive-p'. + +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): diff --git a/lisp/allout.el b/lisp/allout.el index bead3bde7f7..46ecfed96da 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -1590,7 +1590,7 @@ the following two lines in your Emacs init file: \(allout-init t)" (interactive) - (if (interactive-p) + (if (called-interactively-p 'interactive) (progn (setq mode (completing-read @@ -1614,7 +1614,7 @@ the following two lines in your Emacs init file: (cond ((not mode) (set find-file-hook-var-name (delq hook (symbol-value find-file-hook-var-name))) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Allout outline mode auto-activation inhibited."))) ((eq mode 'report) (if (not (memq hook (symbol-value find-file-hook-var-name))) @@ -2901,7 +2901,7 @@ of (before any) topics, in which case we return nil." (let ((bol-point (point))) (if (allout-goto-prefix-doublechecked) (if (<= (point) bol-point) - (if (interactive-p) + (if (called-interactively-p 'interactive) (allout-end-of-prefix) (point)) (goto-char (point-min)) @@ -2968,7 +2968,7 @@ If already there, move cursor to bullet for hot-spot operation. (goto-char allout-recent-prefix-end) (goto-char (point-min))) (allout-end-of-prefix) - (if (and (interactive-p) + (if (and (called-interactively-p 'interactive) (= (point) start-point)) (goto-char (allout-current-bullet-pos))))) ;;;_ > allout-end-of-entry (&optional inclusive) @@ -3018,7 +3018,7 @@ collapsed." (while (and (< depth allout-recent-depth) (setq last-ascended (allout-ascend)))) (goto-char allout-recent-prefix-beginning) - (if (interactive-p) (allout-end-of-prefix)) + (if (called-interactively-p 'interactive) (allout-end-of-prefix)) (and last-ascended allout-recent-depth)))) ;;;_ > allout-ascend () (defun allout-ascend (&optional dont-move-if-unsuccessful) @@ -3046,7 +3046,7 @@ which case point is returned to its original starting location." (goto-char bolevel) (allout-depth) nil)))) - (if (interactive-p) (allout-end-of-prefix)))) + (if (called-interactively-p 'interactive) (allout-end-of-prefix)))) ;;;_ > allout-descend-to-depth (depth) (defun allout-descend-to-depth (depth) "Descend to depth DEPTH within current topic. @@ -3074,7 +3074,7 @@ Returning depth if successful, nil if not." (if (not (allout-ascend)) (progn (goto-char start-point) (error "Can't ascend past outermost level")) - (if (interactive-p) (allout-end-of-prefix)) + (if (called-interactively-p 'interactive) (allout-end-of-prefix)) allout-recent-prefix-beginning))) ;;;_ - Linear @@ -3219,7 +3219,7 @@ Presumes point is at the start of a topic prefix." (let ((depth (allout-depth))) (while (allout-previous-sibling depth nil)) (prog1 allout-recent-depth - (if (interactive-p) (allout-end-of-prefix))))) + (if (called-interactively-p 'interactive) (allout-end-of-prefix))))) ;;;_ > allout-next-visible-heading (arg) (defun allout-next-visible-heading (arg) "Move to the next ARG'th visible heading line, backward if arg is negative. @@ -3272,7 +3272,7 @@ A heading line is one that starts with a `*' (or that `allout-regexp' matches)." (interactive "p") (prog1 (allout-next-visible-heading (- arg)) - (if (interactive-p) (allout-end-of-prefix)))) + (if (called-interactively-p 'interactive) (allout-end-of-prefix)))) ;;;_ > allout-forward-current-level (arg) (defun allout-forward-current-level (arg) "Position point at the next heading of the same level. @@ -3293,7 +3293,7 @@ Returns resulting position, else nil if none found." (allout-previous-sibling) (allout-next-sibling))) (setq arg (1- arg))) - (if (not (interactive-p)) + (if (not (called-interactively-p 'interactive)) nil (allout-end-of-prefix) (if (not (zerop arg)) @@ -3306,7 +3306,7 @@ Returns resulting position, else nil if none found." (defun allout-backward-current-level (arg) "Inverse of `allout-forward-current-level'." (interactive "p") - (if (interactive-p) + (if (called-interactively-p 'interactive) (let ((current-prefix-arg (* -1 arg))) (call-interactively 'allout-forward-current-level)) (allout-forward-current-level (* -1 arg)))) @@ -4845,7 +4845,7 @@ point of non-opened subtree?)" (to-reveal (or (allout-chart-to-reveal chart chart-level) ;; interactive, show discontinuous children: (and chart - (interactive-p) + (called-interactively-p 'interactive) (save-excursion (allout-back-to-current-heading) (setq depth (allout-current-depth)) diff --git a/lisp/apropos.el b/lisp/apropos.el index f66ba95400a..45463784cbc 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -1121,7 +1121,8 @@ If non-nil TEXT is a string that will be printed as a heading." (defun apropos-describe-plist (symbol) "Display a pretty listing of SYMBOL's plist." - (help-setup-xref (list 'apropos-describe-plist symbol) (interactive-p)) + (help-setup-xref (list 'apropos-describe-plist symbol) + (called-interactively-p 'interactive)) (with-help-window (help-buffer) (set-buffer standard-output) (princ "Symbol ") diff --git a/lisp/bookmark.el b/lisp/bookmark.el index bd8511cda71..613c3e07c85 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -442,7 +442,7 @@ the empty string." We need this because sometimes bookmark functions are invoked from menus, so `completing-read' never gets a chance to set `bookmark-history'." `(or - (interactive-p) + (called-interactively-p 'interactive) (setq bookmark-history (cons ,string bookmark-history)))) (defvar bookmark-make-record-function 'bookmark-make-record-default @@ -1494,7 +1494,7 @@ The leftmost column displays a D if the bookmark is flagged for deletion, or > if it is flagged for displaying." (interactive) (bookmark-maybe-load-default-file) - (if (interactive-p) + (if (called-interactively-p 'interactive) (switch-to-buffer (get-buffer-create "*Bookmark List*")) (set-buffer (get-buffer-create "*Bookmark List*"))) (let ((inhibit-read-only t)) diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el index a1c29dd7f49..c7fbe6936a0 100644 --- a/lisp/calendar/timeclock.el +++ b/lisp/calendar/timeclock.el @@ -378,7 +378,8 @@ discover the name of the project." 60 60.0) 60)))))) (timeclock-log "i" (or project (and timeclock-get-project-function - (or find-project (interactive-p)) + (or find-project + (called-interactively-p 'interactive)) (funcall timeclock-get-project-function)))) (run-hooks 'timeclock-in-hook))) @@ -401,7 +402,7 @@ discover the reason." (if arg "O" "o") (or reason (and timeclock-get-reason-function - (or find-reason (interactive-p)) + (or find-reason (called-interactively-p 'interactive)) (funcall timeclock-get-reason-function)))) (run-hooks 'timeclock-out-hook) (if arg @@ -445,7 +446,7 @@ worked today, ignoring the time worked on previous days." (if (> remainder 0) "remaining" "over") (timeclock-when-to-leave-string show-seconds today-only))) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%s" status) status))) @@ -458,7 +459,7 @@ time of changeover. PROJECT is the name of the last project you were working on." (interactive "P") (timeclock-out arg) - (timeclock-in nil project (interactive-p))) + (timeclock-in nil project (called-interactively-p 'interactive))) ;;;###autoload (defun timeclock-query-out () @@ -516,7 +517,7 @@ See `timeclock-relative' for more information about the meaning of (let ((string (timeclock-seconds-to-string (timeclock-workday-remaining today-only) show-seconds t))) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%s" string) string))) @@ -538,7 +539,7 @@ non-nil, the amount returned will be relative to past time worked." (interactive) (let ((string (timeclock-seconds-to-string (timeclock-workday-elapsed) show-seconds))) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%s" string) string))) @@ -583,7 +584,7 @@ relative only to the time worked today, and not to past time." (if show-seconds (format-time-string "%-I:%M:%S %p" then) (format-time-string "%-I:%M %p" then)))) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%s" string) string))) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index b00c5085743..e903f1cfbb7 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -562,7 +562,7 @@ Use `todo-categories' instead.") todo-prefix todo-category-beg cat todo-category-end todo-prefix todo-category-sep)) - (if (interactive-p) + (if (called-interactively-p 'interactive) ;; properly display the newly added category (progn (setq todo-category-number 0) (todo-show)) 0)))) diff --git a/lisp/comint.el b/lisp/comint.el index cc04bd90209..4f3f1c6d207 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1899,7 +1899,8 @@ This function could be on `comint-output-filter-functions' or bound to a key." (save-excursion (condition-case nil (goto-char - (if (interactive-p) comint-last-input-end comint-last-output-start)) + (if (called-interactively-p 'interactive) + comint-last-input-end comint-last-output-start)) (error nil)) (while (re-search-forward "\r+$" pmark t) (replace-match "" t t))))) @@ -3068,7 +3069,7 @@ from input that has not yet been sent." (let ((proc (or (get-buffer-process (current-buffer)) (error "Current buffer has no process")))) (goto-char (process-mark proc)) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message "Point is now at the process mark")))) (defun comint-bol-or-process-mark () diff --git a/lisp/completion.el b/lisp/completion.el index b29a325f732..a8080ac8f5a 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -1311,7 +1311,7 @@ The completion is altered appropriately if NUM-USES and/or LAST-USE-TIME are specified." (interactive (interactive-completion-string-reader "Completion to add")) (check-completion-length string) - (let* ((current-completion-source (if (interactive-p) + (let* ((current-completion-source (if (called-interactively-p 'interactive) cmpl-source-interactive current-completion-source)) (entry (add-completion-to-head string))) @@ -1324,7 +1324,7 @@ are specified." "Add STRING if it isn't already listed, and mark it permanent." (interactive (interactive-completion-string-reader "Completion to add permanently")) - (let ((current-completion-source (if (interactive-p) + (let ((current-completion-source (if (called-interactively-p 'interactive) cmpl-source-interactive current-completion-source))) (add-completion string nil t))) diff --git a/lisp/descr-text.el b/lisp/descr-text.el index b559a1391fd..c16f8fde610 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -101,7 +101,8 @@ into help buttons that call `describe-text-category' or (defun describe-text-category (category) "Describe a text property category." (interactive "SCategory: ") - (help-setup-xref (list #'describe-text-category category) (interactive-p)) + (help-setup-xref (list #'describe-text-category category) + (called-interactively-p 'interactive)) (save-excursion (with-output-to-temp-buffer "*Help*" (set-buffer standard-output) @@ -607,7 +608,7 @@ as well as widgets, buttons, overlays, and text properties." (setq max-width (apply #'max (mapcar #'(lambda (x) (if (cadr x) (length (car x)) 0)) item-list))) - (help-setup-xref nil (interactive-p)) + (help-setup-xref nil (called-interactively-p 'interactive)) (with-help-window (help-buffer) (with-current-buffer standard-output (set-buffer-multibyte multibyte-p) diff --git a/lisp/desktop.el b/lisp/desktop.el index 29230e07cb5..01573be7dba 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1280,7 +1280,7 @@ If there are no buffers left to create, kill the timer." (setq desktop-lazy-timer nil)) (when desktop-buffer-args-list (setq desktop-buffer-args-list nil) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message "Lazy desktop load aborted")))) ;; ---------------------------------------------------------------------------- diff --git a/lisp/dired-x.el b/lisp/dired-x.el index e00cae3a80c..4da19f66c90 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -595,7 +595,7 @@ This functions works by temporarily binding `dired-marker-char' to `dired-omit-marker-char' and calling `dired-do-kill-lines'." (interactive "sOmit files (regexp): ") (if (and dired-omit-mode - (or (interactive-p) + (or (called-interactively-p 'interactive) (not dired-omit-size-limit) (< (buffer-size) dired-omit-size-limit) (progn @@ -1640,7 +1640,7 @@ Similarly for `dired-x-find-file-other-window' and `find-file-other-window'. Binding direction based on `dired-x-hands-off-my-keys'. This function is part of `after-init-hook'." (interactive) - (if (interactive-p) + (if (called-interactively-p 'interactive) (setq dired-x-hands-off-my-keys (not (y-or-n-p "Bind dired-x-find-file over find-file? ")))) (cond ((not dired-x-hands-off-my-keys) diff --git a/lisp/dired.el b/lisp/dired.el index e0843943f90..4f0c9bc3c47 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2373,7 +2373,7 @@ instead of `dired-actual-switches'." (goto-char (match-beginning 0)) (beginning-of-line) (point-marker))))) - (if (and (> count 1) (interactive-p)) + (if (and (> count 1) (called-interactively-p 'interactive)) (message "Buffer includes %d directories" count))) ;; We don't need to sort it because it is in buffer order per ;; constructionem. Return new alist: @@ -3914,7 +3914,7 @@ true then the type of the file linked to by FILE is printed instead. ;;;*** ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" -;;;;;; "1a0298749959c80c24c73b8bec5f1f74") +;;;;;; "7c58535b489f23d5503ef8219c7d1282") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ diff --git a/lisp/ediff.el b/lisp/ediff.el index 6243c040e2c..5c53d1a6688 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el @@ -1453,7 +1453,7 @@ Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'." "Return string describing the version of Ediff. When called interactively, displays the version." (interactive) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%s" (ediff-version)) (format "Ediff %s of %s" ediff-version ediff-date))) diff --git a/lisp/elide-head.el b/lisp/elide-head.el index 7c26204d793..99dcd7804d6 100644 --- a/lisp/elide-head.el +++ b/lisp/elide-head.el @@ -97,7 +97,7 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks." rest nil)))) (if rest (setq rest (cdr rest)))) (if (not (and beg end)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "No header found")) (goto-char beg) (end-of-line) @@ -114,7 +114,7 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks." (if (and (overlayp elide-head-overlay) (overlay-buffer elide-head-overlay)) (delete-overlay elide-head-overlay) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "No header hidden")))) (provide 'elide-head) diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 8979f9dfa10..4165cb5f193 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -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 @@ All currently advised functions will be considered." (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 @@ 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 (interactive-p) + (if (called-interactively-p 'interactive) (message "%d matching advices disabled" matched-advices)) matched-advices)) diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index bf00bbb4420..fc5b3081a6d 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -505,7 +505,7 @@ Return FILE if there was no autoload cookie in it, else nil." (no-autoloads (autoload-generate-file-autoloads file))) (if autoload-modified-buffers (if save-after (autoload-save-buffers)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Autoload section for %s is up to date." file))) (if no-autoloads file))) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index b49638b8229..226ee17ce51 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -853,7 +853,8 @@ With a prefix argument (in Lisp, the argument TAKE-NOTES), store all errors found in a warnings buffer, otherwise stop after the first error." (interactive "P") - (if (interactive-p) (message "Checking buffer for style...")) + (if (called-interactively-p 'interactive) + (message "Checking buffer for style...")) ;; Assign a flag to spellcheck flag (let ((checkdoc-spellcheck-documentation-flag (car (memq checkdoc-spellcheck-documentation-flag @@ -870,7 +871,7 @@ otherwise stop after the first error." (checkdoc-start) (checkdoc-message-text) (checkdoc-rogue-spaces) - (not (interactive-p)) + (not (called-interactively-p 'interactive)) (if take-notes (checkdoc-show-diagnostics)) (message "Checking buffer for style...Done.")))) @@ -884,7 +885,7 @@ a separate buffer." (interactive "P") (let ((p (point))) (goto-char (point-min)) - (if (and take-notes (interactive-p)) + (if (and take-notes (called-interactively-p 'interactive)) (checkdoc-start-section "checkdoc-start")) (checkdoc-continue take-notes) ;; Go back since we can't be here without success above. @@ -920,7 +921,7 @@ is the starting location. If this is nil, `point-min' is used instead." (if (not take-notes) (error "%s" (checkdoc-error-text msg))))) (checkdoc-show-diagnostics) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "No style warnings.")))) (defun checkdoc-next-docstring () @@ -968,7 +969,7 @@ Optional argument INTERACT permits more interactive fixing." (e (checkdoc-rogue-space-check-engine nil nil interact)) (checkdoc-generate-compile-warnings-flag (or take-notes checkdoc-generate-compile-warnings-flag))) - (if (not (interactive-p)) + (if (not (called-interactively-p 'interactive)) e (if e (message "%s" (checkdoc-error-text e)) @@ -986,13 +987,14 @@ Optional argument TAKE-NOTES causes all errors to be logged." (checkdoc-generate-compile-warnings-flag (or take-notes checkdoc-generate-compile-warnings-flag))) (setq e (checkdoc-message-text-search)) - (if (not (interactive-p)) + (if (not (called-interactively-p 'interactive)) e (if e (error "%s" (checkdoc-error-text e)) (checkdoc-show-diagnostics))) (goto-char p)) - (if (interactive-p) (message "Checking interactive message text...done."))) + (if (called-interactively-p 'interactive) + (message "Checking interactive message text...done."))) ;;;###autoload (defun checkdoc-eval-defun () @@ -1041,7 +1043,8 @@ space at the end of each line." (if msg (if no-error (message "%s" (checkdoc-error-text msg)) (error "%s" (checkdoc-error-text msg)))))) - (if (interactive-p) (message "Checkdoc: done.")))))) + (if (called-interactively-p 'interactive) + (message "Checkdoc: done.")))))) ;;; Ispell interface for forcing a spell check ;; diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index baad2559e0c..59c37a5f3d5 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -873,7 +873,8 @@ To specify a nil argument interactively, exit with an empty minibuffer." "Display a list of all the functions now set to debug on entry." (interactive) (require 'help-mode) - (help-setup-xref '(debugger-list-functions) (interactive-p)) + (help-setup-xref '(debugger-list-functions) + (called-interactively-p 'interactive)) (with-output-to-temp-buffer (help-buffer) (with-current-buffer standard-output (if (null debug-function-list) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index def270cbc6d..b667d39ea17 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -533,7 +533,7 @@ BODY is executed after moving to the destination location." (error "No next %s" ,name)) (goto-char (match-beginning 0)) (when (and (eq (current-buffer) (window-buffer (selected-window))) - (interactive-p)) + (called-interactively-p 'interactive)) (let ((endpt (or (save-excursion ,(if endfun `(,endfun) `(re-search-forward ,re nil t 2))) diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index 12fd666f415..b2359f74a17 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -80,7 +80,7 @@ Optional HEADERFCN should be called to insert a few bits of info first." (interactive (list (eieio-read-class "Class: "))) (with-output-to-temp-buffer (help-buffer) ;"*Help*" (help-setup-xref (list #'eieio-describe-class class headerfcn) - (interactive-p)) + (called-interactively-p 'interactive)) (when headerfcn (funcall headerfcn)) @@ -312,7 +312,8 @@ Also extracts information about all methods specific to this generic." (if (not (generic-p generic)) (signal 'wrong-type-argument '(generic-p generic))) (with-output-to-temp-buffer (help-buffer) ; "*Help*" - (help-setup-xref (list #'eieio-describe-generic generic) (interactive-p)) + (help-setup-xref (list #'eieio-describe-generic generic) + (called-interactively-p 'interactive)) (prin1 generic) (princ " is a generic function") diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 6b6c74be786..a748835d477 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -583,7 +583,7 @@ which do not include a recognizable synopsis." (let ((must-kill (and file (not (get-file-buffer file))))) (when file (find-file file)) (prog1 - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%s" (lm-summary)) (lm-summary)) (when must-kill (kill-buffer (current-buffer)))))))) diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 62feb15939d..d86718884f3 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -241,7 +241,7 @@ function, `find-emacs-lisp-shadows'." (setq shadows (cdr (cdr shadows)))) (if stringp (buffer-string) - (if (interactive-p) + (if (called-interactively-p 'interactive) (save-excursion ;; We are interactive. ;; Create the *Shadows* buffer and display shadowings there. diff --git a/lisp/emerge.el b/lisp/emerge.el index 447c5d8de99..21921e352c6 100644 --- a/lisp/emerge.el +++ b/lisp/emerge.el @@ -94,7 +94,7 @@ but can be invoked directly in `fast' mode.") "Return string describing the version of Emerge. When called interactively, displays the version." (interactive) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Emerge version %s" emacs-version) emacs-version)) diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index a99a3f76250..df91d53db81 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -1599,7 +1599,7 @@ shifted movement key, set `cua-highlight-region-shift-only'." (if (nth 2 cua--saved-state) (pc-selection-mode 1)) (setq shift-select-mode (nth 3 cua--saved-state)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "CUA mode disabled.%s%s%s%s" (if (nth 1 cua--saved-state) " Delete-Selection" "") (if (and (nth 1 cua--saved-state) (nth 2 cua--saved-state)) " and" "") diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 68ffea55e80..a11e06130a5 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -1272,7 +1272,7 @@ Argument BOTTOM is the bottom margin in number of lines or percent of window." (/ (1- (+ (* (string-to-number bottom) 100) (window-height))) (window-height))))) ;; report scroll margin settings if running interactively - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Scroll margins set. Top = %s%%, Bottom = %s%%" edt-top-scroll-margin edt-bottom-scroll-margin))) diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index c0fca58a5a8..a069679108c 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el @@ -884,7 +884,7 @@ With argument, fill and justify." (setq tpu-newline-and-indent-p t) (tpu-local-set-key "\C-m" 'newline-and-indent))) (tpu-update-mode-line) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Carriage return inserts a newline%s" (if tpu-newline-and-indent-p " and indents." ".")))) @@ -1305,7 +1305,7 @@ kill modified buffers without asking." (interactive) (setq tpu-regexp-p (not tpu-regexp-p)) (tpu-set-search) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Regular expression search and substitute %sabled." (if tpu-regexp-p "en" "dis")))) @@ -1450,7 +1450,7 @@ Used for reversing a search in progress." (interactive) (setq tpu-searching-forward (not tpu-searching-forward)) (tpu-set-search t) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Searching %sward." (if tpu-searching-forward "for" "back")))) @@ -1501,7 +1501,7 @@ Used for reversing a search in progress." (setq tpu-rectangular-p (not tpu-rectangular-p)) (setq tpu-rectangle-string (if tpu-rectangular-p " Rect" "")) (tpu-update-mode-line) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Rectangular cut and paste %sabled." (if tpu-rectangular-p "en" "dis")))) @@ -2273,7 +2273,7 @@ Accepts a prefix argument for the number of tpu-pan-columns to scroll." "Toggle control key bindings between TPU-edt and Emacs." (interactive) (tpu-reset-control-keys (not tpu-control-keys)) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Control keys function with %s bindings." (if tpu-control-keys "TPU-edt" "Emacs")))) @@ -2438,7 +2438,7 @@ If FILE is nil, try to load a default file. The default file names are ;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins -;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "a7e10e36bed23a02f05ec5a69ae8569a") +;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "54d496981b1b831be427cbe3521e01d1") ;;; Generated autoloads from tpu-extras.el (autoload 'tpu-cursor-free-mode "tpu-extras" "\ diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el index e8b2fec3ad3..6d0823ceb75 100644 --- a/lisp/emulation/tpu-extras.el +++ b/lisp/emulation/tpu-extras.el @@ -436,7 +436,7 @@ A repeat count means scroll that many sections." (ad-enable-advice f 'around 'tpu-respect-bottom-scroll-margin) (ad-activate f)) ;; report scroll margin settings if running interactively - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Scroll margins set. Top = %s%%, Bottom = %s%%" tpu-top-scroll-margin tpu-bottom-scroll-margin))) diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 83f268aa7ed..53a4517b476 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -3773,7 +3773,7 @@ If MAJOR-MODE is set, set the macros only in that major mode." "///" 'vi-state [2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] scope) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "// and /// now toggle case-sensitivity and regexp search"))) (viper-unrecord-kbd-macro "//" 'vi-state) @@ -3796,7 +3796,7 @@ With a prefix argument, unsets the macro." "%%%" 'vi-state [(meta x) v i p e r - t o g g l e - p a r s e - s e x p - i g n o r e - c o m m e n t s return] 't) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%%%%%% now toggles whether comments should be parsed for matching parentheses"))) (viper-unrecord-kbd-macro "%%%" 'vi-state)))) @@ -3825,7 +3825,7 @@ the macros are set in the current major mode. "///" 'emacs-state [2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] (or arg-majormode major-mode)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "// and /// now toggle case-sensitivity and regexp search."))) (viper-unrecord-kbd-macro "//" 'emacs-state) diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 2d65f5c4a06..a179e163933 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -897,7 +897,8 @@ It also can't undo some Viper settings." (defadvice self-insert-command (around viper-self-insert-ad activate) "Ignore all self-inserting keys in the vi-state." - (if (and (eq viper-current-state 'vi-state) (interactive-p)) + (if (and (eq viper-current-state 'vi-state) + (called-interactively-p 'interactive)) (beep 1) ad-do-it )) diff --git a/lisp/env.el b/lisp/env.el index 33d5545edae..f7efe2059d5 100644 --- a/lisp/env.el +++ b/lisp/env.el @@ -203,7 +203,7 @@ in the environment list of the selected frame." (frame-parameters frame)))))) (if (and enable-multibyte-characters value) (setq value (decode-coding-string value locale-coding-system))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message "%s" (if value value "Not set"))) value)) diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index bdb5fd3179c..0fa6347edee 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -999,10 +999,10 @@ a key." (beginning-of-line) (let ((pos (point))) (if (bobp) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Buffer too short to truncate")) (delete-region (point-min) (point)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Truncated buffer from %d to %d lines (%.1fk freed)" lines eshell-buffer-maximum-lines (/ pos 1024.0)))))))) diff --git a/lisp/face-remap.el b/lisp/face-remap.el index c899a8d3f8f..896656ff842 100644 --- a/lisp/face-remap.el +++ b/lisp/face-remap.el @@ -417,7 +417,8 @@ may be more appropriate." An interface to `buffer-face-mode' which uses the `variable-pitch' face. Besides the choice of face, it is the same as `buffer-face-mode'." (interactive (list (or current-prefix-arg 'toggle))) - (buffer-face-mode-invoke 'variable-pitch arg (interactive-p))) + (buffer-face-mode-invoke 'variable-pitch arg + (called-interactively-p 'interactive))) (provide 'face-remap) diff --git a/lisp/faces.el b/lisp/faces.el index 4d0e1211ada..3bcd76b5c03 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1348,7 +1348,8 @@ If FRAME is omitted or nil, use the selected frame." (:inherit . "Inherit"))) (max-width (apply #'max (mapcar #'(lambda (x) (length (cdr x))) attrs)))) - (help-setup-xref (list #'describe-face face) (interactive-p)) + (help-setup-xref (list #'describe-face face) + (called-interactively-p 'interactive)) (unless face (setq face 'default)) (if (not (listp face)) diff --git a/lisp/ffap.el b/lisp/ffap.el index 3eb21a53666..939b287c528 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -360,7 +360,7 @@ Actual search is done by `ffap-next-guess'." "Like `ffap-next', but search with `ffap-url-regexp'." (interactive) (let ((ffap-next-regexp ffap-url-regexp)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (call-interactively 'ffap-next) (ffap-next back wrap)))) @@ -1416,7 +1416,7 @@ If `ffap-require-prefix' is set, the prefix meaning is reversed. See also the variables `ffap-dired-wildcards', `ffap-newfile-prompt', and the functions `ffap-file-at-point' and `ffap-url-at-point'." (interactive) - (if (and (interactive-p) + (if (and (called-interactively-p 'interactive) (if ffap-require-prefix (not current-prefix-arg) current-prefix-arg)) ;; Do exactly the ffap-file-finder command, even the prompting: @@ -1624,7 +1624,7 @@ Return value: (find-file-at-point guess) guess) ; success: return non-nil (ffap-highlight t))) - ((interactive-p) + ((called-interactively-p 'interactive) (if ffap-at-mouse-fallback (call-interactively ffap-at-mouse-fallback) (message "No file or url found at mouse click.") @@ -1780,7 +1780,7 @@ ffap most of the time." (defun dired-at-point (&optional filename) "Start Dired, defaulting to file at point. See `ffap'." (interactive) - (if (and (interactive-p) + (if (and (called-interactively-p 'interactive) (if dired-at-point-require-prefix (not current-prefix-arg) current-prefix-arg)) diff --git a/lisp/files.el b/lisp/files.el index 61de4cb1704..ac058efde08 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1382,7 +1382,8 @@ expand wildcards (if any) and visit multiple files." Like \\[find-file], but only allow a file that exists, and do not allow file names with wildcards." (interactive (nbutlast (find-file-read-args "Find existing file: " t))) - (if (and (not (interactive-p)) (not (file-exists-p filename))) + (if (and (not (called-interactively-p 'interactive)) + (not (file-exists-p filename))) (error "%s does not exist" filename) (find-file filename) (current-buffer))) @@ -5067,7 +5068,7 @@ With prefix argument ARG, turn auto-saving on if positive, else off." ;; turn it back on. (and (< buffer-saved-size 0) (setq buffer-saved-size 0)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Auto-save %s (in this buffer)" (if buffer-auto-save-file-name "on" "off"))) buffer-auto-save-file-name) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 4d8198292f8..95d061b3024 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1019,7 +1019,8 @@ The region it returns may start or end in the middle of a line.") "Fontify the current buffer the way the function `font-lock-mode' would." (interactive) (font-lock-set-defaults) - (let ((font-lock-verbose (or font-lock-verbose (interactive-p)))) + (let ((font-lock-verbose (or font-lock-verbose + (called-interactively-p 'interactive)))) (funcall font-lock-fontify-buffer-function))) (defun font-lock-unfontify-buffer () diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 53663d1aeeb..a080cd22ea0 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -52,7 +52,8 @@ fn (intern val))))) (if (null function) (message "You didn't specify a function") - (help-setup-xref (list #'describe-function function) (interactive-p)) + (help-setup-xref (list #'describe-function function) + (called-interactively-p 'interactive)) (save-excursion (with-help-window (help-buffer) (prin1 function) @@ -606,7 +607,7 @@ it is displayed along with the global value." (setq val (symbol-value variable) locus (variable-binding-locus variable))))) (help-setup-xref (list #'describe-variable variable buffer) - (interactive-p)) + (called-interactively-p 'interactive)) (with-help-window (help-buffer) (with-current-buffer buffer (prin1 variable) @@ -800,7 +801,8 @@ The descriptions are inserted in a help buffer, which is then displayed. BUFFER defaults to the current buffer." (interactive) (setq buffer (or buffer (current-buffer))) - (help-setup-xref (list #'describe-syntax buffer) (interactive-p)) + (help-setup-xref (list #'describe-syntax buffer) + (called-interactively-p 'interactive)) (with-help-window (help-buffer) (let ((table (with-current-buffer buffer (syntax-table)))) (with-current-buffer standard-output @@ -825,7 +827,8 @@ If BUFFER is non-nil, then describe BUFFER's category table instead. BUFFER should be a buffer or a buffer name." (interactive) (setq buffer (or buffer (current-buffer))) - (help-setup-xref (list #'describe-categories buffer) (interactive-p)) + (help-setup-xref (list #'describe-categories buffer) + (called-interactively-p 'interactive)) (with-help-window (help-buffer) (let* ((table (with-current-buffer buffer (category-table))) (docs (char-table-extra-slot table 0))) diff --git a/lisp/help.el b/lisp/help.el index 8b5efc88d8d..141fa66436c 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -461,7 +461,8 @@ is specified by the variable `message-log-max'." To record all your input on a file, use `open-dribble-file'." (interactive) - (help-setup-xref (list #'view-lossage) (interactive-p)) + (help-setup-xref (list #'view-lossage) + (called-interactively-p 'interactive)) (with-help-window (help-buffer) (princ (mapconcat (lambda (key) (if (or (integerp key) (symbolp key) (listp key)) @@ -492,7 +493,8 @@ to display (default, the current buffer). BUFFER can be a buffer or a buffer name." (interactive) (or buffer (setq buffer (current-buffer))) - (help-setup-xref (list #'describe-bindings prefix buffer) (interactive-p)) + (help-setup-xref (list #'describe-bindings prefix buffer) + (called-interactively-p 'interactive)) (with-current-buffer buffer (describe-bindings-internal nil prefix))) @@ -721,7 +723,8 @@ temporarily enables it to allow getting help on disabled items and buttons." (if (or (null defn) (integerp defn) (equal defn 'undefined)) (message "%s%s is undefined" (help-key-description key untranslated) mouse-msg) - (help-setup-xref (list #'describe-function defn) (interactive-p)) + (help-setup-xref (list #'describe-function defn) + (called-interactively-p 'interactive)) ;; Don't bother user with strings from (e.g.) the select-paste menu. (when (stringp (aref key (1- (length key)))) (aset key (1- (length key)) "(any string)")) @@ -798,7 +801,7 @@ whose documentation describes the minor mode." (interactive "@") (unless buffer (setq buffer (current-buffer))) (help-setup-xref (list #'describe-mode buffer) - (interactive-p)) + (called-interactively-p 'interactive)) ;; For the sake of help-do-xref and help-xref-go-back, ;; don't switch buffers before calling `help-buffer'. (with-help-window (help-buffer) diff --git a/lisp/hexl.el b/lisp/hexl.el index 19c1b996b16..f832028be37 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -448,7 +448,7 @@ Ask the user for confirmation." (if (>= current-column 41) (- current-column 41) (/ (- current-column (/ current-column 5)) 2)))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message "Current address is %d/0x%08x" hexl-address hexl-address)) hexl-address)) diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index a4d7d7f24c6..8a85068d559 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -338,7 +338,7 @@ is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'." :keymap hi-lock-map (when (and (equal (buffer-name) "*scratch*") load-in-progress - (not (interactive-p)) + (not (called-interactively-p 'interactive)) (not hi-lock-archaic-interface-message-used)) (setq hi-lock-archaic-interface-message-used t) (if hi-lock-archaic-interface-deduce @@ -636,7 +636,7 @@ This is used by `hi-lock-set-pattern'.") (y-or-n-p "Add patterns from this buffer to hi-lock? ")) (t nil))) (hi-lock-set-file-patterns all-patterns) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Hi-lock added %d patterns." (length all-patterns))))))) (defun hi-lock-font-lock-hook () diff --git a/lisp/info.el b/lisp/info.el index cfaf749ef8a..7ee5516aa45 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4093,7 +4093,7 @@ the variable `Info-file-list-for-emacs'." (let ((command (key-binding key))) (cond ((null command) (message "%s is undefined" (key-description key))) - ((and (interactive-p) + ((and (called-interactively-p 'interactive) (eq command 'execute-extended-command)) (Info-goto-emacs-command-node (read-command "Find documentation for command: "))) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index eba35856f0e..8c8934874ff 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -403,7 +403,7 @@ A coding system that requires automatic detection of text+encoding (let ((base (coding-system-base coding-system)) (eol-type (coding-system-eol-type coding-system))) (set-coding-system-priority base) - (and (interactive-p) + (and (called-interactively-p 'interactive) (or (eq base coding-system) (message "Highest priority is set to %s (base of %s)" base coding-system))) @@ -1530,7 +1530,7 @@ which marks the variable `default-input-method' as set for Custom buffers." (setq input-method (symbol-name input-method))) (help-setup-xref (list #'describe-input-method (or input-method current-input-method)) - (interactive-p)) + (called-interactively-p 'interactive)) (if (null input-method) (describe-current-input-method) @@ -1544,7 +1544,7 @@ which marks the variable `default-input-method' as set for Custom buffers." (error (activate-input-method current) (help-setup-xref (list #'describe-input-method input-method) - (interactive-p)) + (called-interactively-p 'interactive)) (with-output-to-temp-buffer (help-buffer) (let ((elt (assoc input-method input-method-alist))) (princ (format @@ -2067,7 +2067,7 @@ See `set-language-info-alist' for use in programs." (require feature)) (let ((doc (get-language-info language-name 'documentation))) (help-setup-xref (list #'describe-language-environment language-name) - (interactive-p)) + (called-interactively-p 'interactive)) (with-output-to-temp-buffer (help-buffer) (save-excursion (set-buffer standard-output) diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 8417a7c1142..83d9cca9a77 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -67,7 +67,8 @@ ISO-2022-based coding systems. With prefix ARG, the output format gets more cryptic, but still shows the full information." (interactive "P") - (help-setup-xref (list #'list-character-sets arg) (interactive-p)) + (help-setup-xref (list #'list-character-sets arg) + (called-interactively-p 'interactive)) (with-output-to-temp-buffer "*Character Set List*" (with-current-buffer standard-output (if arg @@ -314,7 +315,8 @@ meanings of these arguments." (interactive (list (read-charset "Charset: "))) (or (charsetp charset) (error "Invalid charset: %S" charset)) - (help-setup-xref (list #'describe-character-set charset) (interactive-p)) + (help-setup-xref (list #'describe-character-set charset) + (called-interactively-p 'interactive)) (with-output-to-temp-buffer (help-buffer) (with-current-buffer standard-output (insert "Character set: " (symbol-name charset)) @@ -419,7 +421,7 @@ meanings of these arguments." (if (null coding-system) (describe-current-coding-system) (help-setup-xref (list #'describe-coding-system coding-system) - (interactive-p)) + (called-interactively-p 'interactive)) (with-output-to-temp-buffer (help-buffer) (print-coding-system-briefly coding-system 'doc-string) (let ((type (coding-system-type coding-system)) @@ -983,7 +985,8 @@ This shows which font is used for which character(s)." (if (= (length fontset) 0) (setq fontset (face-attribute 'default :fontset)) (setq fontset (query-fontset fontset))) - (help-setup-xref (list #'describe-fontset fontset) (interactive-p)) + (help-setup-xref (list #'describe-fontset fontset) + (called-interactively-p 'interactive)) (with-output-to-temp-buffer (help-buffer) (with-current-buffer standard-output (print-fontset fontset t)))) @@ -999,7 +1002,8 @@ see the function `describe-fontset' for the format of the list." (interactive "P") (if (not (and window-system (fboundp 'fontset-list))) (error "No fontsets being used") - (help-setup-xref (list #'list-fontsets arg) (interactive-p)) + (help-setup-xref (list #'list-fontsets arg) + (called-interactively-p 'interactive)) (with-output-to-temp-buffer (help-buffer) (with-current-buffer standard-output ;; This code is duplicated near the end of mule-diag. @@ -1018,7 +1022,8 @@ see the function `describe-fontset' for the format of the list." (defun list-input-methods () "Display information about all input methods." (interactive) - (help-setup-xref '(list-input-methods) (interactive-p)) + (help-setup-xref '(list-input-methods) + (called-interactively-p 'interactive)) (with-output-to-temp-buffer (help-buffer) (list-input-methods-1) (with-current-buffer standard-output diff --git a/lisp/log-edit.el b/lisp/log-edit.el index f648d1f1fb4..c7ecac22ae7 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el @@ -470,7 +470,8 @@ If you want to abort the commit, simply delete the buffer." "Insert the template specified by the CVS administrator, if any. This simply uses the local CVS/Template file." (interactive) - (when (or (interactive-p) (= (point-min) (point-max))) + (when (or (called-interactively-p 'interactive) + (= (point-min) (point-max))) (when (file-readable-p "CVS/Template") (insert-file-contents "CVS/Template")))) @@ -479,7 +480,8 @@ This simply uses the local CVS/Template file." This contacts the repository to get the rcstemplate file and can thus take some time." (interactive) - (when (or (interactive-p) (= (point-min) (point-max))) + (when (or (called-interactively-p 'interactive) + (= (point-min) (point-max))) (when (file-readable-p "CVS/Root") ;; Ignore the stderr stuff, even if it's an error. (call-process "cvs" nil '(t nil) nil diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 955e424cf23..f8b2052dd21 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -1437,7 +1437,7 @@ Prefix argument ATPOINT means insert at point rather than the end." ;; whitespace, so that we don't modify the buffer needlessly. (if (and (memq mail-signature '(t nil)) (not (file-readable-p mail-signature-file))) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "The signature file `%s' could not be read" mail-signature-file)) (save-excursion diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index b94faa390ef..ea14366b549 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1920,7 +1920,7 @@ turn on menu bars; otherwise, turn off menu bars." ;; Make the message appear when Emacs is idle. We can not call message ;; directly. The minor-mode message "Menu-bar mode disabled" comes ;; after this function returns, overwriting any message we do here. - (when (and (interactive-p) (not menu-bar-mode)) + (when (and (called-interactively-p 'interactive) (not menu-bar-mode)) (run-with-idle-timer 0 nil 'message "Menu-bar mode disabled. Use M-x menu-bar-mode to make the menu bar appear.")) menu-bar-mode) diff --git a/lisp/mouse.el b/lisp/mouse.el index dd3edbb13ae..0101cacefbf 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -2565,7 +2565,8 @@ choose a font." (if (eq choice 'x-select-font) (x-select-font) (symbol-name choice))) - t (interactive-p)))))))) + t + (called-interactively-p 'interactive)))))))) ;;; Bindings for mouse commands. diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 72c6c032bbe..60fe96623e1 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -3797,7 +3797,7 @@ Value is (0 0) if the modification time cannot be determined." keep-date nil nil - (interactive-p))) + (called-interactively-p 'interactive))) (defun ange-ftp-copy-files-async (okay-p line verbose-p files) "Copy some files in the background. diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index a0813a052d8..1e724dda047 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -770,7 +770,7 @@ narrowed." Prompts for a URL, defaulting to the URL at or before point. Variable `browse-url-browser-function' says which browser to use." (interactive (browse-url-interactive-arg "URL: ")) - (unless (interactive-p) + (unless (called-interactively-p 'interactive) (setq args (or args (list browse-url-new-window-flag)))) (let ((process-environment (copy-sequence process-environment))) ;; When connected to various displays, be careful to use the display of diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index be3654728d8..b93f7e3ddc0 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -706,7 +706,7 @@ server for future sessions." (setq eudc-server server) (eudc-update-local-variables) (run-hooks 'eudc-switch-to-server-hook) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Current directory server is now %s (%s)" eudc-server eudc-protocol)) (if (null no-save) (eudc-save-options))) @@ -753,9 +753,10 @@ When called interactively the list is formatted in a dedicated buffer otherwise a list of symbols is returned." (interactive) (if eudc-list-attributes-function - (let ((entries (funcall eudc-list-attributes-function (interactive-p)))) + (let ((entries (funcall eudc-list-attributes-function + (called-interactively-p 'interactive)))) (if entries - (if (interactive-p) + (if (called-interactively-p 'interactive) (eudc-display-records entries t) entries))) (error "The %s protocol has no support for listing attributes" eudc-protocol))) diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index 96e79cd15ce..8a7e73fa150 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -368,7 +368,7 @@ is decided." (quickurl-load-urls) (let* ((current-url (quickurl-find-url word)) (add-it (if current-url - (if (interactive-p) + (if (called-interactively-p 'interactive) (y-or-n-p (format "\"%s\" exists, replace URL? " word)) t) t))) @@ -382,7 +382,7 @@ is decided." (quickurl-save-urls) (when (get-buffer quickurl-list-buffer-name) (quickurl-list-populate-buffer)) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message "Added %s" url)))))) ;;;###autoload diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index ab9a0ba8b7d..dd6f0f0efac 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2014,7 +2014,7 @@ activity. Only run if the buffer is not visible and "Display list of names in CHANNEL or in current channel if CHANNEL is nil. If called interactively, prompt for a channel when prefix arg is supplied." (interactive "P") - (if (interactive-p) + (if (called-interactively-p 'interactive) (if channel (setq channel (read-string "List names in channel: " target)))) (let ((channel (if (> (length channel) 0) @@ -2026,7 +2026,7 @@ If called interactively, prompt for a channel when prefix arg is supplied." "List TOPIC for the TARGET channel. With a prefix arg, prompt for new topic." (interactive "P") - (if (and (interactive-p) topic) + (if (and (called-interactively-p 'interactive) topic) (setq topic (read-string "New Topic: " rcirc-topic))) (rcirc-send-string process (concat "TOPIC " target (when (> (length topic) 0) diff --git a/lisp/net/xesam.el b/lisp/net/xesam.el index b4d61c9c63d..97ecd1d43c0 100644 --- a/lisp/net/xesam.el +++ b/lisp/net/xesam.el @@ -502,7 +502,7 @@ engine specific, widget :notify function to visualize xesam:url." 'face 'xesam-mode-line 'help-echo (when xesam-debug xesam-xml-string))))))) - (when (not (interactive-p)) + (when (not (called-interactively-p 'interactive)) ;; Initialize buffer. (setq buffer-read-only t) (let ((inhibit-read-only t)) diff --git a/lisp/newcomment.el b/lisp/newcomment.el index c7ad8821b6f..e1c257ccc54 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -1236,7 +1236,7 @@ if we're not inside a comment." (buffer-substring (point) (progn (move-to-left-margin) (point))))))))))))) - + ;;;###autoload (defun comment-indent-new-line (&optional soft) @@ -1260,7 +1260,7 @@ unless optional argument SOFT is non-nil." ;; don't do anything (unless no comment syntax is defined). (unless (and comment-start comment-auto-fill-only-comments - (not (interactive-p)) + (not (called-interactively-p 'interactive)) (not (save-excursion (prog1 (setq compos (comment-beginning)) (setq comin (point)))))) diff --git a/lisp/pgg.el b/lisp/pgg.el index 3cb9bca084e..4a39d948895 100644 --- a/lisp/pgg.el +++ b/lisp/pgg.el @@ -130,7 +130,7 @@ or `cancel-timer'." (put 'pgg-save-coding-system 'lisp-indent-function 2) (defmacro pgg-save-coding-system (start end &rest body) - `(if (interactive-p) + `(if (called-interactively-p 'interactive) (let ((buffer (current-buffer))) (with-temp-buffer (let (buffer-undo-list) @@ -324,7 +324,7 @@ passphrase cache or user." (pgg-save-coding-system start end (pgg-invoke "encrypt-region" (or pgg-scheme pgg-default-scheme) (point-min) (point-max) rcpts sign passphrase)))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (pgg-display-output-buffer start end status)) status)) @@ -340,7 +340,7 @@ cache or user." (pgg-invoke "encrypt-symmetric-region" (or pgg-scheme pgg-default-scheme) (point-min) (point-max) passphrase)))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (pgg-display-output-buffer start end status)) status)) @@ -357,7 +357,7 @@ passphrase cache or user." (let* ((start (or start (point-min))) (end (or end (point-max))) (status (pgg-encrypt-symmetric-region start end passphrase))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (pgg-display-output-buffer start end status)) status)) @@ -376,7 +376,7 @@ passphrase cache or user." (let* ((start (or start (point-min))) (end (or end (point-max))) (status (pgg-encrypt-region start end rcpts sign passphrase))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (pgg-display-output-buffer start end status)) status)) @@ -392,7 +392,7 @@ passphrase cache or user." (pgg-save-coding-system start end (pgg-invoke "decrypt-region" (or pgg-scheme pgg-default-scheme) (point-min) (point-max) passphrase)))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (pgg-display-output-buffer start end status)) status)) @@ -409,7 +409,7 @@ passphrase cache or user." (let* ((start (or start (point-min))) (end (or end (point-max))) (status (pgg-decrypt-region start end passphrase))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (pgg-display-output-buffer start end status)) status)) @@ -429,9 +429,10 @@ passphrase cache or user." (let ((status (pgg-save-coding-system start end (pgg-invoke "sign-region" (or pgg-scheme pgg-default-scheme) (point-min) (point-max) - (or (interactive-p) cleartext) + (or (called-interactively-p 'interactive) + cleartext) passphrase)))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (pgg-display-output-buffer start end status)) status)) @@ -454,9 +455,10 @@ passphrase cache or user." (let* ((start (or start (point-min))) (end (or end (point-max))) (status (pgg-sign-region start end - (or (interactive-p) cleartext) + (or (called-interactively-p 'interactive) + cleartext) passphrase))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (pgg-display-output-buffer start end status)) status)) @@ -484,7 +486,7 @@ signer's public key from `pgg-default-keyserver-address'." pgg-query-keyserver (setq key (concat "0x" (pgg-truncate-key-identifier key))) (null (pgg-lookup-key key)) - (or fetch (interactive-p)) + (or fetch (called-interactively-p 'interactive)) (y-or-n-p (format "Key %s not found; attempt to fetch? " key)) (setq keyserver (or (cdr (assq 'preferred-key-server packet)) @@ -494,7 +496,7 @@ signer's public key from `pgg-default-keyserver-address'." (pgg-save-coding-system start end (pgg-invoke "verify-region" (or pgg-scheme pgg-default-scheme) (point-min) (point-max) signature))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (let ((temp-buffer-show-function (function pgg-temp-buffer-show-function))) (with-output-to-temp-buffer pgg-echo-buffer @@ -516,7 +518,7 @@ within the region." (let* ((start (or start (point-min))) (end (or end (point-max))) (status (pgg-verify-region start end signature fetch))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (let ((temp-buffer-show-function (function pgg-temp-buffer-show-function))) (with-output-to-temp-buffer pgg-echo-buffer diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index 73edc965460..55fc5f32daf 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el @@ -211,7 +211,8 @@ Quit current game \\[5x5-quit-game]" (defun 5x5-new-game () "Start a new game of `5x5'." (interactive) - (when (if (interactive-p) (5x5-y-or-n-p "Start a new game? ") t) + (when (if (called-interactively-p 'interactive) + (5x5-y-or-n-p "Start a new game? ") t) (setq 5x5-x-pos (/ 5x5-grid-size 2) 5x5-y-pos (/ 5x5-grid-size 2) 5x5-moves 0 diff --git a/lisp/play/yow.el b/lisp/play/yow.el index 1c284d009ad..6d00a3a0b72 100644 --- a/lisp/play/yow.el +++ b/lisp/play/yow.el @@ -91,7 +91,7 @@ If called interactively, display a list of matches." (setq i (1+ i)))) (and matches (setq matches (sort matches 'string-lessp))) - (and (interactive-p) + (and (called-interactively-p 'interactive) (cond ((null matches) (message "No matches found.")) (t diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 89cbdd18454..26b68bf9c2b 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -135,7 +135,7 @@ "Return Ada mode version." (interactive) (let ((version-string "4.00")) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message version-string) version-string))) diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 58a82a8918b..49f908c99f9 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -1505,7 +1505,8 @@ Return (TYPE NAME), or nil if not found." matching-beg ;; Note this includes the case of an un-named main program, ;; in which case we go to (point-min). - (if (interactive-p) (message "No beginning found")) + (if (called-interactively-p 'interactive) + (message "No beginning found")) nil))) (defun f90-end-of-subprogram () @@ -1530,7 +1531,8 @@ Return (TYPE NAME), or nil if not found." ;;; (forward-line 1) (if (zerop count) matching-end - (if (interactive-p) (message "No end found")) + (if (called-interactively-p 'interactive) + (message "No end found")) nil))) @@ -1542,7 +1544,8 @@ for consistency of block types and labels (if present), and completes outermost block if `f90-smart-end' is non-nil. Interactively, pushes mark before moving point." (interactive "p") - (if (interactive-p) (push-mark (point) t)) ; can move some distance + (if (called-interactively-p 'interactive) + (push-mark (point) t)) ; can move some distance (and num (< num 0) (f90-beginning-of-block (- num))) (let ((f90-smart-end (if f90-smart-end 'no-blink)) ; for final match-end (case-fold-search t) @@ -1598,7 +1601,7 @@ Checks for consistency of block types and labels (if present). Does not check the outermost block, because it may be incomplete. Interactively, pushes mark before moving point." (interactive "p") - (if (interactive-p) (push-mark (point) t)) + (if (called-interactively-p 'interactive) (push-mark (point) t)) (and num (< num 0) (f90-end-of-block (- num))) (let ((case-fold-search t) (count (or num 1)) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 71913d0eca0..02346c14967 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -1295,7 +1295,7 @@ If NUM is negative, go backward to the start of a block. Does not check for consistency of block types. Interactively, pushes mark before moving point." (interactive "p") - (if (interactive-p) (push-mark (point) t)) + (if (called-interactively-p 'interactive) (push-mark (point) t)) (and num (< num 0) (fortran-beginning-of-block (- num))) (let ((case-fold-search t) (count (or num 1))) @@ -1328,7 +1328,7 @@ blocks. If NUM is negative, go forward to the end of a block. Does not check for consistency of block types. Interactively, pushes mark before moving point." (interactive "p") - (if (interactive-p) (push-mark (point) t)) + (if (called-interactively-p 'interactive) (push-mark (point) t)) (and num (< num 0) (fortran-end-of-block (- num))) (let ((case-fold-search t) (count (or num 1))) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index d2264043cb5..96b49499f4f 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1595,7 +1595,7 @@ context." (let* ((syntactic-context (js--syntactic-context-from-pstate (js--parse-state-at-point)))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message "Syntactic context: %s" syntactic-context)) syntactic-context)) @@ -2821,7 +2821,7 @@ With argument, run even if no intervening GC has happened." (setq num (js--js-funcall '(repl "_jsGC") (or keys []))) (setq js--js-last-gcs-done this-gcs-done) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message "Cleaned %s entries" num)) num))) @@ -2835,7 +2835,7 @@ With argument, run even if no intervening GC has happened." (let* ((content-window (js--js-content-window (js--get-js-context))) (result (js-eval content-window js))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message "%s" (js! "String" result))) result))) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4582163e17b..eb33c760b64 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1785,7 +1785,8 @@ will." (with-output-to-temp-buffer (help-buffer) (with-current-buffer standard-output ;; Fixme: Is this actually useful? - (help-setup-xref (list 'python-describe-symbol symbol) (interactive-p)) + (help-setup-xref (list 'python-describe-symbol symbol) + (called-interactively-p 'interactive)) (set (make-local-variable 'comint-redirect-subvert-readonly) t) (help-print-return-message)))) (comint-redirect-send-command-to-process (format "emacs.ehelp(%S, %s)" @@ -2797,7 +2798,7 @@ filter." (python-toggle-shells python-default-interpreter)) (let ((args python-which-args)) (when (and argprompt - (interactive-p) + (called-interactively-p 'interactive) (fboundp 'split-string)) ;; TBD: Perhaps force "-i" in the final list? (setq args (split-string diff --git a/lisp/recentf.el b/lisp/recentf.el index 2a6955f88b8..81485a3190b 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -1357,7 +1357,7 @@ that were operated on recently." (dolist (hook recentf-used-hooks) (apply hook-setup hook))) (run-hooks 'recentf-mode-hook) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message "Recentf mode %sabled" (if recentf-mode "en" "dis")))) recentf-mode) diff --git a/lisp/savehist.el b/lisp/savehist.el index d05a29f6901..8dd308610ac 100644 --- a/lisp/savehist.el +++ b/lisp/savehist.el @@ -203,7 +203,7 @@ which is probably undesirable." ;; coding cookie to convey that information. That way, if ;; the user changes the value of savehist-coding-system, ;; we can still correctly load the old file. - (load savehist-file nil (not (interactive-p))) + (load savehist-file nil (not (called-interactively-p 'interactive))) (setq savehist-loaded t)) (error ;; Don't install the mode if reading failed. Doing so would @@ -351,7 +351,7 @@ If AUTO-SAVE is non-nil, compare the saved contents to the one last saved, (let ((file-precious-flag t) (coding-system-for-write savehist-coding-system)) (write-region (point-min) (point-max) savehist-file nil - (unless (interactive-p) 'quiet))) + (unless (called-interactively-p 'interactive) 'quiet))) (when savehist-file-modes (set-file-modes savehist-file savehist-file-modes)) (setq savehist-last-checksum checksum))))) diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el index aa99b1e785e..7cd0e325da0 100644 --- a/lisp/shadowfile.el +++ b/lisp/shadowfile.el @@ -510,7 +510,7 @@ Pending copies are stored in variable `shadow-files-to-copy', and in call it manually." (interactive "P") (if (not shadow-files-to-copy) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "No files need to be shadowed.")) (save-excursion (map-y-or-n-p (function diff --git a/lisp/simple.el b/lisp/simple.el index e95c736951c..b77429ebd20 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3026,9 +3026,9 @@ This command is similar to `copy-region-as-kill', except that it gives visual feedback indicating the extent of the region being copied." (interactive "r") (copy-region-as-kill beg end) - ;; This use of interactive-p is correct + ;; This use of called-interactively-p is correct ;; because the code it controls just gives the user visual feedback. - (if (interactive-p) + (if (called-interactively-p 'interactive) (let ((other-end (if (= (point) beg) end beg)) (opoint (point)) ;; Inhibit quitting so we can make a quit here @@ -3992,7 +3992,7 @@ and more reliable (no dependence on goal column, etc.)." (end-of-line) (insert (if use-hard-newlines hard-newline "\n"))) (line-move arg nil nil try-vscroll)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (condition-case nil (line-move arg nil nil try-vscroll) ((beginning-of-buffer end-of-buffer) (ding))) @@ -4022,7 +4022,7 @@ If you are thinking of using this in a Lisp program, consider using to use and more reliable (no dependence on goal column, etc.)." (interactive "^p\np") (or arg (setq arg 1)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (condition-case nil (line-move (- arg) nil nil try-vscroll) ((beginning-of-buffer end-of-buffer) (ding))) @@ -6429,7 +6429,7 @@ See also `normal-erase-is-backspace'." (keyboard-translate ?\C-? ?\C-?)))) (run-hooks 'normal-erase-is-backspace-hook) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Delete key deletes %s" (if (terminal-parameter nil 'normal-erase-is-backspace) "forward" "backward"))))) diff --git a/lisp/strokes.el b/lisp/strokes.el index 75278f69d13..d033f779980 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el @@ -1055,7 +1055,7 @@ This is based on the last time `strokes-window-configuration' was updated." ;; don't try to update strokes window configuration ;; if window is dedicated or a minibuffer nil) - ((or (interactive-p) + ((or (called-interactively-p 'interactive) (not (buffer-live-p (get-buffer strokes-buffer-name))) (null strokes-window-configuration)) ;; create `strokes-window-configuration' from scratch... @@ -1092,7 +1092,7 @@ This is based on the last time `strokes-window-configuration' was updated." (cond ((and (file-exists-p strokes-file) (file-readable-p strokes-file)) (load-file strokes-file)) - ((interactive-p) + ((called-interactively-p 'interactive) (error "Trouble loading user-defined strokes; nothing done")) (t (message "No user-defined strokes, sorry")))) @@ -1107,7 +1107,7 @@ This is based on the last time `strokes-window-configuration' was updated." (setq strokes-global-map nil) (strokes-load-user-strokes) (if (and (not (equal current strokes-global-map)) - (or (interactive-p) + (or (called-interactively-p 'interactive) (yes-or-no-p "Save your strokes? "))) (progn (require 'pp) ; pretty-print variables @@ -1202,7 +1202,7 @@ the stroke as a character in some language." ((strokes-lift-p point) ;; a lift--tell the loop to X out the next point... (setq lift-flag t)))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (pop-to-buffer " *strokes-xpm*") ;; (xpm-mode 1) (goto-char (point-min)) diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 399043049c1..fa3e9404bf8 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -888,7 +888,7 @@ unless the current buffer is a scratch buffer." (defun ns-print-buffer () "Interactive front-end to `print-buffer': asks for user confirmation first." (interactive) - (if (and (interactive-p) + (if (and (called-interactively-p 'interactive) (or (listp last-nonmenu-event) (and (char-or-string-p (event-basic-type last-command-event)) (memq 'super (event-modifiers last-command-event))))) diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 8ae49c63eb2..d0ede949886 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -3334,7 +3334,8 @@ Return the new location of point." ((looking-at bibtex-any-valid-entry-type) ;; Parsing of entry failed (error "Syntactically incorrect BibTeX entry starts here")) - (t (if (interactive-p) (message "Not on a known BibTeX entry.")) + (t (if (called-interactively-p 'interactive) + (message "Not on a known BibTeX entry.")) (goto-char pnt))) (point))) @@ -4749,9 +4750,10 @@ Return the URL or nil if none can be generated." (error "Match failed: %s" text))) (if fmt (apply 'format fmt (nreverse obj)) (apply 'concat (nreverse obj))))) - (if (interactive-p) (message "%s" url)) + (if (called-interactively-p 'interactive) (message "%s" url)) (unless no-browse (browse-url url))) - (if (and (not url) (interactive-p)) (message "No URL known.")) + (if (and (not url) (called-interactively-p 'interactive)) + (message "No URL known.")) url))) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index eff19e632fb..2c8ccd6054d 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -604,7 +604,7 @@ in your .emacs file. ;; the welcome message (if (and flyspell-issue-message-flag flyspell-issue-welcome-flag - (interactive-p)) + (called-interactively-p 'interactive)) (let ((binding (where-is-internal 'flyspell-auto-correct-word nil 'non-ascii))) (message "%s" diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index 7aa3b8606d2..67a39d5cf51 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -507,7 +507,7 @@ resets the page-delimiter to the original value." (if (not reset-p) (setq page-delimiter regexp) (setq page-delimiter original-page-delimiter)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "The value of `page-delimiter' is now: %s" page-delimiter))) @@ -565,7 +565,7 @@ directory for only the accessible portion of the buffer." (setq regexp pages-directory-previous-regexp) (setq pages-directory-previous-regexp regexp)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Creating directory for: %s " (buffer-name))) @@ -633,7 +633,7 @@ directory for only the accessible portion of the buffer." (set-buffer standard-output) ;; Put positions in increasing order to go with buffer. (setq pages-pos-list (nreverse pages-pos-list)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%d matching lines in: %s" (length pages-pos-list) (buffer-name pages-target-buffer)))) (pop-to-buffer pages-directory-buffer) @@ -765,7 +765,7 @@ directory." (list (if current-prefix-arg (read-file-name "Filename: " pages-addresses-file-name)))) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Creating directory for: %s " (or filename pages-addresses-file-name))) (if (file-exists-p (or filename pages-addresses-file-name)) diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 90337e734f5..f0c8645a974 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -2044,7 +2044,7 @@ plain text and loses all the table specific features." (interactive "i\ni\np") (table--make-cell-map) (if (or force (not (memq (table--get-last-command) table-command-list))) - (let* ((cell (table--probe-cell (interactive-p))) + (let* ((cell (table--probe-cell (called-interactively-p 'interactive))) (cache-buffer (get-buffer-create table-cache-buffer-name)) (modified-flag (buffer-modified-p)) (inhibit-read-only t)) @@ -2953,7 +2953,7 @@ WHERE is provided the cell and table at that location is reported." (setq table-rb (cdr starting-cell)) (setq col-list (cons (car (table--get-coordinate (car starting-cell))) nil)) (setq row-list (cons (cdr (table--get-coordinate (car starting-cell))) nil)) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Computing cell dimension...")) (while (progn @@ -2980,7 +2980,7 @@ WHERE is provided the cell and table at that location is reported." (th (+ 3 (- (cdr table-rb-coordinate) (cdr table-lu-coordinate)))) (c (length col-list)) (r (length row-list))) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Cell: (%dw, %dh), Table: (%dw, %dh), Dim: (%dc, %dr), Total Cells: %d" cw ch tw th c r cells)) (list cw ch tw th c r cells)))))) @@ -3025,7 +3025,8 @@ CALS (DocBook DTD): (read-buffer "Destination buffer: " (concat table-dest-buffer-name "." language)) (table--read-from-minibuffer '("Table Caption" . table-source-caption-history))))) (let ((default-buffer-name (concat table-dest-buffer-name "." (symbol-name language)))) - (unless (or (interactive-p) (table--probe-cell)) (error "Table not found here")) + (unless (or (called-interactively-p 'interactive) (table--probe-cell)) + (error "Table not found here")) (unless (bufferp dest-buffer) (setq dest-buffer (get-buffer-create (or dest-buffer default-buffer-name)))) (if (string= (buffer-name dest-buffer) default-buffer-name) @@ -3047,7 +3048,7 @@ CALS (DocBook DTD): (let ((wheel [?- ?\\ ?| ?/])) (while (progn - (if (interactive-p) + (if (called-interactively-p 'interactive) (progn (message "Analyzing table...%c" (aref wheel i)) (if (eq (setq i (1+ i)) (length wheel)) @@ -3084,7 +3085,7 @@ CALS (DocBook DTD): ;; insert closing (table--generate-source-epilogue dest-buffer language col-list row-list)) ;; lastly do some convenience work - (if (interactive-p) + (if (called-interactively-p 'interactive) (save-selected-window (pop-to-buffer dest-buffer t) (goto-char (point-min)) @@ -3433,9 +3434,10 @@ Example: (format "Justify (default %s): " default) '(("left") ("center") ("right")) nil t nil 'table-sequence-justify-history default))))))) - (unless (or (interactive-p) (table--probe-cell)) (error "Table not found here")) + (unless (or (called-interactively-p 'interactive) (table--probe-cell)) + (error "Table not found here")) (string-match "\\([0-9]*\\)\\([]})>]*\\)\\'" str) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Sequencing...")) (let* ((prefix (substring str 0 (match-beginning 1))) (index (match-string 1 str)) @@ -3483,7 +3485,7 @@ Example: (setq cells (1- cells)) (and (> n 0) (> cells 0))))) (table-recognize-cell 'force) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Sequencing...done")) )) @@ -5344,7 +5346,7 @@ Refresh the menu bar." This feature is disabled when `table-disable-incompatibility-warning' is non-nil. The warning is done only once per session for each item." (unless (and table-disable-incompatibility-warning - (not (interactive-p))) + (not (called-interactively-p 'interactive))) (cond ((and (featurep 'xemacs) (not (get 'table-disable-incompatibility-warning 'xemacs))) (put 'table-disable-incompatibility-warning 'xemacs t) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index b45cb25b3b7..6a34956604c 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1274,7 +1274,7 @@ on the line for the invalidity you want to see." (let ((no-matches (zerop num-matches))) (if no-matches (insert "None!\n")) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message (cond (no-matches "No mismatches found") ((= num-matches 1) "1 mismatch found") (t "%d mismatches found")) diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index 0ced6b74d39..42e8fb27eeb 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el @@ -38,7 +38,7 @@ If optional argument HERE is non-nil, insert info at point." (format "Version of \`texinfmt.el\': %s" texinfmt-version))) (if here (insert version-string) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%s" version-string) version-string)))) @@ -171,7 +171,8 @@ and don't split the file if large. You can use `Info-tagify' and (message (setq lastmessage "Splitting Info file...")) (Info-split)))) (message (concat lastmessage - (if (interactive-p) "done. Now save it." "done."))))) + (if (called-interactively-p 'interactive) + "done. Now save it." "done."))))) (defvar texinfo-region-buffer-name "*Info Region*" "*Name of the temporary buffer used by \\[texinfo-format-region].") diff --git a/lisp/time.el b/lisp/time.el index 2ff840db762..b6523b7ffc1 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -562,7 +562,7 @@ For example, the Unix uptime command format is \"%D, %z%2h:%.2m\"." (format-seconds (or format "%Y, %D, %H, %M, %z%S") (float-time (time-subtract (current-time) before-init-time))))) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%s" str) str))) @@ -574,7 +574,7 @@ For example, the Unix uptime command format is \"%D, %z%2h:%.2m\"." (format "%.1f seconds" (float-time (time-subtract after-init-time before-init-time))))) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%s" str) str))) diff --git a/lisp/tutorial.el b/lisp/tutorial.el index 3290d67a99a..61c73fdd3c1 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -74,7 +74,7 @@ Where for the function it is remapped to)" (with-output-to-temp-buffer (help-buffer) (help-setup-xref (list #'tutorial--describe-nonstandard-key value) - (interactive-p)) + (called-interactively-p 'interactive)) (with-current-buffer (help-buffer) (insert "Your Emacs customizations override the default binding for this key:" @@ -323,7 +323,7 @@ LEFT and RIGHT are the elements to compare." "Give detailed help about changed keys." (with-output-to-temp-buffer (help-buffer) (help-setup-xref (list #'tutorial--detailed-help button) - (interactive-p)) + (called-interactively-p 'interactive)) (with-current-buffer (help-buffer) (let* ((tutorial-buffer (button-get button 'tutorial-buffer)) (explain-key-desc (button-get button 'explain-key-desc)) diff --git a/lisp/type-break.el b/lisp/type-break.el index 71aa10bfd6f..a72de04256e 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el @@ -386,7 +386,7 @@ problems." (cond ((and already-enabled type-break-mode) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Type Break mode is already enabled"))) (type-break-mode (when type-break-file-name @@ -430,7 +430,7 @@ problems." type-break-interval-start type-break-interval) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Type Break mode is enabled and set"))) (t (type-break-keystroke-reset) @@ -443,7 +443,7 @@ problems." (set-buffer-modified-p nil) (unlock-buffer) (kill-this-buffer))) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Type Break mode is disabled"))))) type-break-mode) @@ -465,7 +465,7 @@ Variables controlling the display of messages in the mode line include: (interactive "P") (setq type-break-mode-line-message-mode (>= (prefix-numeric-value prefix) 0)) - (and (interactive-p) + (and (called-interactively-p 'interactive) (if type-break-mode-line-message-mode (message "type-break-mode-line-message-mode is enabled") (message "type-break-mode-line-message-mode is disabled"))) @@ -486,7 +486,7 @@ variable of the same name." (interactive "P") (setq type-break-query-mode (>= (prefix-numeric-value prefix) 0)) - (and (interactive-p) + (and (called-interactively-p 'interactive) (if type-break-query-mode (message "type-break-query-mode is enabled") (message "type-break-query-mode is disabled"))) @@ -1015,7 +1015,7 @@ FRAC should be the inverse of the fractional value; for example, a value of (setq type-break-keystroke-threshold (cons nil nil))) (setcar type-break-keystroke-threshold lower) (setcdr type-break-keystroke-threshold upper) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "min threshold: %d\tmax threshold: %d" lower upper)) type-break-keystroke-threshold)) diff --git a/lisp/vc.el b/lisp/vc.el index f0275153679..8dfe34a4cb1 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1577,7 +1577,8 @@ returns t if the buffer had changes, nil otherwise." (error "Not a valid revision range")) ;; Yes, it's painful to call (vc-deduce-fileset) again. Alas, the ;; placement rules for (interactive) don't actually leave us a choice. - (vc-diff-internal t (vc-deduce-fileset) rev1 rev2 (interactive-p))) + (vc-diff-internal t (vc-deduce-fileset) rev1 rev2 + (called-interactively-p 'interactive))) ;; (defun vc-contains-version-controlled-file (dir) ;; "Return t if DIR contains a version-controlled file, nil otherwise." @@ -1598,7 +1599,8 @@ saving the buffer." (if historic (call-interactively 'vc-version-diff) (when buffer-file-name (vc-buffer-sync not-urgent)) - (vc-diff-internal t (vc-deduce-fileset) nil nil (interactive-p)))) + (vc-diff-internal t (vc-deduce-fileset) nil nil + (called-interactively-p 'interactive)))) ;;;###autoload (defun vc-root-diff (historic &optional not-urgent) @@ -1625,7 +1627,8 @@ saving the buffer." (setq rootdir (vc-call-backend backend 'root default-directory)) (setq working-revision (vc-working-revision rootdir)) (vc-diff-internal - t (list backend (list rootdir) working-revision) nil nil (interactive-p))))) + t (list backend (list rootdir) working-revision) nil nil + (called-interactively-p 'interactive))))) ;;;###autoload (defun vc-revision-other-window (rev) diff --git a/lisp/version.el b/lisp/version.el index 01347a5735a..f5109ab6433 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -55,7 +55,7 @@ Don't use this function in programs to choose actions according to the system configuration; look at `system-configuration' instead." (interactive "P") (let ((version-string - (format (if (not (interactive-p)) + (format (if (not (called-interactively-p 'interactive)) "GNU Emacs %s (%s%s%s)\n of %s on %s" "GNU Emacs %s (%s%s%s) of %s on %s") emacs-version @@ -77,7 +77,7 @@ to the system configuration; look at `system-configuration' instead." emacs-build-system))) (if here (insert version-string) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%s" version-string) version-string)))) diff --git a/lisp/vt-control.el b/lisp/vt-control.el index b25266bee08..d762483ebd2 100644 --- a/lisp/vt-control.el +++ b/lisp/vt-control.el @@ -88,20 +88,23 @@ (interactive) (send-string-to-terminal "\e=") (setq vt-applications-keypad-p t) - (if (or tell (interactive-p)) (message "Applications keypad enabled."))) + (if (or tell (called-interactively-p 'interactive)) + (message "Applications keypad enabled."))) (defun vt-keypad-off (&optional tell) "Turn off the VT applications keypad." (interactive "p") (send-string-to-terminal "\e>") (setq vt-applications-keypad-p nil) - (if (or tell (interactive-p)) (message "Applications keypad disabled."))) + (if (or tell (called-interactively-p 'interactive)) + (message "Applications keypad disabled."))) (defun vt-numlock nil "Toggle VT application keypad on and off." (interactive) - (if vt-applications-keypad-p (vt-keypad-off (interactive-p)) - (vt-keypad-on (interactive-p)))) + (if vt-applications-keypad-p + (vt-keypad-off (called-interactively-p 'interactive)) + (vt-keypad-on (called-interactively-p 'interactive)))) (provide 'vt-control) diff --git a/lisp/winner.el b/lisp/winner.el index cf9fd2bee41..1a8a0952aa2 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -387,7 +387,8 @@ With arg, turn Winner mode on if and only if arg is positive." (setq winner-modified-list (frame-list)) (winner-save-old-configurations) (run-hooks 'winner-mode-hook) - (when (interactive-p) (message "Winner mode enabled"))) + (when (called-interactively-p 'interactive) + (message "Winner mode enabled"))) ;; Turn mode off (winner-mode (setq winner-mode nil) @@ -396,7 +397,8 @@ With arg, turn Winner mode on if and only if arg is positive." (remove-hook 'post-command-hook 'winner-save-conditionally) (remove-hook 'minibuffer-setup-hook 'winner-save-unconditionally) (run-hooks 'winner-mode-leave-hook) - (when (interactive-p) (message "Winner mode disabled")))))) + (when (called-interactively-p 'interactive) + (message "Winner mode disabled")))))) ;; Inspired by undo (simple.el) -- 2.11.4.GIT