10

Unable to load color "unspecified-bg" [16 times]使用时出现错误emacsclient -c。我已经使用emacs --daemon. 这似乎意味着我的自定义面孔不会加载。

当像往常一样启动emacs,然后使用M-x server-start时,这个问题根本不会发生。我怎样才能emacsclient -c正确加载面部?

以下是相关代码:

(custom-set-faces '(default ((t (:inherit nil :stipple nil :background "black" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant正常:体重正常:高度120:宽度正常:铸造“未知”:家庭“Inconsolata”)))))

4

2 回答 2

0

听起来这可能是错误 #4776:http ://debbugs.gnu.org/cgi/bugreport.cgi?bug=4776#5 。如果没有,请考虑为此提交一份错误报告,使用M-x report-emacs-bug.

于 2012-01-03T22:13:35.350 回答
0

我不是 100% 确定这会解决您的问题,但您确实应该使用颜色主题来突出显示语法。Custom 是为刚开始使用 emacs 的用户设计的,所以我建议你试试 color-theme 看看它是否有效。这是我在我的机器上设置它的方法:

  1. 颜色主题主页下载包。
  2. 将颜色主题文件夹放在~/.emacs.d/color-theme/.
  3. 确保此文件夹在您的加载路径中。我从 Steve Yegge 的帖子中获取了以下代码:

在您的 .emacs 中:

(defvar emacs-root "~/.emacs.d/")
(labels
  ((add-path
    (p)
    (add-to-list
     'load-path
     (concat emacs-root p))))
  (add-path "lisp")
  (add-path "color-theme-6.6.0")
  (add-path "cedet-1.0"))

(require 'color-theme)

然后你定义你的颜色主题:

;; Color-theme
(eval-after-load "color-theme"
  '(progn
     (color-theme-initialize)

;; Set custom color theme
(defun color-theme-mine ()
  "My custom color theme"
  (interactive)
  (set-cursor-color "#ffffff")
  (color-theme-install
   '(color-theme-mine
     ;; Super-light grey on Dark grey
     ((foreground-color . "#e0e0e0")
      (background-color . "#151515")
      (background-mode . dark))

     (font-lock-comment-face ((t (:foreground "#106010")))) ;; Forest Green
     ;; More definitions below
     ;; ...
  (color-theme-mine)) ;; end eval-after-load

这将color-them-mine在您启动 emacs 时加载。您可以通过键入来查看所有可用的颜色主题M-x color-theme <TAB>。要查看可用面的完整列表,请使用命令M-x list-faces-display

于 2011-12-12T20:28:22.403 回答