emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r112678: Silence checkdoc.el compilat


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112678: Silence checkdoc.el compilation
Date: Wed, 22 May 2013 22:01:59 -0700
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112678
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-05-22 22:01:59 -0700
message:
  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.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/checkdoc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-05-23 04:59:14 +0000
+++ b/lisp/ChangeLog    2013-05-23 05:01:59 +0000
@@ -1,5 +1,10 @@
 2013-05-23  Glenn Morris  <address@hidden>
 
+       * 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.
+
        * progmodes/vera-mode.el (he-init-string, he-dabbrev-beg)
        (he-string-member, he-reset-string, he-substitute-string): Declare.
 

=== modified file 'lisp/emacs-lisp/checkdoc.el'
--- a/lisp/emacs-lisp/checkdoc.el       2013-01-01 09:11:05 +0000
+++ b/lisp/emacs-lisp/checkdoc.el       2013-05-23 05:01:59 +0000
@@ -2066,7 +2066,8 @@
 
 ;;; 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 @@
 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 @@
 
 ;;; 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:,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]