bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#10601: 24.0.92; Visiting tgz files sets mode from File Local Variabl


From: Juri Linkov
Subject: bug#10601: 24.0.92; Visiting tgz files sets mode from File Local Variables
Date: Wed, 25 Jan 2012 21:32:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (x86_64-pc-linux-gnu)

> Isn't this bug #10506 that Glenn fixed a few days ago?  When was your
> Emacs built?

With bug#10506 Glenn also fixed the case of visiting `browser.jar'
that I reported in http://debbugs.gnu.org/10338#11

But visiting TGA image files still displays the message "Malformed -*- line"
as reported in http://debbugs.gnu.org/9044#29

I think `imagemagick-register-types' should add TGA to
`inhibit-local-variables-regexps':

=== modified file 'lisp/image.el'
--- lisp/image.el       2012-01-25 17:54:01 +0000
+++ lisp/image.el       2012-01-25 19:31:10 +0000
@@ -712,7 +712,8 @@ (defun imagemagick-register-types ()
                     (not (memq (intern (upcase (symbol-name im-type)))
                                imagemagick-types-inhibit)))
            (push (cons (car header-regexp) 'imagemagick)
-                 image-type-header-regexps)))))))
+                 image-type-header-regexps))))
+      (push "\\.tga\\'" inhibit-local-variables-regexps))))
 
 (provide 'image)
 

This is desirable for TGA because it usually contains many occurences of -*-
in the first line.

Of course, in 24.2 it would be better to check for `image-mode'
to cover all other image formats as well.





reply via email to

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