help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: which-function-mode + visual-basic-mode?


From: David Wolff
Subject: Re: which-function-mode + visual-basic-mode?
Date: Wed, 11 Jun 2008 00:39:05 +0000 (UTC)

In article <address@hidden>,
Kevin Rodgers  <address@hidden> wrote:
> David Wolff wrote:
>> In article <address@hidden>,
>> Kevin Rodgers  <address@hidden> wrote:
>>> David Wolff wrote:
>>>> Hi all,
>>>>
>>>> Emacs 22.2.  which-function-mode does the right thing for Emacs Lisp
>>>> files and other modes that I don't remember off-hand, but not for
>>>> visual-basic-mode... nothing shows up in the mode line even after ESC-:
>>>> (which-function-mode 1).  Any ideas?
>>> Hmmm, `M-x apropos RET visual-basic RET' says:
>>>
>>> No apropos matches for `visual-basic'
>> 
>> Right, I found visual-basic-mode somewhere on that internet thingy.  I
>> took a look at which-func.el but it's not very clear how it figures out
>> the current function -- sort of looks like imenu magic.  So how does
>> which-func work correctly for several programming modes but not
>> visual-basic-mode?
> 
> The first thing I see in which-func.el is that you'll need to add
> visual-basic-mode to which-func-modes, and perhaps to
> which-func-non-auto-modes.
> 
> If visual-basic-mode support imenu, then you should be good to go.
> And if beginning-of-defun works in that mode, that might be good
> enough.
> 
> Otherwise, you could try defining a function that returns the name
> of the current function in visual-basic-mode, then assign that to
> which-func-functions (actually, use add-hook with non-nil LOCAL arg).

Well, I looked at this some more, and it's looking more complicated than
I have time for.  I was hoping that a simple answer existed (especially
since which-func is not exactly crucial).

Kevin, thanks for your effort on this.

-- David


reply via email to

[Prev in Thread] Current Thread [Next in Thread]