diff options
| author | Colin Woodbury | 2022-08-18 15:06:56 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-08-18 15:07:08 +0200 |
| commit | ac43ac1af9dac42d30fbee044defee6e2641ebfc (patch) | |
| tree | 1ab5a485dedfa08fcc5a03b170b245a4f2f76dc4 | |
| parent | 21751f02d36444676db0cf8477822d6522a1f7a6 (diff) | |
| download | emacs-ac43ac1af9dac42d30fbee044defee6e2641ebfc.tar.gz emacs-ac43ac1af9dac42d30fbee044defee6e2641ebfc.zip | |
cl-reduce doc string improvement
* lisp/emacs-lisp/cl-seq.el (cl-reduce): Explain what happens when
using :from-end (bug#57273).
| -rw-r--r-- | lisp/emacs-lisp/cl-seq.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el index 64ae05bf2a0..60e204eaf51 100644 --- a/lisp/emacs-lisp/cl-seq.el +++ b/lisp/emacs-lisp/cl-seq.el | |||
| @@ -139,6 +139,10 @@ only case where FUNCTION is called with fewer than two arguments. | |||
| 139 | If SEQ contains exactly one element and no :INITIAL-VALUE is | 139 | If SEQ contains exactly one element and no :INITIAL-VALUE is |
| 140 | specified, then return that element and FUNCTION is not called. | 140 | specified, then return that element and FUNCTION is not called. |
| 141 | 141 | ||
| 142 | If :FROM-END is non-nil, the reduction occurs from the back of | ||
| 143 | the SEQ moving forward, and the order of arguments to the | ||
| 144 | FUNCTION is also reversed. | ||
| 145 | |||
| 142 | \n(fn FUNCTION SEQ [KEYWORD VALUE]...)" | 146 | \n(fn FUNCTION SEQ [KEYWORD VALUE]...)" |
| 143 | (cl--parsing-keywords (:from-end (:start 0) :end :initial-value :key) () | 147 | (cl--parsing-keywords (:from-end (:start 0) :end :initial-value :key) () |
| 144 | (or (listp cl-seq) (setq cl-seq (append cl-seq nil))) | 148 | (or (listp cl-seq) (setq cl-seq (append cl-seq nil))) |