[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7751: 24.0.50; `fill-paragraph' on doc string with colons
From: |
Lawrence Mitchell |
Subject: |
bug#7751: 24.0.50; `fill-paragraph' on doc string with colons |
Date: |
Tue, 28 Dec 2010 21:36:07 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Drew Adams wrote:
> This is a regression introduced in Emacs 22.1. There is no such problem
> in Emacs 20 or 21.
[...]
> The same problem occurs if you change "allowed:" to "allowed.",
> "allowed!", "allowed?", "allowed,", or just "allowed", and no matter how
> much space you leave after it. The same problem occurs if you remove
> "allowed:" altogether, i.e., with "The usual menu keywords are :enable,
> ...".
Here's an even more minimal test-case:
emacs -Q
(setq emacs-lisp-docstring-fill-column 30)
(insert "\"a word, another word and more :bar\"")
M-q
gives a break of:
| a word, another word and
| more :bar
whereas one would expect
| a word, another word and more
| :bar
The problem appears to be in the regexp used to define
paragraph-start in lisp-fill-paragraph:
...
(let ((paragraph-start (concat paragraph-start
"\\|\\s-*\\([(;:\"]\\|`(\\|#'(\\)"))
...
Removing the colon leads to "expected" line breaking.
FWIW, the colon was introduced by this commit:
commit cd3f5084abdd59a8392cedee90ddbaa096d61d55
Author: Dave Love <fx@gnu.org>
Date: Wed Mar 18 16:02:37 1998 +0000
(lisp-fill-paragraph): Adjust
paragraph-start in default filling case so that filling doc
strings works.
Cheers,
Lawrence
--
Lawrence Mitchell <wence@gmx.li>