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

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

bug#68318: 30.0.50; Fontification of \{m\} and \{m,n\} in a regexp


From: Arash Esbati
Subject: bug#68318: 30.0.50; Fontification of \{m\} and \{m,n\} in a regexp
Date: Thu, 11 Jan 2024 16:51:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Andreas Schwab <schwab@linux-m68k.org> writes:

> See lisp-el-font-lock-keywords-2 in lisp-mode.el:
>
>          ;; Words inside \\[], \\<>, \\{} or \\`' tend to be for
>          ;; `substitute-command-keys'.

Thanks for the pointer.  I'm not familiar with the code, but IIUC, the
lines 499-500 are relevant, where the condense is:

  (rx "\\\\" (seq "{" (group-n 1 lisp-mode-symbol) "}"))

which returns:

  "\\\\\\\\{\\(?1:\\(?:\\w\\|\\s_\\|\\\\.\\)+\\)}"

Since we're talking about \\{\\} and not \\{}, I wonder if some
variation like:

  "\\\\\\\\{\\(?1:\\(?:\\w\\|\\s_\\|\\\\.\\)*?[^\\]\\)}"

would fix this issue?  Not sure if it does TRT reg. the "\\\\." part.

Best, Arash





reply via email to

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