summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/checkdoc.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-05-22 22:01:59 -0700
committerGlenn Morris <rgm@gnu.org>2013-05-22 22:01:59 -0700
commite2aec513de00c1bf420d0258c708ba25a9ab3eda (patch)
tree5dc6c1997283887a5b45b8293dcc976bd16afbb8 /lisp/emacs-lisp/checkdoc.el
parente68bbd7c43ce36a8d7aeafe9df88174a80dffd0d (diff)
downloademacs-e2aec513de00c1bf420d0258c708ba25a9ab3eda.tar.gz
Silence checkdoc.el compilation
* lisp/emacs-lisp/checkdoc.el: No need to load ispell when compiling. (ispell-process, ispell-buffer-local-words, lm-summary) (lm-section-start, lm-section-end): Declare. (checkdoc-ispell-init): Simplify.
Diffstat (limited to 'lisp/emacs-lisp/checkdoc.el')
-rw-r--r--lisp/emacs-lisp/checkdoc.el35
1 files changed, 15 insertions, 20 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index b154e722707..6540a8e9f14 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -2066,7 +2066,8 @@ If the offending word is in a piece of quoted text, then it is skipped."
;;; Ispell engine
;;
-(eval-when-compile (require 'ispell))
+(defvar ispell-process)
+(declare-function ispell-buffer-local-words "ispell" ())
(defun checkdoc-ispell-init ()
"Initialize Ispell process (default version) with Lisp words.
@@ -2074,19 +2075,14 @@ The words used are from `checkdoc-ispell-lisp-words'. If `ispell'
cannot be loaded, then set `checkdoc-spellcheck-documentation-flag' to
nil."
(require 'ispell)
- (if (not (symbol-value 'ispell-process)) ;Silence byteCompiler
- (condition-case nil
- (progn
- (ispell-buffer-local-words)
- ;; This code copied in part from ispell.el Emacs 19.34
- (let ((w checkdoc-ispell-lisp-words))
- (while w
- (process-send-string
- ;; Silence byte compiler
- (symbol-value 'ispell-process)
- (concat "@" (car w) "\n"))
- (setq w (cdr w)))))
- (error (setq checkdoc-spellcheck-documentation-flag nil)))))
+ (unless ispell-process
+ (condition-case nil
+ (progn
+ (ispell-buffer-local-words)
+ ;; This code copied in part from ispell.el Emacs 19.34
+ (dolist (w checkdoc-ispell-lisp-words)
+ (process-send-string ispell-process (concat "@" w "\n"))))
+ (error (setq checkdoc-spellcheck-documentation-flag nil)))))
(defun checkdoc-ispell-docstring-engine (end)
"Run the Ispell tools on the doc string between point and END.
@@ -2187,14 +2183,13 @@ News agents may remove it"
;;; Comment checking engine
;;
-(eval-when-compile
- ;; We must load this to:
- ;; a) get symbols for compile and
- ;; b) determine if we have lm-history symbol which doesn't always exist
- (require 'lisp-mnt))
-
(defvar generate-autoload-cookie)
+(eval-when-compile (require 'lisp-mnt)) ; expand silly defsubsts
+(declare-function lm-summary "lisp-mnt" (&optional file))
+(declare-function lm-section-start "lisp-mnt" (header &optional after))
+(declare-function lm-section-end "lisp-mnt" (header))
+
(defun checkdoc-file-comments-engine ()
"Return a message list if this file does not match the Emacs standard.
This checks for style only, such as the first line, Commentary:,