From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Invoking a function from a list of functions Date: Thu, 8 Nov 2018 14:01:25 -0900 Organization: AkWebsoft Message-ID: <20181108230125.GA2179@mail.akwebsoft.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1541718957 26262 195.159.176.226 (8 Nov 2018 23:15:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Nov 2018 23:15:57 +0000 (UTC) User-Agent: Mutt/1.10.0 (2018-05-17) To: Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 09 00:15:53 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKtWi-0006iW-Mo for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Nov 2018 00:15:52 +0100 Original-Received: from localhost ([::1]:59433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKtYp-0004Vo-7O for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Nov 2018 18:18:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKtX6-0003iw-3m for Help-gnu-emacs@gnu.org; Thu, 08 Nov 2018 18:16:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKtIz-0007ae-4Y for Help-gnu-emacs@gnu.org; Thu, 08 Nov 2018 18:01:44 -0500 Original-Received: from tjohnson.mtaonline.net ([64.4.232.191]:46924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKtIv-0006vQ-DX for Help-gnu-emacs@gnu.org; Thu, 08 Nov 2018 18:01:39 -0500 Original-Received: by linus (Postfix, from userid 1000) id 538F9240436; Thu, 8 Nov 2018 14:01:25 -0900 (AKST) Mail-Followup-To: Emacs Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.4.232.191 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118598 Archived-At: 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