1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2025-01-01 11:15:00 +00:00

org-list: org-drawer-regexp is nil outside Org buffers

* lisp/org-list.el (org-in-item-p): re-build org-drawer-regexp,
  whatever the major mode is.
This commit is contained in:
Nicolas Goaziou 2011-03-20 09:10:53 +01:00
parent eab89fd82b
commit 74169a8029

View File

@ -419,6 +419,9 @@ This checks `org-list-ending-method'."
(let* ((case-fold-search t)
(context (org-list-context))
(lim-up (car context))
(drawers-re (concat "^[ \t]*:\\("
(mapconcat 'regexp-quote org-drawers "\\|")
"\\):[ \t]*$"))
(inlinetask-re (and (featurep 'org-inlinetask)
(org-inlinetask-outline-regexp)))
(item-re (org-item-re))
@ -468,7 +471,7 @@ This checks `org-list-ending-method'."
((looking-at "^[ \t]*#\\+end_")
(re-search-backward "^[ \t]*#\\+begin_" nil t))
((looking-at "^[ \t]*:END:")
(re-search-backward org-drawer-regexp nil t)
(re-search-backward drawers-re nil t)
(beginning-of-line))
((and inlinetask-re (looking-at inlinetask-re))
(org-inlinetask-goto-beginning)