+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):
\(allout-init t)"
(interactive)
- (if (interactive-p)
+ (if (called-interactively-p 'interactive)
(progn
(setq mode
(completing-read
(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)))
(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))
(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)
(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)
(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.
(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
(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.
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.
(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))
(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))))
(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))
(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 ")
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
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))
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)))
(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
(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)))
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 ()
(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)))
(interactive)
(let ((string (timeclock-seconds-to-string (timeclock-workday-elapsed)
show-seconds)))
- (if (interactive-p)
+ (if (called-interactively-p 'interactive)
(message "%s" string)
string)))
(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)))
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))))
(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)))))
(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 ()
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)))
"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)))
(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)
(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)
(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"))))
;; ----------------------------------------------------------------------------
`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
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)
(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:
;;;***
\f
;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el"
-;;;;;; "1a0298749959c80c24c73b8bec5f1f74")
+;;;;;; "7c58535b489f23d5503ef8219c7d1282")
;;; Generated autoloads from dired-x.el
(autoload 'dired-jump "dired-x" "\
"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)))
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)
(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)
;; "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)))
(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))
(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))
(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)))
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
(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."))))
(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.
(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 ()
(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))
(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 ()
(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
;;
"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)
(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)))
(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))
(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")
(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))))))))
(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.
"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))
(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" "")
(/ (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)))
(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." "."))))
(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"))))
(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"))))
(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"))))
"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"))))
\f
;;;### (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" "\
(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)))
"///" '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)
"%%%" '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))))
"///" '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)
(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
))
(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))
(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))))))))
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)
(: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))
"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))))
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:
(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.")
(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))
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)))
;; 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)
"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 ()
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)
(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)
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
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)))
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))
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)))
(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)"))
(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)
(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))
: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
(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 ()
(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: ")))
(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)))
(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)
(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
(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)
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
(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))
(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))
(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))))
(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.
(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
"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"))))
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
;; 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
;; 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)
(if (eq choice 'x-select-font)
(x-select-font)
(symbol-name choice)))
- t (interactive-p))))))))
+ t
+ (called-interactively-p 'interactive))))))))
\f
;;; Bindings for mouse commands.
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.
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
(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)))
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)))
(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)))
(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
"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)
"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)
'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))
(buffer-substring (point)
(progn (move-to-left-margin)
(point)))))))))))))
-
+
;;;###autoload
(defun comment-indent-new-line (&optional soft)
;; 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))))))
(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)
(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))
(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))
(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))
(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))
(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))
(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))
(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))
(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))
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))
(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
(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
(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
(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
"Return Ada mode version."
(interactive)
(let ((version-string "4.00"))
- (if (interactive-p)
+ (if (called-interactively-p 'interactive)
(message version-string)
version-string)))
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 ()
;;; (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)))
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)
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))
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)))
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)))
(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))
(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)))
(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)))
(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)"
(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
(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)
;; 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
(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)))))
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
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
(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)))
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)))
(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")))))
;; 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...
(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"))))
(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
((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))
(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)))))
((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)))
(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)))
\f
;; 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"
(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)))
\f
(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)))
(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)
(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))
(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))
(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
(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))))))
(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)
(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))
;; 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))
(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))
(setq cells (1- cells))
(and (> n 0) (> cells 0)))))
(table-recognize-cell 'force)
- (if (interactive-p)
+ (if (called-interactively-p 'interactive)
(message "Sequencing...done"))
))
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)
(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"))
(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))))
(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].")
(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)))
(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)))
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:"
"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))
(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
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)
(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)
(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")))
(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")))
(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))
(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."
(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)
(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)
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
emacs-build-system)))
(if here
(insert version-string)
- (if (interactive-p)
+ (if (called-interactively-p 'interactive)
(message "%s" version-string)
version-string))))
(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)
(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)
(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)