Subject: bug#10063: 24.0.91; Making font-lock-mode-hook buffer-local while locally let-bound!

From: Stefan Monnier <[email-masked]>
Date: Wed, 16 Nov 2011 09:49:37 -0500

> I am seeing this warning in Gnus.
> ,----
> | Making font-lock-mode-hook buffer-local while locally let-bound!
> `----

> which seems to relate to line 602 in mm-view.el

> 601:	    ;; Disable support modes, e.g., jit-lock, lazy-lock, etc.
> 602:	    (font-lock-mode-hook nil)
> 603:	    (font-lock-support-mode nil)

BTW, these should not be let-bindings but buffer-local bindings.

Also the mode-setting and font-locking should be wrapped in
with-demoted-errors so that errors in them don't prevent showing the
attachment's content.

Finally, font-lock-maximum-size should not be set to nil: there is
nothing special about font-locking attachments that makes it more
desirable to font-lock them entirely than normal files.

        Stefan