I was trying to fix the annoying red output in slime. It's OK on light backgrounds but on the dark backgrounds it gets on my nerves.
Some themes fix it. Quick experiment with aurora-theme reveals that slime-repl-inputed-output-face is responsible for the colour.
To fix it I wrote a little function
(defun repl-theme-fix () "Fix REPL theme issues concerning the red annoying text." (interactive) (print "going to change repl buffer") (print (current-buffer)) (load-theme-buffer-local 'hamburg (current-buffer)))
The problem is I have to run M-x repl-theme-fix each time I start the REPL.
I've tired to experiment with
(add-hook 'lisp-interaction-mode-hook (lambda () (some code here)))
But couldn't make it work not knowing the current-buffer argument needed by the theme.
Another option would be fixing the theme instead of replacing it with hamburg-theme.
What is the best way to fix a theme in emacs startup file?
In slime repl, when I move cursor on colourized output and press C-u C-x = I get more detailed information, which contains hyperlink to a file where the font for slime-repl-inputed-output-face is defined.
In that file I have found the right code fragment and replaced foreground color with Yellow.
(defface slime-repl-inputed-output-face '((((class color) (background light)) (:foreground "Red")) (((class color) (background dark)) (:foreground "Yellow")) (t (:slant italic))) "Face for the result of an evaluation in the SLIME REPL." :group 'slime-repl)
It does what I want to do. When theme does not change the colour I still get nice default for dark backgrounds.
But still do not know how to do it in the init file. What is the best way of fixing it?