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

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

Re: Rainbow-delimiters highlighting { and } for tex and latex


From: Christopher Dimech
Subject: Re: Rainbow-delimiters highlighting { and } for tex and latex
Date: Wed, 7 Sep 2022 21:29:13 +0200

> Sent: Thursday, September 08, 2022 at 1:34 AM
> From: "Stefan Monnier" <monnier@iro.umontreal.ca>
> To: wilnerthomas@tutanota.com
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: Rainbow-delimiters highlighting { and } for tex and latex
>
> wilnerthomas@tutanota.com [2022-09-07 15:23:57] wrote:
> > Sep 7, 2022, 13:14 by help-gnu-emacs@gnu.org:
> >>> Stefan, you are right.  But it handles only lisp commands, colouring
> >>> initial  "("  and final  ")".  But
> >>> not for highlighting  "{"  and  "}"  for  "tex"  and  "latex".
> >>>
> >>
> >> That is not my experience (from a few seconds before sending my
> >> previous message).
> >>
> > What do I have to do exactly?
> 
> I don't know.  For me it just works (I don't use rainbow-delimiters,
> I simply turned it on to double-check my intuition before replying to
> you, and it worked for (..), {..} and [..] in a `latex-mode` buffer).
> 
> 
>         Stefan
 
Have scrutinised this.  The problem is the atrocious design around the 
implementation
of tex and latex major modes.

This will work

(add-to-list 'auto-mode-alist '("\\.sty\\'"   . LaTeX-mode))
(add-hook 'LaTeX-mode-hook #'rainbow-delimiters-mode)

But this will not

(add-to-list 'auto-mode-alist '("\\.sty\\'"   . latex-mode))
(add-hook 'latex-mode-hook #'rainbow-delimiters-mode)

Work needs to be done so that there is just "tex-mode" and "latex-mode",
and getting rid with all this TeX-mode", "LaTeX-mode",  TeX-mode-hook, 
LaTeX-mode-hook, nonsense.

Tools are supposed to work well together but this is not the case with
"tex-related" modes.












reply via email to

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