emacs-devel
[Top][All Lists]
Advanced

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

Re: Proposal: window-system-version function


From: Stefan Monnier
Subject: Re: Proposal: window-system-version function
Date: Tue, 22 May 2012 08:41:40 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Not sure if you've missed my earlier reply, but I want to mark
window-system-version as obsolete, so unless there's a strong objection
to that, there' no point discussing how to improve it.


        Stefan


>>>>> "Dmitry" == Dmitry Antipov <address@hidden> writes:

> On 05/21/2012 08:20 PM, Eli Zaretskii wrote:

>> Thanks.  However, this change breaks backward compatibility.  Perhaps
>> it would be better to leave the variable alone, and _add_ the
>> function; that would be backward-compatible.

> I fixed Lisp code in lisp/international/mule-diag.el and
> lisp/textmodes/artist.el; not sure about external packages which
> may also use it.

> Leaving the variable "as is" means that window-system-version
> and (window-system-version) may have different values, which
> is confusing. Ideally, window-system-version should be a frame-local
> variable, but I'm wondering whether this is possible in Emacs.

>>> +It's value is a number:
>>> + - 0 for a termcap frame,
>>> + - Major X protocol version for the frame on X display,
>>> + - Major OS version for the frame on MS-Windows display,
>>> + - 24 for the frame on direct-write MS-DOS display,
>>> + - 10 for the frame on a GNUstep or Macintosh Cocoa display.
>> 
>> This is inaccurate at least for MS-DOS and MS-Windows.  Do we really
>> want to document the precise meaning of the values here?  Why is that
>> important?

> I'm not sure about exact values on a systems beyond *nix, and I suppose
> that every Lisp-visible function should be documented.

>>> +#ifdef HAVE_X_WINDOWS
>>> +    case output_x_window:
>>> +      return make_number (ProtocolVersion (FRAME_X_DISPLAY (f)));
>>> +#endif
>>> +#ifdef WINDOWSNT
>>> +    case output_w32:
>>> +      return make_number (w32_major_version);
>>> +#endif
>>> +#ifdef MSDOS
>>> +    case output_msdos_raw:
>>> +      return make_number (24);
>>> +#endif
>> 
>> The MSDOS build supports HAVE_X_WINDOWS as well, so HAVE_X_WINDOWS and
>> MSDOS are not by themselves mutually exclusive.

> The cpp stuff above has no mutually exclusive paths (no #elif or so),
> so it should work if both HAVE_X_WINDOWS and MSDOS are defined.

> Dmitry



reply via email to

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