branch: externals/auctex commit f6e7767e13abe5be03ecc3a0f1d50ddf1d0562c4 Author: Arash Esbati <ar...@gnu.org> Commit: Arash Esbati <ar...@gnu.org>
Do not highlight control spaces with "\ " * font-latex.el (font-latex-match-simple-command): Add space to the list of characters to be ignored. --- font-latex.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/font-latex.el b/font-latex.el index 47b6607..83e2115 100644 --- a/font-latex.el +++ b/font-latex.el @@ -1781,10 +1781,11 @@ marks boundaries for searching for group ends." (defun font-latex-match-simple-command (limit) "Search for command like \\foo before LIMIT." - ;; The \\\\[^,-] makes sure we don't highlight hyphenation as commands - ;; (foo\-bar) nor thin spaces (foo\,bar). \s_ matches chars with symbol - ;; syntax, \sw chars with word syntax. - (TeX-re-search-forward-unescaped "\\\\[^,-]\\(?:\\s_\\|\\sw\\)+" limit t)) + ;; The \\\\[^ ,-] makes sure we don't highlight hyphenation as + ;; commands (foo\-bar), nor thin spaces (foo\,bar) nor control + ;; spaces (foo\ bar). \s_ matches chars with symbol syntax, \sw + ;; chars with word syntax. + (TeX-re-search-forward-unescaped "\\\\[^ ,-]\\(?:\\s_\\|\\sw\\)+" limit t)) (defun font-latex-match-math-env (limit) "Match math pattern up to LIMIT.