Mercurial > hg > xemacs-beta
diff lisp/cl-macs.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 | 7789ae555c45 |
children | 0d436a78c514 |
line wrap: on
line diff
--- a/lisp/cl-macs.el Sat Jul 24 15:56:57 2010 +0100 +++ b/lisp/cl-macs.el Sat Jul 24 17:38:35 2010 +0100 @@ -3751,6 +3751,16 @@ :test #'equal)) ,stack-depth)))) +(define-compiler-macro concatenate (&whole form type &rest seqs) + (if (and (cl-const-expr-p type) (memq (cl-const-expr-val type) + '(vector bit-vector list string))) + (case (cl-const-expr-val type) + (list (append (list 'append) (cddr form) '(nil))) + (vector (cons 'vconcat (cddr form))) + (bit-vector (cons 'bvconcat (cddr form))) + (string (cons 'concat (cddr form)))) + form)) + (mapc #'(lambda (y) (put (car y) 'side-effect-free t)