unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Calling functions dynamically
@ 2024-09-16 11:08 Heime
  0 siblings, 0 replies; only message in thread
From: Heime @ 2024-09-16 11:08 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

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, depending
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))) ))





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-16 11:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-16 11:08 Calling functions dynamically Heime

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).