From 1bde5c3b08d1de9b2c9cd38728bcd35329455a8c Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 7 Feb 2014 19:37:57 -0800 Subject: [PATCH] * subr.el (add-to-list): Refill the paragraphs. Fixes: debbugs:15791 --- lisp/ChangeLog | 2 ++ lisp/subr.el | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7d11d09fc98..fe5e2914ee1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2014-02-08 Lars Ingebrigtsen + * subr.el (add-to-list): Refill the paragraphs (bug#15791). + * macros.el (insert-kbd-macro): Doc fix (bug#16025). 2014-02-08 Glenn Morris diff --git a/lisp/subr.el b/lisp/subr.el index 3101cc8b6f0..7730a4327b4 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1500,8 +1500,8 @@ FUN is then called once." (defun add-to-list (list-var element &optional append compare-fn) "Add ELEMENT to the value of LIST-VAR if it isn't there yet. -The test for presence of ELEMENT is done with `equal', -or with COMPARE-FN if that's non-nil. +The test for presence of ELEMENT is done with `equal', or with +COMPARE-FN if that's non-nil. If ELEMENT is added, it is added at the beginning of the list, unless the optional argument APPEND is non-nil, in which case ELEMENT is added at the end. @@ -1509,14 +1509,15 @@ ELEMENT is added at the end. The return value is the new value of LIST-VAR. This is handy to add some elements to configuration variables, -but please do not abuse it in Elisp code, where you are usually better off -using `push' or `cl-pushnew'. - -If you want to use `add-to-list' on a variable that is not defined -until a certain package is loaded, you should put the call to `add-to-list' -into a hook function that will be run only after loading the package. -`eval-after-load' provides one way to do this. In some cases -other hooks, such as major mode hooks, can do the job." +but please do not abuse it in Elisp code, where you are usually +better off using `push' or `cl-pushnew'. + +If you want to use `add-to-list' on a variable that is not +defined until a certain package is loaded, you should put the +call to `add-to-list' into a hook function that will be run only +after loading the package. `eval-after-load' provides one way to +do this. In some cases other hooks, such as major mode hooks, +can do the job." (declare (compiler-macro (lambda (exp) -- 2.39.2