From: Ralf Angeli <[EMAIL PROTECTED]> 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") > > "\\_>" > > "[EMAIL PROTECTED]"))))) > > > > (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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] Name:: Masayuki Ataka // (Japan) _______________________________________________ auctex-devel mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/auctex-devel
