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: Eli Zaretskii
Subject: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
Date: Sat, 02 Jun 2018 09:41:47 +0300

> From: Noam Postavsky <npostavs@gmail.com>
> Cc: 31656@debbugs.gnu.org,  stefan@automata.se
> Date: Fri, 01 Jun 2018 21:45:37 -0400
> 
> --- 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
>                         "\\|\\s-*\\([(;\"]\\|\\s-:\\|`(\\|#'(\\)"))
> @@ -1323,7 +1324,7 @@ lisp-fill-paragraph
>                                      (derived-mode-p 'emacs-lisp-mode))
>                                 emacs-lisp-docstring-fill-column
>                               fill-column)))
> -     (fill-paragraph justify))
> +       (fill-paragraph justify)))
>        ;; Never return nil.
>        t))
> 
> 
> I think this covers the scenario in the OP.

Are there no use cases where we would want M-q outside of syntactic
strings?





reply via email to

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