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

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

Structuring a list to run sequence of commands


From: Heime
Subject: Structuring a list to run sequence of commands
Date: Mon, 25 Nov 2024 20:37:40 +0000

Have been hoping to grouping a sequence of commands and execute each one.

But am getting 

Debugger entered--Lisp error: (invalid-function (add-to-list 'load-path 
(marnap-sec-fpln-waypt "NAPLN")))
  ((add-to-list 'load-path (marnap-sec-fpln-waypt "NAPLN")) (require 'napoleon))
  eval(((add-to-list 'load-path (marnap-sec-fpln-waypt "NAPLN")) (require 
'napoleon)))
  (let ((cmd (car tail))) (eval cmd) (setq tail (cdr tail)))

I want to ensures that each command in lookup-alist for options 'armg 
and 'go are evaluated independently.

The call I use is (marnap '(armg go))

(defun marnap (&optional actm-service)

  (let ( (lookup-alist '((armg ((add-to-list 'load-path
                                  (marnap-sec-fpln-waypt "NAPLN"))
                                (require 'napoleon)) )

                         (go   ((napoleon-tachyon 'go)) ) )) )

    (dolist (actm actm-service)

      (let ( (fnlist (cdr (assoc actm lookup-alist))) )
        (if fnlist
             ;; Iterate over list of commands and evaluate each
             (dolist (cmd fnlist)
               (eval cmd))  ; Evaluate command as a list
          (message "ACTM Unrecognised: '%s\n" actm))) )) )







reply via email to

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