Emacs符号作为变量的值是未定义的。

4

我在我的Emacs初始化文件中有以下代码 -

(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/solarized")
(load-theme 'solarized-light t)

我收到以下错误信息 -
Symbol's value as variable is void: custom-theme-load-path

错误的回溯信息如下 -

Debugger entered--Lisp error: (void-variable custom-theme-load-path)
  add-to-list(custom-theme-load-path "~/.emacs.d/themes/solarized")
  eval-buffer(#<buffer  *load*> nil "/home/kshitiz/.emacs" nil t)  ; Reading at buffer position 69
  load-with-code-conversion("/home/kshitiz/.emacs" "/home/kshitiz/.emacs" t t)
  load("~/.emacs" t t)
  #[nil "\205\264

我做错了什么?

你的Emacs版本是什么? - abo-abo
当您调用add-to-list时,变量custom-theme-load-path不存在。也许您需要先加载定义该变量的软件包。 - Barmar
@abo-abo GNU Emacs 23.4.1 - Kshitiz Sharma
@Barmar 或许吧。但我正在遵循这里的指南(https://github.com/bbatsov/zenburn-emacs),它没有提到这样的事情。 - Kshitiz Sharma
1
从文档中可以看到:该主题使用内置的主题支持,这是从Emacs 24开始提供的新功能。 - Barmar
1个回答

4

这个需要主题支持,只有在Emacs 24.x中才可用,但你正在运行Emacs 23.x。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接