[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: image.el doesn't associate image-mode with .JPG files
From: |
Juanma Barranquero |
Subject: |
Re: image.el doesn't associate image-mode with .JPG files |
Date: |
Tue, 12 Dec 2006 12:04:49 +0100 |
On 12/12/06, Chris Moore <address@hidden> wrote:
Opening these files with Emacs opens them in fundamental mode, not
image mode, since Emacs only associates image-mode with .jpg and .jpeg
files.
`image-type-from-file-name' uses `string-match', which depends on the
setting of `case-fold-search'.
Adding this line to the default value of image-type-file-name-regexps
in lisp/image.el would help:
("\\.JPE?G\\'" . jpeg)
Perhaps the following patch would be more correct. After all, I don't
think it will be common to have files with extensions .PNG, .TIFF,
.BMP, etc. which are not images.
/L/e/k/t/u
Index: lisp/image.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/image.el,v
retrieving revision 1.63
diff -u -2 -r1.63 image.el
--- lisp/image.el 21 Apr 2006 20:56:06 -0000 1.63
+++ lisp/image.el 12 Dec 2006 10:59:47 -0000
@@ -271,4 +271,5 @@
be determined."
(let ((types image-type-file-name-regexps)
+ (case-fold-search t)
type)
(while types
- image.el doesn't associate image-mode with .JPG files, Chris Moore, 2006/12/12
- Re: image.el doesn't associate image-mode with .JPG files,
Juanma Barranquero <=
- Re: image.el doesn't associate image-mode with .JPG files, Miles Bader, 2006/12/12
- Re: image.el doesn't associate image-mode with .JPG files, Juanma Barranquero, 2006/12/12
- Re: image.el doesn't associate image-mode with .JPG files, Chris Moore, 2006/12/12
- Re: image.el doesn't associate image-mode with .JPG files, Richard Stallman, 2006/12/12
- Re: image.el doesn't associate image-mode with .JPG files, Mathias Dahl, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files, Jason Rumney, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files, Juanma Barranquero, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files, Chris Moore, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files, Juanma Barranquero, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files, Chris Moore, 2006/12/13