From: Bastien Guerry <bastien1@free.fr>
Date: Wed, 16 May 2012 21:53:39 +0000 (+0200)
Subject: ob.el: Fix bug.
X-Git-Tag: emacs-24.0.97~1
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eb2adf0a299180c4c78253c8b3ccc9c3da9c3805;p=emacs.git

ob.el: Fix bug.
---

diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 3839100ff4d..19f6a15dc9c 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-16  Eric Schulte  <eric.schulte@gmx.com>
+
+	* ob.el (org-babel-parse-src-block-match): Save match data during
+	indentation check.
+
 2012-05-16  Bastien Guerry  <bzg@gnu.org>
 
 	* org.el (org-scan-tags): Correctly match TODO keywords.
diff --git a/lisp/org/ob.el b/lisp/org/ob.el
index f3b7d6814bd..69d7da4cb0e 100644
--- a/lisp/org/ob.el
+++ b/lisp/org/ob.el
@@ -1159,7 +1159,8 @@ may be specified in the properties of the current outline entry."
 		      (substring body 0 sub-length)
 		    (or body "")))))
 	 (preserve-indentation (or org-src-preserve-indentation
-				   (string-match "-i\\>" switches))))
+				   (save-match-data
+				     (string-match "-i\\>" switches)))))
     (list lang
           ;; get block body less properties, protective commas, and indentation
           (with-temp-buffer