I load a package that defines a list of radio stations with defvar
(defvar default-list
'((station1) (station2)))
I want to redefine this list after loading the package (I am using require
) because a lot of the stations are defunct.
I load a package that defines a list of radio stations with defvar
(defvar default-list
'((station1) (station2)))
I want to redefine this list after loading the package (I am using require
) because a lot of the stations are defunct.
(setq default-list '((station1) (station99) (stationABC))) ; Redefine.
or
(add-to-list 'default-list '(station23)) ; Add a station.
Take a look at C-h i
, Emacs Lisp Intro
. See also the Elisp manual, node Setting Variables.
You can also use setq
or your own defvar
before that defvar
in the package is evaluated. That will prevent the package's defvar
from taking effect. See the Elisp manual, node Defining Variables.