Browse Source

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’.
Aaron Ecay 10 years ago
parent
commit
caad78ca8a
1 changed files with 4 additions and 3 deletions
  1. 4 3
      lisp/ob-lob.el

+ 4 - 3
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)