[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#2459: 22.2.1: global-font-lock-mode does not turn off colors: ido.el

From: Juri Linkov
Subject: bug#2459: 22.2.1: global-font-lock-mode does not turn off colors: ido.el, minibuffer prompt
Date: Tue, 24 Feb 2009 21:56:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (x86_64-pc-linux-gnu)

>>>     After global-font-lock-mode is turned off:
>>>     - ido-mode still displays completions in color.
>>>     - Minibuffer prompt's text is still displayed in color.
>> These features, and several other places that use colour, are not
>> implemented using font-lock, so toggling global-font-lock-mode has no
>> effect. In this specific case, you can set ido-use-faces and customize
>> the minibuffer-prompt face.
> Perhaps those can be teach to obey global-font-lock-mode settings.
> It is not feasible to have to configure those separately.

Font-lock makes sense only for syntax-based highlighting.

>> AFAIK there is no simple way to say "give me an entirely monochromatic
>> Emacs".
> It used to.

Something along the lines is a simple way to give a monochromatic Emacs.
Perhaps we should create a new function that will do this depending on
an option.

(defun my-faces-fix (&optional frame)
  "Fix defined faces."
  ;; 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 (string-match "^mode-line" (symbol-name face))
        ;; 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]