unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Face initialization
Date: Sun, 06 Jul 2008 09:58:22 -0400	[thread overview]
Message-ID: <87skunt8qp.fsf@stupidchicken.com> (raw)
In-Reply-To: <jwv1w27cerq.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 06 Jul 2008 09:41:28 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> After staring at face-set-after-frame-default for a while, I think it
>> can be simplified somewhat.  If we only set frame parameters based on
>> the parameter list explicitly passed to `make-frame', it shouldn't be
>> necessary to mess around with the default face in the beginning of the
>> function.
>
> Interesting: could you explain why you think so?

I think on reason for the stuff in the beginning was for the following
check:

! 	     (default-value (face-attribute face attr t)))
....
! 	(if (eq default-value 'unspecified)
! 	    ;; The face spec does not specify a new-frame value for
! 	    ;; this attribute.  Check if the existing frame parameter
! 	    ;; specifies it.
! 	    (if value
! 		(push (list face frame attr value) apply-params))
! 	  ;; The face spec specifies a value for this attribute, to be
! 	  ;; applied to the face on all new frames.
! 	  (push (list face frame attr default-value) apply-params))))

If we only set the frame parameters explicitly specified for that frame,
this is not required.  I think all the other information is already
present in the face spec.

>> Also, the call to make-face-x-resource-internal seems to be
>> unnecessary.
>
> Why?

The X resource settings are already stored in the `theme-face' property
of the default face, so face-spec-recalc applies it (now that it is
called for the default face).




  reply	other threads:[~2008-07-06 13:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-06  5:57 Face initialization Chong Yidong
2008-07-06 13:41 ` Stefan Monnier
2008-07-06 13:58   ` Chong Yidong [this message]
2008-07-06 21:28     ` Richard M Stallman
2008-07-07  2:51       ` Chong Yidong
2008-07-07  1:56     ` Stefan Monnier
2008-07-07  3:06       ` Chong Yidong
2008-07-07  4:37         ` Stefan Monnier
2008-07-07 11:38           ` Richard M Stallman
2008-07-07 19:24             ` Stephen J. Turnbull
2008-07-08 12:52               ` Richard M Stallman
2008-07-08 13:40                 ` Jason Rumney
2008-07-08 23:06                   ` Richard M Stallman
2008-07-07 11:38         ` Richard M Stallman
2008-07-07 14:00           ` Chong Yidong
2008-07-09 21:45             ` Jason Rumney
2008-07-10  2:54               ` Chong Yidong
2008-07-10  3:09               ` Miles Bader
2008-07-10  8:16                 ` Jason Rumney
2008-07-10 15:52                   ` Stefan Monnier
2008-07-10 16:07                     ` Jason Rumney
2008-07-06 18:47 ` Richard M 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=87skunt8qp.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).