# HG changeset patch # User Kim F. Storm # Date 1158793945 0 # Node ID b944195ced3499d100b37331f2fb6964fa4f5ee8 # Parent fc21b1eb42716c2ac558de08133b38cad6107995 (member*): Use memql instead of complex code. Suggested by Miles Bader. diff -r fc21b1eb4271 -r b944195ced34 lisp/emacs-lisp/cl-macs.el --- a/lisp/emacs-lisp/cl-macs.el Wed Sep 20 23:12:15 2006 +0000 +++ b/lisp/emacs-lisp/cl-macs.el Wed Sep 20 23:12:25 2006 +0000 @@ -2578,21 +2578,7 @@ (cl-const-expr-val (nth 1 keys))))) (cond ((eq test 'eq) (list 'memq a list)) ((eq test 'equal) (list 'member a list)) - ((or (null keys) (eq test 'eql)) - (if (eq (cl-const-expr-p a) t) - (list (if (floatp-safe (cl-const-expr-val a)) 'member 'memq) - a list) - (if (eq (cl-const-expr-p list) t) - (let ((p (cl-const-expr-val list)) (mb nil) (mq nil)) - (if (not (cdr p)) - (and p (list 'eql a (list 'quote (car p)))) - (while p - (if (floatp-safe (car p)) (setq mb t) - (or (integerp (car p)) (symbolp (car p)) (setq mq t))) - (setq p (cdr p))) - (if (not mb) (list 'memq a list) - (if (not mq) (list 'member a list) form)))) - form))) + ((or (null keys) (eq test 'eql)) (list 'memql a list)) (t form)))) (define-compiler-macro assoc* (&whole form a list &rest keys)