outline-move-subtree-down/up: Fix for non-nil outline-blank-line

* lisp/outline.el (outline-move-subtree-down):
Include blank line when outline-blank-line is t
(bug#77238).

Copyright-paperwork-exempt: yes
This commit is contained in:
James Cherti 2025-03-20 09:01:36 -04:00 committed by Juri Linkov
parent 7ec0ee742d
commit 40bf281c64

View file

@ -915,7 +915,8 @@ the match data is set appropriately."
;; move it to, adding a newline if necessary, to ensure these points
;; are at bol on the line below the subtree.
(end-point-func (lambda ()
(outline-end-of-subtree)
(let ((outline-blank-line nil))
(outline-end-of-subtree))
(if (eq (char-after) ?\n) (forward-char 1)
(if (and (eobp) (not (bolp))) (insert "\n")))
(point)))