aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2018-10-16 01:30:56 +0300
committerJuri Linkov2018-10-16 01:30:56 +0300
commit987956ae24b8311cf8ab4735d0147cb6a4bc370a (patch)
tree5ce6db3bd155ab2aca3c7d8782481573c0879061
parent96df6043bdd67507a7e3289ef2611e077933deb4 (diff)
downloademacs-987956ae24b8311cf8ab4735d0147cb6a4bc370a.tar.gz
emacs-987956ae24b8311cf8ab4735d0147cb6a4bc370a.zip
* lisp/image-mode.el (image--imagemagick-wanted-p): Check for file extension.
(Bug#32994) (image-toggle-display-text): Let-bind create-lockfiles to nil like in image-toggle-display-image.
-rw-r--r--lisp/image-mode.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 19fa28d4401..97c23e67480 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -692,6 +692,7 @@ on these modes."
692Remove text properties that display the image." 692Remove text properties that display the image."
693 (let ((inhibit-read-only t) 693 (let ((inhibit-read-only t)
694 (buffer-undo-list t) 694 (buffer-undo-list t)
695 (create-lockfiles nil) ; avoid changing dir mtime by lock_file
695 (modified (buffer-modified-p))) 696 (modified (buffer-modified-p)))
696 (remove-list-of-text-properties (point-min) (point-max) 697 (remove-list-of-text-properties (point-min) (point-max)
697 '(display read-nonsticky ;; intangible 698 '(display read-nonsticky ;; intangible
@@ -781,8 +782,9 @@ was inserted."
781(defun image--imagemagick-wanted-p (filename) 782(defun image--imagemagick-wanted-p (filename)
782 (and (fboundp 'imagemagick-types) 783 (and (fboundp 'imagemagick-types)
783 (not (eq imagemagick-types-inhibit t)) 784 (not (eq imagemagick-types-inhibit t))
784 (not (memq (intern (upcase (file-name-extension filename)) obarray) 785 (not (and (file-name-extension filename)
785 imagemagick-types-inhibit)))) 786 (memq (intern (upcase (file-name-extension filename)) obarray)
787 imagemagick-types-inhibit)))))
786 788
787(defun image-toggle-hex-display () 789(defun image-toggle-hex-display ()
788 "Toggle between image and hex display." 790 "Toggle between image and hex display."