aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-05-22 22:01:59 -0700
committerGlenn Morris2013-05-22 22:01:59 -0700
commite2aec513de00c1bf420d0258c708ba25a9ab3eda (patch)
tree5dc6c1997283887a5b45b8293dcc976bd16afbb8
parente68bbd7c43ce36a8d7aeafe9df88174a80dffd0d (diff)
downloademacs-e2aec513de00c1bf420d0258c708ba25a9ab3eda.tar.gz
emacs-e2aec513de00c1bf420d0258c708ba25a9ab3eda.zip
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.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/checkdoc.el35
2 files changed, 20 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0fc244b1270..6ffd7e13ea5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12013-05-23 Glenn Morris <rgm@gnu.org> 12013-05-23 Glenn Morris <rgm@gnu.org>
2 2
3 * emacs-lisp/checkdoc.el: No need to load ispell when compiling.
4 (ispell-process, ispell-buffer-local-words, lm-summary)
5 (lm-section-start, lm-section-end): Declare.
6 (checkdoc-ispell-init): Simplify.
7
3 * progmodes/vera-mode.el (he-init-string, he-dabbrev-beg) 8 * progmodes/vera-mode.el (he-init-string, he-dabbrev-beg)
4 (he-string-member, he-reset-string, he-substitute-string): Declare. 9 (he-string-member, he-reset-string, he-substitute-string): Declare.
5 10
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."
2066 2066
2067;;; Ispell engine 2067;;; Ispell engine
2068;; 2068;;
2069(eval-when-compile (require 'ispell)) 2069(defvar ispell-process)
2070(declare-function ispell-buffer-local-words "ispell" ())
2070 2071
2071(defun checkdoc-ispell-init () 2072(defun checkdoc-ispell-init ()
2072 "Initialize Ispell process (default version) with Lisp words. 2073 "Initialize Ispell process (default version) with Lisp words.
@@ -2074,19 +2075,14 @@ The words used are from `checkdoc-ispell-lisp-words'. If `ispell'
2074cannot be loaded, then set `checkdoc-spellcheck-documentation-flag' to 2075cannot be loaded, then set `checkdoc-spellcheck-documentation-flag' to
2075nil." 2076nil."
2076 (require 'ispell) 2077 (require 'ispell)
2077 (if (not (symbol-value 'ispell-process)) ;Silence byteCompiler 2078 (unless ispell-process
2078 (condition-case nil 2079 (condition-case nil
2079 (progn 2080 (progn
2080 (ispell-buffer-local-words) 2081 (ispell-buffer-local-words)
2081 ;; This code copied in part from ispell.el Emacs 19.34 2082 ;; This code copied in part from ispell.el Emacs 19.34
2082 (let ((w checkdoc-ispell-lisp-words)) 2083 (dolist (w checkdoc-ispell-lisp-words)
2083 (while w 2084 (process-send-string ispell-process (concat "@" w "\n"))))
2084 (process-send-string 2085 (error (setq checkdoc-spellcheck-documentation-flag nil)))))
2085 ;; Silence byte compiler
2086 (symbol-value 'ispell-process)
2087 (concat "@" (car w) "\n"))
2088 (setq w (cdr w)))))
2089 (error (setq checkdoc-spellcheck-documentation-flag nil)))))
2090 2086
2091(defun checkdoc-ispell-docstring-engine (end) 2087(defun checkdoc-ispell-docstring-engine (end)
2092 "Run the Ispell tools on the doc string between point and END. 2088 "Run the Ispell tools on the doc string between point and END.
@@ -2187,14 +2183,13 @@ News agents may remove it"
2187 2183
2188;;; Comment checking engine 2184;;; Comment checking engine
2189;; 2185;;
2190(eval-when-compile
2191 ;; We must load this to:
2192 ;; a) get symbols for compile and
2193 ;; b) determine if we have lm-history symbol which doesn't always exist
2194 (require 'lisp-mnt))
2195
2196(defvar generate-autoload-cookie) 2186(defvar generate-autoload-cookie)
2197 2187
2188(eval-when-compile (require 'lisp-mnt)) ; expand silly defsubsts
2189(declare-function lm-summary "lisp-mnt" (&optional file))
2190(declare-function lm-section-start "lisp-mnt" (header &optional after))
2191(declare-function lm-section-end "lisp-mnt" (header))
2192
2198(defun checkdoc-file-comments-engine () 2193(defun checkdoc-file-comments-engine ()
2199 "Return a message list if this file does not match the Emacs standard. 2194 "Return a message list if this file does not match the Emacs standard.
2200This checks for style only, such as the first line, Commentary:, 2195This checks for style only, such as the first line, Commentary:,