aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS7
-rw-r--r--lisp/image-mode.el8
2 files changed, 14 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index d29a513c70c..980a5b453a2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -551,6 +551,13 @@ such decisions (if they are to be made at all) are left to
551higher-level functions. 551higher-level functions.
552 552
553 553
554** image-mode
555
556*** image-mode started using ImageMagick by default for all images
557some years back. It now respects `imagemagick-types-inhibit' as a way
558to disable that.
559
560
554+++ 561+++
555** The new function 'read-answer' accepts either long or short answers 562** The new function 'read-answer' accepts either long or short answers
556depending on the new customizable variable 'read-answer-short'. 563depending on the new customizable variable 'read-answer-short'.
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 70d2ca87cc6..320f21a62d7 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -758,7 +758,7 @@ was inserted."
758 (edges (and (null image-transform-resize) 758 (edges (and (null image-transform-resize)
759 (window-inside-pixel-edges 759 (window-inside-pixel-edges
760 (get-buffer-window (current-buffer))))) 760 (get-buffer-window (current-buffer)))))
761 (type (if (fboundp 'imagemagick-types) 761 (type (if (image--imagemagick-wanted-p filename)
762 'imagemagick 762 'imagemagick
763 (image-type file-or-data nil data-p))) 763 (image-type file-or-data nil data-p)))
764 (image (if (not edges) 764 (image (if (not edges)
@@ -803,6 +803,12 @@ was inserted."
803 (if (called-interactively-p 'any) 803 (if (called-interactively-p 'any)
804 (message "Repeat this command to go back to displaying the file as text")))) 804 (message "Repeat this command to go back to displaying the file as text"))))
805 805
806(defun image--imagemagick-wanted-p (filename)
807 (and (fboundp 'imagemagick-types)
808 (not (eq imagemagick-types-inhibit t))
809 (not (memq (intern (upcase (file-name-extension filename)) obarray)
810 imagemagick-types-inhibit))))
811
806(defun image-toggle-hex-display () 812(defun image-toggle-hex-display ()
807 "Toggle between image and hex display." 813 "Toggle between image and hex display."
808 (interactive) 814 (interactive)