1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-19 10:22:27 +00:00

* lisp/emacs-lisp/cl-macs.el (cl-loop): Doc fix.

This commit is contained in:
Glenn Morris 2013-05-09 22:01:12 -04:00
parent 759fd76395
commit d5837773e0
2 changed files with 33 additions and 11 deletions

View File

@ -1,3 +1,7 @@
2013-05-10 Glenn Morris <rgm@gnu.org>
* emacs-lisp/cl-macs.el (cl-loop): Doc fix.
2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
* comint.el (comint-redirect-send-command-to-process): Use :around

View File

@ -765,17 +765,35 @@ This is compatible with Common Lisp, but note that `defun' and
;;;###autoload
(defmacro cl-loop (&rest loop-args)
"The Common Lisp `loop' macro.
Valid clauses are:
for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM,
for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR,
for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND,
always COND, never COND, thereis COND, collect EXPR into VAR,
append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR,
count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR,
if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR,
finally return EXPR, named NAME.
Valid clauses include:
For clauses:
for VAR from/upfrom/downfrom EXPR1 to/upto/downto/above/below EXPR2 by EXPR3
for VAR = EXPR1 then EXPR2
for VAR in/on/in-ref LIST by FUNC
for VAR across/across-ref ARRAY
for VAR being:
the elements of/of-ref SEQUENCE [using (index VAR2)]
the symbols [of OBARRAY]
the hash-keys/hash-values of HASH-TABLE [using (hash-values/hash-keys V2)]
the key-codes/key-bindings/key-seqs of KEYMAP [using (key-bindings VAR2)]
the overlays/intervals [of BUFFER] [from POS1] [to POS2]
the frames/buffers
the windows [of FRAME]
Iteration clauses:
repeat INTEGER
while/until/always/never/thereis CONDITION
Accumulation clauses:
collect/append/nconc/concat/vconcat/count/sum/maximize/minimize FORM
[into VAR]
Miscellaneous clauses:
with VAR = INIT
if/when/unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...]
named NAME
initially/finally [do] EXPRS...
do EXPRS...
[finally] return EXPR
For more details, see Info node `(cl)Loop Facility'.
\(fn CLAUSE...)"
(declare (debug (&rest &or