emacs-diffs
[Top][All Lists]
Advanced

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

master ef61a6b: Actually fill the correct paragraph in `lisp-fill-paragr


From: Lars Ingebrigtsen
Subject: master ef61a6b: Actually fill the correct paragraph in `lisp-fill-paragraph'
Date: Fri, 5 Mar 2021 08:01:10 -0500 (EST)

branch: master
commit ef61a6b636156a31a20bb4f002015e4e4611c041
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Actually fill the correct paragraph in `lisp-fill-paragraph'
    
    * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Fix previous
    change here by actually filling the correct paragraph (bug#28937).
---
 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 257ac74..4aa8ddc 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1371,7 +1371,8 @@ and initial semicolons."
                            fill-column)))
         (save-restriction
           (save-excursion
-          (let ((ppss (syntax-ppss)))
+          (let ((ppss (syntax-ppss))
+                (start (point)))
             ;; If we're in a string, then narrow (roughly) to that
             ;; string before filling.  This avoids filling Lisp
             ;; statements that follow the string.
@@ -1386,6 +1387,8 @@ and initial semicolons."
                         t))
                 (narrow-to-region (ppss-comment-or-string-start ppss)
                                   (point))))
+            ;; Move back to where we were.
+            (goto-char start)
            (fill-paragraph justify)))))
       ;; Never return nil.
       t))



reply via email to

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