From: troelskn <troelskn@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Assign a function to a variable, and invoke it
Date: Mon, 30 Jul 2007 22:52:24 -0000 [thread overview]
Message-ID: <1185835944.997796.286880@w3g2000hsg.googlegroups.com> (raw)
In-Reply-To: <1185834175.653370.242000@22g2000hsm.googlegroups.com>
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? How do I invoke the function, which my-browse-url points to?
I figured it out. I need to use funcall
http://www.delorie.com/gnu/docs/elisp-manual-21/elisp_168.html
next prev parent reply other threads:[~2007-07-30 22:52 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 [this message]
2007-07-30 22:56 ` Joost Kremers
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1185835944.997796.286880@w3g2000hsg.googlegroups.com \
--to=troelskn@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).