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

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

bug#9044: 24.0.50; File mode specification error: (error "Malformed -*-


From: Juri Linkov
Subject: bug#9044: 24.0.50; File mode specification error: (error "Malformed -*- line")
Date: Thu, 15 Sep 2011 21:37:37 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> Well, it would make sense to have the "-*-" parser try to be a bit more
> intelligent, wouldn't it?  But I don't really have a good idea what to
> do.
>
> Having Emacs error totally out and refuse to show the image sounds like
> a bad idea, though.

This can be fixed by limiting the search for "-*-" with some reasonable value,
e.g. modifying `set-auto-mode-1' to use: `(min (line-end-position) 1024)'.

Another solution is to add file extensions of binary image formats to
`inhibit-first-line-modes-regexps' or `inhibit-first-line-modes-suffixes'.
But a list of image formats supported by ImageMagick is too long:
(length (imagemagick-types)) => 206.  Perhaps this is not a problem.





reply via email to

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