From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: emacs-devel@gnu.org
Subject: Re: Proposal: window-system-version function
Date: Tue, 22 May 2012 19:13:12 +0300 [thread overview]
Message-ID: <83mx50xkh3.fsf@gnu.org> (raw)
In-Reply-To: <4FBB2956.7000409@yandex.ru>
> Date: Tue, 22 May 2012 09:51:18 +0400
> From: Dmitry Antipov <dmantipov@yandex.ru>
> CC: emacs-devel@gnu.org
This probably becomes a moot point, given Stefan's response, but...
> 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.
I'm not sure either, but gray hair tells me they might.
> Leaving the variable "as is" means that window-system-version
> and (window-system-version) may have different values, which
> is confusing.
Not confusing at all, since we would deprecate the variable. But
breaking working code over such a minor issue is not a good idea, IMO.
> Ideally, window-system-version should be a frame-local
> variable, but I'm wondering whether this is possible in Emacs.
Yes, see "Frame Parameters".
> >> +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.
I didn't mean not to document it. I meant to document it like this:
Value is the version of the windowing system used for this frame, as
a string.
I think this is enough, since the number itself won't tell anything
specific anyway.
> >> +#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.
Right, my bad. I've misread the code.
next prev parent reply other threads:[~2012-05-22 16:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 14:11 Proposal: window-system-version function Dmitry Antipov
2012-05-21 16:03 ` Stefan Monnier
2012-05-21 16:20 ` Eli Zaretskii
2012-05-22 5:51 ` Dmitry Antipov
2012-05-22 12:41 ` Stefan Monnier
2012-05-22 16:13 ` Eli Zaretskii [this message]
2012-05-22 5:08 ` Ken Raeburn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83mx50xkh3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dmantipov@yandex.ru \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.