diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2017-04-20 23:23:59 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2017-04-21 06:13:06 +0200 |
commit | 0ca61907cf4fe8afc723ed1e89e1a15ee69507ce (patch) | |
tree | 3585bf3d4d9e3100b7764e61f147e4c7e505d2bd /lisp/svg.el | |
parent | e8875bcbe067ea020dba95530ec4e9485942babd (diff) | |
download | emacs-0ca61907cf4fe8afc723ed1e89e1a15ee69507ce.tar.gz |
Allow svg-image to take all create-image PROPS
* lisp/svg.el (svg-image): Allow passing in PROPS when
creating an image for convenience.
Diffstat (limited to 'lisp/svg.el')
-rw-r--r-- | lisp/svg.el | 10 |
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 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. |