Commit 1344aad4 authored by Tom Tromey's avatar Tom Tromey

Hide implementation of `struct kboard'

	* callint.c (Fcall_interactively): Update.
	* doc.c (Fsubstitute_command_keys): Update.
	* cmds.c (Fself_insert_command): Update.
	* keymap.c (Fcurrent_active_maps, Fkey_binding)
	(Fdescribe_buffer_bindings): Update.
	* macros.c (Fstart_kbd_macro, end_kbd_macro, Fend_kbd_macro)
	(store_kbd_macro_char, Fcall_last_kbd_macro, Fexecute_kbd_macro):
	Update.
	* keyboard.c (echo_char, echo_dash, echo_now, cancel_echoing)
	(echo_length, echo_truncate, cmd_error, command_loop_1)
	(read_char, kbd_buffer_store_event_hold, make_lispy_event)
	(menu_bar_items, tool_bar_items, read_char_minibuf_menu_prompt)
	(read_key_sequence, Fcommand_execute, Fexecute_extended_command)
	(Fdiscard_input, init_kboard, init_keyboard, mark_kboards):
	Update.
	* xfns.c (Fx_create_frame): Update.
	* xterm.c (x_connection_closed, x_term_init): Update.
	* term.c (term_get_fkeys_1, CONDITIONAL_REASSIGN, init_tty):
	Update.
	* window.c (window_scroll_pixel_based, window_scroll_line_based):
	Update.
	* frame.c (make_frame_without_minibuffer, Fhandle_switch_frame)
	(delete_frame): Update.
	* lisp.h (DEFVAR_KBOARD): Update for change to field names.
	* keyboard.h (struct kboard): Rename all Lisp_Object fields.
	(KBOARD_INTERNAL_FIELD, KVAR): New macros.
parent eb4916d7
2011-02-16 Tom Tromey <tromey@parfait>
* callint.c (Fcall_interactively): Update.
* doc.c (Fsubstitute_command_keys): Update.
* cmds.c (Fself_insert_command): Update.
* keymap.c (Fcurrent_active_maps, Fkey_binding)
(Fdescribe_buffer_bindings): Update.
* macros.c (Fstart_kbd_macro, end_kbd_macro, Fend_kbd_macro)
(store_kbd_macro_char, Fcall_last_kbd_macro, Fexecute_kbd_macro):
Update.
* keyboard.c (echo_char, echo_dash, echo_now, cancel_echoing)
(echo_length, echo_truncate, cmd_error, command_loop_1)
(read_char, kbd_buffer_store_event_hold, make_lispy_event)
(menu_bar_items, tool_bar_items, read_char_minibuf_menu_prompt)
(read_key_sequence, Fcommand_execute, Fexecute_extended_command)
(Fdiscard_input, init_kboard, init_keyboard, mark_kboards):
Update.
* xfns.c (Fx_create_frame): Update.
* xterm.c (x_connection_closed, x_term_init): Update.
* term.c (term_get_fkeys_1, CONDITIONAL_REASSIGN, init_tty):
Update.
* window.c (window_scroll_pixel_based, window_scroll_line_based):
Update.
* frame.c (make_frame_without_minibuffer, Fhandle_switch_frame)
(delete_frame): Update.
* lisp.h (DEFVAR_KBOARD): Update for change to field names.
* keyboard.h (struct kboard): Rename all Lisp_Object fields.
(KBOARD_INTERNAL_FIELD, KVAR): New macros.
2011-02-16 Tom Tromey <tromey@redhat.com>
* lisp.h (DEFVAR_BUFFER_DEFAULTS): Use BVAR.
......@@ -280,7 +280,7 @@ invoke it. If KEYS is omitted or nil, the return value of
save_this_command = Vthis_command;
save_this_original_command = Vthis_original_command;
save_real_this_command = real_this_command;
save_last_command = current_kboard->Vlast_command;
save_last_command = KVAR (current_kboard, Vlast_command);
if (NILP (keys))
keys = this_command_keys, key_count = this_command_key_count;
......@@ -363,7 +363,7 @@ invoke it. If KEYS is omitted or nil, the return value of
Vthis_command = save_this_command;
Vthis_original_command = save_this_original_command;
real_this_command= save_real_this_command;
current_kboard->Vlast_command = save_last_command;
KVAR (current_kboard, Vlast_command) = save_last_command;
temporarily_switch_to_single_kboard (NULL);
return unbind_to (speccount, apply1 (function, specs));
......@@ -832,7 +832,7 @@ invoke it. If KEYS is omitted or nil, the return value of
Vthis_command = save_this_command;
Vthis_original_command = save_this_original_command;
real_this_command= save_real_this_command;
current_kboard->Vlast_command = save_last_command;
KVAR (current_kboard, Vlast_command) = save_last_command;
{
Lisp_Object val;
......
......@@ -277,7 +277,7 @@ After insertion, the value of `auto-fill-function' is called if the
int remove_boundary = 1;
CHECK_NATNUM (n);
if (!EQ (Vthis_command, current_kboard->Vlast_command))
if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command)))
nonundocount = 0;
if (NILP (Vexecuting_kbd_macro)
......
......@@ -719,7 +719,7 @@ a new string, without any text properties, is returned. */)
or a specified local map (which means search just that and the
global map). If non-nil, it might come from Voverriding_local_map,
or from a \\<mapname> construct in STRING itself.. */
keymap = current_kboard->Voverriding_terminal_local_map;
keymap = KVAR (current_kboard, Voverriding_terminal_local_map);
if (NILP (keymap))
keymap = Voverriding_local_map;
......
......@@ -428,20 +428,20 @@ make_frame_without_minibuffer (register Lisp_Object mini_window, KBOARD *kb, Lis
if (NILP (mini_window))
{
/* Use default-minibuffer-frame if possible. */
if (!FRAMEP (kb->Vdefault_minibuffer_frame)
|| ! FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame)))
if (!FRAMEP (KVAR (kb, Vdefault_minibuffer_frame))
|| ! FRAME_LIVE_P (XFRAME (KVAR (kb, Vdefault_minibuffer_frame))))
{
Lisp_Object frame_dummy;
XSETFRAME (frame_dummy, f);
GCPRO1 (frame_dummy);
/* If there's no minibuffer frame to use, create one. */
kb->Vdefault_minibuffer_frame =
KVAR (kb, Vdefault_minibuffer_frame) =
call1 (intern ("make-initial-minibuffer-frame"), display);
UNGCPRO;
}
mini_window = XFRAME (kb->Vdefault_minibuffer_frame)->minibuffer_window;
mini_window = XFRAME (KVAR (kb, Vdefault_minibuffer_frame))->minibuffer_window;
}
f->minibuffer_window = mini_window;
......@@ -889,7 +889,7 @@ to that frame. */)
(Lisp_Object event)
{
/* Preserve prefix arg that the command loop just cleared. */
current_kboard->Vprefix_arg = Vcurrent_prefix_arg;
KVAR (current_kboard, Vprefix_arg) = Vcurrent_prefix_arg;
call1 (Vrun_hooks, Qmouse_leave_buffer_hook);
return do_switch_frame (event, 0, 0, Qnil);
}
......@@ -1526,7 +1526,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
/* If we've deleted this keyboard's default_minibuffer_frame, try to
find another one. Prefer minibuffer-only frames, but also notice
frames with other windows. */
if (kb != NULL && EQ (frame, kb->Vdefault_minibuffer_frame))
if (kb != NULL && EQ (frame, KVAR (kb, Vdefault_minibuffer_frame)))
{
Lisp_Object frames;
......@@ -1575,11 +1575,11 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
if (NILP (frame_with_minibuf))
abort ();
kb->Vdefault_minibuffer_frame = frame_with_minibuf;
KVAR (kb, Vdefault_minibuffer_frame) = frame_with_minibuf;
}
else
/* No frames left on this kboard--say no minibuffer either. */
kb->Vdefault_minibuffer_frame = Qnil;
KVAR (kb, Vdefault_minibuffer_frame) = Qnil;
}
/* Cause frame titles to update--necessary if we now have just one frame. */
......
This diff is collapsed.
......@@ -19,6 +19,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "systime.h" /* for EMACS_TIME */
#include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */
/* Lisp fields in struct keyboard are hidden from most code and accessed
via the KVAR macro, below. Only select pieces of code, like the GC,
are allowed to use KBOARD_INTERNAL_FIELD. */
#define KBOARD_INTERNAL_FIELD(field) field ## _
/* Most code should use this macro to access Lisp fields in struct
kboard. */
#define KVAR(kboard, field) ((kboard)->KBOARD_INTERNAL_FIELD (field))
/* Each KBOARD represents one logical input stream from which Emacs
gets input. If we are using ordinary terminals, it has one KBOARD
object for each terminal device.
......@@ -70,32 +79,32 @@ struct kboard
can effectively wait for input in the any-kboard state, and hence
avoid blocking out the other KBOARDs. See universal-argument in
lisp/simple.el for an example. */
Lisp_Object Voverriding_terminal_local_map;
Lisp_Object KBOARD_INTERNAL_FIELD (Voverriding_terminal_local_map);
/* Last command executed by the editor command loop, not counting
commands that set the prefix argument. */
Lisp_Object Vlast_command;
Lisp_Object KBOARD_INTERNAL_FIELD (Vlast_command);
/* Normally same as last-command, but never modified by other commands. */
Lisp_Object Vreal_last_command;
Lisp_Object KBOARD_INTERNAL_FIELD (Vreal_last_command);
/* User-supplied table to translate input characters through. */
Lisp_Object Vkeyboard_translate_table;
Lisp_Object KBOARD_INTERNAL_FIELD (Vkeyboard_translate_table);
/* Last command that may be repeated by `repeat'. */
Lisp_Object Vlast_repeatable_command;
Lisp_Object KBOARD_INTERNAL_FIELD (Vlast_repeatable_command);
/* The prefix argument for the next command, in raw form. */
Lisp_Object Vprefix_arg;
Lisp_Object KBOARD_INTERNAL_FIELD (Vprefix_arg);
/* Saved prefix argument for the last command, in raw form. */
Lisp_Object Vlast_prefix_arg;
Lisp_Object KBOARD_INTERNAL_FIELD (Vlast_prefix_arg);
/* Unread events specific to this kboard. */
Lisp_Object kbd_queue;
Lisp_Object KBOARD_INTERNAL_FIELD (kbd_queue);
/* Non-nil while a kbd macro is being defined. */
Lisp_Object defining_kbd_macro;
Lisp_Object KBOARD_INTERNAL_FIELD (defining_kbd_macro);
/* The start of storage for the current keyboard macro. */
Lisp_Object *kbd_macro_buffer;
......@@ -117,28 +126,28 @@ struct kboard
int kbd_macro_bufsize;
/* Last anonymous kbd macro defined. */
Lisp_Object Vlast_kbd_macro;
Lisp_Object KBOARD_INTERNAL_FIELD (Vlast_kbd_macro);
/* Alist of system-specific X windows key symbols. */
Lisp_Object Vsystem_key_alist;
Lisp_Object KBOARD_INTERNAL_FIELD (Vsystem_key_alist);
/* Cache for modify_event_symbol. */
Lisp_Object system_key_syms;
Lisp_Object KBOARD_INTERNAL_FIELD (system_key_syms);
/* The kind of display: x, w32, ... */
Lisp_Object Vwindow_system;
Lisp_Object KBOARD_INTERNAL_FIELD (Vwindow_system);
/* Keymap mapping keys to alternative preferred forms.
See the DEFVAR for more documentation. */
Lisp_Object Vlocal_function_key_map;
Lisp_Object KBOARD_INTERNAL_FIELD (Vlocal_function_key_map);
/* Keymap mapping ASCII function key sequences onto their preferred
forms. Initialized by the terminal-specific lisp files. See the
DEFVAR for more documentation. */
Lisp_Object Vinput_decode_map;
Lisp_Object KBOARD_INTERNAL_FIELD (Vinput_decode_map);
/* Minibufferless frames on this display use this frame's minibuffer. */
Lisp_Object Vdefault_minibuffer_frame;
Lisp_Object KBOARD_INTERNAL_FIELD (Vdefault_minibuffer_frame);
/* Number of displays using this KBOARD. Normally 1, but can be
larger when you have multiple screens on a single X display. */
......@@ -146,7 +155,7 @@ struct kboard
/* The text we're echoing in the modeline - partial key sequences,
usually. This is nil when not echoing. */
Lisp_Object echo_string;
Lisp_Object KBOARD_INTERNAL_FIELD (echo_string);
/* This flag indicates that events were put into kbd_queue
while Emacs was running for some other KBOARD.
......
......@@ -1565,8 +1565,8 @@ like in the respective argument of `key-binding'. */)
if (!NILP (olp))
{
if (!NILP (current_kboard->Voverriding_terminal_local_map))
keymaps = Fcons (current_kboard->Voverriding_terminal_local_map, keymaps);
if (!NILP (KVAR (current_kboard, Voverriding_terminal_local_map)))
keymaps = Fcons (KVAR (current_kboard, Voverriding_terminal_local_map), keymaps);
/* The doc said that overriding-terminal-local-map should
override overriding-local-map. The code used them both,
but it seems clearer to use just one. rms, jan 2005. */
......@@ -1745,9 +1745,9 @@ specified buffer position instead of point are used.
}
}
if (! NILP (current_kboard->Voverriding_terminal_local_map))
if (! NILP (KVAR (current_kboard, Voverriding_terminal_local_map)))
{
value = Flookup_key (current_kboard->Voverriding_terminal_local_map,
value = Flookup_key (KVAR (current_kboard, Voverriding_terminal_local_map),
key, accept_default);
if (! NILP (value) && !INTEGERP (value))
goto done;
......@@ -2941,11 +2941,11 @@ You type Translation\n\
outbuf = Fcurrent_buffer ();
/* Report on alternates for keys. */
if (STRINGP (current_kboard->Vkeyboard_translate_table) && !NILP (prefix))
if (STRINGP (KVAR (current_kboard, Vkeyboard_translate_table)) && !NILP (prefix))
{
int c;
const unsigned char *translate = SDATA (current_kboard->Vkeyboard_translate_table);
int translate_len = SCHARS (current_kboard->Vkeyboard_translate_table);
const unsigned char *translate = SDATA (KVAR (current_kboard, Vkeyboard_translate_table));
int translate_len = SCHARS (KVAR (current_kboard, Vkeyboard_translate_table));
for (c = 0; c < translate_len; c++)
if (translate[c] != c)
......@@ -2968,7 +2968,7 @@ You type Translation\n\
insert ("\n", 1);
/* Insert calls signal_after_change which may GC. */
translate = SDATA (current_kboard->Vkeyboard_translate_table);
translate = SDATA (KVAR (current_kboard, Vkeyboard_translate_table));
}
insert ("\n", 1);
......@@ -2981,8 +2981,8 @@ You type Translation\n\
/* Print the (major mode) local map. */
start1 = Qnil;
if (!NILP (current_kboard->Voverriding_terminal_local_map))
start1 = current_kboard->Voverriding_terminal_local_map;
if (!NILP (KVAR (current_kboard, Voverriding_terminal_local_map)))
start1 = KVAR (current_kboard, Voverriding_terminal_local_map);
else if (!NILP (Voverriding_local_map))
start1 = Voverriding_local_map;
......@@ -3064,13 +3064,13 @@ You type Translation\n\
"\f\nGlobal Bindings", nomenu, 0, 1, 0);
/* Print the function-key-map translations under this prefix. */
if (!NILP (current_kboard->Vlocal_function_key_map))
describe_map_tree (current_kboard->Vlocal_function_key_map, 0, Qnil, prefix,
if (!NILP (KVAR (current_kboard, Vlocal_function_key_map)))
describe_map_tree (KVAR (current_kboard, Vlocal_function_key_map), 0, Qnil, prefix,
"\f\nFunction key map translations", nomenu, 1, 0, 0);
/* Print the input-decode-map translations under this prefix. */
if (!NILP (current_kboard->Vinput_decode_map))
describe_map_tree (current_kboard->Vinput_decode_map, 0, Qnil, prefix,
if (!NILP (KVAR (current_kboard, Vinput_decode_map)))
describe_map_tree (KVAR (current_kboard, Vinput_decode_map), 0, Qnil, prefix,
"\f\nInput decoding map translations", nomenu, 1, 0, 0);
UNGCPRO;
......
......@@ -1890,7 +1890,7 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int);
static struct Lisp_Kboard_Objfwd ko_fwd; \
defvar_kboard (&ko_fwd, \
lname, \
(int)((char *)(&current_kboard->vname) \
(int)((char *)(&current_kboard->vname ## _) \
- (char *)current_kboard)); \
} while (0)
......
......@@ -56,7 +56,7 @@ If optional second arg, NO-EXEC, is non-nil, do not re-execute last
macro before appending to it. */)
(Lisp_Object append, Lisp_Object no_exec)
{
if (!NILP (current_kboard->defining_kbd_macro))
if (!NILP (KVAR (current_kboard, defining_kbd_macro)))
error ("Already defining kbd macro");
if (!current_kboard->kbd_macro_buffer)
......@@ -85,9 +85,9 @@ macro before appending to it. */)
int cvt;
/* Check the type of last-kbd-macro in case Lisp code changed it. */
CHECK_VECTOR_OR_STRING (current_kboard->Vlast_kbd_macro);
CHECK_VECTOR_OR_STRING (KVAR (current_kboard, Vlast_kbd_macro));
len = XINT (Flength (current_kboard->Vlast_kbd_macro));
len = XINT (Flength (KVAR (current_kboard, Vlast_kbd_macro)));
/* Copy last-kbd-macro into the buffer, in case the Lisp code
has put another macro there. */
......@@ -100,11 +100,11 @@ macro before appending to it. */)
}
/* Must convert meta modifier when copying string to vector. */
cvt = STRINGP (current_kboard->Vlast_kbd_macro);
cvt = STRINGP (KVAR (current_kboard, Vlast_kbd_macro));
for (i = 0; i < len; i++)
{
Lisp_Object c;
c = Faref (current_kboard->Vlast_kbd_macro, make_number (i));
c = Faref (KVAR (current_kboard, Vlast_kbd_macro), make_number (i));
if (cvt && NATNUMP (c) && (XFASTINT (c) & 0x80))
XSETFASTINT (c, CHAR_META | (XFASTINT (c) & ~0x80));
current_kboard->kbd_macro_buffer[i] = c;
......@@ -116,12 +116,12 @@ macro before appending to it. */)
/* Re-execute the macro we are appending to,
for consistency of behavior. */
if (NILP (no_exec))
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro,
Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro),
make_number (1), Qnil);
message ("Appending to kbd macro...");
}
current_kboard->defining_kbd_macro = Qt;
KVAR (current_kboard, defining_kbd_macro) = Qt;
return Qnil;
}
......@@ -131,9 +131,9 @@ macro before appending to it. */)
void
end_kbd_macro (void)
{
current_kboard->defining_kbd_macro = Qnil;
KVAR (current_kboard, defining_kbd_macro) = Qnil;
update_mode_lines++;
current_kboard->Vlast_kbd_macro
KVAR (current_kboard, Vlast_kbd_macro)
= make_event_array ((current_kboard->kbd_macro_end
- current_kboard->kbd_macro_buffer),
current_kboard->kbd_macro_buffer);
......@@ -154,7 +154,7 @@ In Lisp, optional second arg LOOPFUNC may be a function that is called prior to
each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
(Lisp_Object repeat, Lisp_Object loopfunc)
{
if (NILP (current_kboard->defining_kbd_macro))
if (NILP (KVAR (current_kboard, defining_kbd_macro)))
error ("Not defining kbd macro");
if (NILP (repeat))
......@@ -162,19 +162,19 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
else
CHECK_NUMBER (repeat);
if (!NILP (current_kboard->defining_kbd_macro))
if (!NILP (KVAR (current_kboard, defining_kbd_macro)))
{
end_kbd_macro ();
message ("Keyboard macro defined");
}
if (XFASTINT (repeat) == 0)
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, repeat, loopfunc);
Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro), repeat, loopfunc);
else
{
XSETINT (repeat, XINT (repeat)-1);
if (XINT (repeat) > 0)
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, repeat, loopfunc);
Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro), repeat, loopfunc);
}
return Qnil;
}
......@@ -186,7 +186,7 @@ store_kbd_macro_char (Lisp_Object c)
{
struct kboard *kb = current_kboard;
if (!NILP (kb->defining_kbd_macro))
if (!NILP (KVAR (kb, defining_kbd_macro)))
{
if (kb->kbd_macro_ptr - kb->kbd_macro_buffer == kb->kbd_macro_bufsize)
{
......@@ -248,21 +248,21 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
{
/* Don't interfere with recognition of the previous command
from before this macro started. */
Vthis_command = current_kboard->Vlast_command;
Vthis_command = KVAR (current_kboard, Vlast_command);
/* C-x z after the macro should repeat the macro. */
real_this_command = current_kboard->Vlast_kbd_macro;
real_this_command = KVAR (current_kboard, Vlast_kbd_macro);
if (! NILP (current_kboard->defining_kbd_macro))
if (! NILP (KVAR (current_kboard, defining_kbd_macro)))
error ("Can't execute anonymous macro while defining one");
else if (NILP (current_kboard->Vlast_kbd_macro))
else if (NILP (KVAR (current_kboard, Vlast_kbd_macro)))
error ("No kbd macro has been defined");
else
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, prefix, loopfunc);
Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro), prefix, loopfunc);
/* command_loop_1 sets this to nil before it returns;
get back the last command within the macro
so that it can be last, again, after we return. */
Vthis_command = current_kboard->Vlast_command;
Vthis_command = KVAR (current_kboard, Vlast_command);
return Qnil;
}
......@@ -322,7 +322,7 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
executing_kbd_macro = final;
executing_kbd_macro_index = 0;
current_kboard->Vprefix_arg = Qnil;
KVAR (current_kboard, Vprefix_arg) = Qnil;
if (!NILP (loopfunc))
{
......
......@@ -1350,14 +1350,14 @@ term_get_fkeys_1 (void)
KBOARD *kboard = term_get_fkeys_kboard;
/* This can happen if CANNOT_DUMP or with strange options. */
if (!KEYMAPP (kboard->Vinput_decode_map))
kboard->Vinput_decode_map = Fmake_sparse_keymap (Qnil);
if (!KEYMAPP (KVAR (kboard, Vinput_decode_map)))
KVAR (kboard, Vinput_decode_map) = Fmake_sparse_keymap (Qnil);
for (i = 0; i < (sizeof (keys)/sizeof (keys[0])); i++)
{
char *sequence = tgetstr (keys[i].cap, address);
if (sequence)
Fdefine_key (kboard->Vinput_decode_map, build_string (sequence),
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (sequence),
Fmake_vector (make_number (1),
intern (keys[i].name)));
}
......@@ -1377,13 +1377,13 @@ term_get_fkeys_1 (void)
if (k0)
/* Define f0 first, so that f10 takes precedence in case the
key sequences happens to be the same. */
Fdefine_key (kboard->Vinput_decode_map, build_string (k0),
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (k0),
Fmake_vector (make_number (1), intern ("f0")));
Fdefine_key (kboard->Vinput_decode_map, build_string (k_semi),
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (k_semi),
Fmake_vector (make_number (1), intern ("f10")));
}
else if (k0)
Fdefine_key (kboard->Vinput_decode_map, build_string (k0),
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (k0),
Fmake_vector (make_number (1), intern (k0_name)));
}
......@@ -1406,7 +1406,7 @@ term_get_fkeys_1 (void)
if (sequence)
{
sprintf (fkey, "f%d", i);
Fdefine_key (kboard->Vinput_decode_map, build_string (sequence),
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (sequence),
Fmake_vector (make_number (1),
intern (fkey)));
}
......@@ -1423,7 +1423,7 @@ term_get_fkeys_1 (void)
{ \
char *sequence = tgetstr (cap2, address); \
if (sequence) \
Fdefine_key (kboard->Vinput_decode_map, build_string (sequence), \
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (sequence), \
Fmake_vector (make_number (1), \
intern (sym))); \
}
......@@ -3418,7 +3418,7 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
init_kboard (terminal->kboard);
terminal->kboard->Vwindow_system = Qnil;
KVAR (terminal->kboard, Vwindow_system) = Qnil;
terminal->kboard->next_kboard = all_kboards;
all_kboards = terminal->kboard;
terminal->kboard->reference_count++;
......
......@@ -4834,8 +4834,8 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror)
possibility of point becoming "stuck" on a tall line when
scrolling by one line. */
if (window_scroll_pixel_based_preserve_y < 0
|| !SYMBOLP (current_kboard->Vlast_command)
|| NILP (Fget (current_kboard->Vlast_command, Qscroll_command)))
|| !SYMBOLP (KVAR (current_kboard, Vlast_command))
|| NILP (Fget (KVAR (current_kboard, Vlast_command), Qscroll_command)))
{
start_display (&it, w, start);
move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
......@@ -5091,8 +5091,8 @@ window_scroll_line_based (Lisp_Object window, int n, int whole, int noerror)
if (!NILP (Vscroll_preserve_screen_position))
{
if (window_scroll_preserve_vpos <= 0
|| !SYMBOLP (current_kboard->Vlast_command)
|| NILP (Fget (current_kboard->Vlast_command, Qscroll_command)))
|| !SYMBOLP (KVAR (current_kboard, Vlast_command))
|| NILP (Fget (KVAR (current_kboard, Vlast_command), Qscroll_command)))
{
struct position posit
= *compute_motion (startpos, 0, 0, 0,
......
......@@ -3473,9 +3473,9 @@ This function is an internal primitive--use `make-frame' instead. */)
/* Initialize `default-minibuffer-frame' in case this is the first
frame on this terminal. */
if (FRAME_HAS_MINIBUF_P (f)
&& (!FRAMEP (kb->Vdefault_minibuffer_frame)
|| !FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame))))
kb->Vdefault_minibuffer_frame = frame;
&& (!FRAMEP (KVAR (kb, Vdefault_minibuffer_frame))
|| !FRAME_LIVE_P (XFRAME (KVAR (kb, Vdefault_minibuffer_frame)))))
KVAR (kb, Vdefault_minibuffer_frame) = frame;
/* All remaining specified parameters, which have not been "used"
by x_get_arg and friends, now go in the misc. alist of the frame. */
......
......@@ -7727,7 +7727,7 @@ x_connection_closed (Display *dpy, const char *error_message)
{
/* Set this to t so that delete_frame won't get confused
trying to find a replacement. */
FRAME_KBOARD (XFRAME (frame))->Vdefault_minibuffer_frame = Qt;
KVAR (FRAME_KBOARD (XFRAME (frame)), Vdefault_minibuffer_frame) = Qt;
delete_frame (frame, Qnoelisp);
}
......@@ -9966,7 +9966,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
{
terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
init_kboard (terminal->kboard);
terminal->kboard->Vwindow_system = Qx;
KVAR (terminal->kboard, Vwindow_system) = Qx;
/* Add the keyboard to the list before running Lisp code (via
Qvendor_specific_keysyms below), since these are not traced
......@@ -9988,7 +9988,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
/* Temporarily hide the partially initialized terminal. */
terminal_list = terminal->next_terminal;
UNBLOCK_INPUT;
terminal->kboard->Vsystem_key_alist
KVAR (terminal->kboard, Vsystem_key_alist)
= call1 (Qvendor_specific_keysyms,
vendor ? build_string (vendor) : empty_unibyte_string);
BLOCK_INPUT;
......
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