diff options
author | Kim F. Storm <storm@cua.dk> | 2006-09-20 23:12:25 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2006-09-20 23:12:25 +0000 |
commit | eae510750d41e542edc35b5c74e9093f8afb2e01 (patch) | |
tree | b24c3687157baced7a67fa866528034223b1b6f9 /lisp/emacs-lisp | |
parent | 5bde639f478b246e33bfb74f03e8f8ccfa7542f9 (diff) | |
download | emacs-eae510750d41e542edc35b5c74e9093f8afb2e01.tar.gz |
(member*): Use memql instead of complex code.
Suggested by Miles Bader.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index e8590933863..b7d63acc861 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -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) |