Browse Source

Fix bug associated with setting image size via ATTR.

* lisp/org.el (org-display-inline-images): This change is necessary to
  make ATTR work.  Removed unnecessary save-match-data forms.
Joe Corneli 10 years ago
parent
commit
3ea1ce2e85
1 changed files with 9 additions and 10 deletions
  1. 9 10
      lisp/org.el

+ 9 - 10
lisp/org.el

@@ -19177,13 +19177,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)
@@ -19193,11 +19193,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