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).
This commit is contained in:
Lars Ingebrigtsen 2021-03-05 14:01:00 +01:00
parent 0ddbacca7d
commit ef61a6b636

View file

@ -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))