aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2017-04-20 23:23:59 +0200
committerLars Ingebrigtsen2017-04-21 06:13:06 +0200
commit0ca61907cf4fe8afc723ed1e89e1a15ee69507ce (patch)
tree3585bf3d4d9e3100b7764e61f147e4c7e505d2bd
parente8875bcbe067ea020dba95530ec4e9485942babd (diff)
downloademacs-0ca61907cf4fe8afc723ed1e89e1a15ee69507ce.tar.gz
emacs-0ca61907cf4fe8afc723ed1e89e1a15ee69507ce.zip
Allow svg-image to take all create-image PROPS
* lisp/svg.el (svg-image): Allow passing in PROPS when creating an image for convenience.
-rw-r--r--lisp/svg.el10
1 files changed, 6 insertions, 4 deletions
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
222 def) 222 def)
223 svg) 223 svg)
224 224
225(defun svg-image (svg) 225(defun svg-image (svg &rest props)
226 "Return an image object from SVG." 226 "Return an image object from SVG.
227 (create-image 227PROPS is passed on to `create-image' as its PROPS list."
228 (apply
229 #'create-image
228 (with-temp-buffer 230 (with-temp-buffer
229 (svg-print svg) 231 (svg-print svg)
230 (buffer-string)) 232 (buffer-string))
231 'svg t)) 233 'svg t props))
232 234
233(defun svg-insert-image (svg) 235(defun svg-insert-image (svg)
234 "Insert SVG as an image at point. 236 "Insert SVG as an image at point.