[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Assign a function to a variable, and invoke it
From: |
troelskn |
Subject: |
Re: Assign a function to a variable, and invoke it |
Date: |
Mon, 30 Jul 2007 22:52:24 -0000 |
User-agent: |
G2/1.0 |
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