[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Image autodetection
From: |
Juanma Barranquero |
Subject: |
Re: Image autodetection |
Date: |
Tue, 30 Jan 2007 13:11:55 +0100 |
On 1/30/07, Juanma Barranquero <address@hidden> wrote:
so I like Richard's idea of bypassing #1 of Chong's
proposals (no more options, please!) and just implementing #2 (with
image-toggle-display disabled, as you note).
Something like the attached patch, which couldn't be simpler.
/L/e/k/t/u
Index: lisp/image-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/image-mode.el,v
retrieving revision 1.16
diff -u -2 -r1.16 image-mode.el
--- lisp/image-mode.el 21 Jan 2007 03:53:11 -0000 1.16
+++ lisp/image-mode.el 30 Jan 2007 12:03:44 -0000
@@ -61,10 +61,5 @@
(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))
+ (setq cursor-type nil truncate-lines t)
(run-mode-hooks 'image-mode-hook)
(if (display-images-p)
@@ -180,4 +175,10 @@
(message "Repeat this command to go back to displaying the file as
text")))))
+(put 'image-toggle-display 'disabled "\
+
+WARNING: Displaying images can be a security risk.
+Please make sure you're using up-to-date image libraries
+and the images displayed come from a trusted source.")
+
(provide 'image-mode)
- Image autodetection, Chong Yidong, 2007/01/29
- Re: Image autodetection, Juanma Barranquero, 2007/01/29
- Re: Image autodetection, Jason Rumney, 2007/01/30
- Re: Image autodetection, Juanma Barranquero, 2007/01/30
- Re: Image autodetection,
Juanma Barranquero <=
- Re: Image autodetection, Stefan Monnier, 2007/01/30
- Re: Image autodetection, Juanma Barranquero, 2007/01/30
- Re: Image autodetection, Jason Rumney, 2007/01/30
- Re: Image autodetection, Juanma Barranquero, 2007/01/30
- Re: Image autodetection, Chong Yidong, 2007/01/30
Re: Image autodetection, Richard Stallman, 2007/01/29
Re: Image autodetection, Miles Bader, 2007/01/29