all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: bojohan+news@dd.chalmers.se (Johan Bockgård)
To: help-gnu-emacs@gnu.org
Subject: Re: how to save a face in Lisp?
Date: Wed, 03 Oct 2007 11:12:35 +0200	[thread overview]
Message-ID: <yoijlkaky324.fsf@remote4.student.chalmers.se> (raw)
In-Reply-To: mailman.1658.1191397285.18990.help-gnu-emacs@gnu.org

"Drew Adams" <drew.adams@oracle.com> writes:

> For example, suppose this is the definition of face `foo':
>
> (defface foo
>     '((((background dark)) (:foreground "DarkGreen"))
>       (t (:foreground "Red")))
>   "...")
>
> And suppose this has been evaluated, temporarily "customizing" the face
> outside of Customize:
>
> (set-face-attribute 'foo nil :foreground "Yellow")
>
> And suppose that the background mode is not `dark'. Then the spec that needs
> to be written if this face is saved is this:
>
>  '((((background dark)) (:foreground "DarkGreen"))
>    (t (:foreground "Yellow")))
>

(set-face-attribute FACE nil ...) overrides all other settings of FACE,
so I don't think the `(background dark)' part should be saved.

-- 
Johan Bockgård

       reply	other threads:[~2007-10-03  9:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1658.1191397285.18990.help-gnu-emacs@gnu.org>
2007-10-03  9:12 ` Johan Bockgård [this message]
2007-10-03 14:55   ` how to save a face in Lisp? Drew Adams
     [not found] <mailman.1599.1191333917.18990.help-gnu-emacs@gnu.org>
2007-10-03  4:24 ` Steven L.
2007-10-03  7:41   ` Drew Adams
     [not found] <mailman.1515.1191195346.18990.help-gnu-emacs@gnu.org>
2007-10-02  4:17 ` Steven L.
2007-10-02 14:04   ` Drew Adams
2007-09-30 23:35 Drew Adams

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yoijlkaky324.fsf@remote4.student.chalmers.se \
    --to=bojohan+news@dd.chalmers.se \
    --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.
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.