GNU bug report logs -
#78451
30.0.92; prog-fill-reindent-defun ignores fill-column inside string in emacs-lisp-mode.
Previous Next
Reported by: Jake <jforst.mailman <at> gmail.com>
Date: Fri, 16 May 2025 07:49:02 UTC
Severity: normal
Found in version 30.0.92
Done: Jake <jforst.mailman <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 78451 in the body.
You can then email your comments to 78451 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78451
; Package
emacs
.
(Fri, 16 May 2025 07:49:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jake <jforst.mailman <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 16 May 2025 07:49:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello
`prog-fill-reindent-defun' does not respect the value of fill-column when
inside a string (e.g. a docstring) in emacs-lisp-mode and
lisp-interaction-mode. I checked it is respected in python-mode, c-mode,
and c++-mode.
From emacs -Q:
Yank into the *scratch* buffer:
(defun a ()
"a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a"
nil)
C-x f 30 RET
Put the point inside the docstring and M-q
Observe that it is filled to something like column 70 to 75.
Thanks
Jake
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78451
; Package
emacs
.
(Fri, 16 May 2025 08:31:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 78451 <at> debbugs.gnu.org (full text, mbox):
On Fri, 16 May 2025 07:47:42 +0000 Jake <jforst.mailman <at> gmail.com> wrote:
> Hello
>
> `prog-fill-reindent-defun' does not respect the value of fill-column when
> inside a string (e.g. a docstring) in emacs-lisp-mode and
> lisp-interaction-mode. I checked it is respected in python-mode, c-mode,
> and c++-mode.
>
> From emacs -Q:
> Yank into the *scratch* buffer:
>
> (defun a ()
> "a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
> a a a a a a a a a a a a a a a a"
> nil)
>
> C-x f 30 RET
> Put the point inside the docstring and M-q
> Observe that it is filled to something like column 70 to 75.
That's because lisp-data-mode (which emacs-lisp-mode and
lisp-interaction-mode derive from) binds fill-column to the value of
emacs-lisp-docstring-fill-column, which is 72 by default.
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78451
; Package
emacs
.
(Fri, 16 May 2025 11:28:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 78451 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks Steve.
It respects the fill-column when point is in a comment, though. Is that
expected?
Jake
On Fri, 16 May 2025 at 6:00 pm, Stephen Berman <stephen.berman <at> gmx.net>
wrote:
> On Fri, 16 May 2025 07:47:42 +0000 Jake <jforst.mailman <at> gmail.com> wrote:
>
> > Hello
> >
> > `prog-fill-reindent-defun' does not respect the value of fill-column when
> > inside a string (e.g. a docstring) in emacs-lisp-mode and
> > lisp-interaction-mode. I checked it is respected in python-mode, c-mode,
> > and c++-mode.
> >
> > From emacs -Q:
> > Yank into the *scratch* buffer:
> >
> > (defun a ()
> > "a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
> a
> > a a a a a a a a a a a a a a a a"
> > nil)
> >
> > C-x f 30 RET
> > Put the point inside the docstring and M-q
> > Observe that it is filled to something like column 70 to 75.
>
> That's because lisp-data-mode (which emacs-lisp-mode and
> lisp-interaction-mode derive from) binds fill-column to the value of
> emacs-lisp-docstring-fill-column, which is 72 by default.
>
> Steve Berman
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78451
; Package
emacs
.
(Fri, 16 May 2025 12:21:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 78451 <at> debbugs.gnu.org (full text, mbox):
On Fri, 16 May 2025 20:56:50 +0930 Jake <jforst.mailman <at> gmail.com> wrote:
> Thanks Steve.
> It respects the fill-column when point is in a comment, though. Is that
> expected?
>
> Jake
Yes, because emacs-lisp-docstring-fill-column is used only in the
function lisp-fill-paragraph, which handles filling in emacs-lisp-mode
and lisp-interaction-mode and treats doc strings specially but delegates
filling in comments to fill-comment-paragraph, which uses the
buffer-local value of fill-column.
If you agree this is not a bug, you can close this issue by sending
email (e.g. as a reply to this) to 78451-done <at> debbugs.gnu.org (and not
to 78451 <at> debbugs.gnu.org) (or I can close it if you prefer).
Steve Berman
> On Fri, 16 May 2025 at 6:00 pm, Stephen Berman <stephen.berman <at> gmx.net>
> wrote:
>
>> On Fri, 16 May 2025 07:47:42 +0000 Jake <jforst.mailman <at> gmail.com> wrote:
>>
>> > Hello
>> >
>> > `prog-fill-reindent-defun' does not respect the value of fill-column when
>> > inside a string (e.g. a docstring) in emacs-lisp-mode and
>> > lisp-interaction-mode. I checked it is respected in python-mode, c-mode,
>> > and c++-mode.
>> >
>> > From emacs -Q:
>> > Yank into the *scratch* buffer:
>> >
>> > (defun a ()
>> > "a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
>> a
>> > a a a a a a a a a a a a a a a a"
>> > nil)
>> >
>> > C-x f 30 RET
>> > Put the point inside the docstring and M-q
>> > Observe that it is filled to something like column 70 to 75.
>>
>> That's because lisp-data-mode (which emacs-lisp-mode and
>> lisp-interaction-mode derive from) binds fill-column to the value of
>> emacs-lisp-docstring-fill-column, which is 72 by default.
>>
>> Steve Berman
>>
Reply sent
to
Jake <jforst.mailman <at> gmail.com>
:
You have taken responsibility.
(Fri, 16 May 2025 12:26:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jake <jforst.mailman <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 16 May 2025 12:26:04 GMT)
Full text and
rfc822 format available.
Message #19 received at 78451-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Closing. Thanks for the help, Steve.
Jake
On Fri, May 16, 2025 at 12:20 PM Stephen Berman <stephen.berman <at> gmx.net>
wrote:
> On Fri, 16 May 2025 20:56:50 +0930 Jake <jforst.mailman <at> gmail.com> wrote:
>
> > Thanks Steve.
> > It respects the fill-column when point is in a comment, though. Is that
> > expected?
> >
> > Jake
>
> Yes, because emacs-lisp-docstring-fill-column is used only in the
> function lisp-fill-paragraph, which handles filling in emacs-lisp-mode
> and lisp-interaction-mode and treats doc strings specially but delegates
> filling in comments to fill-comment-paragraph, which uses the
> buffer-local value of fill-column.
>
> If you agree this is not a bug, you can close this issue by sending
> email (e.g. as a reply to this) to 78451-done <at> debbugs.gnu.org (and not
> to 78451 <at> debbugs.gnu.org) (or I can close it if you prefer).
>
> Steve Berman
>
> > On Fri, 16 May 2025 at 6:00 pm, Stephen Berman <stephen.berman <at> gmx.net>
> > wrote:
> >
> >> On Fri, 16 May 2025 07:47:42 +0000 Jake <jforst.mailman <at> gmail.com>
> wrote:
> >>
> >> > Hello
> >> >
> >> > `prog-fill-reindent-defun' does not respect the value of fill-column
> when
> >> > inside a string (e.g. a docstring) in emacs-lisp-mode and
> >> > lisp-interaction-mode. I checked it is respected in python-mode,
> c-mode,
> >> > and c++-mode.
> >> >
> >> > From emacs -Q:
> >> > Yank into the *scratch* buffer:
> >> >
> >> > (defun a ()
> >> > "a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
> a a
> >> a
> >> > a a a a a a a a a a a a a a a a"
> >> > nil)
> >> >
> >> > C-x f 30 RET
> >> > Put the point inside the docstring and M-q
> >> > Observe that it is filled to something like column 70 to 75.
> >>
> >> That's because lisp-data-mode (which emacs-lisp-mode and
> >> lisp-interaction-mode derive from) binds fill-column to the value of
> >> emacs-lisp-docstring-fill-column, which is 72 by default.
> >>
> >> Steve Berman
> >>
>
[Message part 2 (text/html, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 14 Jun 2025 11:24:16 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.