From fd77065fc66e340e3d6a246859868d459076f509 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 21 Sep 2021 21:51:38 +0300 Subject: [PATCH] Improve recently added documentation * doc/lispref/lists.texi (Building Lists): * lisp/subr.el (ensure-list): Avoid passive tense in documenting 'ensure-list'. --- doc/lispref/lists.texi | 6 +++--- lisp/subr.el | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index 6bb11460efe..75641256b60 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi @@ -680,9 +680,9 @@ list are in the same order as in @var{tree}. @end example @defun ensure-list object -Ensure that we have a list. If @var{object} is already a list, it is -returned. If @var{object} isn't a list, a one-element list containing -@var{object} is returned. +This function returns @var{object} as a list. If @var{object} is +already a list, the function returns it; otherwise, the function +returns a one-element list containing @var{object}. This is usually useful if you have a variable that may or may not be a list, and you can then say, for instance: diff --git a/lisp/subr.el b/lisp/subr.el index 232e684cd46..0793cbca5e1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -6427,9 +6427,9 @@ This is intended for internal use only." (json-unavailable nil)))) (defun ensure-list (object) - "Ensure that we have a list. -If OBJECT is already a list, OBJECT is returned. If it's -not a list, a one-element list containing OBJECT is returned." + "Return OBJECT as a list. +If OBJECT is already a list, return OBJECT itself. If it's +not a list, return a one-element list containing OBJECT." (if (listp object) object (list object))) -- 2.39.5