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.
(kill-buffer (current-buffer)))
(defun image-after-revert-hook ()
+ ;; Fixes bug#21598
+ (when (not (image-get-display-property))
+ (image-toggle-display-image))
(when (image-get-display-property)
(image-toggle-display-text)
;; Update image display.