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

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

Use of return in dolist


From: Heime
Subject: Use of return in dolist
Date: Tue, 31 Dec 2024 18:45:18 +0000

I want to understand what return does?  I is supposed to exit the dolist.
But does return also return a value.  Does in also exit the function or not? 


(defun amazones-okul-kntlr (actm-seqr)
  "TODO"

  ;; Make ACTM-SEQR a list, even if a single symbol is passed.
  (let ( (actm-seqr
           (if (listp actm-seqr) actm-seqr (list actm-seqr))) )

    (dolist (actm actm-seqr)
      (pcase actm

  ;; PCASE
  ('armg
     (message "ARMG amazones-okul-kntlr")
     (add-to-list 'load-path (amazones-fpln-waypt "OKUL" 'sec))
     (require 'okul)
     (require 'prevodilac))

  ;; PCASE
  ('go
     (message "GO amazones-okul-kntlr")
     (okul-modeline "primitive"))

  ;; PCASE
  ('nogo
     (message "NOGO amazones-okul-kntlr")
     (return))

  ;; PCASE
  (_
     (message "NOGO amazones-okul-kntlr")
     (message " └── ACTM Unrecognised: %s" actm)
     (return)) ))) )





reply via email to

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