all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: which-function-mode + visual-basic-mode?
Date: Thu, 22 May 2008 21:43:19 -0600	[thread overview]
Message-ID: <g15egb$a35$1@ger.gmane.org> (raw)
In-Reply-To: <g156ol$jaq$1@reader2.panix.com>

David Wolff wrote:
> In article <mailman.11865.1211251654.18990.help-gnu-emacs@gnu.org>,
> Kevin Rodgers  <kevin.d.rodgers@gmail.com> 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	other threads:[~2008-05-23  3:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16 22:10 which-function-mode + visual-basic-mode? David Wolff
2008-05-20  2:47 ` Kevin Rodgers
     [not found] ` <mailman.11865.1211251654.18990.help-gnu-emacs@gnu.org>
2008-05-23  1:31   ` David Wolff
2008-05-23  3:43     ` Kevin Rodgers [this message]
     [not found]     ` <mailman.12074.1211514209.18990.help-gnu-emacs@gnu.org>
2008-06-11  0:39       ` David Wolff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='g15egb$a35$1@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.