Use called-interactively-p' instead of interactive-p'.

This commit is contained in:
Juanma Barranquero 2009-10-02 03:48:36 +00:00
parent 12a3c28c78
commit 32226619c5
81 changed files with 375 additions and 204 deletions

View file

@ -1,3 +1,125 @@
2009-10-02 Juanma Barranquero <lekktu@gmail.com>
* 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 <lekktu@gmail.com>
* image-mode.el (image-toggle-display):

View file

@ -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))

View file

@ -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 ")

View file

@ -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))

View file

@ -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)))

View file

@ -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))))

View file

@ -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 ()

View file

@ -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)))

View file

@ -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)

View file

@ -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"))))
;; ----------------------------------------------------------------------------

View file

@ -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)

View file

@ -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" "\

View file

@ -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)))

View file

@ -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)

View file

@ -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))

View file

@ -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)))

View file

@ -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
;;

View file

@ -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)

View file

@ -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)))

View file

@ -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")

View file

@ -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))))))))

View file

@ -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.

View file

@ -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))

View file

@ -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" "")

View file

@ -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)))

View file

@ -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" "\

View file

@ -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)))

View file

@ -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)

View file

@ -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
))

View file

@ -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))

View file

@ -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))))))))

View file

@ -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)

View file

@ -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))

View file

@ -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))

View file

@ -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)

View file

@ -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 ()

View file

@ -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)))

View file

@ -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)

View file

@ -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))

View file

@ -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 ()

View file

@ -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: ")))

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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.

View file

@ -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.

View file

@ -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

View file

@ -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)))

View file

@ -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

View file

@ -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)

View file

@ -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))

View file

@ -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))))))

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)))

View file

@ -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))

View file

@ -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)))

View file

@ -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)))

View file

@ -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

View file

@ -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)

View file

@ -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)))))

View file

@ -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

View file

@ -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")))))

View file

@ -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))

View file

@ -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)))))

View file

@ -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)))

View file

@ -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"

View file

@ -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))

View file

@ -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)

View file

@ -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"))

View file

@ -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].")

View file

@ -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)))

View file

@ -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))

View file

@ -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))

View file

@ -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)

View file

@ -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))))

View file

@ -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)

View file

@ -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)