+2004-12-05 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * progmodes/which-func.el (which-function): Use
+ `run-hook-with-args-until-success' instead of a custom loop.
+ Fixes bug with local hooks.
+
2004-12-05 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
* textmodes/bibtex.el (bibtex-font-lock-url-regexp):
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)