[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Assign a function to a variable, and invoke it
From: |
Joost Kremers |
Subject: |
Re: Assign a function to a variable, and invoke it |
Date: |
30 Jul 2007 22:56:40 GMT |
User-agent: |
slrn/0.9.8.1 (Linux) |
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)