]> git.eshelyaron.com Git - emacs.git/commitdiff
(member*): Use memql instead of complex code.
authorKim F. Storm <storm@cua.dk>
Wed, 20 Sep 2006 23:12:25 +0000 (23:12 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 20 Sep 2006 23:12:25 +0000 (23:12 +0000)
Suggested by Miles Bader.

lisp/emacs-lisp/cl-macs.el

index e8590933863e3e67cd06edaf8cb946bb0d4ed37d..b7d63acc8612e257eea4c8bc71f28f02a929c0b0 100644 (file)
@@ -2578,21 +2578,7 @@ surrounded by (block NAME ...).
                   (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)