Mercurial > hg > xemacs-beta
diff lisp/cl-seq.el @ 5242:f3eca926258e
Bit vectors are also sequences; enforce this in some CL functions.
lisp/ChangeLog addition:
2010-07-24 Aidan Kehoe <kehoea@parhasard.net>
* cl-extra.el (concatenate):
* cl-seq.el (remove*, cl-delete-duplicates):
Bit vectors are also sequences; enforce this in these functions.
* cl-macs.el (concatenate):
If TYPE is constant, don't inline #'concatenate, replace it by a
call to the appropriate C functions.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 24 Jul 2010 17:38:35 +0100 |
parents | fbd1485af104 |
children | 69f687b3ba9d |
line wrap: on
line diff
--- a/lisp/cl-seq.el Sat Jul 24 15:56:57 2010 +0100 +++ b/lisp/cl-seq.el Sat Jul 24 17:38:35 2010 +0100 @@ -215,8 +215,11 @@ (list :end (1+ cl-i)) (list :start cl-i)) cl-keys)))) - (if (listp cl-seq) cl-res - (if (stringp cl-seq) (concat cl-res) (vconcat cl-res)))) + (typecase cl-seq + (list cl-res) + (string (concat cl-res)) + (vector (vconcat cl-res)) + (bit-vector (bvconcat cl-res)))) cl-seq)) (setq cl-end (- (or cl-end 8000000) cl-start)) (if (= cl-start 0) @@ -382,7 +385,10 @@ (setq cl-end (1- cl-end) cl-start (1+ cl-start))) cl-seq))) (let ((cl-res (cl-delete-duplicates (append cl-seq nil) cl-keys nil))) - (if (stringp cl-seq) (concat cl-res) (vconcat cl-res))))) + (typecase cl-seq + (string (concat cl-res)) + (vector (vconcat cl-res)) + (bit-vector (bvconcat cl-res)))))) (defun substitute (cl-new cl-old cl-seq &rest cl-keys) "Substitute NEW for OLD in SEQ.