Reputation: 475
I'm a long time (26 years) Emacs user, all the way from TECO Emacs to GNU Emacs 23.4 for MacOS X. I can hack Lisp macros and usually find my way around.
Emacs has become very big. And very colorful.
Is there a simple way to make sure that Emacs never changes font size or color ever?
Upvotes: 4
Views: 206
Reputation: 30701
Emacs has some highlighting that is not controlled by font-lock-mode
.
Here is a solution posted by Juri Linkov to the Emacs Dev mailing list, back in 2007:
I use the following trick to post-process faces immediately after they
get created. I also modified this code to not reset mode line faces:
(defun my-faces-fix (&optional frame)
"Fix defined faces."
(interactive)
;; Check if this function is called by `custom-define-hook' from
;; `custom-declare-face' where the variable `face' is bound locally.
(when (boundp 'face)
(dolist (face (face-list))
(unless (memq face '(mode-line mode-line-highlight mode-line-inactive))
;; Reset all face attributes
(modify-face face)))))
;; 1. Fix existing faces
(let ((face t)) (my-faces-fix))
;; 2. Call `my-faces-fix' every time some new face gets defined
(add-to-list 'custom-define-hook 'my-faces-fix)
Upvotes: 2
Reputation: 10032
You can turn off all font colours and other decorations with the following line in your .emacs:
(global-font-lock-mode 0)
Upvotes: 2
Reputation: 20342
Here's what I've been using for two years now:
(custom-set-faces
'(default ((t (:inherit nil :height 113 :family "DejaVu Sans Mono"))))
'(font-lock-builtin-face ((nil (:foreground "#7F0055" :weight bold))))
'(font-lock-keyword-face ((nil (:foreground "#7F0055" :weight bold))))
'(font-lock-comment-face ((nil (:foreground "#3F7F5F"))))
'(font-lock-string-face ((nil (:foreground "#2A00FF"))))
'(font-lock-type-face ((t (:underline t :slant italic :foreground "#000000"))))
'(font-lock-constant-face ((t (:foreground "#110099"))))
'(font-lock-variable-name-face ((nil nil)))
'(font-lock-function-name-face ((t (:weight bold)))))
You can customize a bunch of other faces too:
just call M-x customize-face
. It will auto-select
the current face.
Upvotes: 1