all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: e23 inverse video on mode line and nowhere else
@ 2010-02-01  2:04 Karl Berry
  0 siblings, 0 replies; 9+ messages in thread
From: Karl Berry @ 2010-02-01  2:04 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks to everyone for replying, although unfortunately these
suggestions do not work for me.(*)

I've filed a bug about compile.el using non-mode-line-faces on the
mode line.  Meanwhile, I'll guess I'll try to defadvise
mode line creation, or something.

Karl

(*) list-faces and customize-face are useless for me.  They do not allow
for completely turning off "facification", last time I tried anyway.
Beyond that, they are far too ui-intensive, mess around with my startup
files, and most importantly there are far too many faces to deal with
that way.  And new faces crop up at the drop of a hat.

The Elisp that Juri sent me years ago, which I included in my original
post, already takes care of the issue in general, as well as possible.
(http://lists.gnu.org/archive/html/help-gnu-emacs/2010-01/msg00196.html)

What I posted about this month is a new problem, where, as Juri and I
said, non-mode-line faces are used to propertize text for the mode line.
It's no different in the 23.1.92 pretest, either.

Anyway.




^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <20100115004221.598A8AF600@mxperim7.sea5.speakeasy.net>]
* e23 inverse video on mode line and nowhere else
@ 2010-01-13  1:42 Karl Berry
  2010-01-13  8:31 ` Leo
  2010-01-16 22:35 ` Juri Linkov
  0 siblings, 2 replies; 9+ messages in thread
From: Karl Berry @ 2010-01-13  1:42 UTC (permalink / raw)
  To: help-gnu-emacs

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)




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-02-01  2:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1436.1263510311.18930.help-gnu-emacs@gnu.org>
2010-01-15  0:32 ` e23 inverse video on mode line and nowhere else Tim X
2010-01-15  8:21   ` Eli Zaretskii
2010-02-01  2:04 Karl Berry
     [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
  -- strict thread matches above, loose matches on Subject: below --
2010-01-13  1:42 Karl Berry
2010-01-13  8:31 ` Leo
2010-01-16 22:35 ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.