From 6309dcae6b9fccd8e3cca13ab2c9ff21b361dac2 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sun, 19 Aug 2012 10:15:59 +0200 Subject: [PATCH] org.el: Be more strict about matching option keywords * org.el (org-options-keywords): Add "TODO". (org-make-options-regexp): Make the hashtag mandatory for options and don't allow whitespaces between the hashtag and the plus sign. --- lisp/org.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index e0366f5b3..fdaa16881 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11324,7 +11324,7 @@ This function can be used in a hook." '("TITLE:" "AUTHOR:" "EMAIL:" "DATE:" "DESCRIPTION:" "KEYWORDS:" "LANGUAGE:" "OPTIONS:" "EXPORT_SELECT_TAGS:" "EXPORT_EXCLUDE_TAGS:" - "LINK_UP:" "LINK_HOME:" "LINK:" + "LINK_UP:" "LINK_HOME:" "LINK:" "TODO:" "XSLT:" "CATEGORY:" "SEQ_TODO:" "TYP_TODO:" "PRIORITIES:" "DRAWERS:" "STARTUP:" "TAGS:" "FILETAGS:" "ARCHIVE:")) @@ -22062,12 +22062,10 @@ Show the heading too, if it is currently invisible." (defun org-make-options-regexp (kwds &optional extra) "Make a regular expression for keyword lines." (concat - "^" - "#?[ \t]*\\+\\(" + "^#\\+\\(" (mapconcat 'regexp-quote kwds "\\|") (if extra (concat "\\|" extra)) - "\\):[ \t]*" - "\\(.*\\)")) + "\\):[ \t]*\\(.*\\)")) ;; Make isearch reveal the necessary context (defun org-isearch-end () -- 2.11.4.GIT