diff options
| author | Chong Yidong | 2007-02-09 16:50:29 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-02-09 16:50:29 +0000 |
| commit | f992a935ed097ef3e63472fc9a0fb4dc063fbe54 (patch) | |
| tree | 6c582f5bc34f7ae78800900fa9fca4f2ffa9bd81 | |
| parent | a9bb04bb5327566ed880b896893465687b22b41b (diff) | |
| download | emacs-f992a935ed097ef3e63472fc9a0fb4dc063fbe54.tar.gz emacs-f992a935ed097ef3e63472fc9a0fb4dc063fbe54.zip | |
(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." | |||
| 60 | (setq major-mode 'image-mode) | 60 | (setq major-mode 'image-mode) |
| 61 | (use-local-map image-mode-map) | 61 | (use-local-map image-mode-map) |
| 62 | (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) | 62 | (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) |
| 63 | (if (and (display-images-p) | ||
| 64 | (not (get-text-property (point-min) 'display))) | ||
| 65 | (image-toggle-display) | ||
| 66 | ;; Set next vars when image is already displayed but local | ||
| 67 | ;; variables were cleared by kill-all-local-variables | ||
| 68 | (setq cursor-type nil truncate-lines t)) | ||
| 63 | (run-mode-hooks 'image-mode-hook) | 69 | (run-mode-hooks 'image-mode-hook) |
| 64 | (if (display-images-p) | 70 | (if (display-images-p) |
| 65 | (message "%s" (concat | 71 | (message "%s" (concat |
| @@ -174,16 +180,6 @@ and showing the image as an image." | |||
| 174 | (if (called-interactively-p) | 180 | (if (called-interactively-p) |
| 175 | (message "Repeat this command to go back to displaying the file as text"))))) | 181 | (message "Repeat this command to go back to displaying the file as text"))))) |
| 176 | 182 | ||
| 177 | ;; Don't override the setting from .emacs. | ||
| 178 | ;;;###autoload (put 'image-toggle-display 'disabled t) | ||
| 179 | |||
| 180 | (if (get 'image-toggle-display 'disabled) | ||
| 181 | (put 'image-toggle-display 'disabled "\ | ||
| 182 | |||
| 183 | Warning: Displaying images in Emacs could be a security risk. | ||
| 184 | Please ensure that you are using up-to-date image libraries | ||
| 185 | and that the images being displayed come from a trusted source.")) | ||
| 186 | |||
| 187 | (provide 'image-mode) | 183 | (provide 'image-mode) |
| 188 | 184 | ||
| 189 | ;; arch-tag: b5b2b7e6-26a7-4b79-96e3-1546b5c4c6cb | 185 | ;; arch-tag: b5b2b7e6-26a7-4b79-96e3-1546b5c4c6cb |