Tassilo Horn <[email protected]> writes:

> Arash Esbati <[email protected]> writes:
>
>> Following up myself, the patch was not good enough.
>
> Oh, yeah, I introduced the bug.

To avoid any misunderstandings: I meant that my last patch was not good
enough.

> My change said that the first char after the \ must not be a - or a ,.
> However, then it did not need to be a symbol or word character, too!
> ;-)
>
> Ok, I fixed it now but that "\ followed by word and symbol chars but not
> starting with - or ," couldn't be captured in a regex anymore (tell me
> if I'm wrong).

Thanks for your patch, it looks much better.  I think the only thing
missing is when you have a character with punctuation syntax after \
like \"o, \^o or \~o.  What do you think about a variation like this:

--8<---------------cut here---------------start------------->8---
diff --git a/font-latex.el b/font-latex.el
index 746193bc..d6bf8d37 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1786,10 +1786,10 @@ marks boundaries for searching for group ends."
   ;; foo\,bar) or a - (hyphenation: foo\-bar).
   (let* ((search (lambda ()
                   (TeX-re-search-forward-unescaped
-                   "\\\\\\(\\s_\\|\\sw\\)\\(?:\\s_\\|\\sw\\)*" limit t)))
+                   "\\\\\\(\\s.\\|\\s_\\|\\sw\\)\\(?:\\s_\\|\\sw\\)*" limit 
t)))
         (pos (funcall search)))
     (while (and pos
-               (member (match-string 1) '("-" ",")))
+               (member (match-string 1) '("-" "," "/" "&" "#" "_")))
       (setq pos (funcall search)))
     pos))
--8<---------------cut here---------------end--------------->8---

We can extend the exclude list if other characters appear.

Best, Arash

_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to