[Top][All Lists]

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

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

From: Eli Zaretskii
Subject: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
Date: Fri, 01 Jun 2018 12:20:52 +0300

> From: Stefan Guath <address@hidden>
> Date: Wed, 30 May 2018 14:50:01 +0200
> `emacs-lisp-docstring-fill-column' shadows `fill-column' in too many cases in 
> emacs-lisp-mode. The
> documentation of `emacs-lisp-docstring-fill-column' states: "Value of 
> ‘fill-column’ to use when filling a
> docstring". But it incorrectly seems to be used in a lot more cases than just 
> in a docstring (the only case that
> I've found where ‘fill-column’ is actually respected is within comments). A 
> work-around is to set
> `emacs-lisp-docstring-fill-column' to nil, but it would be nice to have it 
> working properly instead.
> I might be missing something, but think the incorrect behavior is to be found 
> in `lisp-fill-paragraph' that is
> invoked by `fill-paragraph' through `fill-paragraph-function'. It seems like 
> `lisp-fill-paragraph' unconditionally
> sets `fill-column' to `emacs-lisp-docstring-fill-column' without checking 
> whether point is within a doc string
> first. The only requirements for enable shadowing currently seems to be "(and 
> (integerp
> emacs-lisp-docstring-fill-column) (derived-mode-p 'emacs-lisp-mode))", which 
> doesn't seems sufficient.

AFAICT, this behavior was in Emacs since about forever (since 1995, t
be precise).  So maybe we just need to adjust the doc string to
reflect the reality?

Or are there real-life use cases where this behavior is grossly

reply via email to

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