emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0ca6190 1/2: Allow svg-image to take all create-ima


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 0ca6190 1/2: Allow svg-image to take all create-image PROPS
Date: Fri, 21 Apr 2017 00:13:11 -0400 (EDT)

branch: master
commit 0ca61907cf4fe8afc723ed1e89e1a15ee69507ce
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Allow svg-image to take all create-image PROPS
    
    * lisp/svg.el (svg-image): Allow passing in PROPS when
    creating an image for convenience.
---
 lisp/svg.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/svg.el b/lisp/svg.el
index 2295e5f..cb924f8 100644
--- a/lisp/svg.el
+++ b/lisp/svg.el
@@ -222,13 +222,15 @@ otherwise.  IMAGE-TYPE should be a MIME image type, like
    def)
   svg)
 
-(defun svg-image (svg)
-  "Return an image object from SVG."
-  (create-image
+(defun svg-image (svg &rest props)
+  "Return an image object from SVG.
+PROPS is passed on to `create-image' as its PROPS list."
+  (apply
+   #'create-image
    (with-temp-buffer
      (svg-print svg)
      (buffer-string))
-   'svg t))
+   'svg t props))
 
 (defun svg-insert-image (svg)
   "Insert SVG as an image at point.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]