Brian Palmer writes:
- (if (member element (symbol-value list-var))
+ (if (if (not compare-fn)
+ (member element (symbol-value list-var))
+ (member* element (symbol-value list-var) :test compare-fn))
How about
(if (member* element (symbol-value list-var)
:test (or compare-fn #'equal))
instead? Or for efficiency (does that ever matter here?)
;; member and memq are implemented in C
(if (cond ((eq compare-fn #'eq) (memq element (symbol-value list-var)))
((null compare-fn) (member element (symbol-value list-var)))
((member* element (symbol-value list-var) :test compare-fn)))
Do we have any use cases for :test functions other than member?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches