On Tue, Jul 19, 2022 at 11:31:48AM +0200, carlmarcos@tutanota.com wrote: > > Jul 19, 2022, 08:39 by tomas@tuxteam.de: > > > On Tue, Jul 19, 2022 at 10:21:15AM +0200, carlmarcos@tutanota.com wrote: > > > >> > >> Jul 19, 2022, 07:34 by tomas@tuxteam.de: > >> > > > > [...] > > > >> > Look up the documentation for `skip-syntax-forward'. Then read on > >> > syntax classes. Then, be enlightened :) > >> > > >> >From the help for skip-syntax-forward, if syntax starts with ^, skip characters whose syntax is not in syntax. > >> > > > > Nearly. > > > > Dig deeper: what could that "syntax" thing mean? Did you read on syntax > > classes in the manual? Does this answer your question? > > > I have read.  Looks as if emacs has internal functionality to determine start and end of elisp > expressions, which rainbow-delimiters relies of.  It does actually also follow [], not so for {}.    Read again: The “syntax class” of a character describes its syntactic role. Each syntax table specifies the syntax class of each character. There is no necessary relationship between the class of a character in one syntax table and its class in any other table. So whether { resp } have the syntax class symbolised by ( resp. ) depends on how you set up your syntax class table. Major modes set that up to match the expectations of the language in question. In theory you could even set # . up as opening and closing parentheses whenever it makes sense. The answer is: Emacs _already does_ what you want. Cheers -- t