0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 22:37:47 +00:00

Fix consistency with `org-insert-heading' called with an argument

* lisp/org.el (org-insert-heading): Consistently add a new heading at
  the end of the subtree when called with an universal argument, even if
  point is at beginning of line.

Reported-by: Jorge <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109510>
This commit is contained in:
Nicolas Goaziou 2016-10-04 11:33:10 +02:00
parent 17e73cf949
commit 2b03e945a1

View file

@ -7974,8 +7974,7 @@ unconditionally."
;; If we insert after content, move there and clean up
;; whitespace.
(when (and respect-content
(not (looking-at-p org-outline-regexp-bol)))
(when respect-content
(if (not (org-before-first-heading-p))
(org-end-of-subtree nil t)
(re-search-forward org-outline-regexp-bol)