diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2007-02-09 16:50:29 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2007-02-09 16:50:29 +0000 |
commit | f992a935ed097ef3e63472fc9a0fb4dc063fbe54 (patch) | |
tree | 6c582f5bc34f7ae78800900fa9fca4f2ffa9bd81 | |
parent | a9bb04bb5327566ed880b896893465687b22b41b (diff) | |
download | emacs-f992a935ed097ef3e63472fc9a0fb4dc063fbe54.tar.gz |
(image-mode): Revert 2007-01-30 changes.
-rw-r--r-- | lisp/image-mode.el | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index fdc331a08be..eb08de1d6bb 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -60,6 +60,12 @@ to toggle between display as an image and display as text." (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 @@ and showing the image as an image." (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 |