Skip to content
Back to formatted view

Raw Message

Message-ID: <20070212181335.825821F7B2@mail.rsma.frb.gov>
Date: 2007-02-12T18:13:35Z
From: Jeffrey J. Hallman
Subject: How to override functions in namespaces?

In package A I have askForString(), which asks the user for a string.
Also in package A I have defined ssh(), which calls askForString().

Package B has package A as a prerequisite.

In package B I redefine askForString() to take advantage of a nicer user
interface made available by B, namely the Emacs mini-buffer prompt.

Packages B and A are both on the search path, with B ahead of A.  If I
call askForString() at the command prompt, I get the version from B.
But the version used by ssh() depends on whether or not package A has a
namespace. If so, ssh() (defined in A) always uses the A version of
askForString().  How can I get ssh() to use the B version of
askForString()? Or am I going about this all wrong?

Jeff