diff options
| author | Karl Heuer | 1994-10-04 12:13:17 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-10-04 12:13:17 +0000 |
| commit | 18cd2eebb213f405727e5c715bf71cb9a6835c86 (patch) | |
| tree | 4c8dd50f2629938891d8fdebc175284d2f376c37 /src | |
| parent | 55cfc73193a21253979cbfa94198b69e5030e14c (diff) | |
| download | emacs-18cd2eebb213f405727e5c715bf71cb9a6835c86.tar.gz emacs-18cd2eebb213f405727e5c715bf71cb9a6835c86.zip | |
(command_loop_1, read_char, Ftrack_mouse, kbd_buffer_get_event,
make_lispy_event, make_lispy_movement, modify_event_symbol, read_avail_input,
follow_key, syms_of_keyboard): Use new accessor macros instead of calling XSET
directly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 7db075284a4..0975792cd4a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1090,7 +1090,7 @@ command_loop_1 () | |||
| 1090 | prev_buffer = current_buffer; | 1090 | prev_buffer = current_buffer; |
| 1091 | prev_modiff = MODIFF; | 1091 | prev_modiff = MODIFF; |
| 1092 | last_point_position = PT; | 1092 | last_point_position = PT; |
| 1093 | XSET (last_point_position_buffer, Lisp_Buffer, prev_buffer); | 1093 | XSETBUFFER (last_point_position_buffer, prev_buffer); |
| 1094 | 1094 | ||
| 1095 | /* Execute the command. */ | 1095 | /* Execute the command. */ |
| 1096 | 1096 | ||
| @@ -1500,7 +1500,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1500 | 1500 | ||
| 1501 | if (unread_command_char != -1) | 1501 | if (unread_command_char != -1) |
| 1502 | { | 1502 | { |
| 1503 | XSET (c, Lisp_Int, unread_command_char); | 1503 | XSETINT (c, unread_command_char); |
| 1504 | unread_command_char = -1; | 1504 | unread_command_char = -1; |
| 1505 | 1505 | ||
| 1506 | if (this_command_key_count == 0) | 1506 | if (this_command_key_count == 0) |
| @@ -1531,7 +1531,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1531 | if (EQ (Vexecuting_macro, Qt) | 1531 | if (EQ (Vexecuting_macro, Qt) |
| 1532 | || executing_macro_index >= XFASTINT (Flength (Vexecuting_macro))) | 1532 | || executing_macro_index >= XFASTINT (Flength (Vexecuting_macro))) |
| 1533 | { | 1533 | { |
| 1534 | XSET (c, Lisp_Int, -1); | 1534 | XSETINT (c, -1); |
| 1535 | return c; | 1535 | return c; |
| 1536 | } | 1536 | } |
| 1537 | 1537 | ||
| @@ -1571,9 +1571,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1571 | 1571 | ||
| 1572 | if (_setjmp (getcjmp)) | 1572 | if (_setjmp (getcjmp)) |
| 1573 | { | 1573 | { |
| 1574 | XSET (c, Lisp_Int, quit_char); | 1574 | XSETINT (c, quit_char); |
| 1575 | #ifdef MULTI_FRAME | 1575 | #ifdef MULTI_FRAME |
| 1576 | XSET (internal_last_event_frame, Lisp_Frame, selected_frame); | 1576 | XSETFRAME (internal_last_event_frame, selected_frame); |
| 1577 | Vlast_event_frame = internal_last_event_frame; | 1577 | Vlast_event_frame = internal_last_event_frame; |
| 1578 | #endif | 1578 | #endif |
| 1579 | /* If we report the quit char as an event, | 1579 | /* If we report the quit char as an event, |
| @@ -1916,7 +1916,7 @@ Normally, mouse motion is ignored.") | |||
| 1916 | int count = specpdl_ptr - specpdl; | 1916 | int count = specpdl_ptr - specpdl; |
| 1917 | Lisp_Object val; | 1917 | Lisp_Object val; |
| 1918 | 1918 | ||
| 1919 | XSET (val, Lisp_Int, do_mouse_tracking); | 1919 | XSETINT (val, do_mouse_tracking); |
| 1920 | record_unwind_protect (tracking_off, val); | 1920 | record_unwind_protect (tracking_off, val); |
| 1921 | 1921 | ||
| 1922 | if (!input_pending && !detect_input_pending ()) | 1922 | if (!input_pending && !detect_input_pending ()) |
| @@ -2048,7 +2048,7 @@ kbd_buffer_get_event () | |||
| 2048 | if (noninteractive) | 2048 | if (noninteractive) |
| 2049 | { | 2049 | { |
| 2050 | c = getchar (); | 2050 | c = getchar (); |
| 2051 | XSET (obj, Lisp_Int, c); | 2051 | XSETINT (obj, c); |
| 2052 | return obj; | 2052 | return obj; |
| 2053 | } | 2053 | } |
| 2054 | 2054 | ||
| @@ -2077,7 +2077,7 @@ kbd_buffer_get_event () | |||
| 2077 | { | 2077 | { |
| 2078 | Lisp_Object minus_one; | 2078 | Lisp_Object minus_one; |
| 2079 | 2079 | ||
| 2080 | XSET (minus_one, Lisp_Int, -1); | 2080 | XSETINT (minus_one, -1); |
| 2081 | wait_reading_process_input (0, 0, minus_one, 1); | 2081 | wait_reading_process_input (0, 0, minus_one, 1); |
| 2082 | 2082 | ||
| 2083 | if (!interrupt_input && EVENT_QUEUES_EMPTY) | 2083 | if (!interrupt_input && EVENT_QUEUES_EMPTY) |
| @@ -2146,7 +2146,7 @@ kbd_buffer_get_event () | |||
| 2146 | else if (event->kind == buffer_switch_event) | 2146 | else if (event->kind == buffer_switch_event) |
| 2147 | { | 2147 | { |
| 2148 | /* The value doesn't matter here; only the type is tested. */ | 2148 | /* The value doesn't matter here; only the type is tested. */ |
| 2149 | XSET (obj, Lisp_Buffer, current_buffer); | 2149 | XSETBUFFER (obj, current_buffer); |
| 2150 | kbd_fetch_ptr = event + 1; | 2150 | kbd_fetch_ptr = event + 1; |
| 2151 | } | 2151 | } |
| 2152 | /* Just discard these, by returning nil. | 2152 | /* Just discard these, by returning nil. |
| @@ -2216,7 +2216,7 @@ kbd_buffer_get_event () | |||
| 2216 | 2216 | ||
| 2217 | frame = FRAME_FOCUS_FRAME (f); | 2217 | frame = FRAME_FOCUS_FRAME (f); |
| 2218 | if (NILP (frame)) | 2218 | if (NILP (frame)) |
| 2219 | XSET (frame, Lisp_Frame, f); | 2219 | XSETFRAME (frame, f); |
| 2220 | 2220 | ||
| 2221 | if (! EQ (frame, internal_last_event_frame) | 2221 | if (! EQ (frame, internal_last_event_frame) |
| 2222 | && XFRAME (frame) != selected_frame) | 2222 | && XFRAME (frame) != selected_frame) |
| @@ -2712,9 +2712,9 @@ make_lispy_event (event) | |||
| 2712 | else if (part == 2) | 2712 | else if (part == 2) |
| 2713 | posn = Qvertical_line; | 2713 | posn = Qvertical_line; |
| 2714 | else | 2714 | else |
| 2715 | XSET (posn, Lisp_Int, | 2715 | XSETINT (posn, |
| 2716 | buffer_posn_from_coords (XWINDOW (window), | 2716 | buffer_posn_from_coords (XWINDOW (window), |
| 2717 | column, row)); | 2717 | column, row)); |
| 2718 | } | 2718 | } |
| 2719 | 2719 | ||
| 2720 | position | 2720 | position |
| @@ -2921,13 +2921,13 @@ make_lispy_movement (frame, bar_window, part, x, y, time) | |||
| 2921 | else if (area == 2) | 2921 | else if (area == 2) |
| 2922 | posn = Qvertical_line; | 2922 | posn = Qvertical_line; |
| 2923 | else | 2923 | else |
| 2924 | XSET (posn, Lisp_Int, | 2924 | XSETINT (posn, |
| 2925 | buffer_posn_from_coords (XWINDOW (window), column, row)); | 2925 | buffer_posn_from_coords (XWINDOW (window), column, row)); |
| 2926 | } | 2926 | } |
| 2927 | #ifdef MULTI_FRAME | 2927 | #ifdef MULTI_FRAME |
| 2928 | else if (frame != 0) | 2928 | else if (frame != 0) |
| 2929 | { | 2929 | { |
| 2930 | XSET (window, Lisp_Frame, frame); | 2930 | XSETFRAME (window, frame); |
| 2931 | posn = Qnil; | 2931 | posn = Qnil; |
| 2932 | } | 2932 | } |
| 2933 | #endif | 2933 | #endif |
| @@ -3330,7 +3330,7 @@ modify_event_symbol (symbol_num, modifiers, symbol_kind, name_alist, | |||
| 3330 | Lisp_Object value; | 3330 | Lisp_Object value; |
| 3331 | Lisp_Object symbol_int; | 3331 | Lisp_Object symbol_int; |
| 3332 | 3332 | ||
| 3333 | XSET (symbol_int, Lisp_Int, symbol_num); | 3333 | XSETINT (symbol_int, symbol_num); |
| 3334 | 3334 | ||
| 3335 | /* Is this a request for a valid symbol? */ | 3335 | /* Is this a request for a valid symbol? */ |
| 3336 | if (symbol_num < 0 || symbol_num >= table_size) | 3336 | if (symbol_num < 0 || symbol_num >= table_size) |
| @@ -3600,9 +3600,9 @@ read_avail_input (expected) | |||
| 3600 | if (meta_key != 2) | 3600 | if (meta_key != 2) |
| 3601 | cbuf[i] &= ~0x80; | 3601 | cbuf[i] &= ~0x80; |
| 3602 | 3602 | ||
| 3603 | XSET (buf[i].code, Lisp_Int, cbuf[i]); | 3603 | XSETINT (buf[i].code, cbuf[i]); |
| 3604 | #ifdef MULTI_FRAME | 3604 | #ifdef MULTI_FRAME |
| 3605 | XSET (buf[i].frame_or_window, Lisp_Frame, selected_frame); | 3605 | XSETFRAME (buf[i].frame_or_window, selected_frame); |
| 3606 | #else | 3606 | #else |
| 3607 | buf[i].frame_or_window = Qnil; | 3607 | buf[i].frame_or_window = Qnil; |
| 3608 | #endif | 3608 | #endif |
| @@ -4297,7 +4297,7 @@ follow_key (key, nmaps, current, defs, next) | |||
| 4297 | next[i] = Qnil; | 4297 | next[i] = Qnil; |
| 4298 | 4298 | ||
| 4299 | current = next; | 4299 | current = next; |
| 4300 | XSET (key, Lisp_Int, XFASTINT (key) & ~CHAR_META); | 4300 | XSETINT (key, XFASTINT (key) & ~CHAR_META); |
| 4301 | } | 4301 | } |
| 4302 | 4302 | ||
| 4303 | first_binding = nmaps; | 4303 | first_binding = nmaps; |
| @@ -6089,7 +6089,7 @@ so that you can determine whether the command was run by mouse or not."); | |||
| 6089 | DEFVAR_LISP ("meta-prefix-char", &meta_prefix_char, | 6089 | DEFVAR_LISP ("meta-prefix-char", &meta_prefix_char, |
| 6090 | "Meta-prefix character code. Meta-foo as command input\n\ | 6090 | "Meta-prefix character code. Meta-foo as command input\n\ |
| 6091 | turns into this character followed by foo."); | 6091 | turns into this character followed by foo."); |
| 6092 | XSET (meta_prefix_char, Lisp_Int, 033); | 6092 | XSETINT (meta_prefix_char, 033); |
| 6093 | 6093 | ||
| 6094 | DEFVAR_LISP ("last-command", &last_command, | 6094 | DEFVAR_LISP ("last-command", &last_command, |
| 6095 | "The last command executed. Normally a symbol with a function definition,\n\ | 6095 | "The last command executed. Normally a symbol with a function definition,\n\ |
| @@ -6146,7 +6146,7 @@ If the last event came from a keyboard macro, this is set to `macro'."); | |||
| 6146 | "Character to recognize as meaning Help.\n\ | 6146 | "Character to recognize as meaning Help.\n\ |
| 6147 | When it is read, do `(eval help-form)', and display result if it's a string.\n\ | 6147 | When it is read, do `(eval help-form)', and display result if it's a string.\n\ |
| 6148 | If the value of `help-form' is nil, this char can be read normally."); | 6148 | If the value of `help-form' is nil, this char can be read normally."); |
| 6149 | XSET (Vhelp_char, Lisp_Int, Ctl ('H')); | 6149 | XSETINT (Vhelp_char, Ctl ('H')); |
| 6150 | 6150 | ||
| 6151 | DEFVAR_LISP ("help-form", &Vhelp_form, | 6151 | DEFVAR_LISP ("help-form", &Vhelp_form, |
| 6152 | "Form to execute when character `help-char' is read.\n\ | 6152 | "Form to execute when character `help-char' is read.\n\ |
| @@ -6195,7 +6195,7 @@ Otherwise, menu prompting uses the echo area."); | |||
| 6195 | DEFVAR_LISP ("menu-prompt-more-char", &menu_prompt_more_char, | 6195 | DEFVAR_LISP ("menu-prompt-more-char", &menu_prompt_more_char, |
| 6196 | "Character to see next line of menu prompt.\n\ | 6196 | "Character to see next line of menu prompt.\n\ |
| 6197 | Type this character while in a menu prompt to rotate around the lines of it."); | 6197 | Type this character while in a menu prompt to rotate around the lines of it."); |
| 6198 | XSET (menu_prompt_more_char, Lisp_Int, ' '); | 6198 | XSETINT (menu_prompt_more_char, ' '); |
| 6199 | 6199 | ||
| 6200 | DEFVAR_INT ("extra-keyboard-modifiers", &extra_keyboard_modifiers, | 6200 | DEFVAR_INT ("extra-keyboard-modifiers", &extra_keyboard_modifiers, |
| 6201 | "A mask of additional modifier keys to use with every keyboard character.\n\ | 6201 | "A mask of additional modifier keys to use with every keyboard character.\n\ |