summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ecay <aaronecay@gmail.com>2015-01-22 00:47:48 -0500
committerAaron Ecay <aaronecay@gmail.com>2015-01-22 00:47:48 -0500
commitcaad78ca8a15d5dce4c2f58f11c8b51966a2f42d (patch)
tree7fc786856a933792a14c353737249979bc8989f0
parentd45b5a788410a26a62c9f9a204bf4a0def3a0d3d (diff)
downloadorg-mode-caad78ca8a15d5dce4c2f58f11c8b51966a2f42d.tar.gz
babel: Fix bug in ‘org-babel-lob-get-info’.
* lisp/ob-lob.el (org-babel-lob-get-info): Use `save-match-data'. Callers rely on the match data being set to ‘org-babel-lob-one-liner-regexp’.
-rw-r--r--lisp/ob-lob.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ob-lob.el b/lisp/ob-lob.el
index 6480468..01148c7 100644
--- a/lisp/ob-lob.el
+++ b/lisp/ob-lob.el
@@ -116,9 +116,10 @@ if so then run the appropriate source block from the Library."
(match-string 2) (match-string 11)))
(save-excursion
(forward-line -1)
- (and (looking-at (concat org-babel-src-name-regexp
- "\\([^\n]*\\)$"))
- (org-no-properties (match-string 1))))))))))
+ (save-match-data
+ (and (looking-at (concat org-babel-src-name-regexp
+ "\\([^\n]*\\)$"))
+ (org-no-properties (match-string 1)))))))))))
(defvar org-babel-default-header-args:emacs-lisp) ; Defined in ob-emacs-lisp.el
(defun org-babel-lob-execute (info)