[Top][All Lists]

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

bug#24263: TeX-fold-item and environments with an '*'

From: Tyler Smith
Subject: bug#24263: TeX-fold-item and environments with an '*'
Date: Thu, 18 Aug 2016 20:29:31 -0400


I'm not sure if this is a bug, or if I'm not using folding properly. I'm
trying to enable folding of math environments, using
TeX-fold-env-spec-list to set the replacement text to "[equation]". This
works fine for environments like "align" and "alignat". However, these
environments have variants "align*" and "alignat*". These aren't
properly detected by TeX-fold-item, and get replaced by the default
"[env]" instead. 

The problem seems to be the following form from Tex-fold-item:

    ((eq type 'env)
                                    (concat (regexp-quote TeX-esc)
                                            "begin[ \t]*{"

This only matches environments with names composed only of letters.
Replacing it with:

    ((eq type 'env)
                                    (concat (regexp-quote TeX-esc)
                                            "begin[ \t]*{"

resolves the issue: with this, alignat* and align* are properly matched
and replaced.  I'm using the following value for 'TeX-fold-item':

       ("alignat*" "align*" "align" "alignat")))

My questions:

1. Is there a way to get environments that have * characters in their
name to work properly with 'TeX-fold-item'?
2. If not, would the modification of the form I suggest above be
acceptable, or will it break something else?




reply via email to

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