emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master bb59647: Improve recent doc fix for cl-reduce


From: Basil L. Contovounesios
Subject: [Emacs-diffs] master bb59647: Improve recent doc fix for cl-reduce
Date: Mon, 7 Oct 2019 12:59:00 -0400 (EDT)

branch: master
commit bb596474207632ac5cfd139baad000c5470f6dae
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>

    Improve recent doc fix for cl-reduce
    
    * lisp/emacs-lisp/cl-seq.el: (cl-reduce): Clarify treatment of
    :INITIAL-VALUE when :FROM-END is non-nil.  Improve wording when SEQ
    is empty and :INITIAL-VALUE is unspecified (bug#37400).  Describe
    behavior when SEQ comprises a single element.
---
 lisp/emacs-lisp/cl-seq.el | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index 520d450..df3fbe8 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -129,14 +129,16 @@ second element of SEQ, then calling FUNCTION with that 
result and
 the third element of SEQ, then with that result and the fourth
 element of SEQ, etc.
 
-If :INITIAL-VALUE is specified, it is added to the front of SEQ.
-If SEQ is empty, return :INITIAL-VALUE and FUNCTION is not
-called.
-
-If SEQ is empty and no :INITIAL-VALUE is given, then the function
-is called with zero arguments, and reduce returns whatever
-function does. This is the only case where the function is called
-with other than two arguments.
+If :INITIAL-VALUE is specified, it is logically added to the
+front of SEQ (or the back if :FROM-END is non-nil).  If SEQ is
+empty, return :INITIAL-VALUE and FUNCTION is not called.
+
+If SEQ is empty and no :INITIAL-VALUE is specified, then return
+the result of calling FUNCTION with zero arguments.  This is the
+only case where FUNCTION is called with fewer than two arguments.
+
+If SEQ contains exactly one element and no :INITIAL-VALUE is
+specified, then return that element and FUNCTION is not called.
 
 \n(fn FUNCTION SEQ [KEYWORD VALUE]...)"
   (cl--parsing-keywords (:from-end (:start 0) :end :initial-value :key) ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]