From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: karl@freefriends.org (Karl Berry) Newsgroups: gmane.emacs.help Subject: e23 inverse video on mode line and nowhere else Date: Wed, 13 Jan 2010 01:42:25 GMT Message-ID: <201001130142.o0D1gPRH010981@f7.net> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1263346990 31370 80.91.229.12 (13 Jan 2010 01:43:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jan 2010 01:43:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 13 02:43:03 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NUsGE-0003df-FU for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jan 2010 02:43:03 +0100 Original-Received: from localhost ([127.0.0.1]:45949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUsGD-0002fY-4o for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jan 2010 20:43:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUsFp-0002fJ-Vb for help-gnu-emacs@gnu.org; Tue, 12 Jan 2010 20:42:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUsFk-0002f6-R1 for help-gnu-emacs@gnu.org; Tue, 12 Jan 2010 20:42:36 -0500 Original-Received: from [199.232.76.173] (port=42141 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUsFk-0002f3-M4 for help-gnu-emacs@gnu.org; Tue, 12 Jan 2010 20:42:32 -0500 Original-Received: from b0.f7.net ([66.148.120.132]:52384 helo=f7.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUsFk-0002WR-6Q for help-gnu-emacs@gnu.org; Tue, 12 Jan 2010 20:42:32 -0500 X-Envelope-From: karl@freefriends.org X-Envelope-To: Original-Received: from f7.net (sls-af11p1 [127.0.0.1]) by f7.net (8.14.4/8.14.4) with ESMTP id o0D1gPgn010982 for ; Tue, 12 Jan 2010 20:42:28 -0500 Original-Received: (from karl@localhost) by f7.net (8.14.4/8.14.4/submit) id o0D1gPRH010981; Wed, 13 Jan 2010 01:42:25 GMT X-Authentication-Warning: localhost.localdomain: karl set sender to karl@freefriends.org using -f X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71199 Archived-At: I habitually run Emacs in an xterm window. For that purpose, I'd like to have the mode lines be inverse video, and not to have inverse video, or any other face manipulations (underline, etc.), in buffer contents, such as *compilation* and *grep*. Is there any way to do this globally in Emacs 23? If not ... A couple years ago Juri Linkov kindly sent me the Elisp below to disable faces by default, leaving only faces matching ^mode-line untouched. This seems to generally give what I want. (Thanks again, Juri.) But what I'm finding now is that the compilation status string, such as ":run", ": exit[0]", and so on, is shown as normal text (not inverse video) in the mode line. I can get the compilation string in inverse video in the mode line with this (or by excluding ^compilation in my-faces-fix below): (set-face-attribute 'compilation-info nil :inverse-video t) (set-face-attribute 'compilation-warning nil :inverse-video t) (set-face-attribute 'compilation-error nil :inverse-video t) But then filenames and various other strings show up in inverse video in the buffer contents. Short of reverting back to old versions of M-x compile, etc., which I don't want to do, is there any way to control this? Perhaps by doing something in the mode line display to force all faces to inverse video? (It seems like the same compilation-* faces should not be used both within the buffer contents and in the mode line, but anyway.) Thanks, Karl ;; Kill all faces except mode lines. (Juri, 14aug07) (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 (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)