243 |
Uses `which-function-functions', `imenu--index-alist' |
Uses `which-function-functions', `imenu--index-alist' |
244 |
or `add-log-current-defun-function'. |
or `add-log-current-defun-function'. |
245 |
If no function name is found, return nil." |
If no function name is found, return nil." |
246 |
(let (name) |
(let ((name |
247 |
;; Try the which-function-functions functions first. |
;; Try the `which-function-functions' functions first. |
248 |
(let ((hooks which-func-functions)) |
(run-hook-with-args-until-success 'which-func-functions))) |
|
(while hooks |
|
|
(let ((value (funcall (car hooks)))) |
|
|
(when value |
|
|
(setq name value |
|
|
hooks nil))) |
|
|
(setq hooks (cdr hooks)))) |
|
249 |
|
|
250 |
;; If Imenu is loaded, try to make an index alist with it. |
;; If Imenu is loaded, try to make an index alist with it. |
251 |
(when (and (null name) |
(when (and (null name) |