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: Kevin Rodgers
Subject: Re: which-function-mode + visual-basic-mode?
Date: Thu, 22 May 2008 21:43:19 -0600
User-agent: Thunderbird 2.0.0.14 (Macintosh/20080421)

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

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

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