فهرست منبع

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.
Bastien Guerry 13 سال پیش
والد
کامیت
6309dcae6b
1فایلهای تغییر یافته به همراه3 افزوده شده و 5 حذف شده
  1. 3 5
      lisp/org.el

+ 3 - 5
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 ()