[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: Noam Postavsky
Subject: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
Date: Fri, 01 Jun 2018 21:45:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> And if you set the value of emacs-lisp-docstring-fill-column to 80,
> the value of fill-column that, according to the OP, should have been
> used instead, do you get a better-looking nonsense?

No, I was thinking more along the aligns of:

--- i/lisp/emacs-lisp/lisp-mode.el
+++ w/lisp/emacs-lisp/lisp-mode.el
@@ -1314,6 +1314,7 @@ lisp-fill-paragraph
       ;; The `fill-column' is temporarily bound to
       ;; `emacs-lisp-docstring-fill-column' if that value is an integer.
+      (when (nth 3 (syntax-ppss))       ; Only fill inside strings.
         (let ((paragraph-start
                (concat paragraph-start
@@ -1323,7 +1324,7 @@ lisp-fill-paragraph
                                     (derived-mode-p 'emacs-lisp-mode))
-       (fill-paragraph justify))
+         (fill-paragraph justify)))
       ;; Never return nil.

I think this covers the scenario in the OP.

reply via email to

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