Merge branch 'maint' of orgmode.org:org-mode into maint

This commit is contained in:
Bastien Guerry 2014-01-10 21:00:32 +01:00
commit 8ac18f6d22
1 changed files with 4 additions and 8 deletions

View File

@ -7887,14 +7887,10 @@ The level is the number of stars at the beginning of the headline."
"Return the outline depth of the last headline before the current line. "Return the outline depth of the last headline before the current line.
Returns 0 for the first headline in the buffer, and nil if before the Returns 0 for the first headline in the buffer, and nil if before the
first headline." first headline."
(let ((current-level (org-current-level)) (and (org-current-level)
(prev-level (when (> (line-number-at-pos) 1) (or (and (/= (line-beginning-position) (point-min))
(save-excursion (save-excursion (beginning-of-line 0) (org-current-level)))
(beginning-of-line 0) 0)))
(org-current-level)))))
(cond ((null current-level) nil) ; Before first headline
((null prev-level) 0) ; At first headline
(prev-level))))
(defun org-reduced-level (l) (defun org-reduced-level (l)
"Compute the effective level of a heading. "Compute the effective level of a heading.