From: Lars Ingebrigtsen Date: Thu, 20 Apr 2017 21:23:59 +0000 (+0200) Subject: Allow svg-image to take all create-image PROPS X-Git-Tag: emacs-26.0.90~521^2~585 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0ca61907cf4fe8afc723ed1e89e1a15ee69507ce;p=emacs.git Allow svg-image to take all create-image PROPS * lisp/svg.el (svg-image): Allow passing in PROPS when creating an image for convenience. --- diff --git a/lisp/svg.el b/lisp/svg.el index 2295e5f8d49..cb924f8163d 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.