Mercurial > emacs
diff lisp/emacs-lisp/checkdoc.el @ 105372:bd2966850aac
Use `called-interactively-p' instead of `interactive-p'.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 02 Oct 2009 03:48:36 +0000 |
parents | f0b66ed6123b |
children | bbd67ae03f38 |
line wrap: on
line diff
--- a/lisp/emacs-lisp/checkdoc.el Fri Oct 02 00:02:02 2009 +0000 +++ b/lisp/emacs-lisp/checkdoc.el Fri Oct 02 03:48:36 2009 +0000 @@ -853,7 +853,8 @@ 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 @@ (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 @@ (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 @@ (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 @@ (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 @@ (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 @@ (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 ;;