From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Calling functions dynamically Date: Mon, 16 Sep 2024 11:08:35 +0000 Message-ID: <3elWsEffP5BlZpLMMjbK-B1YGJgpMIsHL_X_YaN2XPk5gCbxuj-QobvDf-9z3WR5XMxwPodPaCRI87ecfMzFZmY0KR2sL7zzZYT-v0eulrs=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40499"; mail-complaints-to="usenet@ciao.gmane.io" To: Heime via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 16 13:09:10 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sq9bS-000AQC-D7 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 16 Sep 2024 13:09:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sq9b6-0001dM-0w; Mon, 16 Sep 2024 07:08:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sq9b4-0001dD-AE for help-gnu-emacs@gnu.org; Mon, 16 Sep 2024 07:08:46 -0400 Original-Received: from mail-43167.protonmail.ch ([185.70.43.167]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sq9b2-0001j7-8f for help-gnu-emacs@gnu.org; Mon, 16 Sep 2024 07:08:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1726484921; x=1726744121; bh=A8a/DrmgrHUGMFUUlxjvtwsTcLpUzYhC2QDnSLoMbTk=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=k2jkjDcQNvt4EX9ybHYnBnK31+eLfXoXrrje4rTN3KIHASJEmNuE3txoJ2Ixs8h5K PVcqY8Ihd4ltRyCG2cA+Xf9bgVez4Db/tbHvneMHy1M4miqj1chBD8y5A1S9l/nwZY vtDcyPqAYz9PSUdpwn76r6pCLeqI/li/ON+bUNZ6NXlhAnkf1a0VSoW+KYmAYuKJf2 2ta5N4USKVK3onnmMIFc6YWWD2tJmQklm9eCxtxOQWrvZYC02zXUjzz1TjELDjZJ8m p9f1K4RdHRojCIl9Ms37ATo85hqvOZI8rrOHRSGls8oMJ/6fj0Nn3QZtiUlJyl6Xh3 9x/db+juqIV5A== Feedback-ID: 57735886:user:proton X-Pm-Message-ID: 99fc4ffe86458efa441024ed3a4ab71d50bd97ea Received-SPF: pass client-ip=185.70.43.167; envelope-from=heimeborgia@protonmail.com; helo=mail-43167.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147996 Archived-At: I wonder how to implement the following function dynamically, so that I will have just a single (let ( (anctr (torium-fpln-anctr xiakos-data)) ) (torium-fpln-test-chart "xiakos F-Pln" xiakos-data anctr))) where xiakos-data would use either xiakos-fpln or xiakos-sec-fpln, dependin= g on the interactive condition. (defun xiakos-chart (actm) (interactive (let ( (cseq '("F-PLN" "Sec F-PLN")) ) (completing-read " ACTM: " cseq nil t "F-PLN"))) (cond ((string-equal actm "F-PLN") (let ( (anctr (torium-fpln-anctr xiakos-fpln)) ) (torium-fpln-test-chart "xiakos F-Pln" xiakos-fpln anctr))) ((string-equal actm "Sec F-PLN") (let ( (anctr (torium-anctr xiakos-sec-fpln)) ) (torium-fpln-test-chart "xiakos Sec F-Pln" xiakos-sec-fpln anctr))) = ))