changeset 73031:b944195ced34

(member*): Use memql instead of complex code. Suggested by Miles Bader.
author Kim F. Storm <storm@cua.dk>
date Wed, 20 Sep 2006 23:12:25 +0000
parents fc21b1eb4271
children 83e355d76736
files lisp/emacs-lisp/cl-macs.el
diffstat 1 files changed, 1 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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)