diff options
author | Zajcev Evgeny <zevlg@yandex.ru> | 2020-12-17 01:04:09 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2020-12-26 11:18:49 +0200 |
commit | b3c9af9061e09efd94a1f5bd58aed69800da237d (patch) | |
tree | ceb3266033e04195ab66f5417cca86c35387034e /src/image.c | |
parent | cf1d7034445e7896c34f88256e5d7f2674a4f7ee (diff) | |
download | emacs-b3c9af9061e09efd94a1f5bd58aed69800da237d.tar.gz |
Improvements for `:base-uri' svg image property
* src/image.c (svg_load): Use ENCODE_FILE for `:base-uri'
* doc/lispref/display.texi (SVG Images): Add more documentation for
`:base-uri'
Diffstat (limited to 'src/image.c')
-rw-r--r-- | src/image.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/image.c b/src/image.c index 29cd189f177..e99ba09f515 100644 --- a/src/image.c +++ b/src/image.c @@ -9803,8 +9803,9 @@ svg_load (struct frame *f, struct image *img) } /* If the file was slurped into memory properly, parse it. */ if (!STRINGP (base_uri)) - base_uri = ENCODE_FILE (file); - success_p = svg_load_image (f, img, contents, size, SSDATA (base_uri)); + base_uri = file; + success_p = svg_load_image (f, img, contents, size, + SSDATA (ENCODE_FILE (base_uri))); xfree (contents); } /* Else it's not a file, it's a Lisp object. Load the image from a @@ -9822,7 +9823,8 @@ svg_load (struct frame *f, struct image *img) if (!STRINGP (base_uri)) base_uri = BVAR (current_buffer, filename); success_p = svg_load_image (f, img, SSDATA (data), SBYTES (data), - (NILP (base_uri) ? NULL : SSDATA (base_uri))); + (STRINGP (base_uri) ? + SSDATA (ENCODE_FILE (base_uri)) : NULL)); } return success_p; |