* Re: Bug#203005: emacs21: Emacs21 does not honor customized default
[not found] <20031211123753.GA21204@xanadu.int.undue.org>
@ 2003-12-11 17:01 ` Eli Zaretskii
2003-12-11 18:54 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2003-12-11 17:01 UTC (permalink / raw)
Cc: 203005, emacs-devel, shawn, rms
> Date: Thu, 11 Dec 2003 12:37:53 +0000
> From: Matt Kern <matt.kern@undue.org>
>
> +2002-05-31 Eli Zaretskii <eliz@is.elta.co.il>
> +
> + * faces.el (face-set-after-frame-default): Don't change `default' face.
>
> I am not sure why this change has been made. Presumably the default
> face is supposed to be inherited or set elsewhere?
>
> Can you shed some light on it, Eli?
You are asking me to remember the reason for a 1-line change 18
months after I've made that change. It's not easy, but I'll try.
This change appears in CVS HEAD on a different date (2001-12-30) and
was made there by Richard Stallman (CC'ed). So I'm guessing that at
a later date Richard asked me to make the same change on the 21.3
release branch, which I did. Perhaps Richard remembers the reason
for the original change.
Anyway, the CVS HEAD code includes an additional fragment in
face-set-after-frame-default, which the 21.3 version doesn't seem to
have. I attached face-set-after-frame-default from CVS at the end of
this message; note the first part of it which deals specifically with
setting up the `default' face.
So I'd suggest to insert that initial code fragment into 21.3's
version of the function and see if that solves the problem. I don't
remember the details, but my vague recollection is that we skipped the
default face for some good reason.
HTH
===================================================================
(defun face-set-after-frame-default (frame)
"Set frame-local faces of FRAME from face specs and resources.
Initialize colors of certain faces from frame parameters."
(if (face-attribute 'default :font t)
(set-face-attribute 'default frame :font
(face-attribute 'default :font t))
(set-face-attribute 'default frame :family
(face-attribute 'default :family t))
(set-face-attribute 'default frame :height
(face-attribute 'default :height t))
(set-face-attribute 'default frame :slant
(face-attribute 'default :slant t))
(set-face-attribute 'default frame :weight
(face-attribute 'default :weight t))
(set-face-attribute 'default frame :width
(face-attribute 'default :width t)))
(dolist (face (face-list))
;; Don't let frame creation fail because of an invalid face spec.
(condition-case ()
(when (not (equal face 'default))
(face-spec-set face (face-user-default-spec face) frame)
(internal-merge-in-global-face face frame)
(when (and (memq window-system '(x w32 mac))
(or (not (boundp 'inhibit-default-face-x-resources))
(not (eq face 'default))))
(make-face-x-resource-internal face frame)))
(error nil)))
;; Initialize attributes from frame parameters.
(let ((params '((foreground-color default :foreground)
(background-color default :background)
(border-color border :background)
(cursor-color cursor :background)
(scroll-bar-foreground scroll-bar :foreground)
(scroll-bar-background scroll-bar :background)
(mouse-color mouse :background))))
(dolist (param params)
(let ((frame-param (frame-parameter frame (nth 0 param)))
(face (nth 1 param))
(attr (nth 2 param)))
(when (and frame-param
;; Don't override face attributes explicitly
;; specified for new frames.
(eq (face-attribute face attr t) 'unspecified))
(set-face-attribute face frame attr frame-param))))))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug#203005: emacs21: Emacs21 does not honor customized default
2003-12-11 17:01 ` Bug#203005: emacs21: Emacs21 does not honor customized default Eli Zaretskii
@ 2003-12-11 18:54 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2003-12-11 18:54 UTC (permalink / raw)
Cc: 203005, shawn, emacs-devel
> Date: 11 Dec 2003 19:01:15 +0200
> From: Eli Zaretskii <eliz@elta.co.il>
>
> I don't remember the details, but my vague recollection is that we
> skipped the default face for some good reason.
Found it. See:
http://mail.gnu.org/archive/html/bug-gnu-emacs/2001-11/msg00667.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-12-11 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20031211123753.GA21204@xanadu.int.undue.org>
2003-12-11 17:01 ` Bug#203005: emacs21: Emacs21 does not honor customized default Eli Zaretskii
2003-12-11 18:54 ` Eli Zaretskii
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).