emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs revision #107149


From: Stefan Monnier
Subject: Re: Emacs revision #107149
Date: Sun, 12 Feb 2012 22:15:18 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

> Try this instead: It solves the actual problem stated in the comment,
> rather than papering over it:

> *** mm-view.el~       2012-02-08 14:25:18.000000000 +0000
> --- mm-view.el        2012-02-12 21:50:34.000000000 +0000
> ***************
> *** 601,610 ****
>         (require 'font-lock)
>         ;; I find font-lock a bit too verbose.
>         (let ((font-lock-verbose nil)
> !         (font-lock-support-mode nil))
>       ;; Disable support modes, e.g., jit-lock, lazy-lock, etc.
>       ;; Note: XEmacs people use `font-lock-mode-hook' to run those modes.
> !     (set (make-local-variable 'font-lock-mode-hook) nil)
>           (setq buffer-file-name (mm-handle-filename handle))
>           (set (make-local-variable 'enable-local-variables) nil)
>       (with-demoted-errors
> --- 601,612 ----
>         (require 'font-lock)
>         ;; I find font-lock a bit too verbose.
>         (let ((font-lock-verbose nil)
> !         (font-lock-support-mode nil)
> !         (font-lock-mode-hook font-lock-mode-hook))
>       ;; Disable support modes, e.g., jit-lock, lazy-lock, etc.
>       ;; Note: XEmacs people use `font-lock-mode-hook' to run those modes.
> !     (remove-hook 'font-lock-mode-hook 'turn-on-fast-lock)
> !     (remove-hook 'font-lock-mode-hook 'turn-on-lazy-lock)
>           (setq buffer-file-name (mm-handle-filename handle))
>           (set (make-local-variable 'enable-local-variables) nil)
>       (with-demoted-errors

Actually, a real fix to this problem involves adding new a font-lock
function, which I like to call font-lock-ensure-fontification, which
mm-view would then call to force immediate fontification of the
specified region.  This function would know how to handle jit-lock,
lazy-lock, and whichever other accelerator we come up with.

Such a functionality is also needed in other packages, such as
in htmlfontify.  We have a bug report for this, but I can't find it
any more.


        Stefan



reply via email to

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