Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
103095:65cc22e2c624 | 103096:d98eb168e700 |
---|---|
308 (if (>= (setq offset (- (point) mark)) 0) | 308 (if (>= (setq offset (- (point) mark)) 0) |
309 (if (< offset minoffset) ; find the closest item | 309 (if (< offset minoffset) ; find the closest item |
310 (setq minoffset offset | 310 (setq minoffset offset |
311 name (funcall | 311 name (funcall |
312 which-func-imenu-joiner-function | 312 which-func-imenu-joiner-function |
313 (reverse (cons (car pair) namestack))))) | 313 (reverse (cons (car pair) |
314 ;; Entries in order, so can skip all those after point. | 314 namestack))))))))) |
315 (setq alist nil | |
316 imstack nil))))) | |
317 | |
318 (setq alist (car imstack) | 315 (setq alist (car imstack) |
319 namestack (cdr namestack) | 316 namestack (cdr namestack) |
320 imstack (cdr imstack)))))) | 317 imstack (cdr imstack)))))) |
321 | 318 |
322 ;; Try using add-log support. | 319 ;; Try using add-log support. |