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.
This commit is contained in:
parent
50cc08bf6e
commit
b176d16934
1 changed files with 3 additions and 0 deletions
|
|
@ -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))
|
||||
(image-toggle-display-image))
|
||||
(when (image-get-display-property)
|
||||
(image-toggle-display-text)
|
||||
;; Update image display.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue