diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-10-04 11:33:10 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-10-04 11:33:10 +0200 |
commit | 2b03e945a19701194e510791a96006c5eee9edc6 (patch) | |
tree | a640a7a403089b8b01a73c4292f38d8cc83eb137 | |
parent | 17e73cf9496b9972e21c4024cd9719740c2b3e62 (diff) | |
download | org-mode-2b03e945a19701194e510791a96006c5eee9edc6.tar.gz |
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>
-rw-r--r-- | lisp/org.el | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index f508a10..f85ddd8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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) |