1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-28 10:56:36 +00:00

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

(image-after-revert-hook): New function.  (Bug#5669)
This commit is contained in:
Juri Linkov 2010-05-25 19:03:53 +03:00
parent fc93792445
commit 0fb1193d6c
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -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"