From 8ab9102950e9476c0d0d1cbecfd7c1dd22141a5f Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 11 Jul 2022 12:15:04 +0200 Subject: [PATCH] Fix `M-x lisp-fill-paragraph' * 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 68528e199f8..c906ee6e31d 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -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 -- 2.39.5