diff options
| author | Juanma Barranquero <lekktu@gmail.com> | 2009-10-02 03:48:36 +0000 |
|---|---|---|
| committer | Juanma Barranquero <lekktu@gmail.com> | 2009-10-02 03:48:36 +0000 |
| commit | 32226619c5e563c384372b566000e5d37d783a61 (patch) | |
| tree | 216af4221d2ba868b45162679ce3a0462985c422 /lisp/textmodes | |
| parent | 12a3c28c787e23801f40ea557a5c00b538968a52 (diff) | |
| download | emacs-32226619c5e563c384372b566000e5d37d783a61.tar.gz | |
Use `called-interactively-p' instead of `interactive-p'.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/bibtex.el | 8 | ||||
| -rw-r--r-- | lisp/textmodes/flyspell.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/page-ext.el | 8 | ||||
| -rw-r--r-- | lisp/textmodes/table.el | 22 | ||||
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/texinfmt.el | 5 |
6 files changed, 26 insertions, 21 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 8ae49c63eb2..d0ede949886 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -3334,7 +3334,8 @@ Return the new location of point." ((looking-at bibtex-any-valid-entry-type) ;; Parsing of entry failed (error "Syntactically incorrect BibTeX entry starts here")) - (t (if (interactive-p) (message "Not on a known BibTeX entry.")) + (t (if (called-interactively-p 'interactive) + (message "Not on a known BibTeX entry.")) (goto-char pnt))) (point))) @@ -4749,9 +4750,10 @@ Return the URL or nil if none can be generated." (error "Match failed: %s" text))) (if fmt (apply 'format fmt (nreverse obj)) (apply 'concat (nreverse obj))))) - (if (interactive-p) (message "%s" url)) + (if (called-interactively-p 'interactive) (message "%s" url)) (unless no-browse (browse-url url))) - (if (and (not url) (interactive-p)) (message "No URL known.")) + (if (and (not url) (called-interactively-p 'interactive)) + (message "No URL known.")) url))) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index eff19e632fb..2c8ccd6054d 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -604,7 +604,7 @@ in your .emacs file. ;; the welcome message (if (and flyspell-issue-message-flag flyspell-issue-welcome-flag - (interactive-p)) + (called-interactively-p 'interactive)) (let ((binding (where-is-internal 'flyspell-auto-correct-word nil 'non-ascii))) (message "%s" diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index 7aa3b8606d2..67a39d5cf51 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -507,7 +507,7 @@ resets the page-delimiter to the original value." (if (not reset-p) (setq page-delimiter regexp) (setq page-delimiter original-page-delimiter)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "The value of `page-delimiter' is now: %s" page-delimiter))) @@ -565,7 +565,7 @@ directory for only the accessible portion of the buffer." (setq regexp pages-directory-previous-regexp) (setq pages-directory-previous-regexp regexp)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Creating directory for: %s " (buffer-name))) @@ -633,7 +633,7 @@ directory for only the accessible portion of the buffer." (set-buffer standard-output) ;; Put positions in increasing order to go with buffer. (setq pages-pos-list (nreverse pages-pos-list)) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%d matching lines in: %s" (length pages-pos-list) (buffer-name pages-target-buffer)))) (pop-to-buffer pages-directory-buffer) @@ -765,7 +765,7 @@ directory." (list (if current-prefix-arg (read-file-name "Filename: " pages-addresses-file-name)))) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Creating directory for: %s " (or filename pages-addresses-file-name))) (if (file-exists-p (or filename pages-addresses-file-name)) diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 90337e734f5..f0c8645a974 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -2044,7 +2044,7 @@ plain text and loses all the table specific features." (interactive "i\ni\np") (table--make-cell-map) (if (or force (not (memq (table--get-last-command) table-command-list))) - (let* ((cell (table--probe-cell (interactive-p))) + (let* ((cell (table--probe-cell (called-interactively-p 'interactive))) (cache-buffer (get-buffer-create table-cache-buffer-name)) (modified-flag (buffer-modified-p)) (inhibit-read-only t)) @@ -2953,7 +2953,7 @@ WHERE is provided the cell and table at that location is reported." (setq table-rb (cdr starting-cell)) (setq col-list (cons (car (table--get-coordinate (car starting-cell))) nil)) (setq row-list (cons (cdr (table--get-coordinate (car starting-cell))) nil)) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Computing cell dimension...")) (while (progn @@ -2980,7 +2980,7 @@ WHERE is provided the cell and table at that location is reported." (th (+ 3 (- (cdr table-rb-coordinate) (cdr table-lu-coordinate)))) (c (length col-list)) (r (length row-list))) - (and (interactive-p) + (and (called-interactively-p 'interactive) (message "Cell: (%dw, %dh), Table: (%dw, %dh), Dim: (%dc, %dr), Total Cells: %d" cw ch tw th c r cells)) (list cw ch tw th c r cells)))))) @@ -3025,7 +3025,8 @@ CALS (DocBook DTD): (read-buffer "Destination buffer: " (concat table-dest-buffer-name "." language)) (table--read-from-minibuffer '("Table Caption" . table-source-caption-history))))) (let ((default-buffer-name (concat table-dest-buffer-name "." (symbol-name language)))) - (unless (or (interactive-p) (table--probe-cell)) (error "Table not found here")) + (unless (or (called-interactively-p 'interactive) (table--probe-cell)) + (error "Table not found here")) (unless (bufferp dest-buffer) (setq dest-buffer (get-buffer-create (or dest-buffer default-buffer-name)))) (if (string= (buffer-name dest-buffer) default-buffer-name) @@ -3047,7 +3048,7 @@ CALS (DocBook DTD): (let ((wheel [?- ?\\ ?| ?/])) (while (progn - (if (interactive-p) + (if (called-interactively-p 'interactive) (progn (message "Analyzing table...%c" (aref wheel i)) (if (eq (setq i (1+ i)) (length wheel)) @@ -3084,7 +3085,7 @@ CALS (DocBook DTD): ;; insert closing (table--generate-source-epilogue dest-buffer language col-list row-list)) ;; lastly do some convenience work - (if (interactive-p) + (if (called-interactively-p 'interactive) (save-selected-window (pop-to-buffer dest-buffer t) (goto-char (point-min)) @@ -3433,9 +3434,10 @@ Example: (format "Justify (default %s): " default) '(("left") ("center") ("right")) nil t nil 'table-sequence-justify-history default))))))) - (unless (or (interactive-p) (table--probe-cell)) (error "Table not found here")) + (unless (or (called-interactively-p 'interactive) (table--probe-cell)) + (error "Table not found here")) (string-match "\\([0-9]*\\)\\([]})>]*\\)\\'" str) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Sequencing...")) (let* ((prefix (substring str 0 (match-beginning 1))) (index (match-string 1 str)) @@ -3483,7 +3485,7 @@ Example: (setq cells (1- cells)) (and (> n 0) (> cells 0))))) (table-recognize-cell 'force) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "Sequencing...done")) )) @@ -5344,7 +5346,7 @@ Refresh the menu bar." This feature is disabled when `table-disable-incompatibility-warning' is non-nil. The warning is done only once per session for each item." (unless (and table-disable-incompatibility-warning - (not (interactive-p))) + (not (called-interactively-p 'interactive))) (cond ((and (featurep 'xemacs) (not (get 'table-disable-incompatibility-warning 'xemacs))) (put 'table-disable-incompatibility-warning 'xemacs t) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index b45cb25b3b7..6a34956604c 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1274,7 +1274,7 @@ on the line for the invalidity you want to see." (let ((no-matches (zerop num-matches))) (if no-matches (insert "None!\n")) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message (cond (no-matches "No mismatches found") ((= num-matches 1) "1 mismatch found") (t "%d mismatches found")) diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index 0ced6b74d39..42e8fb27eeb 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el @@ -38,7 +38,7 @@ If optional argument HERE is non-nil, insert info at point." (format "Version of \`texinfmt.el\': %s" texinfmt-version))) (if here (insert version-string) - (if (interactive-p) + (if (called-interactively-p 'interactive) (message "%s" version-string) version-string)))) @@ -171,7 +171,8 @@ and don't split the file if large. You can use `Info-tagify' and (message (setq lastmessage "Splitting Info file...")) (Info-split)))) (message (concat lastmessage - (if (interactive-p) "done. Now save it." "done."))))) + (if (called-interactively-p 'interactive) + "done. Now save it." "done."))))) (defvar texinfo-region-buffer-name "*Info Region*" "*Name of the temporary buffer used by \\[texinfo-format-region].") |
