diff options
author | Noam Postavsky <npostavs@gmail.com> | 2019-04-28 16:29:44 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2019-04-28 16:45:13 -0400 |
commit | 74712470fcb95cd4ef6ef5c61eee73cb8e02a8bd (patch) | |
tree | 3c802c616119719cf8434e77706fd22915df0a8c /lisp/image-file.el | |
parent | caadbd94921b66fd6820dbc95783765837b931f7 (diff) | |
download | emacs-74712470fcb95cd4ef6ef5c61eee73cb8e02a8bd.tar.gz |
Replace use of obsolete string-make-unibyte
* lisp/image-file.el (insert-image-file): Use encode-coding-region
instead of string-make-unibyte.
* test/lisp/image-file-tests.el: New test.
Diffstat (limited to 'lisp/image-file.el')
-rw-r--r-- | lisp/image-file.el | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lisp/image-file.el b/lisp/image-file.el index abc4686d69c..6cadc42110f 100644 --- a/lisp/image-file.el +++ b/lisp/image-file.el @@ -110,11 +110,8 @@ absolute file name and number of characters inserted." (let* ((ibeg (point)) (iend (+ (point) (cadr rval))) (visitingp (and visit (= ibeg (point-min)) (= iend (point-max)))) - (data - (string-make-unibyte - (buffer-substring-no-properties ibeg iend))) - (image - (create-image data nil t)) + (image (create-image (encode-coding-region ibeg iend 'binary t) + nil t)) (props `(display ,image yank-handler |