]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-list-to-menu): Bind `command' with let.
authorRichard M. Stallman <rms@gnu.org>
Sun, 12 Mar 1995 07:47:33 +0000 (07:47 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 12 Mar 1995 07:47:33 +0000 (07:47 +0000)
lisp/mail/rmail.el

index d5f094c4eddc68598a4a42fcad2c4ef008b98351..bc9f60ea540969731bb9a429459a68e95b2175d8 100644 (file)
@@ -762,28 +762,29 @@ original copy."
   (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))