# HG changeset patch # User Karl Heuer # Date 821229501 0 # Node ID b8c7c891ed634617f0570b71cf2fdb3a78815200 # Parent dfbb4ab9bee10fc94d6131ab570668f9710fd7af (imenu--create-keymap-2): Fix bug in constructing the lambda expression. Use backquote. Don't use incf. diff -r dfbb4ab9bee1 -r b8c7c891ed63 lisp/imenu.el --- 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)))) )))