Subject: Re: bug#56197: lisp-fill-paragraph behavior changed in Emacs 28

From: Maxim Cournoyer <[email-masked]>
Date: Sun, 19 Jan 2025 21:35:44 +0900

Hello Eli,

Eli Zaretskii <[email-masked]> writes:

[...]

>> > Thanks.  But this is not a user-level problem, so the variable to
>> > control this should IMO be a defvar, not a defcustom.  Then Lisp
>> > programs which need to get back old behavior for some reason could
>> > bind the variable around the call.
>> 
>> I'm not sure.  A user (such as myself) may prefer the old behavior, and
>> customize lisp-fill-paragraph-as-displayed (setting it to t) so that
>> this behavior is now the default everywhere.  It also makes it
>> more easily discoverable.  So unless you see a strong reason against
>> using defcustom, it seems preferable to me than defvar.
>
> Users can also set a defvar, if they want this globally.  However, the
> original problem is not a global one, it is specific to some
> situations in some particular major mode.
>
> The important question here is: how common is the situation where a
> user will prefer to set that globally?  I think this could only happen
> if the user uses a major mode of just one variant of Lisp-like
> languages, and especially if that one variant is not Emacs Lisp.

Good point.  The current behavior is probably useful when editing Emacs
Lisp, so I agree that setting this precisely for specific modes (such as
scheme-mode) instead probably makes more sense.

> In addition, making it a defcustom means Lisp programs cannot easily
> bind it to specific values when they need it (overriding user options
> is considered unclean in Emacs).
>
> So my preference is to introduce a defvar, and only promote it to a
> user option if we have enough demand in the future.

OK!  I'll send a reworked version using defvar shortly.  Thanks for the
thoughtful discussion!

-- 
Maxim