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.
+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
(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__.
(*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));
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. */);
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;
{
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;
}
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));
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);
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. */
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);
#endif
wipe_kboard (current_kboard);
init_kboard (current_kboard);
+ /* Leave Vwindow_system at its `t' default for now. */
if (!noninteractive)
{
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);
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. */
/* 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;
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
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;
#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++;
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
Qnil));
}
- Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qw32), Qnil));
-
f->no_split = 1;
UNGCPRO;
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.
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
Qnil));
}
- Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qx), Qnil));
-
f->no_split = 1;
UNGCPRO;
{
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);