emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C file recoginzed as image file


From: Juanma Barranquero
Subject: Re: C file recoginzed as image file
Date: Fri, 5 Jan 2007 20:02:26 +0100

On 1/5/07, Chris Moore <address@hidden> wrote:

I'm thinking it would be safer to use auto-mode-alist before
magic-mode-alist.

`magic-mode-alist' is more specific. The problem is that some of these
regexps are too permissive. Supposing that anything that starts with
"#define " is a XBM file makes no sense.

I think it'd be good to apply the following patch, so auto-detection
of images by content is disabled, but available to these wanting to
set it up. (And we should mention `image-type-auto-detectable' in
NEWS.)

                   /L/e/k/t/u



Index: lisp/image.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/image.el,v
retrieving revision 1.66
diff -u -2 -r1.66 image.el
--- lisp/image.el       30 Dec 2006 01:51:24 -0000      1.66
+++ lisp/image.el       5 Jan 2007 18:53:41 -0000
@@ -65,12 +65,12 @@

 (defvar image-type-auto-detectable
-  '((pbm . t)
-    (xbm . t)
-    (bmp . maybe)
-    (gif . maybe)
-    (png . maybe)
-    (xpm . maybe)
-    (jpeg . maybe)
-    (tiff . maybe)
+  '((pbm . nil)
+    (xbm . nil)
+    (bmp . nil)
+    (gif . nil)
+    (png . nil)
+    (xpm . nil)
+    (jpeg . nil)
+    (tiff . nil)
    (postscript . nil))
  "Alist of (IMAGE-TYPE . AUTODETECT) pairs used to auto-detect image files.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]