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: Eli Zaretskii
Subject: Re: Proposal: window-system-version function
Date: Mon, 21 May 2012 19:20:23 +0300

> Date: Mon, 21 May 2012 18:11:02 +0400
> From: Dmitry Antipov <address@hidden>
> 
> This patch replaces global variable 'window-system-version' with the function
> which returns the window system version for the specified frame. An obvious
> reason for this is to have correct results when Emacs is running with both
> TTY and X frames.

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.

> +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?

> +#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.

> --- src/msdos.c       2012-04-09 13:05:48 +0000
> +++ src/msdos.c       2012-05-21 13:54:49 +0000
> @@ -1813,7 +1813,6 @@
>       }
>  
>        Vinitial_window_system = Qpc;
> -      Vwindow_system_version = make_number (23); /* RE Emacs version */
                                               ^^^^^^^^^^^^^^^^^^^^^^^^
Which means I goofed.  Will fix in a moment.



reply via email to

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