]> git.eshelyaron.com Git - emacs.git/commitdiff
* progmodes/which-func.el (which-function): Don't assume that
authorChong Yidong <cyd@stupidchicken.com>
Tue, 28 Apr 2009 21:29:47 +0000 (21:29 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 28 Apr 2009 21:29:47 +0000 (21:29 +0000)
entries from `imenu--index-alist' are ordered by buffer position,
which fails when submenus are present (Bug#3153).

lisp/ChangeLog
lisp/progmodes/which-func.el

index 009225a97f00c28c7bc3ba78e12ffd5f9936cffe..8d7881c1aa1db9e25a7f0e1b85bf3772f1d4a226 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-28  Geert Kloosterman  <g.j.kloosterman@gmail.com>  (tiny change)
+
+       * 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).
+
 2009-04-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * international/quail.el (quail-vunion): Remove unexplained nreverse.
index ee392e2734ae4780cbd4449774c8998332137ccf..3e06bf762a8dbb7275b41e41d99164edbea056c7 100644 (file)
@@ -310,11 +310,8 @@ If no function name is found, return nil."
                                (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))))))