]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/image-mode.el (image--imagemagick-wanted-p): Check for file extension.
authorJuri Linkov <juri@linkov.net>
Mon, 15 Oct 2018 22:30:56 +0000 (01:30 +0300)
committerJuri Linkov <juri@linkov.net>
Mon, 15 Oct 2018 22:30:56 +0000 (01:30 +0300)
(Bug#32994)
(image-toggle-display-text): Let-bind create-lockfiles to nil
like in image-toggle-display-image.

lisp/image-mode.el

index 19fa28d4401c7d3ddbfe682c509f94fd49023cc5..97c23e6748049e83dde9dddfedd3b6622c8cbcf6 100644 (file)
@@ -692,6 +692,7 @@ on these modes."
 Remove text properties that display the image."
   (let ((inhibit-read-only t)
        (buffer-undo-list t)
+       (create-lockfiles nil) ; avoid changing dir mtime by lock_file
        (modified (buffer-modified-p)))
     (remove-list-of-text-properties (point-min) (point-max)
                                    '(display read-nonsticky ;; intangible
@@ -781,8 +782,9 @@ was inserted."
 (defun image--imagemagick-wanted-p (filename)
   (and (fboundp 'imagemagick-types)
        (not (eq imagemagick-types-inhibit t))
-       (not (memq (intern (upcase (file-name-extension filename)) obarray)
-                  imagemagick-types-inhibit))))
+       (not (and (file-name-extension filename)
+                 (memq (intern (upcase (file-name-extension filename)) obarray)
+                       imagemagick-types-inhibit)))))
 
 (defun image-toggle-hex-display ()
   "Toggle between image and hex display."