From: karl@freefriends.org (Karl Berry)
To: help-gnu-emacs@gnu.org
Subject: e23 inverse video on mode line and nowhere else
Date: Wed, 13 Jan 2010 01:42:25 GMT [thread overview]
Message-ID: <201001130142.o0D1gPRH010981@f7.net> (raw)
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)
next reply other threads:[~2010-01-13 1:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-13 1:42 Karl Berry [this message]
2010-01-13 8:31 ` e23 inverse video on mode line and nowhere else Leo
2010-01-16 22:35 ` Juri Linkov
[not found] <20100115004221.598A8AF600@mxperim7.sea5.speakeasy.net>
2010-01-14 23:04 ` Karl Berry
2010-01-15 4:13 ` Steve Revilak
2010-01-15 20:23 ` Leo
[not found] <mailman.1436.1263510311.18930.help-gnu-emacs@gnu.org>
2010-01-15 0:32 ` Tim X
2010-01-15 8:21 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2010-02-01 2:04 Karl Berry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201001130142.o0D1gPRH010981@f7.net \
--to=karl@freefriends.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).