1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-02 08:22:16 +00:00

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.
This commit is contained in:
Bastien Guerry 2012-04-09 20:48:43 +02:00
parent bf4d38b1fb
commit 6144a83c5d

View File

@ -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)))