]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix `M-x lisp-fill-paragraph'
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 11 Jul 2022 10:15:04 +0000 (12:15 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 11 Jul 2022 10:15:38 +0000 (12:15 +0200)
* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Fix filling
when called directly with `M-x lisp-fill-paragraph' instead of via
`M-q' (bug#56476).

lisp/emacs-lisp/lisp-mode.el

index 68528e199f8d4fa625ec2789984ebd5fff0992bd..c906ee6e31dd0392c71ece9ebf3728184c72592a 100644 (file)
@@ -1466,7 +1466,10 @@ and initial semicolons."
                              emacs-lisp-docstring-fill-column
                            fill-column)))
         (let ((ppss (syntax-ppss))
-              (start (point)))
+              (start (point))
+              ;; Avoid recursion if we're being called directly with
+              ;; `M-x lisp-fill-paragraph' in an `emacs-lisp-mode' buffer.
+              (fill-paragraph-function t))
           (save-excursion
             (save-restriction
               ;; If we're not inside a string, then do very basic