From c0f60b932c11936e2c1ed7e84c9385500d3e6e7e Mon Sep 17 00:00:00 2001
From: Joe Corneli <holtzermann17@gmail.com>
Date: Thu, 7 Aug 2014 13:42:54 +0100
Subject: [PATCH] Fix bug associated with setting image size via ATTR.

This change is necessary to make ATTR work.
Removed unnecessary save-match-data forms.
---
 lisp/org.el | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 0f7a4ef..2584dc4 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19168,13 +19168,13 @@ boundaries."
 			     (when paragraph
 			       (save-excursion
 				 (goto-char (org-element-property :begin paragraph))
-				 (when (save-match-data
-					 (re-search-forward
-					  "^[ \t]*#\\+attr_.*?: +.*?:width +\\(\\S-+\\)"
-					  (org-element-property
-					   :post-affiliated paragraph)
-					  t))
-				   (string-to-number (match-string 1))))))
+				   (when
+				       (re-search-forward
+					"^[ \t]*#\\+attr_.*?: +.*?:width +\\(\\S-+\\)"
+					(org-element-property
+					 :post-affiliated paragraph)
+					t)
+				     (string-to-number (match-string 1))))))
 			   ;; Otherwise, fall-back to provided number.
 			   (car org-image-actual-width)))
 			 ((numberp org-image-actual-width)
@@ -19184,11 +19184,10 @@ boundaries."
 			     'org-image-overlay)))
 		   (if (and (car-safe old) refresh)
 		       (image-refresh (overlay-get (cdr old) 'display))
-		     (let ((image (save-match-data
-				    (create-image file
+		     (let ((image (create-image file
 						  (and width 'imagemagick)
 						  nil
-						  :width width))))
+						  :width width)))
 		       (when image
 			 (let* ((link
 				 ;; If inline image is the description
-- 
1.8.5.2 (Apple Git-48)

