Unverified Commit b176d169 authored by NicolasPetton's avatar NicolasPetton
Browse files

Fix auto-reverting image-mode buffer (bug#21598)

When auto-reverting an image buffer, `image-mode' is not called since
`revert-buffer' is called with `preserve-modes' set to non-nil.

* lisp/image-mode.el (image-after-revert-hook): Check if there is an
image display property for the current buffer before updating it.
parent 50cc08bf
......@@ -784,6 +784,9 @@ Otherwise, display the image by calling `image-mode'"
(kill-buffer (current-buffer)))
(defun image-after-revert-hook ()
;; Fixes bug#21598
(when (not (image-get-display-property))
(when (image-get-display-property)
;; Update image display.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment