From: Joost Kremers <joostkremers@yahoo.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Assign a function to a variable, and invoke it
Date: 30 Jul 2007 22:56:40 GMT [thread overview]
Message-ID: <slrnfasr57.2re.joostkremers@j.kremers4.news.arnhem.chello.nl> (raw)
In-Reply-To: 1185835944.997796.286880@w3g2000hsg.googlegroups.com
troelskn wrote:
> On Jul 31, 12:22 am, troelskn <troel...@gmail.com> wrote:
>> I'm trying to assign an existing function to a variable, so I can call
>> that variable, rather than the actual function directly. The aim is to
>> have a single point, where I can change behaviour for my module. The
>> code I have so far is:
>>
>> (defvar my-browse-url 'browse-url)
>> ...
>> (my-browse-url "http://example.com")
>>
>> I suppose that functions and variables have different namespaces in
>> elisp?
yup.
> How do I invoke the function, which my-browse-url points to?
>
> I figured it out. I need to use funcall
or perhaps use fset or defalias?
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
next prev parent reply other threads:[~2007-07-30 22:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-30 22:22 Assign a function to a variable, and invoke it troelskn
2007-07-30 22:52 ` troelskn
2007-07-30 22:56 ` Joost Kremers [this message]
2007-07-30 22:56 ` Drew Adams
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=slrnfasr57.2re.joostkremers@j.kremers4.news.arnhem.chello.nl \
--to=joostkremers@yahoo.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.