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

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

Re: tex-mode.el


From: Michael Heerdegen
Subject: Re: tex-mode.el
Date: Thu, 11 Feb 2021 04:42:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Christopher,

After commenting out the `multic' expression I could try your example.

I'm not really skilled with font-lock.

I think in your case `font-lock-flush' is indeed not enough, I think
that one doesn't unfontify, which has to be done in your case.
`font-lock-refresh-defaults' as had been suggested should be better.

Your unfontify function seems to work when called (tested).  But is it
called?

I think here:

(defun supinf-disable ()
  "Disable the supinf typeface"
  (font-lock-flush (point-min) (point-max))
  (setq font-lock-defaults
        '(font-lock-unfontify-region-function . supinf-disable-cruc))
        ^^^^
  ;;(supinf-disable-cruc (point-min) (point-max))
  (font-lock-flush (point-min) (point-max)) )

you are missing a level of parens.  Then, with some good will, the thing
could indeed work I think.

Oh, and it seems something in your mode is not done buffer locally,
since the ^^^^ underlining here now looks weird in my messages buffer,
where I definitely didn't enable your mode.  Or maybe just a side effect
of experimenting, dunno.

HTH,

Michael.




reply via email to

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