diff options
author | Bastien Guerry <bzg@altern.org> | 2014-01-10 21:00:32 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2014-01-10 21:00:32 +0100 |
commit | 8ac18f6d2237faa0cf39afd37c1a58e20b5a975a (patch) | |
tree | d6b5f9663ac09597c7b25992133e0852868a870c | |
parent | be63eb69050ce78b20f2c410eba8301fe1d460a2 (diff) | |
parent | 8720c4980724229545755b08fbac1724cd2e74be (diff) | |
download | org-mode-8ac18f6d2237faa0cf39afd37c1a58e20b5a975a.tar.gz |
Merge branch 'maint' of orgmode.org:org-mode into maint
-rw-r--r-- | lisp/org.el | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/org.el b/lisp/org.el index edbcc09..8949b02 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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. Returns 0 for the first headline in the buffer, and nil if before the first headline." - (let ((current-level (org-current-level)) - (prev-level (when (> (line-number-at-pos) 1) - (save-excursion - (beginning-of-line 0) - (org-current-level))))) - (cond ((null current-level) nil) ; Before first headline - ((null prev-level) 0) ; At first headline - (prev-level)))) + (and (org-current-level) + (or (and (/= (line-beginning-position) (point-min)) + (save-excursion (beginning-of-line 0) (org-current-level))) + 0))) (defun org-reduced-level (l) "Compute the effective level of a heading. |