changeset 50802:fe838fc4d9a9

(cl-map-keymap): Redefine as alias. (cl-map-keymap-recursively): Use map-keymap. (cl-macroexpand-all): Don't quote functions.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 04 May 2003 00:44:25 +0000
parents 9c84256c5456
children 140fa7af01db
files lisp/emacs-lisp/cl-extra.el
diffstat 1 files changed, 6 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/cl-extra.el	Sun May 04 00:34:16 2003 +0000
+++ b/lisp/emacs-lisp/cl-extra.el	Sun May 04 00:44:25 2003 +0000
@@ -203,26 +203,12 @@
   (not (apply 'every cl-pred cl-seq cl-rest)))
 
 ;;; Support for `loop'.
-(defun cl-map-keymap (cl-func cl-map)
-  (while (symbolp cl-map) (setq cl-map (symbol-function cl-map)))
-  (if (listp cl-map)
-      (let ((cl-p cl-map))
-	(while (consp (setq cl-p (cdr cl-p)))
-	  (cond ((consp (car cl-p))
-		 (funcall cl-func (car (car cl-p)) (cdr (car cl-p))))
-		((or (vectorp (car cl-p)) (char-table-p (car cl-p)))
-		 (cl-map-keymap cl-func (car cl-p)))
-		((eq (car cl-p) 'keymap)
-		 (setq cl-p nil)))))
-    (let ((cl-i -1))
-      (while (< (setq cl-i (1+ cl-i)) (length cl-map))
-	(if (aref cl-map cl-i)
-	    (funcall cl-func cl-i (aref cl-map cl-i)))))))
+(defalias 'cl-map-keymap 'map-keymap)
 
 (defun cl-map-keymap-recursively (cl-func-rec cl-map &optional cl-base)
   (or cl-base
       (setq cl-base (copy-sequence [0])))
-  (cl-map-keymap
+  (map-keymap
    (function
     (lambda (cl-key cl-bind)
       (aset cl-base (1- (length cl-base)) cl-key)
@@ -721,11 +707,10 @@
 		      (sublis sub (nreverse decls))
 		      (list
 		       (list* 'list '(quote apply)
-			      (list 'list '(quote quote)
-				    (list 'function
-					  (list* 'lambda
-						 (append new (cadadr form))
-						 (sublis sub body))))
+			      (list 'function
+				    (list* 'lambda
+					   (append new (cadadr form))
+					   (sublis sub body)))
 			      (nconc (mapcar (function
 					      (lambda (x)
 						(list 'list '(quote quote) x)))