unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-trunk-diffs] Changes to emacs/lisp/faces.el
Date: Sun, 26 Dec 2004 21:42:36 +0200	[thread overview]
Message-ID: <87ekhcsurb.fsf@jurta.org> (raw)
In-Reply-To: <m1ChpSg-0004HIC@rattlesnake.com> (Robert J. Chassell's message of "Fri, 24 Dec 2004 13:26:30 +0000 (UTC)")

"Robert J. Chassell" <bob@rattlesnake.com> writes:
>    The current `blue' is one of the most unsuitable colors.  It stand
>    out very much.
>
> As I said early, the default cyan for escape glyphs is wonderful for me.

Cyan stands out very much.  OTOH, I see that dark red is not good
for dark backgrounds either.  For dark backgrounds the most suitable
would be a light color with the value between the color values
of font-lock-comment-face and font-lock-string-face, which are
"chocolate1" and "LightSalmon", respectively.  And at the same
time it should be closer to white.

> Please suggest values for each of the most likely various color formats

I suggest "burlywood2", "sandy brown" or "tan1".

> For example, 
>
>     (custom-set-faces
>      '(escape-glyph ((((class color) (background dark)) 
>                       (:foreground "cyan"))))
>      '(escape-glyph ((((class color) (background light)) 
>                       (:foreground "dark red")))))

You can type M-C-x on the following forms in emacs-lisp mode
with evaluated (put 'escape-glyph 'saved-face nil) before that:

(defface escape-glyph '((((background dark)) :foreground "burlywood2")
			(((type pc)) :foreground "magenta")
			(t :foreground "dark green"))
  "Face for characters displayed as ^-sequences or \\-sequences."
  :group 'basic-faces)

(defface escape-glyph '((((background dark)) :foreground "sandy brown")
			(((type pc)) :foreground "magenta")
			(t :foreground "dark red"))
  "Face for characters displayed as ^-sequences or \\-sequences."
  :group 'basic-faces)

(defface escape-glyph '((((background dark)) :foreground "tan1")
			(((type pc)) :foreground "magenta")
			(t :foreground "dark red"))
  "Face for characters displayed as ^-sequences or \\-sequences."
  :group 'basic-faces)

> Or perhaps custom themes could be generated from `custom-set-faces'
> expressions: one for green backgrounds, one for white backgrounds, one
> for blue backgrounds, etc., in X, something else for an audio desktop,
> and something else for the various consoles.

That's an interesting idea.  Do you suggest face conditions like this:

    (((background "green")) :foreground "yellow")

> (In my .emacs file, I set 98 different faces to various colors and
> heights.  Weights, other than normal, don't work for me.)

Different weights don't work for me too, but I reset all them in
with a function in a custom face define hook.

(defun my-faces-set (&optional frame)
  (interactive)
  ;; Check if this function is called by `custom-define-hook' from
  ;; `custom-declare-face' where the variable `face' is bound locally.
  (if (boundp 'face)
      (mapc (lambda (face)
              (when (face-italic-p face frame)
                (if (equal (face-foreground face frame) "black")
                    (set-face-foreground face "gray50" frame)))
              (when (face-bold-p face frame)
                (set-face-bold-p face nil frame)
                (set-face-underline-p face t frame))
              (when (numberp (face-attribute face :height frame))
                (set-face-attribute face frame :height 'unspecified))
              (when (numberp (face-attribute face :width frame))
                (set-face-attribute face frame :width 'unspecified))
              (when (numberp (face-attribute face :weight frame))
                (set-face-attribute face frame :weight 'unspecified)))
            (face-list))))

(add-to-list 'custom-define-hook 'my-faces-set)

> By the way, how do you list the complete contents of a theme?  I could
> not find mention in the Emacs manual, the Emacs Lisp Reference manual,
> or with `help-for-help'.  I know about `C-h v' (describe-variable),
> `list-colors-display', and `list-faces-display'.  (Normally, I look in
> my .emacs file.)

There is a good package at http://www.emacswiki.org/cgi-bin/wiki/ColorTheme
color-theme.el which has the command `color-theme-print' to print the
current color theme as a Lisp function.

-- 
Juri Linkov
http://www.jurta.org/emacs/

  reply	other threads:[~2004-12-26 19:42 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1CZoXW-0007hE-UW@lists.gnu.org>
     [not found] ` <E1Ca4Kt-00067g-EH@fencepost.gnu.org>
2004-12-03  9:18   ` [Emacs-trunk-diffs] Changes to emacs/lisp/faces.el Kim F. Storm
2004-12-04  2:48     ` Richard Stallman
2004-12-05 17:52       ` Juri Linkov
2004-12-05 18:32         ` Daniel Pfeiffer
2004-12-06  1:40         ` Richard Stallman
2004-12-07 22:40           ` Daniel Pfeiffer
2004-12-07 23:48             ` Stefan Monnier
2004-12-08  8:47               ` Daniel Pfeiffer
2004-12-08 15:16                 ` Stefan Monnier
2004-12-08 22:15               ` Richard Stallman
2004-12-08 22:15             ` Richard Stallman
2004-12-12  9:19               ` Daniel Pfeiffer
2004-12-13  9:03                 ` Juri Linkov
2004-12-13 14:51                   ` Stefan Monnier
2004-12-13 19:51                 ` Richard Stallman
2004-12-13 23:41                   ` Daniel Pfeiffer
2004-12-14 23:22                     ` Richard Stallman
2004-12-17  0:54                     ` Richard Stallman
2004-12-19  9:41                       ` Daniel Pfeiffer
2004-12-21 11:21                         ` Richard Stallman
2004-12-23 20:39                           ` Daniel Pfeiffer
2004-12-14 12:32                   ` Kim F. Storm
2004-12-15 10:56                     ` Juri Linkov
2004-12-15 11:21                       ` Kim F. Storm
2004-12-15 12:01                         ` Robert J. Chassell
2004-12-15 14:58                     ` Richard Stallman
2004-12-15 16:14                       ` Kim F. Storm
2004-12-15 20:35                         ` Daniel Pfeiffer
2004-12-24  2:28                       ` Juri Linkov
2004-12-24 13:26                         ` Robert J. Chassell
2004-12-26 19:42                           ` Juri Linkov [this message]
2004-12-27  8:00                             ` Eli Zaretskii
2004-12-27 19:53                               ` Juri Linkov
2004-12-27 22:01                                 ` Eli Zaretskii
2004-12-27 22:56                                   ` Stefan Monnier
2004-12-28 17:25                                     ` Richard Stallman
2004-12-28  2:38                                   ` Juri Linkov
2004-12-28  4:47                                     ` Eli Zaretskii
2004-12-28  7:52                                       ` Juri Linkov
2004-12-28 20:36                                         ` Eli Zaretskii
2004-12-29  0:22                                           ` Juri Linkov
2004-12-29  4:45                                             ` Eli Zaretskii
2004-12-30  7:33                                               ` Juri Linkov
2004-12-30 14:21                                                 ` Alex Schroeder
2004-12-30 16:33                                                   ` Drew Adams
2004-12-30 20:59                                                 ` Richard Stallman
2004-12-28  4:57                                   ` Richard Stallman
2004-12-25 15:12                         ` Richard Stallman

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=87ekhcsurb.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this public inbox

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

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).