aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1998-04-07 18:22:28 +0000
committerKarl Heuer1998-04-07 18:22:28 +0000
commit15171a06d35ecbe33a98aa48751e47a717684bcd (patch)
treee757678d3abdb95640d75e122a65906434afc050
parent912ec20a41a265619958a4608371d53b99665ecb (diff)
downloademacs-15171a06d35ecbe33a98aa48751e47a717684bcd.tar.gz
emacs-15171a06d35ecbe33a98aa48751e47a717684bcd.zip
(add-to-list): Always return updated value of LIST-VAR.
-rw-r--r--lisp/subr.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index b3ad3560eeb..653ab63e015 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -664,8 +664,9 @@ until a certain package is loaded, you should put the call to `add-to-list'
664into a hook function that will be run only after loading the package. 664into a hook function that will be run only after loading the package.
665`eval-after-load' provides one way to do this. In some cases 665`eval-after-load' provides one way to do this. In some cases
666other hooks, such as major mode hooks, can do the job." 666other hooks, such as major mode hooks, can do the job."
667 (or (member element (symbol-value list-var)) 667 (if (member element (symbol-value list-var))
668 (set list-var (cons element (symbol-value list-var))))) 668 (symbol-value list-var)
669 (set list-var (cons element (symbol-value list-var)))))
669 670
670;;;; Specifying things to do after certain files are loaded. 671;;;; Specifying things to do after certain files are loaded.
671 672