org.el: Allow lowercase "#+category" and "#+begin:" dynamic blocks

* org.el (org-refresh-category-properties)
(org-find-dblock, org-dblock-start-re, org-dblock-end-re):
Allow lowercase "#+category" and "#+begin:" dynamic blocks.
This commit is contained in:
Bastien Guerry 2012-08-19 08:48:53 +02:00
parent 788f7da285
commit f926d9019b
1 changed files with 7 additions and 6 deletions

View File

@ -8698,7 +8698,8 @@ call CMD."
(defun org-refresh-category-properties ()
"Refresh category text properties in the buffer."
(let ((inhibit-read-only t)
(let ((case-fold-search t)
(inhibit-read-only t)
(def-cat (cond
((null org-category)
(if buffer-file-name
@ -11158,20 +11159,20 @@ this is used for the GOTO interface."
(defun org-find-dblock (name)
"Find the first dynamic block with name NAME in the buffer.
If not found, stay at current position and return nil."
(let (pos)
(let ((case-fold-search t) pos)
(save-excursion
(goto-char (point-min))
(setq pos (and (re-search-forward (concat "^[ \t]*#\\+BEGIN:[ \t]+" name "\\>")
nil t)
(setq pos (and (re-search-forward
(concat "^[ \t]*#\\+\\(?:BEGIN\\|begin\\):[ \t]+" name "\\>") nil t)
(match-beginning 0))))
(if pos (goto-char pos))
pos))
(defconst org-dblock-start-re
"^[ \t]*#\\+BEGIN:[ \t]+\\(\\S-+\\)\\([ \t]+\\(.*\\)\\)?"
"^[ \t]*#\\+\\(?:BEGIN\\|begin\\):[ \t]+\\(\\S-+\\)\\([ \t]+\\(.*\\)\\)?"
"Matches the start line of a dynamic block, with parameters.")
(defconst org-dblock-end-re "^[ \t]*#\\+END\\([: \t\r\n]\\|$\\)"
(defconst org-dblock-end-re "^[ \t]*#\\+\\(?:END\\|end\\)\\([: \t\r\n]\\|$\\)"
"Matches the end of a dynamic block.")
(defun org-create-dblock (plist)