changeset 14114:b8c7c891ed63

(imenu--create-keymap-2): Fix bug in constructing the lambda expression. Use backquote. Don't use incf.
author Karl Heuer <kwzh@gnu.org>
date Tue, 09 Jan 1996 23:18:21 +0000
parents dfbb4ab9bee1
children bc30354daf1f
files lisp/imenu.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/imenu.el	Tue Jan 09 23:18:07 1996 +0000
+++ b/lisp/imenu.el	Tue Jan 09 23:18:21 1996 +0000
@@ -459,12 +459,14 @@
       (lambda (item)
 	(cond
 	 ((listp (cdr item))
-	  (append (list (incf counter) (car item) 'keymap (car item))
+	  (append (list (setq counter (1+ counter))
+			(car item) 'keymap (car item))
 		  (imenu--create-keymap-2 (cdr item) (+ counter 10) commands)))
 	 (t
-	  (let ((end (if commands (list 'lambda 'nil '(interactive)
-					(list 'imenu--menubar-select item))
+	  (let ((end (if commands `(lambda () (interactive)
+				     (imenu--menubar-select ',item))
 		       (cons '(nil) t))))
+	    (setq foo end)
 	    (cons (car item)
 		  (cons (car item) end))))
 	 )))