From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Proposal: window-system-version function Date: Mon, 21 May 2012 19:20:23 +0300 Message-ID: <83zk91y08o.fsf@gnu.org> References: <4FBA4CF6.1030007@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1337617234 32316 80.91.229.3 (21 May 2012 16:20:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 May 2012 16:20:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 21 18:20:33 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SWVLV-0000H3-0r for ged-emacs-devel@m.gmane.org; Mon, 21 May 2012 18:20:33 +0200 Original-Received: from localhost ([::1]:40875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWVLU-0004jG-EC for ged-emacs-devel@m.gmane.org; Mon, 21 May 2012 12:20:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWVLN-0004j7-2D for emacs-devel@gnu.org; Mon, 21 May 2012 12:20:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWVLG-0002UE-4Z for emacs-devel@gnu.org; Mon, 21 May 2012 12:20:24 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:46370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWVLF-0002Tw-Sr for emacs-devel@gnu.org; Mon, 21 May 2012 12:20:18 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M4D00M00S06K300@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Mon, 21 May 2012 19:20:15 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M4D00MDGS1R5G90@a-mtaout22.012.net.il>; Mon, 21 May 2012 19:20:15 +0300 (IDT) In-reply-to: <4FBA4CF6.1030007@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150582 Archived-At: > Date: Mon, 21 May 2012 18:11:02 +0400 > From: Dmitry Antipov > > 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.