[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can't turn off font-lock
From: |
Juri Linkov |
Subject: |
Re: can't turn off font-lock |
Date: |
Tue, 14 Aug 2007 02:27:47 +0300 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> (mapc (lambda (face) (modify-face face)) (face-list))
>
> Thanks Juri, that's very helpful. I discovered I don't really want mode
> line faces disabled :), so I'm playing with some conditions, but that's
> a detail. And it has to be run after packages get loaded, since of
> course it can't disable faces that don't exist yet. Another detail. At
> least now I know how to shut them off.
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)
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: can't turn off font-lock, Richard Stallman, 2007/08/12
- Re: can't turn off font-lock, Eli Zaretskii, 2007/08/12
- Re: can't turn off font-lock, Richard Stallman, 2007/08/13
- Re: can't turn off font-lock, Eli Zaretskii, 2007/08/13
- Re: can't turn off font-lock, Alfred M. Szmidt, 2007/08/12
Re: can't turn off font-lock, Richard Stallman, 2007/08/13
Re: can't turn off font-lock, Karl Berry, 2007/08/12
Re: can't turn off font-lock, Karl Berry, 2007/08/12