From: "Juanma Barranquero" <lekktu@gmail.com>
To: "Jason Rumney" <jasonr@gnu.org>
Cc: Chong Yidong <cyd@stupidchicken.com>, emacs-devel@gnu.org
Subject: Re: Image autodetection
Date: Tue, 30 Jan 2007 13:11:55 +0100 [thread overview]
Message-ID: <f7ccd24b0701300411n3a943f1ehe59ca3a8646a33a8@mail.gmail.com> (raw)
In-Reply-To: <f7ccd24b0701300138j35f62617o591890d313f48664@mail.gmail.com>
On 1/30/07, Juanma Barranquero <lekktu@gmail.com> 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)
next prev parent reply other threads:[~2007-01-30 12:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-29 19:05 Image autodetection Chong Yidong
2007-01-29 19:19 ` Juanma Barranquero
2007-01-30 9:04 ` Jason Rumney
2007-01-30 9:38 ` Juanma Barranquero
2007-01-30 12:11 ` Juanma Barranquero [this message]
2007-01-30 15:24 ` Stefan Monnier
2007-01-30 15:59 ` Juanma Barranquero
2007-01-30 16:54 ` Jason Rumney
2007-01-30 17:07 ` Juanma Barranquero
2007-01-30 16:58 ` Chong Yidong
2007-01-29 23:53 ` Richard Stallman
2007-01-30 0:55 ` Miles Bader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7ccd24b0701300411n3a943f1ehe59ca3a8646a33a8@mail.gmail.com \
--to=lekktu@gmail.com \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=jasonr@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.