+2009-02-07 Andreas Schwab <schwab@suse.de>
+
+ * image-mode.el (image-mode): Always set image-type.
+ (image-minor-mode): Likewise.
+
2009-02-07 Eli Zaretskii <eliz@gnu.org>
* mail/rmailedit.el (rmail-cease-edit): Look for the message's
to toggle between display as an image and display as text."
(interactive)
(kill-all-local-variables)
- (setq mode-name "Image[text]")
(setq major-mode 'image-mode)
;; Use our own bookmarking function for images.
(set (make-local-variable 'bookmark-make-record-function)
;; Set next vars when image is already displayed but local
;; variables were cleared by kill-all-local-variables
(use-local-map image-mode-map)
- (setq cursor-type nil truncate-lines t))
+ (setq cursor-type nil truncate-lines t
+ image-type (plist-get (cdr (image-get-display-property)) :type)))
+ (setq image-type "text")
(use-local-map image-mode-text-map))
+ (setq mode-name (format "Image[%s]" image-type))
(run-mode-hooks 'image-mode-hook)
(if (display-images-p)
(message "%s" (concat
(if (display-images-p)
(if (not (image-get-display-property))
(image-toggle-display)
- (setq cursor-type nil truncate-lines t))
+ (setq cursor-type nil truncate-lines t
+ image-type (plist-get (cdr (image-get-display-property)) :type)))
(setq image-type "text")
(use-local-map image-mode-text-map))
(if (display-images-p)