# HG changeset patch # User Chong Yidong # Date 1156856573 0 # Node ID 7011a586dd45dfb72d1b4df450d0e276f7c38409 # Parent 7457615d594a6d86c96459a2f12f5ec5e8063cac * image-mode.el (image-mode): Fix last fix. Suggested by Kim F. Storm. diff -r 7457615d594a -r 7011a586dd45 lisp/ChangeLog --- a/lisp/ChangeLog Tue Aug 29 05:48:40 2006 +0000 +++ b/lisp/ChangeLog Tue Aug 29 13:02:53 2006 +0000 @@ -1,3 +1,8 @@ +2006-08-29 Chong Yidong + + * image-mode.el (image-mode): Fix last fix. + Suggested by Kim F. Storm. + 2006-08-29 Michael Albinus Sync with Tramp 2.0.54. diff -r 7457615d594a -r 7011a586dd45 lisp/image-mode.el --- a/lisp/image-mode.el Tue Aug 29 05:48:40 2006 +0000 +++ b/lisp/image-mode.el Tue Aug 29 13:02:53 2006 +0000 @@ -60,20 +60,19 @@ (setq major-mode 'image-mode) (use-local-map image-mode-map) (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) - (let ((image-display-supported-p (memq window-system '(x w32 mac)))) - (if (and image-display-supported-p - (not (get-text-property (point-min) 'display))) - (image-toggle-display) - ;; Set next vars when image is already displayed but local - ;; variables were cleared by kill-all-local-variables - (setq cursor-type nil truncate-lines t)) - (run-mode-hooks 'image-mode-hook) - (if image-display-supported-p - (message "%s" (concat - (substitute-command-keys - "Type \\[image-toggle-display] to view the image as ") - (if (get-text-property (point-min) 'display) - "text" "an image") "."))))) + (if (and (display-images-p) + (not (get-text-property (point-min) 'display))) + (image-toggle-display) + ;; Set next vars when image is already displayed but local + ;; variables were cleared by kill-all-local-variables + (setq cursor-type nil truncate-lines t)) + (run-mode-hooks 'image-mode-hook) + (if (display-images-p) + (message "%s" (concat + (substitute-command-keys + "Type \\[image-toggle-display] to view the image as ") + (if (get-text-property (point-min) 'display) + "text" "an image") ".")))) ;;;###autoload (define-minor-mode image-minor-mode