Commit 0fb1193d authored by Juri Linkov's avatar Juri Linkov
Browse files

* image-mode.el (image-mode): Add image-after-revert-hook to after-revert-hook.

(image-after-revert-hook): New function.  (Bug#5669)
parent fc937924
2010-05-25 Juri Linkov <juri@jurta.org>
* image-mode.el (image-mode): Add image-after-revert-hook to
after-revert-hook.
(image-after-revert-hook): New function. (Bug#5669)
2010-05-25 Juri Linkov <juri@jurta.org>
* image.el (image-animated-p): When delay between animated images
......
......@@ -357,6 +357,7 @@ to toggle between display as an image and display as text."
(image-mode-setup-winprops)
(add-hook 'change-major-mode-hook 'image-toggle-display-text nil t)
(add-hook 'after-revert-hook 'image-after-revert-hook nil t)
(run-mode-hooks 'image-mode-hook)
(message "%s" (concat
(substitute-command-keys
......@@ -503,6 +504,14 @@ the image file and `image-mode' showing the image as an image."
(if (image-get-display-property)
(image-mode-as-text)
(image-mode)))
(defun image-after-revert-hook ()
(when (image-get-display-property)
(image-toggle-display-text)
;; Update image display.
(redraw-frame (selected-frame))
(image-toggle-display-image)))
;;; Support for bookmark.el
(declare-function bookmark-make-record-default "bookmark"
......
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