aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2009-02-07 15:29:11 +0000
committerAndreas Schwab2009-02-07 15:29:11 +0000
commitd2e9b790b7512af4044eb3f4b7b467f0ec54e2a0 (patch)
tree4dd67358709956b7a12caf56ec30b2155b6dead1
parent782c80e89204cbf2c9559ec49d1ebd3ea7fcc9ad (diff)
downloademacs-d2e9b790b7512af4044eb3f4b7b467f0ec54e2a0.tar.gz
emacs-d2e9b790b7512af4044eb3f4b7b467f0ec54e2a0.zip
(image-mode): Always set image-type.
(image-minor-mode): Likewise.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/image-mode.el9
2 files changed, 11 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cb04a520e5f..1b0e40ef29c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12009-02-07 Andreas Schwab <schwab@suse.de>
2
3 * image-mode.el (image-mode): Always set image-type.
4 (image-minor-mode): Likewise.
5
12009-02-07 Eli Zaretskii <eliz@gnu.org> 62009-02-07 Eli Zaretskii <eliz@gnu.org>
2 7
3 * mail/rmailedit.el (rmail-cease-edit): Look for the message's 8 * mail/rmailedit.el (rmail-cease-edit): Look for the message's
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 638f2516741..a5298d8eaa7 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -321,7 +321,6 @@ You can use \\<image-mode-map>\\[image-toggle-display]
321to toggle between display as an image and display as text." 321to toggle between display as an image and display as text."
322 (interactive) 322 (interactive)
323 (kill-all-local-variables) 323 (kill-all-local-variables)
324 (setq mode-name "Image[text]")
325 (setq major-mode 'image-mode) 324 (setq major-mode 'image-mode)
326 ;; Use our own bookmarking function for images. 325 ;; Use our own bookmarking function for images.
327 (set (make-local-variable 'bookmark-make-record-function) 326 (set (make-local-variable 'bookmark-make-record-function)
@@ -337,8 +336,11 @@ to toggle between display as an image and display as text."
337 ;; Set next vars when image is already displayed but local 336 ;; Set next vars when image is already displayed but local
338 ;; variables were cleared by kill-all-local-variables 337 ;; variables were cleared by kill-all-local-variables
339 (use-local-map image-mode-map) 338 (use-local-map image-mode-map)
340 (setq cursor-type nil truncate-lines t)) 339 (setq cursor-type nil truncate-lines t
340 image-type (plist-get (cdr (image-get-display-property)) :type)))
341 (setq image-type "text")
341 (use-local-map image-mode-text-map)) 342 (use-local-map image-mode-text-map))
343 (setq mode-name (format "Image[%s]" image-type))
342 (run-mode-hooks 'image-mode-hook) 344 (run-mode-hooks 'image-mode-hook)
343 (if (display-images-p) 345 (if (display-images-p)
344 (message "%s" (concat 346 (message "%s" (concat
@@ -362,7 +364,8 @@ See the command `image-mode' for more information on this mode."
362 (if (display-images-p) 364 (if (display-images-p)
363 (if (not (image-get-display-property)) 365 (if (not (image-get-display-property))
364 (image-toggle-display) 366 (image-toggle-display)
365 (setq cursor-type nil truncate-lines t)) 367 (setq cursor-type nil truncate-lines t
368 image-type (plist-get (cdr (image-get-display-property)) :type)))
366 (setq image-type "text") 369 (setq image-type "text")
367 (use-local-map image-mode-text-map)) 370 (use-local-map image-mode-text-map))
368 (if (display-images-p) 371 (if (display-images-p)