bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode


From: Stefan Guath
Subject: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
Date: Sun, 3 Jun 2018 14:51:42 +0200

I agree that overriding the value of `fill-column' _only_ inside doc strings is the sensible way to go. The only reason `emacs-lisp-docstring-fill-column' exists in the first place is to cover the edge case of doc strings as recommended in https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html (e.g. for apropos) which is fine, but overriding it in any other situation is confusing. We already have a general mechanism for controlling the fill column width on a major-mode basis through hooks and `fill-column' being buffer-local, and should as a rule encourage the use of these consistent control mechanisms across all major-modes - not introduce redundant functionalities that fight each other.

The proposed solution in this email thread by Noam Postavsky is already too greedy in that it affects _all_ strings, not only doc strings (or maybe I misunderstood "(nth 3 (syntax-ppss))" ?). Still, it's better than the current behavior, and I guess that identifying doc strings only (and not strings in general) is too difficult.

On Sat, Jun 2, 2018 at 4:09 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Noam Postavsky <npostavs@gmail.com>
> Cc: 31656@debbugs.gnu.orgstefan@automata.se
> Date: Sat, 02 Jun 2018 09:07:10 -0400
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Are there no use cases where we would want M-q outside of syntactic
> > strings?
>
> Okay, I can think of one possibility: if you've pasted a long single
> line consisting of a quoted list of symbols, then M-q could be a
> convenient way of breaking it up into multiple lines.  With M-q disabled
> in Lisp code, you would need to copy the data to a temp non-lisp-mode
> buffer in order to do that, so a bit more inconvenient.

Then maybe just override the value of fill-column when inside strings?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]