diff lisp/progmodes/which-func.el @ 103096:d98eb168e700

* progmodes/which-func.el (which-function): Don't assume that entries from `imenu--index-alist' are ordered by buffer position, which fails when submenus are present (Bug#3153).
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 28 Apr 2009 21:29:47 +0000
parents a9dc0e7c3f2b
children 1d1d5d9bd884
line wrap: on
line diff
--- a/lisp/progmodes/which-func.el	Tue Apr 28 19:02:26 2009 +0000
+++ b/lisp/progmodes/which-func.el	Tue Apr 28 21:29:47 2009 +0000
@@ -310,11 +310,8 @@
                                (setq minoffset offset
                                      name (funcall
                                            which-func-imenu-joiner-function
-                                           (reverse (cons (car pair) namestack)))))
-                         ;; Entries in order, so can skip all those after point.
-                         (setq alist nil
-                               imstack nil)))))
-
+					   (reverse (cons (car pair)
+							  namestack)))))))))
             (setq alist     (car imstack)
                   namestack (cdr namestack)
                   imstack   (cdr imstack))))))