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

From: Juri Linkov <[email-masked]>
Date: Sun, 18 Sep 2011 22:28:39 +0300

> I propose two fixes: (1) Adding some common image types to
> inhibit-first-line-modes-regexps,

There is a little inconsistency: the default values for some formats
are added to `inhibit-first-line-modes-regexps' in files.el.
But other values are added to `inhibit-first-line-modes-suffixes'
dynamically by `jka-compr-install' in jka-cmpr-hook.el.
But this is not important because some image formats are
already present in files.el in `auto-mode-alist'.

> and (2) changing hack-local-variables-prop-line to return nil instead
> of signalling an error for the "Malformed mode line" case.

Yes, displaying a message is better even when "Malformed mode-line"
is momentarily replaced with "Type C-c C-c to view the image as text",
because it still allows visiting image files.