Mercurial > hg > xemacs-beta
diff lisp/cl-macs.el @ 4996:c17c857e20bf
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 03 Feb 2010 20:18:53 +0000 |
parents | 6bc1f3f6cf0d 8431b52e43b1 |
children | 8800b5350a13 |
line wrap: on
line diff
--- a/lisp/cl-macs.el Wed Feb 03 09:43:16 2010 -0700 +++ b/lisp/cl-macs.el Wed Feb 03 20:18:53 2010 +0000 @@ -3337,18 +3337,6 @@ (t form)))) -;; XEmacs change, the GNU mapc doesn't accept the Common Lisp args, so this -;; change isn't helpful. -(define-compiler-macro mapc (&whole form cl-func cl-seq &rest cl-rest) - (if cl-rest - form - (cons 'mapc-internal (cdr form)))) - -(define-compiler-macro mapcar* (&whole form cl-func cl-x &rest cl-rest) - (if cl-rest - form - (cons 'mapcar (cdr form)))) - ;; XEmacs; it's perfectly reasonable, and often much clearer to those ;; reading the code, to call regexp-quote on a constant string, which is ;; something we can optimise here easily. @@ -3557,29 +3545,6 @@ ;; ;; byte-optimize.el). ;; (t form))))) -(define-compiler-macro map (&whole form cl-type cl-func cl-seq - &rest cl-rest) - "If CL-TYPE is a constant expression that we know how to handle, transform -the call to `map' to a more efficient expression." - (cond - ;; The first two here rely on the compiler macros for mapc and mapcar*, - ;; to convert to mapc-internal and mapcar, where appropriate (that is, in - ;; the absence of cl-rest.) - ((null cl-type) - `(prog1 nil (mapc ,@(nthcdr 2 form)))) - ((equal '(quote list) cl-type) - (cons 'mapcar* (nthcdr 2 form))) - ((or (equal '(quote vector) cl-type) - (equal '(quote array) cl-type)) - (if cl-rest - `(vconcat (mapcar* ,@(nthcdr 2 form))) - (cons 'mapvector (nthcdr 2 form)))) - ((equal '(quote string) cl-type) - `(concat (mapcar* ,@(nthcdr 2 form)))) - ((equal '(quote bit-vector) cl-type) - `(bvconcat (mapcar* ,@(nthcdr 2 form)))) - (t form))) - (mapc #'(lambda (y) (put (car y) 'side-effect-free t)