diff lisp/subr.el @ 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 e917eb0d4e01
children 6175866e1b71
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.