diff options
| author | Juri Linkov | 2010-05-25 19:03:53 +0300 |
|---|---|---|
| committer | Juri Linkov | 2010-05-25 19:03:53 +0300 |
| commit | 0fb1193d6c3923cb3b2033e75f81a769ff2860f2 (patch) | |
| tree | 8f1ed3447c9f7ae97bf567cf946512fb320a16cc | |
| parent | fc93792445a4414df998a6122c0c90ba69029c13 (diff) | |
| download | emacs-0fb1193d6c3923cb3b2033e75f81a769ff2860f2.tar.gz emacs-0fb1193d6c3923cb3b2033e75f81a769ff2860f2.zip | |
* image-mode.el (image-mode): Add image-after-revert-hook to after-revert-hook.
(image-after-revert-hook): New function. (Bug#5669)
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/image-mode.el | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cfc0f927346..691db07cc4c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2010-05-25 Juri Linkov <juri@jurta.org> | 1 | 2010-05-25 Juri Linkov <juri@jurta.org> |
| 2 | 2 | ||
| 3 | * image-mode.el (image-mode): Add image-after-revert-hook to | ||
| 4 | after-revert-hook. | ||
| 5 | (image-after-revert-hook): New function. (Bug#5669) | ||
| 6 | |||
| 7 | 2010-05-25 Juri Linkov <juri@jurta.org> | ||
| 8 | |||
| 3 | * image.el (image-animated-p): When delay between animated images | 9 | * image.el (image-animated-p): When delay between animated images |
| 4 | is 0, set it to 10 (0.1 sec). (Bug#6258) | 10 | is 0, set it to 10 (0.1 sec). (Bug#6258) |
| 5 | 11 | ||
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index f1323563d5d..04a81f9038e 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -357,6 +357,7 @@ to toggle between display as an image and display as text." | |||
| 357 | (image-mode-setup-winprops) | 357 | (image-mode-setup-winprops) |
| 358 | 358 | ||
| 359 | (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) | 359 | (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) |
| 360 | (add-hook 'after-revert-hook 'image-after-revert-hook nil t) | ||
| 360 | (run-mode-hooks 'image-mode-hook) | 361 | (run-mode-hooks 'image-mode-hook) |
| 361 | (message "%s" (concat | 362 | (message "%s" (concat |
| 362 | (substitute-command-keys | 363 | (substitute-command-keys |
| @@ -503,6 +504,14 @@ the image file and `image-mode' showing the image as an image." | |||
| 503 | (if (image-get-display-property) | 504 | (if (image-get-display-property) |
| 504 | (image-mode-as-text) | 505 | (image-mode-as-text) |
| 505 | (image-mode))) | 506 | (image-mode))) |
| 507 | |||
| 508 | (defun image-after-revert-hook () | ||
| 509 | (when (image-get-display-property) | ||
| 510 | (image-toggle-display-text) | ||
| 511 | ;; Update image display. | ||
| 512 | (redraw-frame (selected-frame)) | ||
| 513 | (image-toggle-display-image))) | ||
| 514 | |||
| 506 | 515 | ||
| 507 | ;;; Support for bookmark.el | 516 | ;;; Support for bookmark.el |
| 508 | (declare-function bookmark-make-record-default "bookmark" | 517 | (declare-function bookmark-make-record-default "bookmark" |