* Stephen J. Turnbull (2005-02-02) writes:
>>>>> "Ralf" == Ralf Angeli
Ralf> As we are about to release AUCTeX 11.55, we are in need of a
Ralf> workaround for 21.4.16.
(when (and (featurep 'xemacs)
(emacs-version>= 21 4 16)
(not (emacs-version>= 21 4 17)))
(error 'invalid-state "XEmacs 21.4.16 (and only that release) has a
fatal bug in the regexp code that AUCTeX triggers in several places.
Upgrade to 21.4.17."))
in some appropriate place in the auctex load sequence is what I would
suggest; even if AUCTeX works around it, other applications could
That's pretty consequent. Besides people building current stable
versions of XEmacs directly from xemacs.org
, it would currently lock
out everybody facilitating a distribution with a frequently updated
package/port system, like Debian/sid, Fedora Core Devel, Mandrake
Cooker or the BSDs. And then we can only hope that none of the bigger
distributions will ship XEmacs 21.4.16 with their next stable
Ralf> David posted the following on the AUCTeX list
Ralf> (string-match "\\(\\(\\(\\(\\(\\(\\(\\(\\(\\(\\(\\(\\(\\(\\(\\(.\
Ralf> \\)\\)\\)\\)\\)\\)\\)\\)\\)\\)\\)\\)\\)\\)\\)\\)" "x")
Doesn't work right, I think. You need the matches of _all_ groups to
_fail_, otherwise you are going to get stale data pointing who knows
(string-match "x" "x")
should do what's needed IIRC (since num_nonshy_groups == num_groups,
all registers > 0 should get set to nil, no "holes" you can fall into).
As David already indicated with his questions it doesn't seem to be
enough to do this once per XEmacs session. At least it didn't work if
included in tex-site.el.
Ralf> As a last resort we could prevent the regexps triggering
Ralf> segfault from being applied in XEmacs.
Any regexp using shy groups can trigger the regexp, unless you can
prove that all matches that succeeded before it had fewer capturing
groups than the regexp using shy groups.
Stephen's suggestion first sounded quite drastic to me but I've come
to the conclusion that it is the cleanest way to deal with the
problem. We don't know how often and where we would have to use
something like `(string-match "x" "x")' in order to prevent
effectively. And as there are other places in AUCTeX where shy groups
are used, simply disabling the respective regexps in
`LaTeX-auto-class-regexp-list' will probably not suffice either.
Unless somebody has a better idea I will insert a code stanza similar
to the one proposed by Stephen into tex-site.el and add a prominent
note to the release notes that people who are using XEmacs 21.4.16
should stay away from AUCTeX 11.55 or upgrade to 21.4.17 as soon as it
Stephen, thanks for your input.
I adapted the Reply-To to limit further discussion of this issue to
the AUCTeX list as this will probably not be of high relevance for the
XEmacs community. Feel free to ignore this if you think otherwise.