你如何在elisp中更改全局变量?

时间:2014-11-30 01:16:34

标签: emacs elisp

package-archives
(("marmalade" . "http://marmalade-repo.org/packages/") ("gnu" . "http://elpa.gnu.org/packages/") ("melpa" . "http://melpa.milkbox.net/packages/"))

setq package-archives '(("melpa" . "http://melpa.milkbox.net/packages/"))
(("melpa" . "http://melpa.milkbox.net/packages/"))

但是当我再次评估package-archives时,我得到原始值:

package-archives
(("marmalade" . "http://marmalade-repo.org/packages/") ("gnu" . "http://elpa.gnu.org/packages/") ("melpa" . "http://melpa.milkbox.net/packages/"))

1 个答案:

答案 0 :(得分:0)

我只需要添加parens:

(setq package-archives '(("melpa" . "http://melpa.milkbox.net/packages/")))