[Top][All Lists]

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

Re: [Emacs-diffs] master 573de39 2/3: Apply font-lock in hexl-mode buffe

From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 573de39 2/3: Apply font-lock in hexl-mode buffers
Date: Thu, 27 Jun 2019 09:08:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>     * lisp/hexl.el (hexl-mode): After setting font-lock-defaults, we
>     need to call `font-lock-ensure' to apply hexl-mode faces
>     (bug#24645).

I looked at the bug report but couldn't figure out what problem this
is fixing.  AFAICT, when I do `M-x hexl-mode` the result is properly
fontified even without this patch.

>      (if hexl-follow-ascii (hexl-follow-ascii-mode 1)))
> +  (when global-font-lock-mode
> +    (font-lock-ensure))
>    (run-mode-hooks 'hexl-mode-hook))

In a large buffer, this can take a lot of time (it defeats jit-lock-mode).
Also I'm not sure just testing global-font-lock-mode is right here: if we go
this route, we should also obey font-lock-global-modes.


reply via email to

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