changeset 10971:d7f0852f800f

(rmail-list-to-menu): Bind `command' with let.
author Richard M. Stallman <rms@gnu.org>
date Sun, 12 Mar 1995 07:47:33 +0000
parents c71d4c1319e4
children ffdc2e03b480
files lisp/mail/rmail.el
diffstat 1 files changed, 22 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Sun Mar 12 07:38:49 1995 +0000
+++ b/lisp/mail/rmail.el	Sun Mar 12 07:47:33 1995 +0000
@@ -762,28 +762,29 @@
   (let ((menu (make-sparse-keymap menu-name)))
     (mapcar
      (function (lambda (item)
-		 (if (consp item)
+		 (let (command)
+		   (if (consp item)
+		       (progn
+			 (setq command
+			       (rmail-list-to-menu (car item) (cdr item) 
+						   action 
+						   (if full-name
+						       (concat full-name "/"
+							       (car item))
+						     (car item))))
+			 (setq name (car item)))
 		     (progn
-		       (setq command
-			     (rmail-list-to-menu (car item) (cdr item) 
-						 action 
-						 (if full-name
-						     (concat full-name "/"
-							     (car item))
-						   (car item))))
-		       (setq name (car item)))
-		   (progn
-		     (setq name item)
-		     (setq command 
-			   (list 'lambda () '(interactive)
-				 (list action
-				  (expand-file-name 
-				   (if full-name
-				       (concat full-name "/" item)
-				     item)
-				   rmail-secondary-file-directory))))))
-		 (define-key menu (vector (intern name))
-		   (cons name command))))
+		       (setq name item)
+		       (setq command 
+			     (list 'lambda () '(interactive)
+				   (list action
+					 (expand-file-name 
+					  (if full-name
+					      (concat full-name "/" item)
+					    item)
+					  rmail-secondary-file-directory))))))
+		   (define-key menu (vector (intern name))
+		     (cons name command)))))
      (reverse l))
     menu))