help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Invoking a function from a list of functions


From: Tim Johnson
Subject: Invoking a function from a list of functions
Date: Thu, 8 Nov 2018 14:01:25 -0900
User-agent: Mutt/1.10.0 (2018-05-17)

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. 

thanks
GNU Emacs 26.1 GTK+ Version, Ubuntu 16.04

-- 
Tim Johnson
http://www.tj49.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]