GNU bug report logs - #8260
which-function fails to find current function name

Previous Next

Package: emacs;

Reported by: Ralph Schleicher <rs <at> ralph-schleicher.de>

Date: Tue, 15 Mar 2011 20:14:01 UTC

Severity: normal

Tags: patch

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8260 in the body.
You can then email your comments to 8260 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8260; Package emacs. (Tue, 15 Mar 2011 20:14:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ralph Schleicher <rs <at> ralph-schleicher.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 15 Mar 2011 20:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ralph Schleicher <rs <at> ralph-schleicher.de>
To: bug-gnu-emacs <at> gnu.org
Subject: which-function fails to find current function name
Date: Tue, 15 Mar 2011 21:11:21 +0100
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 <at> 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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8260; Package emacs. (Sun, 08 May 2011 18:31:01 GMT) Full text and rfc822 format available.

Message #8 received at 8260 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Ralph Schleicher <rs <at> ralph-schleicher.de>
Cc: 8260 <at> debbugs.gnu.org
Subject: Re: bug#8260: which-function fails to find current function name
Date: Sun, 08 May 2011 14:29:55 -0400
Ralph Schleicher <rs <at> ralph-schleicher.de> writes:

> 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.

Applied, thanks.




bug closed, send any further explanations to 8260 <at> debbugs.gnu.org and Ralph Schleicher <rs <at> ralph-schleicher.de> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Sun, 08 May 2011 18:31:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 Jun 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 69 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.