aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-10-22 16:38:11 +0200
committerLars Ingebrigtsen2021-10-22 16:38:22 +0200
commit1f6cdeb12c3cb8a86159cae9bfd638d8139c123e (patch)
treee2e5146623dd417dd1409b07c88c5f0b01c25861
parent9b46150ab04f33514561d0589f9c37eae58bea23 (diff)
downloademacs-1f6cdeb12c3cb8a86159cae9bfd638d8139c123e.tar.gz
emacs-1f6cdeb12c3cb8a86159cae9bfd638d8139c123e.zip
Ensure valid end/beginning lines in message-mark-inserted-region
* lisp/gnus/message.el (message-mark-inserted-region): Ensure there's a newline before inserting the end line (bug#51324).
-rw-r--r--lisp/gnus/message.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index d460f9bd922..bbf1c78a01f 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -2395,6 +2395,8 @@ If VERBATIM, use slrn style verbatim marks (\"#v+\" and \"#v-\")."
2395 (save-excursion 2395 (save-excursion
2396 ;; add to the end of the region first, otherwise end would be invalid 2396 ;; add to the end of the region first, otherwise end would be invalid
2397 (goto-char end) 2397 (goto-char end)
2398 (unless (bolp)
2399 (insert "\n"))
2398 (insert (if verbatim "#v-\n" message-mark-insert-end)) 2400 (insert (if verbatim "#v-\n" message-mark-insert-end))
2399 (goto-char beg) 2401 (goto-char beg)
2400 (insert (if verbatim "#v+\n" message-mark-insert-begin)))) 2402 (insert (if verbatim "#v+\n" message-mark-insert-begin))))