[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A bug fix for `which-func.el'
From: |
Paul Pogonyshev |
Subject: |
A bug fix for `which-func.el' |
Date: |
Fri, 3 Dec 2004 21:33:22 +0200 |
User-agent: |
KMail/1.4.3 |
This one is a certain improvement.
2004-12-03 Paul Pogonyshev <address@hidden>
* progmodes/which-func.el (which-function): Use
`run-hook-with-args-until-success' instead of a custom loop.
Fixes bug with local hooks.
--- which-func.el 17 Aug 2004 01:46:26 +0300 1.6
+++ which-func.el 03 Dec 2004 21:31:04 +0200
@@ -243,15 +243,9 @@ It calls them sequentially, and if any r
Uses `which-function-functions', `imenu--index-alist'
or `add-log-current-defun-function'.
If no function name is found, return nil."
- (let (name)
- ;; Try the which-function-functions functions first.
- (let ((hooks which-func-functions))
- (while hooks
- (let ((value (funcall (car hooks))))
- (when value
- (setq name value
- hooks nil)))
- (setq hooks (cdr hooks))))
+ (let ((name
+ ;; Try the `which-function-functions' functions first.
+ (run-hook-with-args-until-success 'which-func-functions)))
;; If Imenu is loaded, try to make an index alist with it.
(when (and (null name)
- A bug fix for `which-func.el',
Paul Pogonyshev <=