mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
(add-to-list): Always return updated value of LIST-VAR.
This commit is contained in:
parent
912ec20a41
commit
15171a06d3
1 changed files with 3 additions and 2 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue