summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-08-06 10:57:08 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2011-08-06 10:57:08 +0200
commitafa0df9b4709e1af7b7b0cde550a71ec6377c49d (patch)
tree03aedeb568d53b4916ed7f61d7957166f83ff3c3
parentdc904a834dbc6454bb3c947887f2138de7096c79 (diff)
downloadorg-mode-afa0df9b4709e1af7b7b0cde550a71ec6377c49d.tar.gz
Fix heading insertion before any other headline but after a list
* lisp/org.el (org-insert-heading): with force-heading non-nil, inserting an heading before any headline, and just after a list would return an error.
-rw-r--r--lisp/org.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 9df6839..76d9947 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6855,7 +6855,7 @@ This is important for non-interactive uses of the command."
(and (not (save-excursion
(and (ignore-errors (org-back-to-heading invisible-ok))
(org-on-heading-p))))
- (not (org-in-item-p))))
+ (or force-heading (not (org-in-item-p)))))
(progn
(insert "\n* ")
(run-hooks 'org-insert-heading-hook))