diff options
author | Karl Heuer <kwzh@gnu.org> | 1996-01-09 23:18:21 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1996-01-09 23:18:21 +0000 |
commit | fc0ac20de08a3364e00752ec828e8dc2f5cc066b (patch) | |
tree | 426b6ffe7b7e5aa2b2132e73095c6470d8004544 /lisp/imenu.el | |
parent | dcfe5c051172b146e5a126a3ddce612a5ca6a95d (diff) | |
download | emacs-fc0ac20de08a3364e00752ec828e8dc2f5cc066b.tar.gz |
(imenu--create-keymap-2): Fix bug in constructing
the lambda expression. Use backquote. Don't use incf.
Diffstat (limited to 'lisp/imenu.el')
-rw-r--r-- | lisp/imenu.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/imenu.el b/lisp/imenu.el index 84731d50066..42af2a0a1e1 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -459,12 +459,14 @@ This function is called after the function pointed out by (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)))) ))) |