mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-17 19:30:38 -08:00
* image-mode.el (image-mode): Fix last fix.
Suggested by Kim F. Storm.
This commit is contained in:
parent
1a762140f1
commit
ab145daf37
2 changed files with 18 additions and 14 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2006-08-29 Chong Yidong <cyd@stupidchicken.com>
|
||||||
|
|
||||||
|
* image-mode.el (image-mode): Fix last fix.
|
||||||
|
Suggested by Kim F. Storm.
|
||||||
|
|
||||||
2006-08-29 Michael Albinus <michael.albinus@gmx.de>
|
2006-08-29 Michael Albinus <michael.albinus@gmx.de>
|
||||||
|
|
||||||
Sync with Tramp 2.0.54.
|
Sync with Tramp 2.0.54.
|
||||||
|
|
|
||||||
|
|
@ -60,20 +60,19 @@ to toggle between display as an image and display as text."
|
||||||
(setq major-mode 'image-mode)
|
(setq major-mode 'image-mode)
|
||||||
(use-local-map image-mode-map)
|
(use-local-map image-mode-map)
|
||||||
(add-hook 'change-major-mode-hook 'image-toggle-display-text nil t)
|
(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 (display-images-p)
|
||||||
(if (and image-display-supported-p
|
(not (get-text-property (point-min) 'display)))
|
||||||
(not (get-text-property (point-min) 'display)))
|
(image-toggle-display)
|
||||||
(image-toggle-display)
|
;; Set next vars when image is already displayed but local
|
||||||
;; Set next vars when image is already displayed but local
|
;; variables were cleared by kill-all-local-variables
|
||||||
;; variables were cleared by kill-all-local-variables
|
(setq cursor-type nil truncate-lines t))
|
||||||
(setq cursor-type nil truncate-lines t))
|
(run-mode-hooks 'image-mode-hook)
|
||||||
(run-mode-hooks 'image-mode-hook)
|
(if (display-images-p)
|
||||||
(if image-display-supported-p
|
(message "%s" (concat
|
||||||
(message "%s" (concat
|
(substitute-command-keys
|
||||||
(substitute-command-keys
|
"Type \\[image-toggle-display] to view the image as ")
|
||||||
"Type \\[image-toggle-display] to view the image as ")
|
(if (get-text-property (point-min) 'display)
|
||||||
(if (get-text-property (point-min) 'display)
|
"text" "an image") "."))))
|
||||||
"text" "an image") ".")))))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-minor-mode image-minor-mode
|
(define-minor-mode image-minor-mode
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue