diff lisp/emacs-lisp/checkdoc.el @ 51156:46ef9a326558

(checkdoc-file-comments-engine): Use `lm-commentary-end' to find the end of the commentary section.
author Lute Kamstra <lute@gnu.org>
date Fri, 23 May 2003 10:09:52 +0000
parents e3d87b72b575
children 695cf19ef79e
line wrap: on
line diff
--- a/lisp/emacs-lisp/checkdoc.el	Fri May 23 10:08:34 2003 +0000
+++ b/lisp/emacs-lisp/checkdoc.el	Fri May 23 10:09:52 2003 +0000
@@ -2346,22 +2346,16 @@
       ;; section that is easy to pick out, and it is also the most
       ;; visible section (with the finder).
       (let ((cm (lm-commentary-mark)))
-	(if cm
-	    (save-excursion
-	      (goto-char (lm-commentary-mark))
-	      ;; Spellcheck between the commentary, and the first
-	      ;; non-comment line.  We could use lm-commentary, but that
-	      ;; returns a string, and Ispell wants to talk to a buffer.
-	      ;; Since the comments talk about Lisp, use the specialized
-	      ;; spell-checker we also used for doc strings.
-	      (let ((e (save-excursion (re-search-forward "^[^;]" nil t)
-				       (point))))
-		(checkdoc-sentencespace-region-engine (point) e)
-		(checkdoc-proper-noun-region-engine (point) e)
-		(checkdoc-ispell-docstring-engine e)))))
-;;; test comment out code
-;;;       (foo 1 3)
-;;;       (bar 5 7)
+        (when cm
+          (save-excursion
+            (goto-char cm)
+            (let ((e (copy-marker (lm-commentary-end))))
+              ;; Since the comments talk about Lisp, use the
+              ;; specialized spell-checker we also used for doc
+              ;; strings.
+              (checkdoc-sentencespace-region-engine (point) e)
+              (checkdoc-proper-noun-region-engine (point) e)
+              (checkdoc-ispell-docstring-engine e)))))
       (setq
        err
        (or