summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/checkdoc.el
diff options
context:
space:
mode:
authorLute Kamstra <lute@gnu.org>2003-05-23 10:10:24 +0000
committerLute Kamstra <lute@gnu.org>2003-05-23 10:10:24 +0000
commitd547e25f451cc3658cff147bcc0f0508322b6022 (patch)
tree4482f4d47b9be80881b1daaac4df5170f643f3bc /lisp/emacs-lisp/checkdoc.el
parentc7dff41d3f1d1268ac61fbe7f3a025bb1fa985e9 (diff)
downloademacs-d547e25f451cc3658cff147bcc0f0508322b6022.tar.gz
emacs-d547e25f451cc3658cff147bcc0f0508322b6022.tar.bz2
emacs-d547e25f451cc3658cff147bcc0f0508322b6022.zip
(checkdoc-file-comments-engine): Use
`lm-commentary-end' to find the end of the commentary section.
Diffstat (limited to 'lisp/emacs-lisp/checkdoc.el')
-rw-r--r--lisp/emacs-lisp/checkdoc.el26
1 files changed, 10 insertions, 16 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index f9d1cacdc25..a5fb3cede5e 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -2346,22 +2346,16 @@ Code:, and others referenced in the style guide."
;; 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