unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Use of return in dolist
@ 2024-12-31 18:45 Heime via Users list for the GNU Emacs text editor
  2025-01-01  4:31 ` Joel Reicher
  0 siblings, 1 reply; 7+ messages in thread
From: Heime via Users list for the GNU Emacs text editor @ 2024-12-31 18:45 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-01-02 10:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-31 18:45 Use of return in dolist Heime via Users list for the GNU Emacs text editor
2025-01-01  4:31 ` Joel Reicher
2025-01-01 23:09   ` Heime via Users list for the GNU Emacs text editor
2025-01-02  0:28     ` Joel Reicher
2025-01-02  0:42     ` Eduardo Ochs
2025-01-02  1:21       ` Eduardo Ochs
2025-01-02 10:44         ` Jean Louis

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).