[英]emacs color-theme problem
I created my own color theme using this website . 我使用此网站创建了自己的颜色主题。 I've added a new .el file to my ./site-lisp/color-theme/themes directory with the following code: 我已使用以下代码将新的.el文件添加到./site-lisp/color-theme/themes目录中:
(defun your-config-name-here ()
(interactive)
(color-theme-install
'(your-config-name-here
((background-color . "#ffffff")
(background-mode . light)
(border-color . "#000000")
(cursor-color . "#333333")
(foreground-color . "#000000")
(mouse-color . "black"))
(fringe ((t (:background "#000000"))))
(mode-line ((t (:foreground "#000000" :background "#666666"))))
(region ((t (:background "#999999"))))
(font-lock-builtin-face ((t (:foreground "#000000"))))
(font-lock-comment-face ((t (:foreground "#000000"))))
(font-lock-function-name-face ((t (:foreground "#000000"))))
(font-lock-keyword-face ((t (:foreground "#000000"))))
(font-lock-string-face ((t (:foreground "#000000"))))
(font-lock-type-face ((t (:foreground"#000000"))))
(font-lock-variable-name-face ((t (:foreground "#000000"))))
(minibuffer-prompt ((t (:foreground "#7299ff" :bold t))))
(font-lock-warning-face ((t (:foreground "Red" :bold t))))
)))
(provide 'your-config-name-here)
And this in my .emacs file: 这在我的.emacs文件中:
(add-to-list 'load-path "~/../site-lisp/color-theme/")
(add-to-list 'load-path "~/../site-lisp/color-theme/themes")
(require 'color-theme)
(require 'your-config-name-here)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(your-config-name-here)))
The problem is that I've noticed that when I change settings in your-config-name-here.el and exit emacs and reload it, that the changes don't take affect until I do this: 问题是我注意到,当我更改your-config-name-here.el中的设置并退出emacs并重新加载它时,所做的更改在我执行以下操作之前不会生效:
M-x load-file ~/../site-lisp/color-theme/themes/your-config-name-here.el
M-x your-config-name-here
It 'feels' like color-theme is caching the settings somewhere and not reloading then on start-up. 感觉就像颜色主题将设置缓存在某个位置,然后在启动时不重新加载。 What am I missing? 我想念什么?
In your code, you have a call to 'color-theme-initialize
, which doesn't exist as a function in the package color-theme.el . 在您的代码中,您有一个对'color-theme-initialize
的调用,该调用在color-theme.el包中没有作为函数存在。
(eval-after-load "color-theme"
'(progn
;; remove this call (color-theme-initialize)
(your-config-name-here)))
And then your code works. 然后您的代码就可以了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.