[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use of return in dolist
From: |
Eduardo Ochs |
Subject: |
Re: Use of return in dolist |
Date: |
Wed, 1 Jan 2025 22:21:12 -0300 |
On Wed, 1 Jan 2025 at 21:42, Eduardo Ochs <eduardoochs@gmail.com> wrote:
>
> On Wed, 1 Jan 2025 at 20:10, Heime via Users list for the GNU Emacs
> text editor <help-gnu-emacs@gnu.org> wrote:
> >
> > I cannot do C-h f return
>
> Try:
>
> (defun eek (str) (execute-kbd-macro (read-kbd-macro str)))
> (eek "M-x apropos RET return RET")
> (eek "C-h f cl-return RET")
>
> Cheers,
> Eduardo
Try this too:
;; See: (info "(cl)Blocks and Exits")
(defun myinsert (o) (insert (format "\n%S" o)))
(dolist (i '(2 3 5)) (myinsert i))
(cl-block nil (dolist (i '(2 3 5 8)) (if (= i 5) (cl-return) (myinsert i))))
Cheers,
E.