From f22e8eb7d7cced676471268a2eb7d69ad8e3e1b8 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sun, 31 Jul 2011 10:53:54 +0200 Subject: [PATCH] Prevent runtime error introduced by commit 9ff7f80f51a * lisp/ob.el (defvar): revert wrapping into eval-when-compile since it makes the variable non-existent during initial load. * lisp/ob.el (org-babel-map-inline-src-blocks): un-comma use of variable org-babel-inline-src-block-regexp, since we don't want to expand it at compile-time TINYCHANGE --- lisp/ob.el | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lisp/ob.el b/lisp/ob.el index 4961ceb..c5a877d 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -141,16 +141,15 @@ remove code block execution from the C-c C-c keybinding." "\\([^\000]*?\n\\)?[ \t]*#\\+end_src") "Regexp used to identify code blocks.") -(eval-when-compile - (defvar org-babel-inline-src-block-regexp - (concat - ;; (1) replacement target (2) lang - "[^-[:alnum:]]\\(src_\\([^ \f\t\n\r\v]+\\)" - ;; (3,4) (unused, headers) - "\\(\\|\\[\\(.*?\\)\\]\\)" - ;; (5) body - "{\\([^\f\n\r\v]+?\\)}\\)") - "Regexp used to identify inline src-blocks.")) +(defvar org-babel-inline-src-block-regexp + (concat + ;; (1) replacement target (2) lang + "[^-[:alnum:]]\\(src_\\([^ \f\t\n\r\v]+\\)" + ;; (3,4) (unused, headers) + "\\(\\|\\[\\(.*?\\)\\]\\)" + ;; (5) body + "{\\([^\f\n\r\v]+?\\)}\\)") + "Regexp used to identify inline src-blocks.") (defun org-babel-get-header (params key &optional others) "Select only header argument of type KEY from a list. @@ -750,7 +749,7 @@ buffer." If FILE is nil evaluate BODY forms on source blocks in current buffer." (declare (indent 1)) - `(org-babel-map-regexp ,org-babel-inline-src-block-regexp ,file ,@body)) + `(org-babel-map-regexp org-babel-inline-src-block-regexp ,file ,@body)) ;;;###autoload (defun org-babel-execute-buffer (&optional arg) -- 1.7.6