emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Testing window-system considered harmful


From: Eli Zaretskii
Subject: Testing window-system considered harmful
Date: Fri, 21 Oct 2005 16:50:36 +0200

Re: this change:

> From: address@hidden
> Date: Fri, 21 Oct 2005 07:51:47 -0400
> 
> Date: Fri, 21 Oct 2005 04:26:37 -0400
> From: YAMAMOTO Mitsuharu <address@hidden>
> Subject: [Emacs-diffs] Changes to emacs/lisp/cus-face.el
> To: address@hidden
> Message-ID: <address@hidden>
> 
> 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.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]