* Testing window-system considered harmful
[not found] <E1ESvR4-0001vc-4g@monty-python.gnu.org>
@ 2005-10-21 14:50 ` Eli Zaretskii
2005-10-24 1:09 ` YAMAMOTO Mitsuharu
0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2005-10-21 14:50 UTC (permalink / raw)
Cc: emacs-devel
Re: this change:
> From: emacs-diffs-request@gnu.org
> Date: Fri, 21 Oct 2005 07:51:47 -0400
>
> Date: Fri, 21 Oct 2005 04:26:37 -0400
> From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
> Subject: [Emacs-diffs] Changes to emacs/lisp/cus-face.el
> To: emacs-diffs@gnu.org
> Message-ID: <E1ESsEX-0002DE-00@savannah.gnu.org>
>
> Index: emacs/lisp/cus-face.el
> diff -c emacs/lisp/cus-face.el:1.41 emacs/lisp/cus-face.el:1.42
> *** emacs/lisp/cus-face.el:1.41 Sat Aug 6 22:13:42 2005
> --- emacs/lisp/cus-face.el Fri Oct 21 08:26:37 2005
> ***************
> *** 47,53 ****
> (dolist (frame (frame-list))
> (face-spec-set face value frame)))
> ;; When making a face after frames already exist
> ! (if (memq window-system '(x w32))
> (make-face-x-resource-internal face))))
> ;; Don't record SPEC until we see it causes no errors.
> (put face 'face-defface-spec spec)
> --- 47,53 ----
> (dolist (frame (frame-list))
> (face-spec-set face value frame)))
> ;; When making a face after frames already exist
> ! (if (memq window-system '(x w32 mac))
> (make-face-x-resource-internal face))))
> ;; Don't record SPEC until we see it causes no errors.
> (put face 'face-defface-spec spec)
Is it possible to use one of the display-*-p predicate functions
instead of testing the value of window-system here? It is always
better to use one of those predicates, because they automatically
support all relevant Emacs configurations, without any need to add
them explicitly to a list such as the one above.
(There are other changes like the one above that used window-system;
please consider them all.)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Testing window-system considered harmful
2005-10-21 14:50 ` Testing window-system considered harmful Eli Zaretskii
@ 2005-10-24 1:09 ` YAMAMOTO Mitsuharu
0 siblings, 0 replies; 2+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-10-24 1:09 UTC (permalink / raw)
Cc: emacs-devel
>>>>> On Fri, 21 Oct 2005 16:50:36 +0200, Eli Zaretskii <eliz@gnu.org> said:
> Is it possible to use one of the display-*-p predicate functions
> instead of testing the value of window-system here? It is always
> better to use one of those predicates, because they automatically
> support all relevant Emacs configurations, without any need to add
> them explicitly to a list such as the one above.
I don't think any of existing one is suitable for this particular
case. Maybe introduce display-has-x-resource-p?
> (There are other changes like the one above that used window-system;
> please consider them all.)
I'm afraid general cases are beyond me. Experts at disp-table.el and
faces.el could provide good abstractions.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-24 1:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1ESvR4-0001vc-4g@monty-python.gnu.org>
2005-10-21 14:50 ` Testing window-system considered harmful Eli Zaretskii
2005-10-24 1:09 ` YAMAMOTO Mitsuharu
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).