diff options
author | Bastien Guerry <bzg@altern.org> | 2012-04-09 20:48:43 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-04-09 20:48:43 +0200 |
commit | 6144a83c5db861ba89284f844f3975061b9b582b (patch) | |
tree | c6a5c32e09eb0db82148b99ebeb259e774c906de | |
parent | bf4d38b1fbf5ac7ddd4e3cbf4e5ae3519dd9d380 (diff) | |
download | org-mode-6144a83c5db861ba89284f844f3975061b9b582b.tar.gz |
Fix bug in using ̀org-cycle-level' in non-org modes.
* org.el (org-point-at-end-of-empty-headline): Only try to
match ̀org-todo-line-regexp' when the value is non-nil, e.g.
in non-org modes.
Thanks to Jambunathan for bringing this up.
-rw-r--r-- | lisp/org.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/org.el b/lisp/org.el index 7afaba2..1ffd029 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20780,11 +20780,12 @@ This version does not only check the character property, but also If the heading only contains a TODO keyword, it is still still considered empty." (and (looking-at "[ \t]*$") - (save-excursion - (beginning-of-line 1) - (let ((case-fold-search nil)) - (looking-at org-todo-line-regexp))) - (string= (match-string 3) ""))) + (when org-todo-line-regexp + (save-excursion + (beginning-of-line 1) + (let ((case-fold-search nil)) + (looking-at org-todo-line-regexp) + (string= (match-string 3) "")))))) (defun org-at-heading-or-item-p () (or (org-at-heading-p) (org-at-item-p))) |