[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Invoking a function from a list of functions
From: |
Eric Abrahamsen |
Subject: |
Re: Invoking a function from a list of functions |
Date: |
Thu, 08 Nov 2018 17:25:30 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Tim Johnson <tim@akwebsoft.com> writes:
> Given a list of functions:
> (setq funcs '(scroll-up-line scroll-down-line))
>
> And assuming that these functions have a similar argument list,
> I can invoke a function as:
>
> (funcall (nth 1 funcs))
> ;; or optionally
> (funcall (nth 1 funcs) 2)
>
> That approach is sufficient for my needs at the moment, an example
> of which might be to cycle through color themes invoked by my own
> functions.
>
> However, in the quest for futher edification I'd welcome URLs to
> documentation or discussion, as well as any contributions other
> emacsen might choose to make. Keywords also.
>
> I had a heck of a time getting relevant responses from google. I
> actually don't know what keywords to search with.
It isn't clear to me, at least, what else you might be trying to achieve
here. Is it more accurately selecting a function from within a list,
using a keyword? Or cycling through functions in a list?
You'll have a heck of a time getting relevant responses on this list,
too, unless you tell us what you're after! :)
Message not available
Re: Invoking a function from a list of functions, Andreas Röhler, 2018/11/09