unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: wilnerthomas--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Rainbow-delimiters highlighting { and } for tex and latex
Date: Thu, 8 Sep 2022 12:35:53 +0200 (CEST)	[thread overview]
Message-ID: <NBO4iN3--3-2@tutanota.com> (raw)
In-Reply-To: <jwvczc7b0jf.fsf-monnier+emacs@gnu.org-NBNqAf0----2>


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





      parent reply	other threads:[~2022-09-08 10:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 11:07 Rainbow-delimiters highlighting { and } for tex and latex wilnerthomas--- via Users list for the GNU Emacs text editor
2022-09-07 13:01 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-09-07 13:10   ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-09-07 13:14     ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-09-07 13:23       ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-09-07 13:34         ` Stefan Monnier
2022-09-07 19:29           ` Christopher Dimech
2022-09-08  4:13             ` tomas
2022-09-08 10:13               ` Christopher Dimech
2022-09-08 12:08             ` Alessandro Bertulli
2022-09-08 13:25               ` Christopher Dimech
2022-09-08 13:58                 ` Alessandro Bertulli
2022-09-08 15:02                   ` Christopher Dimech
2022-09-08 15:04                     ` Alessandro Bertulli
2022-09-09  8:41                     ` Arash Esbati
2022-09-09 12:33                       ` Christopher Dimech
2022-09-09 19:36                         ` Arash Esbati
2022-09-09 20:13                           ` Christopher Dimech
2022-09-09 20:45                           ` Christopher Dimech
     [not found]         ` <jwvleqvmhqj.fsf-monnier+emacs@gnu.org-NBNA5jg----2>
2022-09-07 15:03           ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-09-07 15:16             ` tomas
2022-09-07 15:29               ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-09-07 15:59                 ` tomas
2022-09-07 16:43             ` Stefan Monnier
     [not found]             ` <jwvczc7b0jf.fsf-monnier+emacs@gnu.org-NBNqAf0----2>
2022-09-08 10:35               ` wilnerthomas--- via Users list for the GNU Emacs text editor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=NBO4iN3--3-2@tutanota.com \
    --to=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=wilnerthomas@tutanota.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).