Dumb question number two for today:
I've recently switched to a CVS build (circa end of January) of GNU Emacs on Windows. Now, if I have a function like this in a lisp mode buffer
(defun foo () "This is a very very very very very very very very very very very very long comment line." (bar x))
and press M-q within the comment string the result looks like so:
(defun foo () "This is a very very very very very very very very very very very very long comment line." (bar x))
However, in 21.3 the result looked like this
(defun foo () "This is a very very very very very very very very very very very very long comment line." (bar x))
which is what I prefer. Is this a bug or can the behaviour be changed with some setting that I'm missing?
Thanks, Edi.
Edi Weitz wrote:
[...]
which is what I prefer. Is this a bug or can the behaviour be changed with some setting that I'm missing?
Bug in Emacs, since it happens in emacs-lisp-mode too, so I guess something in the filling code is broken.
Edi Weitz edi@agharta.de writes:
which is what I prefer. Is this a bug or can the behaviour be changed with some setting that I'm missing?
I think it is a bug.
By Emacs convention, the first sentence in the docstring should fit into the one line. They changed it so that the first line is treated specially and text is not moved from the second to the first line. But somehow messed it up when moving text from the first to the second. lisp-fill-paragraph is the function in question, but I don't see an easy fix. The people at emacs.devel probably know more.
Helmut.
On Tue, 22 Feb 2005 08:27:45 +0100, Edi Weitz edi@agharta.de wrote:
Dumb question number two for today:
I've recently switched to a CVS build (circa end of January) of GNU Emacs on Windows. Now, if I have a function like this in a lisp mode buffer
(defun foo () "This is a very very very very very very very very very very very very long comment line." (bar x))
and press M-q within the comment string the result looks like so:
(defun foo () "This is a very very very very very very very very very very very very long comment line." (bar x))
However, in 21.3 the result looked like this
(defun foo () "This is a very very very very very very very very very very very very long comment line." (bar x))
which is what I prefer. Is this a bug or can the behaviour be changed with some setting that I'm missing?
FWIW, I've more or less ignored this problem for a couple of months until I upgraded to a newer CVS build yesterday - it' still the same and I've now sent a bug report to the Emacs maintainers.
A workaround that works for me is to have this in your .emacs file:
(add-hook 'lisp-mode-hook (lambda () (set (make-local-variable 'adaptive-fill-mode) nil) (slime-mode t)))
There is, BTW, another bug with the new fill code. Replace (bar x) above with an integer like 42 and press M-q - the integer will move up one line and be located at the end of the doc string which it really shouldn't...
Cheers, Edi.