Steve Youngs <steve(a)sxemacs.org> writes:
* Michael Sperber <sperber(a)informatik.uni-tuebingen.de>
> Generally, the change seems fine. But do we really need to use regexps
> for this kind of thing?
The regexp was the only way I could think of to have it work for both
the standard #'featurep use (featurep 'foo), and the
advanced... (featurep '(or foo bar))
Ah, I hadn't know about that. Does it do the right thing for, say,
(featurep '(and undefined-feature sxemacs))
? (My experiments suggest that it doesn't, but maybe I'm again not
understanding this right.)
> (defvar features-always-true '(xemacs sxemacs))
> (defun byte-optimize-featurep (form)
> (if (and (consp (cdr form))
> (eq? 'quote (cadr form))
> (consp (cddr form))
> (memq (caddr form) features-always-true))
Wouldn't that return t even on XEmacs for (featurep 'sxemacs)?
Told you :-) I would think a small interpreter for the featurep language
is needed. I'll be happy to write it if it's the right thing to do.
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
XEmacs-Patches mailing list