From 74712470fcb95cd4ef6ef5c61eee73cb8e02a8bd Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 28 Apr 2019 16:29:44 -0400 Subject: 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. --- lisp/image-file.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lisp/image-file.el') 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 -- cgit v1.2.1