Commit 15171a06 authored by Karl Heuer's avatar Karl Heuer
Browse files

(add-to-list): Always return updated value of LIST-VAR.

parent 912ec20a
......@@ -664,8 +664,9 @@ 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."
(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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment