changeset 21409:3e8b7782f4f5

(add-to-list): Always return updated value of LIST-VAR.
author Karl Heuer <kwzh@gnu.org>
date Tue, 07 Apr 1998 18:22:28 +0000
parents c284604287f3
children d68f866455c6
files lisp/subr.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Tue Apr 07 18:13:23 1998 +0000
+++ b/lisp/subr.el	Tue Apr 07 18:22:28 1998 +0000
@@ -664,8 +664,9 @@
 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."
-  (or (member element (symbol-value list-var))
-      (set list-var (cons element (symbol-value list-var)))))
+  (if (member element (symbol-value list-var))
+      (symbol-value list-var)
+    (set list-var (cons element (symbol-value list-var)))))
 
 ;;;; Specifying things to do after certain files are loaded.