[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[1]: Spell checking of the commentary section by checkdoc.el.
From: |
Eric M. Ludlam |
Subject: |
Re[1]: Spell checking of the commentary section by checkdoc.el. |
Date: |
Tue, 13 May 2003 14:24:43 -0400 |
That seems like a reasonable change to me. It may accidentally pick
up todo lists, and other miscellany comments too, but they may need
spell checking too.
Eric
>>> Lute Kamstra <address@hidden> seems to think that:
>Dear people,
>
>The function `checkdoc-file-comments-engine' in
>lisp/emacs-lisp/checkdoc.el tries to spell check (when spell checking
>is requested) the commentary section of a lisp library. To do this,
>it determines the start and end of the commentary section as follows.
>
>,----[ checkdoc.el.~1.36~; lines 2345 -- 2361 ]
>| ;; Let's spellcheck the commentary section. This is the only
>| ;; 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)))))
>`----
>
>This works fine if the entire commentary section consists of lines
>starting with the `;' character. In most libraries this is not the
>case as their commentary sections contain empty lines as well. In
>most cases the line succeeding the ";;; Commentary:" line is empty.
>As a result, `checkdoc-file-comments-engine' does not spellcheck these
>commentary sections.
>
>I propose the following change to make `checkdoc-file-comments-engine'
>spellcheck everything after the ";;; Commentary:" line up to the first
>non-comment non-whitespace line. Shall I commit it?
>
>Lute.
>
>
>*** lisp/emacs-lisp/checkdoc.el.~1.36.~ 2003-03-28 18:38:50.000000000 +0100
>--- lisp/emacs-lisp/checkdoc.el 2003-05-12 11:23:49.000000000 +0200
>***************
>*** 2354,2361 ****
> ;; 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)))))
>--- 2354,2363 ----
> ;; 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
>! (while (looking-at "[ \t]*[;\n]")
>! (forward-line 1))
>! (point))))
> (checkdoc-sentencespace-region-engine (point) e)
> (checkdoc-proper-noun-region-engine (point) e)
> (checkdoc-ispell-docstring-engine e)))))
>
>
--
Eric Ludlam: address@hidden, address@hidden
Home: http://www.ludlam.net Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: www.gnu.org
- Spell checking of the commentary section by checkdoc.el., Lute Kamstra, 2003/05/12
- Re[1]: Spell checking of the commentary section by checkdoc.el.,
Eric M. Ludlam <=
- Re: Re[1]: Spell checking of the commentary section by checkdoc.el., Stefan Monnier, 2003/05/13
- Re: Spell checking of the commentary section by checkdoc.el., Lute Kamstra, 2003/05/14
- Re: Spell checking of the commentary section by checkdoc.el., Stefan Monnier, 2003/05/14
- Re: Spell checking of the commentary section by checkdoc.el., Lute Kamstra, 2003/05/15
- Re: Spell checking of the commentary section by checkdoc.el., Oliver Scholz, 2003/05/15
- Re: Spell checking of the commentary section by checkdoc.el., Stefan Monnier, 2003/05/15
- Re: Spell checking of the commentary section by checkdoc.el., Miles Bader, 2003/05/15
- Re: Spell checking of the commentary section by checkdoc.el., Oliver Scholz, 2003/05/16
- Re: Spell checking of the commentary section by checkdoc.el., Stefan Monnier, 2003/05/16
- Re: Spell checking of the commentary section by checkdoc.el., Oliver Scholz, 2003/05/16