[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block ret
From: |
Stefan Monnier |
Subject: |
bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block return |
Date: |
Sun, 21 Nov 2010 13:51:58 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> | > $ emacs -Q
> | > (progn
> | > (autoload 'return "cl-macs" nil nil 'macro)
> | > (dolist (elt '(1 2))
> | > (return elt)))
> | This causes cl-macs to be run at an unexpected time. I.e. it's ruled
> | out for being a contrived example.
> Is the above code not valid?
Doesn't matter: lots of vlid Elisp code doesn't do what you'd expect.
> Does it not do what it is supposed to do;
Apparently it doesn't for you.
> to define `return' when it will be used for the first time?
The normal way to use CL features like `return' is with (require 'cl)
somewhere at the top-level. Anything else is poor code that needs to
be improved.
> | E.g. I'd be *really* surprised if it were an example you bumped into
> | before this discussion.
> Surprise or not, it demonstrates the defiency of claimed:
> - "dolist and dotimes are 100% compatible with CL's definition."
You don't need to teach me this. I know full well that 100%
compatibility between two pieces of code in Elisp is *never* true,
unless the two are `eq'.
Stefan
- bug#7408: Linux patchutils: Development of the project?, (continued)
- bug#7408: Linux patchutils: Development of the project?, jari, 2010/11/17
- bug#7408: Linux patchutils: Development of the project?, Štěpán Němec, 2010/11/17
- bug#7408: Linux patchutils: Development of the project?, martin rudalics, 2010/11/17
- bug#7408: Linux patchutils: Development of the project?, Stefan Monnier, 2010/11/18
- bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block return, Jari Aalto, 2010/11/18
- bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block return, Stefan Monnier, 2010/11/21
- bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block return, jari, 2010/11/21
- bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block return, Eli Zaretskii, 2010/11/21
- bug#7408: 23.2.1 dolist -- subr.el and cl-macs differ with nil-block return,
Stefan Monnier <=