summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernt Hansen <bernt@norang.ca>2010-12-20 02:32:54 +0000
committerCarsten Dominik <carsten.dominik@gmail.com>2010-12-20 13:22:05 +0100
commitde62618009355eef3658fa4318b3c0a8144c1ec7 (patch)
treee65ff9e8b02dd7960e8114b01f1b2514e83bdc55
parent3ceee2fefefbeb4f210eb3aa0bab62ca879c09f1 (diff)
downloadorg-mode-de62618009355eef3658fa4318b3c0a8144c1ec7.tar.gz
Fix before first heading check
* lisp/org.el (org-before-first-heading-p): If point is on an org-mode heading line then we are not before the first heading If point is anywhere on the first line of the first heading then we are not before the first heading. This makes org-before-first-heading-p returns t instead of nil when on the '*' or blank of the first level 1 heading in an org file. This was noticed when the first heading has an encryption tag :crypt:. C-c C-r would not decrypt this entry if point is at the beginning of the line since it was considered before the first heading.
-rw-r--r--lisp/org.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 78e048d..3cecca7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19195,6 +19195,7 @@ This version does not only check the character property, but also
(defun org-before-first-heading-p ()
"Before first heading?"
(save-excursion
+ (end-of-line)
(null (re-search-backward "^\\*+ " nil t))))
(defun org-on-heading-p (&optional ignored)