3

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.

Drew
  • 75,699
  • 9
  • 109
  • 225

1 Answers1

3
(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.

Drew
  • 75,699
  • 9
  • 109
  • 225
  • That's what I tried, so in this case the code is not being executed perhaps. or maybe it's being executed before the package defines the defvar (but that doesn't make sense). I'll try putting it somewhere else then. – Alejandro Erickson Jun 16 '16 at 13:15
  • 1
    I figured it out and used this method. EMMS had cached the defunct streams as personal bookmarks (and was updating the variable at runtime). I deleted that directory and now it works properly. – Alejandro Erickson Jun 16 '16 at 13:32