emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: More problems with semi-colons in docstrings


From: Stefan Monnier
Subject: Re: More problems with semi-colons in docstrings
Date: 14 Mar 2004 18:09:24 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> M-x auto-fill-mode
[...]
> ;; Comment
> ;; Other comment
> (defun comment-fun ()
>   "First line.
> aaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaa
> ;; aaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa aaaaaaa
> ;; aaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaaaaaaa aaaaaaaaaaaa
> ;; aaaaaaaaaaaaa

> Where did the semi-colons come from?  Note that one needs _two_ comment
> lines in front of the function for auto-fill-mode to produce them.

auto-fill-mode is very stupid when it comes to finding the beginning of the
current paragraph.  It does not use syntax-tables and does not provide any
hook like fill-paragraph-function, so the modes can't easily give it a hand.

Note that fill-region also lacks a way for a major mode to tell it
where paragraphs start/end.

We should replace the fill-paragraph-function with another hook which
fill-paragraph, auto-fill-mode, and fill-region can all use.


        Stefan




reply via email to

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