Subject: bug#78451: closed (Re: bug#78451: 30.0.92; prog-fill-reindent-defun ignores fill-column inside string in emacs-lisp-mode.)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 16 May 2025 12:26:04 +0000

Your bug report

#78451: 30.0.92; prog-fill-reindent-defun ignores fill-column inside string in emacs-lisp-mode.

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78451: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78451
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#78451: 30.0.92; prog-fill-reindent-defun ignores fill-column inside string in emacs-lisp-mode.
From: Jake <[email-masked]>
To: [email-masked]
Cc: Stephen Berman <[email-masked]>
Date: Fri, 16 May 2025 12:24:30 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Closing.  Thanks for the help, Steve.

Jake

On Fri, May 16, 2025 at 12:20 PM Stephen Berman <[email-masked]>
wrote:

> On Fri, 16 May 2025 20:56:50 +0930 Jake <[email-masked]> 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 [email-masked] (and not
> to [email-masked]) (or I can close it if you prefer).
>
> Steve Berman
>
> > On Fri, 16 May 2025 at 6:00 pm, Stephen Berman <[email-masked]>
> > wrote:
> >
> >> On Fri, 16 May 2025 07:47:42 +0000 Jake <[email-masked]>
> 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
> >>
>

Subject: 30.0.92; prog-fill-reindent-defun ignores fill-column inside string in emacs-lisp-mode.
From: Jake <[email-masked]>
To: [email-masked]
Date: Fri, 16 May 2025 07:47:42 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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