aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIkumi Keita2021-11-29 15:40:19 +0100
committerLars Ingebrigtsen2021-11-29 15:40:19 +0100
commit247ed6ccbcf0d2b0887181a90632d4e461a2f519 (patch)
tree41927dd9bbc1686470456a88444b8571be6ca962
parent49422d2e6986d3ec161e194c73c38f2a7c4b3c64 (diff)
downloademacs-247ed6ccbcf0d2b0887181a90632d4e461a2f519.tar.gz
emacs-247ed6ccbcf0d2b0887181a90632d4e461a2f519.zip
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
-rw-r--r--lisp/textmodes/fill.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 73d76a8ac67..4e161099cd6 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -705,7 +705,10 @@ space does not end a sentence, so don't break a line there."
705 (goto-char from-plus-indent)) 705 (goto-char from-plus-indent))
706 706
707 (if (not (> to (point))) 707 (if (not (> to (point)))
708 nil ;; There is no paragraph, only whitespace: exit now. 708 ;; There is no paragraph, only whitespace: exit now.
709 (progn
710 (set-marker to nil)
711 nil)
709 712
710 (or justify (setq justify (current-justification))) 713 (or justify (setq justify (current-justification)))
711 714
@@ -791,6 +794,7 @@ space does not end a sentence, so don't break a line there."
791 ;; Leave point after final newline. 794 ;; Leave point after final newline.
792 (goto-char to) 795 (goto-char to)
793 (unless (eobp) (forward-char 1)) 796 (unless (eobp) (forward-char 1))
797 (set-marker to nil)
794 ;; Return the fill-prefix we used 798 ;; Return the fill-prefix we used
795 fill-prefix))) 799 fill-prefix)))
796 800