summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-02-26 16:28:36 +0100
committerBastien Guerry <bzg@altern.org>2013-02-26 16:28:36 +0100
commitf20ae92e88cc8b09957fe05a350abc6e9dbe6f37 (patch)
treed54917571b351e91e6fdc27cd30095e5134dc37a
parent3ce145754613ba0d82425c449ea0b5ea01fc8fa1 (diff)
parent2efbd0f138180fe14773d5485ad3c59332d6ddb3 (diff)
downloadorg-mode-f20ae92e88cc8b09957fe05a350abc6e9dbe6f37.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 63c757c..80b577f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6711,13 +6711,16 @@ of the first headline in the buffer. This is important, because if the
first headline is not level one, then (hide-sublevels 1) gives confusing
results."
(interactive)
- (let ((level (save-excursion
+ (let ((l (org-current-line))
+ (level (save-excursion
(goto-char (point-min))
(if (re-search-forward (concat "^" outline-regexp) nil t)
(progn
(goto-char (match-beginning 0))
(funcall outline-level))))))
- (and level (hide-sublevels level))))
+ (and level (hide-sublevels level))
+ (recenter '(4))
+ (org-goto-line l)))
(defun org-content (&optional arg)
"Show all headlines in the buffer, like a table of contents.