This commit is contained in:
Bastien Guerry 2014-04-30 10:43:40 +02:00
parent b0f862dfa9
commit 0ca4092d72
1 changed files with 11 additions and 8 deletions

View File

@ -7583,9 +7583,11 @@ command."
(cond
((or (= (buffer-size) 0)
(and (not (save-excursion
(and (ignore-errors (org-back-to-heading invisible-ok))
(org-at-heading-p))))
(and (or (and (bolp)
(not (save-excursion
(and (ignore-errors (org-back-to-heading invisible-ok))
(org-at-heading-p)))))
(and (bolp) (not (looking-at org-outline-regexp-bol))))
(or arg (not itemp))))
;; At beginning of buffer or so high up that only a heading
;; makes sense.
@ -7614,11 +7616,12 @@ command."
nil))
;; Get a level string to fall back on
(fix-level
(save-excursion
(org-back-to-heading t)
(if (org-previous-line-empty-p) (setq empty-line-p t))
(looking-at org-outline-regexp)
(make-string (1- (length (match-string 0))) ?*)))
(if (org-before-first-heading-p) "*"
(save-excursion
(org-back-to-heading t)
(if (org-previous-line-empty-p) (setq empty-line-p t))
(looking-at org-outline-regexp)
(make-string (1- (length (match-string 0))) ?*))))
(stars
(save-excursion
(condition-case nil