1

I'm trying Emacs. I would like to set colors for Eshell. I tried that first with set-foreground-color. But it affects my other modes too.

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

But that's not working either. Or it's affecting the colors on other modes/scratch too.

Have anyone a suggestion? This is not a duplicate question, because the other answers change the colors of other buffers as well.

ReneFroger
  • 484
  • 8
  • 20
  • The answer to the linked question only works in situations where the font-lock rule is written so that a variable is evaluated to the face that should be used. This is not the case for the `default` face. – Lindydancer Jan 16 '15 at 04:27

1 Answers1

3

Here is a link to the documentation regarding remapping faces: 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)
lawlist
  • 13,099
  • 3
  • 49
  • 158