branch: externals/svg-lib commit 9115bf78c94302a17cc3fb3f60d7b1071c074d9a Author: chenyanming <elecm...@gmail.com> Commit: chenyanming <elecm...@gmail.com>
Fix string/array nil issue on windows This fixes the svg-lib-button/svg-lib-progress can not be used on windows issue. Mentioned on issue #2. --- svg-lib.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/svg-lib.el b/svg-lib.el index 5ee0bba..40919ed 100644 --- a/svg-lib.el +++ b/svg-lib.el @@ -318,18 +318,15 @@ Cached version is returned if it exists unless FORCE-RELOAD is t." (write-region (point-min) (point-max) filename)))) ;; Get data from cache - (let ((buffer (generate-new-buffer " *temp*"))) + (let ((buffer (url-fetch-from-cache url))) (with-current-buffer buffer - (url-cache-extract (url-cache-create-filename url))) - (with-temp-buffer - (url-insert-buffer-contents buffer url) (xml-parse-region (point-min) (point-max)))))) (defun svg-lib-icon (icon &optional style &rest args) "Create a SVG image displaying icon NAME from COLLECTION using given STYLE and style elements ARGS." - + (let* ((default svg-lib-style-default) (style (if style (apply #'svg-lib-style nil style) default)) (style (if args (apply #'svg-lib-style style args) style))