[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] Re: \\_> in tex-fold
From: |
Masayuki Ataka |
Subject: |
Re: [AUCTeX-devel] Re: \\_> in tex-fold |
Date: |
Mon, 18 Apr 2005 03:33:31 +0900 (JST) |
From: Ralf Angeli <address@hidden>
Subject: [AUCTeX-devel] Re: \\_> in tex-fold
Date: Sun, 17 Apr 2005 13:06:17 +0200
> * Masayuki Ataka (2005-04-16) writes:
>
> > In tex-fold.el, TeX-fold-region uses \\_> to match `the empty
> > string, but only at the end of a symbol'.
> >
> > (defun TeX-fold-region (start end &optional type)
> > ... (snip)
> > (t
> > ;; "\\_>" is only available with Emacs
> > ;; 21.4 or later (checked into CVS Emacs
> > ;; on 2004-05-19). (This could be used in
> > ;; font-latex as well for
> > ;; `font-latex-match-variable-make' and
> > ;; friends instead of "\\>" and would fix
> > ;; issues with starred macros.)
> > (concat (regexp-quote TeX-esc)
> > (regexp-opt item-list t)
> > (if (string-match "\\_>" "X")
> > "\\_>"
> > "address@hidden")))))
> >
> > (1)
> > This comment is not correct, anymore. "\\_>" is only available
> > with Emacs 22, and font-latex does not have
> > `font-latex-match-variable-make'.
>
> In some sense it is still there. The function is generated.
>
Ah, yes! I saw it in the macro font-latex-make-built-in-keywords.
Thanks.
> > (2)
> > (string-match "\\_>" "")
> > => 1
> >
> > This means
> > $1\leq2$, $1\neq2$, $1\to2$
> > are not folded when we set TeX-fold-macro-spec-list for \leq,
> > \neq, and \to, respectively.
>
> Hm, the problem is that numbers have word syntax which makes them part
> of a symbol. I think word syntax for numbers generally is correct but
> this renders \\_> useless for the task at hand.
>
> > But I don't have good solution to fix issues with starred
> > macros without "\\_>" Xp
>
> I think we can simply remove \\_> from the code above. The
> alternative with address@hidden should work as well; even with starred
> macros.
OK. If we do not use "\\_>", we also do not need the comment for it.
Could you change it, or shall I do it?
best,
---
email: address@hidden
Name:: Masayuki Ataka // (Japan)