1

我正在尝试 Emacs。我想为 Eshell 设置颜色。我首先尝试使用 set-foreground-color。但它也会影响我的其他模式。

  (add-hook 'eshell-mode-hook (lambda ( default ((t (:foreground "#BD8700"))))))

但这也行不通。或者它也会影响其他模式/划痕的颜色。

有人建议吗?这不是一个重复的问题,因为其他答案也会改变其他缓冲区的颜色。

4

1 回答 1

3

这是有关重新映射面的文档的链接: http ://www.gnu.org/software/emacs/manual/html_node/elisp/Face-Remapping.html

(defun my-eshell-mode-faces ()
  (face-remap-add-relative 'default '(:foreground "#BD8700")))

(add-hook 'eshell-mode-hook 'my-eshell-mode-faces)
于 2015-01-18T07:22:45.603 回答