* bug#8260: which-function fails to find current function name
@ 2011-03-15 20:11 Ralph Schleicher
2011-05-08 18:29 ` Chong Yidong
0 siblings, 1 reply; 2+ messages in thread
From: Ralph Schleicher @ 2011-03-15 20:11 UTC (permalink / raw)
To: 8260
Hi,
which-function fails to find the current function name if a major
mode adjusts add-log-current-defun-header-regexp but does not bind
add-log-current-defun-function. Thus, which-function shall call
add-log-current-defun to query the current function name. Below
is a patch together with a change log entry.
2011-03-11 Ralph Schleicher <rs@ralph-schleicher.de>
* progmodes/which-func.el (which-function): Call add-log-current-defun
instead of evaluating add-log-current-defun-function directly.
--- emacs-23.3/lisp/progmodes/which-func.el.orig 2011-01-08 12:45:14 +0100
+++ emacs-23.3/lisp/progmodes/which-func.el 2011-03-11 11:41:04 +0100
@@ -270,7 +270,7 @@
(defun which-function ()
"Return current function name based on point.
Uses `which-func-functions', `imenu--index-alist'
-or `add-log-current-defun-function'.
+or `add-log-current-defun'.
If no function name is found, return nil."
(let ((name
;; Try the `which-func-functions' functions first.
@@ -319,9 +319,8 @@
imstack (cdr imstack))))))
;; Try using add-log support.
- (when (and (null name) (boundp 'add-log-current-defun-function)
- add-log-current-defun-function)
- (setq name (funcall add-log-current-defun-function)))
+ (when (null name)
+ (setq name (add-log-current-defun)))
;; Filter the name if requested.
(when name
(if which-func-cleanup-function
--
Ralph
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-08 18:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15 20:11 bug#8260: which-function fails to find current function name Ralph Schleicher
2011-05-08 18:29 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.