From: Chong Yidong Date: Tue, 28 Apr 2009 21:29:47 +0000 (+0000) Subject: * progmodes/which-func.el (which-function): Don't assume that X-Git-Tag: emacs-pretest-23.0.93~30 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1c6bf19606fb25af4bff5582b593c7813501a2c5;p=emacs.git * 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). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 009225a97f0..8d7881c1aa1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-04-28 Geert Kloosterman (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 * international/quail.el (quail-vunion): Remove unexplained nreverse. diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index ee392e2734a..3e06bf762a8 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -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))))))