[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/image-mode.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/image-mode.el,v |
Date: |
Fri, 09 Feb 2007 16:50:29 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 07/02/09 16:50:29
Index: image-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/image-mode.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- image-mode.el 3 Feb 2007 01:01:01 -0000 1.20
+++ image-mode.el 9 Feb 2007 16:50:29 -0000 1.21
@@ -60,6 +60,12 @@
(setq major-mode 'image-mode)
(use-local-map image-mode-map)
(add-hook 'change-major-mode-hook 'image-toggle-display-text nil t)
+ (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
@@ -174,16 +180,6 @@
(if (called-interactively-p)
(message "Repeat this command to go back to displaying the file as
text")))))
-;; Don't override the setting from .emacs.
-;;;###autoload (put 'image-toggle-display 'disabled t)
-
-(if (get 'image-toggle-display 'disabled)
- (put 'image-toggle-display 'disabled "\
-
-Warning: Displaying images in Emacs could be a security risk.
-Please ensure that you are using up-to-date image libraries
-and that the images being displayed come from a trusted source."))
-
(provide 'image-mode)
;; arch-tag: b5b2b7e6-26a7-4b79-96e3-1546b5c4c6cb