Make fill-region-as-paragraph clear the markers it creates

* lisp/textmodes/fill.el (fill-region-as-paragraph): Clear
temporary markers (bug#52175).

Copyright-paperwork-exempt: yes
This commit is contained in:
Ikumi Keita 2021-11-29 15:40:19 +01:00 committed by Lars Ingebrigtsen
parent 49422d2e69
commit 247ed6ccbc

View file

@ -705,7 +705,10 @@ space does not end a sentence, so don't break a line there."
(goto-char from-plus-indent))
(if (not (> to (point)))
nil ;; There is no paragraph, only whitespace: exit now.
;; There is no paragraph, only whitespace: exit now.
(progn
(set-marker to nil)
nil)
(or justify (setq justify (current-justification)))
@ -791,6 +794,7 @@ space does not end a sentence, so don't break a line there."
;; Leave point after final newline.
(goto-char to)
(unless (eobp) (forward-char 1))
(set-marker to nil)
;; Return the fill-prefix we used
fill-prefix)))