From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: emacs-devel@gnu.org
Subject: check_window_system
Date: Fri, 05 Apr 2013 17:33:31 +0300 [thread overview]
Message-ID: <83zjxddp38.fsf@gnu.org> (raw)
I think these changes
------------------------------------------------------------
revno: 112228
committer: Dmitry Antipov <dmantipov@yandex.ru>
branch nick: trunk
timestamp: Fri 2013-04-05 14:07:02 +0000
message:
Consistently use platform-specific function to detect window system.
* lisp.h (check_window_system): New prototype. This function is
going to replace check_x, check_w32 and check_ns.
(have_menus_p): Mention msdos.c in comment.
* fontset.c (check_window_system_func): Remove. Adjust all users.
* fontset.h (check_window_system_func): Remove prototype.
* nsterm.h (check_ns):
* xterm.h (check_x):
* w32term.h (check_w32): Likewise.
* menu.c (Fx_popup_menu): Use check_window_system.
* msdos.c (check_window_system): Define for MS-DOS.
* nsfns.m (check_window_system): Define for NS. Adjust all users.
* w32fns.c (check_window_system): Likewise for MS-Windows.
* xfns.c (check_window_system): Likewise for X.
* font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
* xfaces.c, xmenu.c: Use check_window_system where appropriate.
go against our tendency to replace window-system tests at compile time
with run-time tests for frame type (FRAME_X_P, FRAME_NS_P, etc.).
Thus, after the changes above, we have 4 different implementations of
the same function check_window_system, which means it would be
impossible to have, say, X and NS frames in the same binary/session.
Instead, check_window_system should have been implemented only once,
in some common source file, and it should have been doing something
like this:
#ifdef HAVE_X_WINDOWS
if (FRAME_X_P (f))
check_x ();
#endif
#ifdef HAVE_NS
if (FRAME_NS_P (f))
check_ns ();
#endif
etc., you get the idea. IOW, there should be no assumption that X,
NS, and w32 are mutually exclusive.
next reply other threads:[~2013-04-05 14:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-05 14:33 Eli Zaretskii [this message]
2013-04-05 15:21 ` check_window_system Stefan Monnier
2013-04-06 10:13 ` check_window_system Dmitry Antipov
2013-04-06 12:19 ` check_window_system Eli Zaretskii
2013-04-07 15:49 ` check_window_system Eli Zaretskii
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=83zjxddp38.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.