From 4072ef25bf1321755bc2a7840ed6a3620b7e0e14 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 27 Jun 2005 21:21:36 +0000 Subject: [PATCH] (add-to-list, add-to-ordered-list): Doc fixes. --- lisp/subr.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 7b6c56847f9..d489000f7e7 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -937,7 +937,7 @@ the hook's buffer-local value rather than its default value." (set hook hook-value)))))) (defun add-to-list (list-var element &optional append) - "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. + "Add ELEMENT to the value of LIST-VAR if it isn't there yet. The test for presence of ELEMENT is done with `equal'. If ELEMENT is added, it is added at the beginning of the list, unless the optional argument APPEND is non-nil, in which case @@ -959,15 +959,18 @@ other hooks, such as major mode hooks, can do the job." (defun add-to-ordered-list (list-var element &optional order) - "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. + "Add ELEMENT to the value of LIST-VAR if it isn't there yet. The test for presence of ELEMENT is done with `eq'. The resulting list is reordered so that the elements are in the order given by each element's numeric list order. Elements without a numeric list order are placed at the end of the list. -If the third optional argument ORDER is non-nil, set the -element's list order to the given value. +If the third optional argument ORDER is a number (integer or +float), set the element's list order to the given value. If +ORDER is nil or omitted, do not change the numeric order of +ELEMENT. If ORDER has any other value, remove the numeric order +of ELEMENT if it has one. The list order for each element is stored in LIST-VAR's `list-order' property. -- 2.39.2