Commit 70b8d0a4 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

Make `window-system' into a keyboard-local variable (rather than

frame-local as done originally by multi-tty).

* startup.el (window-system): Remove.  Don't make it frame-local.

* keyboard.h (struct kboard): Add Vwindow_system.
* keyboard.c (init_kboard): Set a default for Vwindow_system.
(mark_kboards): Mark Vwindow_system.

* dispnew.c (syms_of_display) <window-system>: Declare terminal-local.
(init_display): Don't set the obsolete `window-system' frame-param.

* xterm.c (x_term_init):
* w32term.c (w32_create_terminal):
* term.c (init_tty): Set Vwindow_system.
* macterm.c (mac_create_terminal): Set a keyboard (missing piece of the
multi-tty merge maybe?), copied from w32term.c.  Set Vwindow_system.

* xfns.c (Fx_create_frame, x_create_tip_frame):
* w32fns.c (Fx_create_frame, x_create_tip_frame):
* macfns.c (Fx_create_frame):
Don't set the obsolete `window-system' frame-param.

* frame.h (Qwindow_system): Remove.
* frame.c (Qwindow_system): Remove.  In `syms_of_frame' as well.
(Fmake_terminal_frame): Don't set obsolete `window-system' frame-param.
parent 5656d1bf
2007-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
* startup.el (window-system): Remove. Don't make it frame-local.
2007-10-24 Dan Nicolaescu <dann@ics.uci.edu>
* textmodes/org-publish.el (org-publish-attachment): Re-install
......
......@@ -36,13 +36,6 @@
(defvar command-line-processed nil
"Non-nil once command line has been processed.")
(defvar window-system initial-window-system
"Name of window system the selected frame is displaying through.
The value is a symbol--for instance, `x' for X windows.
The value is nil if the selected frame is on a text-only-terminal.")
(make-variable-frame-local 'window-system)
(defgroup initialization nil
"Emacs start-up procedure."
:group 'environment)
......
2007-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
Make `window-system' into a keyboard-local variable (rather than
frame-local as done originally by multi-tty).
* keyboard.h (struct kboard): Add Vwindow_system.
* keyboard.c (init_kboard): Set a default for Vwindow_system.
(mark_kboards): Mark Vwindow_system.
* dispnew.c (syms_of_display) <window-system>: Declare terminal-local.
(init_display): Don't set the obsolete `window-system' frame-param.
* xterm.c (x_term_init):
* w32term.c (w32_create_terminal):
* term.c (init_tty): Set Vwindow_system.
* macterm.c (mac_create_terminal): Set a keyboard (missing piece of the
multi-tty merge maybe?), copied from w32term.c. Set Vwindow_system.
* xfns.c (Fx_create_frame, x_create_tip_frame):
* w32fns.c (Fx_create_frame, x_create_tip_frame):
* macfns.c (Fx_create_frame):
Don't set the obsolete `window-system' frame-param.
* frame.h (Qwindow_system): Remove.
* frame.c (Qwindow_system): Remove. In `syms_of_frame' as well.
(Fmake_terminal_frame): Don't set obsolete `window-system' frame-param.
2007-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* process.c (unwind_request_sigio): Only define if __ultrix__.
......
......@@ -6956,7 +6956,6 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
(*initial_terminal->delete_terminal_hook) (initial_terminal);
/* Update frame parameters to reflect the new type. */
Fmodify_frame_parameters (selected_frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil));
Fmodify_frame_parameters
(selected_frame, Fcons (Fcons (Qtty_type,
Ftty_type (selected_frame)), Qnil));
......@@ -7106,6 +7105,11 @@ It is up to you to set this variable if your terminal can do that. */);
The value is a symbol--for instance, `x' for X windows.
The value is nil if Emacs is using a text-only terminal. */);
DEFVAR_KBOARD ("window-system", Vwindow_system,
doc: /* Name of window system through which the selected frame is displayed.
The value is a symbol--for instance, `x' for X windows.
The value is nil if the selected frame is on a text-only-terminal. */);
DEFVAR_LISP ("window-system-version", &Vwindow_system_version,
doc: /* The version number of the window system in use.
For X windows, this is 10 or 11. */);
......
......@@ -110,7 +110,6 @@ Lisp_Object Qleft_fringe, Qright_fringe;
Lisp_Object Qbuffer_predicate, Qbuffer_list, Qburied_buffer_list;
Lisp_Object Qtty_color_mode;
Lisp_Object Qtty, Qtty_type;
Lisp_Object Qwindow_system;
Lisp_Object Qfullscreen, Qfullwidth, Qfullheight, Qfullboth;
......@@ -520,6 +519,7 @@ make_initial_frame (void)
{
initial_kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
init_kboard (initial_kboard);
/* Leave Vwindow_system at its `t' default for now. */
initial_kboard->next_kboard = all_kboards;
all_kboards = initial_kboard;
}
......@@ -764,7 +764,6 @@ affects all frames on the same terminal device. */)
XSETFRAME (frame, f);
Fmodify_frame_parameters (frame, Vdefault_frame_alist);
Fmodify_frame_parameters (frame, parms);
Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil));
Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty_type,
build_string (t->display_info.tty->type)),
Qnil));
......@@ -4292,8 +4291,6 @@ syms_of_frame ()
staticpro (&Qtty);
Qtty_type = intern ("tty-type");
staticpro (&Qtty_type);
Qwindow_system = intern ("window-system");
staticpro (&Qwindow_system);
Qface_set_after_frame_default = intern ("face-set-after-frame-default");
staticpro (&Qface_set_after_frame_default);
......
......@@ -1020,8 +1020,6 @@ extern Lisp_Object Qx_resource_name;
extern Lisp_Object Qleft, Qright, Qtop, Qbox;
extern Lisp_Object Qdisplay;
extern Lisp_Object Qwindow_system;
#ifdef HAVE_WINDOW_SYSTEM
/* The class of this X application. */
......
......@@ -11489,6 +11489,7 @@ init_kboard (kb)
kb->reference_count = 0;
kb->Vsystem_key_alist = Qnil;
kb->system_key_syms = Qnil;
kb->Vwindow_system = Qt; /* Unset. */
kb->Vinput_decode_map = Fmake_sparse_keymap (Qnil);
kb->Vlocal_function_key_map = Fmake_sparse_keymap (Qnil);
Fset_keymap_parent (kb->Vlocal_function_key_map, Vfunction_key_map);
......@@ -11571,6 +11572,7 @@ init_keyboard ()
#endif
wipe_kboard (current_kboard);
init_kboard (current_kboard);
/* Leave Vwindow_system at its `t' default for now. */
if (!noninteractive)
{
......@@ -12466,6 +12468,7 @@ mark_kboards ()
mark_object (kb->Vlast_kbd_macro);
mark_object (kb->Vsystem_key_alist);
mark_object (kb->system_key_syms);
mark_object (kb->Vwindow_system);
mark_object (kb->Vinput_decode_map);
mark_object (kb->Vlocal_function_key_map);
mark_object (kb->Vdefault_minibuffer_frame);
......
......@@ -80,8 +80,7 @@ struct kboard
commands that set the prefix argument. */
Lisp_Object Vlast_command;
/* Normally same as last-command, but never modified by
other commands. */
/* Normally same as last-command, but never modified by other commands. */
Lisp_Object Vreal_last_command;
/* User-supplied table to translate input characters through. */
......@@ -130,6 +129,9 @@ struct kboard
/* Cache for modify_event_symbol. */
Lisp_Object system_key_syms;
/* The kind of display: x, w32, ... */
Lisp_Object Vwindow_system;
/* Keymap mapping keys to alternative preferred forms.
See the DEFVAR for more documentation. */
Lisp_Object Vlocal_function_key_map;
......
......@@ -2830,8 +2830,6 @@ This function is an internal primitive--use `make-frame' instead. */)
if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
f->param_alist = Fcons (XCAR (tem), f->param_alist);
store_frame_param (f, Qwindow_system, Qmac);
UNGCPRO;
/* Make sure windows on this frame appear in calls to next-window
......
......@@ -12819,6 +12819,26 @@ mac_create_terminal (struct mac_display_info *dpyinfo)
terminal->memory_below_frame = 0; /* We don't remember what scrolls
off the bottom. */
#endif
/* FIXME: This keyboard setup is 100% untested, just copied from
w32_create_terminal in order to set window-system now that it's
a keyboard object. */
#ifdef MULTI_KBOARD
/* We don't yet support separate terminals on Mac, so don't try to share
keyboards between virtual terminals that are on the same physical
terminal like X does. */
terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
init_kboard (terminal->kboard);
terminal->kboard->Vwindow_system = intern ("mac");
terminal->kboard->next_kboard = all_kboards;
all_kboards = terminal->kboard;
/* Don't let the initial kboard remain current longer than necessary.
That would cause problems if a file loaded on startup tries to
prompt in the mini-buffer. */
if (current_kboard == initial_kboard)
current_kboard = terminal->kboard;
terminal->kboard->reference_count++;
#endif
return terminal;
......
......@@ -3487,6 +3487,7 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
#ifdef MULTI_KBOARD
terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
init_kboard (terminal->kboard);
terminal->kboard->Vwindow_system = Qnil;
terminal->kboard->next_kboard = all_kboards;
all_kboards = terminal->kboard;
terminal->kboard->reference_count++;
......
......@@ -4455,8 +4455,6 @@ This function is an internal primitive--use `make-frame' instead. */)
if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
f->param_alist = Fcons (XCAR (tem), f->param_alist);
store_frame_param (f, Qwindow_system, Qw32);
UNGCPRO;
/* Make sure windows on this frame appear in calls to next-window
......@@ -7439,8 +7437,6 @@ x_create_tip_frame (dpyinfo, parms, text)
Qnil));
}
Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qw32), Qnil));
f->no_split = 1;
UNGCPRO;
......
......@@ -6331,6 +6331,7 @@ w32_create_terminal (struct w32_display_info *dpyinfo)
terminal like X does. */
terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
init_kboard (terminal->kboard);
terminal->kboard->Vwindow_system = intern ("w32");
terminal->kboard->next_kboard = all_kboards;
all_kboards = terminal->kboard;
/* Don't let the initial kboard remain current longer than necessary.
......
......@@ -3472,8 +3472,6 @@ This function is an internal primitive--use `make-frame' instead. */)
if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
f->param_alist = Fcons (XCAR (tem), f->param_alist);
store_frame_param (f, Qwindow_system, Qx);
UNGCPRO;
/* Make sure windows on this frame appear in calls to next-window
......@@ -4979,8 +4977,6 @@ x_create_tip_frame (dpyinfo, parms, text)
Qnil));
}
Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qx), Qnil));
f->no_split = 1;
UNGCPRO;
......
......@@ -10781,6 +10781,7 @@ x_term_init (display_name, xrm_option, resource_name)
{
terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
init_kboard (terminal->kboard);
terminal->kboard->Vwindow_system = intern ("x");
if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound))
{
char *vendor = ServerVendor (dpy);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment