auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 272c9d624512cf4047f17


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 272c9d624512cf4047f1752324096fec0ef9e0e7
Date: Thu, 27 Apr 2017 15:37:24 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  272c9d624512cf4047f1752324096fec0ef9e0e7 (commit)
      from  f5cf886d72e80bb9b7d22e922869a33fd9bb33f6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 272c9d624512cf4047f1752324096fec0ef9e0e7
Author: Arash Esbati <address@hidden>
Date:   Thu Apr 27 21:35:47 2017 +0200

    Improve exclusion of reserved characters from command matches
    
    * font-latex.el (font-latex-match-simple-command): Skip matches
    starting with reserved characters.

diff --git a/font-latex.el b/font-latex.el
index 5fe53bf..ea3e829 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1784,15 +1784,16 @@ marks boundaries for searching for group ends."
 
 (defun font-latex-match-simple-command (limit)
   "Search for command like \\foo before LIMIT."
-  ;; \s_ matches chars with symbol syntax, \sw chars with word syntax.  We must
-  ;; exclude matches where the first character after the \ is a , (thin space:
-  ;; foo\,bar) or a - (hyphenation: foo\-bar).
+  ;; \s_ matches chars with symbol syntax, \sw chars with word syntax, \s. 
chars
+  ;; with punctuation syntax.  We must exclude matches where the first 
character
+  ;; after the \ is a , (thin space: foo\,bar), a - (hyphenation: foo\-bar), a 
/
+  ;; (italic correction \/) or other reserved chars like &, # or _ (\& \# \_)
   (let* ((search (lambda ()
                   (TeX-re-search-forward-unescaped
-                   "\\\\\\(\\s_\\|\\sw\\)\\(?:\\s_\\|\\sw\\)*" limit t)))
+                   "\\\\\\(\\s_\\|\\sw\\|\\s.\\)\\(?:\\s_\\|\\sw\\)*" limit 
t)))
         (pos (funcall search)))
     (while (and pos
-               (member (match-string 1) '("-" ",")))
+               (member (match-string 1) '("-" "," "/" "&" "#" "_")))
       (setq pos (funcall search)))
     pos))
 

-----------------------------------------------------------------------

Summary of changes:
 font-latex.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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