emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex f6e7767 06/57: Do not highlight control spaces w


From: Tassilo Horn
Subject: [elpa] externals/auctex f6e7767 06/57: Do not highlight control spaces with "\ "
Date: Tue, 25 Jul 2017 14:02:27 -0400 (EDT)

branch: externals/auctex
commit f6e7767e13abe5be03ecc3a0f1d50ddf1d0562c4
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    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.



reply via email to

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