diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-03-05 14:01:00 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-03-05 14:01:00 +0100 |
commit | ef61a6b636156a31a20bb4f002015e4e4611c041 (patch) | |
tree | e27b90509fde5281ce02498761f6cdd341077316 /lisp/emacs-lisp | |
parent | 0ddbacca7d45e68a3235489de94293335891806c (diff) | |
download | emacs-ef61a6b636156a31a20bb4f002015e4e4611c041.tar.gz emacs-ef61a6b636156a31a20bb4f002015e4e4611c041.tar.bz2 emacs-ef61a6b636156a31a20bb4f002015e4e4611c041.zip |
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).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 257ac7412e8..4aa8ddcfa11 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)) |