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

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

Re: tex-mode.el


From: Christopher Dimech
Subject: Re: tex-mode.el
Date: Thu, 11 Feb 2021 04:27:52 +0100

I think that I have found a problem with my code, because when I applied
the two commands mentioned for tex-mode.el the fontifying was disabled on
the entire buffer.

(setq-local tex-fontify-script nil)
(font-lock-flush)

I am actually trying to write a minor-mode for suscript to work also
for texinfo, when one can call tex commands.  For texinfo, the
fontifying is enabled as soon as the mode is called.  However, for
my minor mode I would like that a function would set things up, and
another to disable it.

Have copied the following code parts from tex-mode.el and want to
write a function that enables the raising and lowering fontification.
And anothr that I can call to disable.  Have fount the setup in
tex-mode.el quite complicated.

--------

(defcustom tex-fontify-script t)
(defcustom tex-font-script-display '(-0.2 0.2))
(defcustom tex-suscript-height-ratio 0.8)
(defcustom tex-suscript-height-minimum 0.0)
(defun tex-suscript-height height)

(defface superscript )
(defface subscript )

(defun tex-font-lock-match-suscript limit)
(defun tex-font-lock-suscript pos)
(defun tex-font-lock-unfontify-region beg end)



> Sent: Thursday, February 11, 2021 at 3:13 PM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor" 
> <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: tex-mode.el
>
> Christopher Dimech wrote:
>
> > Still same problem
> >
> > (setq-local tex-fontify-script nil)
> > (font-lock-flush)
> >
> > It works in the sense that when I call it the new text is
> > not fontified. However, the text that was already fontified
> > remains fontified.
>
> Does it work for you when you start Emacs with -Q?
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>



reply via email to

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