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: wilnerthomas
Subject: Re: Rainbow-delimiters highlighting { and } for tex and latex
Date: Thu, 8 Sep 2022 12:35:53 +0200 (CEST)

Sep 7, 2022, 16:43 by monnier@iro.umontreal.ca:

>>> 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).
>>>
>> What version are you using? 
>>
>
> Emacs-29.0.50, but I don't think this has changed for a long time.
>
>> (while (> end (progn (skip-syntax-forward "^()" end)
>>
>
> Yes, that's the code.
>
>> I can see that "( )" and "[ ]" get highlighted, but not "{ }".
>>
>
> The above code looks for chars with the "parenthesis syntax" according
> to the major mode's syntax-table.  I.e. the same info used by
> `show-paren`.
>
> I'm using Emacs's built-in `latex-mode`.  Maybe you're using a different
> major mode which doesn't give paren syntax to the braces?
>
> Check the "syntax:" info give by `C-u C-x =` when your cursor in on a brace.
>
I will investigate deeper with my setup.  Have you tried with latex-mode-hook?

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

Could be that the mode hook is not working





reply via email to

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