emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/4] Implement cygw32


From: Eli Zaretskii
Subject: Re: [PATCH 3/4] Implement cygw32
Date: Fri, 30 Dec 2011 11:23:47 +0200

> Date: Thu, 29 Dec 2011 13:50:32 -0800
> From: Daniel Colascione <address@hidden>
> CC: address@hidden
> 
> >>>> -  (if (eq system-type 'windows-nt)
> >>>> +  (if (featurep 'w32)
> >>>>        '(("iso8859-1" "ms-oemlatin")
> >>>>          ("gb2312.1980" "gb2312" "gbk" "gb18030")
> >>>>          ("jisx0208.1990" "jisx0208.1983" "jisx0208.1978")
> >>>
> >>> Why not use window-system (the function) here?
> >>
> >> Isn't it a little early for window-system at this point?
> > 
> > A defcustom is evaluated more than once.  So I'm a bit fuzzy about
> > "too early" ;-)
> 
> When we initialize for the first time, we won't have a GUI frame to
> check, yes? (And then we dump the table into pure storage.)

In a release tarball, this first time is normally on a GNU/Linux box,
and so the w32-specific setting will never be chosen.

The important initialization is when the dumped Emacs is started on a
Windows system.  At that time, we do have a GUI frame, I think.

> If there's
> no facility to force reevaluation of the mapping table, we'll end up
> using the wrong one when we *do* finally come up with a GUI frame.

But there _is_ such a facility: defcustoms are reevaluated upon
startup (and then again when you actually use "M-x customize", or have
custom-related forms in your .emacs).  This must be so, because
otherwise the values will inherit the platform where Emacs was dumped.

Anyway, given what Jason wrote about this particular variable, it is
not worth arguing about.

My point, however, is that it is a good idea to use window-system (the
function) where it could happen that different frames have different
types, in the current mult-tty Emacs.  If nothing else, using
window-system consistently contributes to the clarity of the code and
shows the overall design to newcomers, who would otherwise become
confused if they see inconsistent tests in each and every place.



reply via email to

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