On Tue, 2004-01-20 at 12:02, W. Borgert wrote:
I'm the author of an Emacs mode(1), that suddenly doesn't
compile with XEmacs anymore, because of "wrong number of
arguments" for regexp-opt(2). I found, that there has been
a discussion between you on the XEmacs mailing list in
2003-10. My questions are:
1. Did/will you do the change as discussed (align arguments
of regexp-opt with GNU Emacs)?
Yes, it is already done.
2. In which version of XEmacs did/will the behaviour change?
(I found nothing in the ChangeLog.)
It is in no version of XEmacs in particular. It is in the xemacs-base
package version 1.82 (released 2003-10-19) and later. XEmacs packages
can be used with all XEmacs >= 21.1 versions (soonish probably >= 21.4
only) IIRC.
3. Is there an easy way to write code that is compatible
with both variants (i.e. check version number of XEmacs)?
Yes. And no. Do not check the version of XEmacs, that will not help as
regexp-opt is not part of any version of XEmacs. Instead, I would
advise that you tell your users to upgrade their XEmacs packages, the
regexp-opt in xemacs-base >= 1.82 should be 100% API compatible with GNU
Emacs. There may be some minor differences in the actual regexps the
functions return, but everything that matters (ie number of grouping
parenthesis etc) should be compatible.
I seem to remember that such a version of regexp-opt and xemacs-base is
also included in the latest package Sumo tarball, which at the moment is
2003-11-13.
If you really want to support older versions of the XEmacs regexp-opt,
I'd say checking the number of arguments would be the best way at the
moment (the `shy' argument is in the old XEmacs regexp-opt, but not in
the synced up one).
For more information, here's the ChangeLog entry:
2003-10-20 Ville Skyttä <scop(a)xemacs.org>
* regexp-opt.el: API + returned regexp compatibility sync with
GNU Emacs 21.3. The major backwards-incompatible change is that
the shy/non-shy argument has been dropped from `regexp-opt',
`regexp-opt-depth' and `regexp-opt-group'.
...and the XEmacs version of regexp-opt.el is here:
http://cvs.xemacs.org/viewcvs.cgi/XEmacs/packages/xemacs-packages/xemacs-...
In the future, I'd suggest that you discuss these issues on the
xemacs-beta mailing list, that way more people will benefit. I've Cc'd
the list.