aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c124
1 files changed, 62 insertions, 62 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index f06c8794a54..bda8a1d82f3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -73,7 +73,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
73#include "nsterm.h" 73#include "nsterm.h"
74#endif 74#endif
75 75
76/* Variables for blockinput.h: */ 76/* Variables for blockinput.h: */
77 77
78/* Non-zero if interrupt input is blocked right now. */ 78/* Non-zero if interrupt input is blocked right now. */
79volatile int interrupt_input_blocked; 79volatile int interrupt_input_blocked;
@@ -341,7 +341,7 @@ static Lisp_Object Qconfig_changed_event;
341Lisp_Object Qevent_kind; 341Lisp_Object Qevent_kind;
342static Lisp_Object Qevent_symbol_elements; 342static Lisp_Object Qevent_symbol_elements;
343 343
344/* menu and tool bar item parts */ 344/* Menu and tool bar item parts. */
345static Lisp_Object Qmenu_enable; 345static Lisp_Object Qmenu_enable;
346static Lisp_Object QCenable, QCvisible, QChelp, QCkeys, QCkey_sequence; 346static Lisp_Object QCenable, QCvisible, QChelp, QCkeys, QCkey_sequence;
347Lisp_Object QCfilter; 347Lisp_Object QCfilter;
@@ -838,7 +838,7 @@ recursive_edit_unwind (Lisp_Object buffer)
838 838
839 839
840#if 0 /* These two functions are now replaced with 840#if 0 /* These two functions are now replaced with
841 temporarily_switch_to_single_kboard. */ 841 temporarily_switch_to_single_kboard. */
842static void 842static void
843any_kboard_state () 843any_kboard_state ()
844{ 844{
@@ -1041,7 +1041,7 @@ cmd_error (Lisp_Object data)
1041 Vquit_flag = Qnil; 1041 Vquit_flag = Qnil;
1042 1042
1043 Vinhibit_quit = Qnil; 1043 Vinhibit_quit = Qnil;
1044#if 0 /* This shouldn't be necessary anymore. --lorentey */ 1044#if 0 /* This shouldn't be necessary anymore. --lorentey */
1045 if (command_loop_level == 0 && minibuf_level == 0) 1045 if (command_loop_level == 0 && minibuf_level == 0)
1046 any_kboard_state (); 1046 any_kboard_state ();
1047#endif 1047#endif
@@ -1134,7 +1134,7 @@ command_loop (void)
1134#if 0 /* This shouldn't be necessary anymore. --lorentey */ 1134#if 0 /* This shouldn't be necessary anymore. --lorentey */
1135 /* Reset single_kboard in case top-level set it while 1135 /* Reset single_kboard in case top-level set it while
1136 evaluating an -f option, or we are stuck there for some 1136 evaluating an -f option, or we are stuck there for some
1137 other reason. */ 1137 other reason. */
1138 any_kboard_state (); 1138 any_kboard_state ();
1139#endif 1139#endif
1140 internal_catch (Qtop_level, command_loop_2, Qnil); 1140 internal_catch (Qtop_level, command_loop_2, Qnil);
@@ -1495,8 +1495,8 @@ command_loop_1 (void)
1495 if (!NILP (Vquit_flag)) 1495 if (!NILP (Vquit_flag))
1496 { 1496 {
1497 Vexecuting_kbd_macro = Qt; 1497 Vexecuting_kbd_macro = Qt;
1498 QUIT; /* Make some noise. */ 1498 QUIT; /* Make some noise. */
1499 /* Will return since macro now empty. */ 1499 /* Will return since macro now empty. */
1500 } 1500 }
1501 } 1501 }
1502 1502
@@ -1515,7 +1515,7 @@ command_loop_1 (void)
1515 Vdisable_point_adjustment = Qnil; 1515 Vdisable_point_adjustment = Qnil;
1516 1516
1517 /* Process filters and timers may have messed with deactivate-mark. 1517 /* Process filters and timers may have messed with deactivate-mark.
1518 reset it before we execute the command. */ 1518 reset it before we execute the command. */
1519 Vdeactivate_mark = Qnil; 1519 Vdeactivate_mark = Qnil;
1520 1520
1521 /* Remap command through active keymaps. */ 1521 /* Remap command through active keymaps. */
@@ -1555,7 +1555,7 @@ command_loop_1 (void)
1555 } 1555 }
1556 else 1556 else
1557 { 1557 {
1558 /* Here for a command that isn't executed directly */ 1558 /* Here for a command that isn't executed directly. */
1559 1559
1560#ifdef HAVE_WINDOW_SYSTEM 1560#ifdef HAVE_WINDOW_SYSTEM
1561 int scount = SPECPDL_INDEX (); 1561 int scount = SPECPDL_INDEX ();
@@ -1963,7 +1963,7 @@ void
1963poll_for_input_1 (void) 1963poll_for_input_1 (void)
1964{ 1964{
1965/* Tell ns_read_socket() it is being called asynchronously so it can avoid 1965/* Tell ns_read_socket() it is being called asynchronously so it can avoid
1966 doing anything dangerous. */ 1966 doing anything dangerous. */
1967#ifdef HAVE_NS 1967#ifdef HAVE_NS
1968 ++handling_signal; 1968 ++handling_signal;
1969#endif 1969#endif
@@ -2003,7 +2003,7 @@ start_polling (void)
2003#ifdef POLL_FOR_INPUT 2003#ifdef POLL_FOR_INPUT
2004 /* XXX This condition was (read_socket_hook && !interrupt_input), 2004 /* XXX This condition was (read_socket_hook && !interrupt_input),
2005 but read_socket_hook is not global anymore. Let's pretend that 2005 but read_socket_hook is not global anymore. Let's pretend that
2006 it's always set. */ 2006 it's always set. */
2007 if (!interrupt_input) 2007 if (!interrupt_input)
2008 { 2008 {
2009 /* Turn alarm handling on unconditionally. It might have 2009 /* Turn alarm handling on unconditionally. It might have
@@ -2040,7 +2040,7 @@ input_polling_used (void)
2040#ifdef POLL_FOR_INPUT 2040#ifdef POLL_FOR_INPUT
2041 /* XXX This condition was (read_socket_hook && !interrupt_input), 2041 /* XXX This condition was (read_socket_hook && !interrupt_input),
2042 but read_socket_hook is not global anymore. Let's pretend that 2042 but read_socket_hook is not global anymore. Let's pretend that
2043 it's always set. */ 2043 it's always set. */
2044 return !interrupt_input; 2044 return !interrupt_input;
2045#else 2045#else
2046 return 0; 2046 return 0;
@@ -2055,7 +2055,7 @@ stop_polling (void)
2055#ifdef POLL_FOR_INPUT 2055#ifdef POLL_FOR_INPUT
2056 /* XXX This condition was (read_socket_hook && !interrupt_input), 2056 /* XXX This condition was (read_socket_hook && !interrupt_input),
2057 but read_socket_hook is not global anymore. Let's pretend that 2057 but read_socket_hook is not global anymore. Let's pretend that
2058 it's always set. */ 2058 it's always set. */
2059 if (!interrupt_input) 2059 if (!interrupt_input)
2060 ++poll_suppress_count; 2060 ++poll_suppress_count;
2061#endif 2061#endif
@@ -2393,7 +2393,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
2393 real event came from. Normally, a switch-frame event selects 2393 real event came from. Normally, a switch-frame event selects
2394 internal_last_event_frame after each command is read, but 2394 internal_last_event_frame after each command is read, but
2395 events read from a macro should never cause a new frame to be 2395 events read from a macro should never cause a new frame to be
2396 selected. */ 2396 selected. */
2397 Vlast_event_frame = internal_last_event_frame = Qmacro; 2397 Vlast_event_frame = internal_last_event_frame = Qmacro;
2398 2398
2399 /* Exit the macro if we are at the end. 2399 /* Exit the macro if we are at the end.
@@ -2503,7 +2503,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
2503 Try this before the sit-for, because the sit-for 2503 Try this before the sit-for, because the sit-for
2504 would do the wrong thing if we are supposed to do 2504 would do the wrong thing if we are supposed to do
2505 menu prompting. If EVENT_HAS_PARAMETERS then we are reading 2505 menu prompting. If EVENT_HAS_PARAMETERS then we are reading
2506 after a mouse event so don't try a minibuf menu. */ 2506 after a mouse event so don't try a minibuf menu. */
2507 c = Qnil; 2507 c = Qnil;
2508 if (nmaps > 0 && INTERACTIVE 2508 if (nmaps > 0 && INTERACTIVE
2509 && !NILP (prev_event) && ! EVENT_HAS_PARAMETERS (prev_event) 2509 && !NILP (prev_event) && ! EVENT_HAS_PARAMETERS (prev_event)
@@ -4990,8 +4990,8 @@ static const char *const lispy_function_keys[] =
4990 "break", /* 0xff6b */ 4990 "break", /* 0xff6b */
4991 4991
4992 0, 0, 0, 0, 4992 0, 0, 0, 0,
4993 0, 0, 0, 0, "backtab", 0, 0, 0, /* 0xff70... */ 4993 0, 0, 0, 0, "backtab", 0, 0, 0, /* 0xff70... */
4994 0, 0, 0, 0, 0, 0, 0, "kp-numlock", /* 0xff78... */ 4994 0, 0, 0, 0, 0, 0, 0, "kp-numlock", /* 0xff78... */
4995 "kp-space", /* 0xff80 */ /* IsKeypadKey */ 4995 "kp-space", /* 0xff80 */ /* IsKeypadKey */
4996 0, 0, 0, 0, 0, 0, 0, 0, 4996 0, 0, 0, 0, 0, 0, 0, 0,
4997 "kp-tab", /* 0xff89 */ 4997 "kp-tab", /* 0xff89 */
@@ -5103,14 +5103,14 @@ static Lisp_Object *const scroll_bar_parts[] = {
5103static Lisp_Object button_down_location; 5103static Lisp_Object button_down_location;
5104 5104
5105/* Information about the most recent up-going button event: Which 5105/* Information about the most recent up-going button event: Which
5106 button, what location, and what time. */ 5106 button, what location, and what time. */
5107 5107
5108static int last_mouse_button; 5108static int last_mouse_button;
5109static int last_mouse_x; 5109static int last_mouse_x;
5110static int last_mouse_y; 5110static int last_mouse_y;
5111static Time button_down_time; 5111static Time button_down_time;
5112 5112
5113/* The number of clicks in this multiple-click. */ 5113/* The number of clicks in this multiple-click. */
5114 5114
5115static int double_click_count; 5115static int double_click_count;
5116 5116
@@ -5354,7 +5354,7 @@ make_lispy_event (struct input_event *event)
5354 5354
5355#ifdef HAVE_NS 5355#ifdef HAVE_NS
5356 /* NS_NONKEY_EVENTs are just like NON_ASCII_KEYSTROKE_EVENTs, 5356 /* NS_NONKEY_EVENTs are just like NON_ASCII_KEYSTROKE_EVENTs,
5357 except that they are non-key events (last-nonmenu-event is nil). */ 5357 except that they are non-key events (last-nonmenu-event is nil). */
5358 case NS_NONKEY_EVENT: 5358 case NS_NONKEY_EVENT:
5359#endif 5359#endif
5360 5360
@@ -5840,7 +5840,7 @@ make_lispy_event (struct input_event *event)
5840 Fcons (make_number (event->timestamp), 5840 Fcons (make_number (event->timestamp),
5841 Fcons (part, Qnil))))); 5841 Fcons (part, Qnil)))));
5842 5842
5843 /* Always treat scroll bar events as clicks. */ 5843 /* Always treat scroll bar events as clicks. */
5844 event->modifiers |= click_modifier; 5844 event->modifiers |= click_modifier;
5845 event->modifiers &= ~up_modifier; 5845 event->modifiers &= ~up_modifier;
5846 5846
@@ -6710,7 +6710,7 @@ lucid_event_type_list_p (Lisp_Object object)
6710 If READABLE_EVENTS_FILTER_EVENTS is set in FLAGS, ignore internal 6710 If READABLE_EVENTS_FILTER_EVENTS is set in FLAGS, ignore internal
6711 events (FOCUS_IN_EVENT). 6711 events (FOCUS_IN_EVENT).
6712 If READABLE_EVENTS_IGNORE_SQUEEZABLES is set in FLAGS, ignore mouse 6712 If READABLE_EVENTS_IGNORE_SQUEEZABLES is set in FLAGS, ignore mouse
6713 movements and toolkit scroll bar thumb drags. */ 6713 movements and toolkit scroll bar thumb drags. */
6714 6714
6715static void 6715static void
6716get_input_pending (int *addr, int flags) 6716get_input_pending (int *addr, int flags)
@@ -6744,7 +6744,7 @@ gobble_input (int expected)
6744#ifdef POLL_FOR_INPUT 6744#ifdef POLL_FOR_INPUT
6745 /* XXX This condition was (read_socket_hook && !interrupt_input), 6745 /* XXX This condition was (read_socket_hook && !interrupt_input),
6746 but read_socket_hook is not global anymore. Let's pretend that 6746 but read_socket_hook is not global anymore. Let's pretend that
6747 it's always set. */ 6747 it's always set. */
6748 if (!interrupt_input && poll_suppress_count == 0) 6748 if (!interrupt_input && poll_suppress_count == 0)
6749 { 6749 {
6750 SIGMASKTYPE mask; 6750 SIGMASKTYPE mask;
@@ -6819,7 +6819,7 @@ read_avail_input (int expected)
6819 if (store_user_signal_events ()) 6819 if (store_user_signal_events ())
6820 expected = 0; 6820 expected = 0;
6821 6821
6822 /* Loop through the available terminals, and call their input hooks. */ 6822 /* Loop through the available terminals, and call their input hooks. */
6823 t = terminal_list; 6823 t = terminal_list;
6824 while (t) 6824 while (t)
6825 { 6825 {
@@ -6840,15 +6840,15 @@ read_avail_input (int expected)
6840 expected = 0; 6840 expected = 0;
6841 } 6841 }
6842 6842
6843 if (nr == -1) /* Not OK to read input now. */ 6843 if (nr == -1) /* Not OK to read input now. */
6844 { 6844 {
6845 err = 1; 6845 err = 1;
6846 } 6846 }
6847 else if (nr == -2) /* Non-transient error. */ 6847 else if (nr == -2) /* Non-transient error. */
6848 { 6848 {
6849 /* The terminal device terminated; it should be closed. */ 6849 /* The terminal device terminated; it should be closed. */
6850 6850
6851 /* Kill Emacs if this was our last terminal. */ 6851 /* Kill Emacs if this was our last terminal. */
6852 if (!terminal_list->next_terminal) 6852 if (!terminal_list->next_terminal)
6853 /* Formerly simply reported no input, but that 6853 /* Formerly simply reported no input, but that
6854 sometimes led to a failure of Emacs to terminate. 6854 sometimes led to a failure of Emacs to terminate.
@@ -6860,7 +6860,7 @@ read_avail_input (int expected)
6860 alone in its group. */ 6860 alone in its group. */
6861 kill (getpid (), SIGHUP); 6861 kill (getpid (), SIGHUP);
6862 6862
6863 /* XXX Is calling delete_terminal safe here? It calls delete_frame. */ 6863 /* XXX Is calling delete_terminal safe here? It calls delete_frame. */
6864 { 6864 {
6865 Lisp_Object tmp; 6865 Lisp_Object tmp;
6866 XSETTERMINAL (tmp, t); 6866 XSETTERMINAL (tmp, t);
@@ -6950,7 +6950,7 @@ tty_read_avail_input (struct terminal *terminal,
6950 return 0; 6950 return 0;
6951#endif /* subprocesses */ 6951#endif /* subprocesses */
6952 6952
6953 if (!terminal->name) /* Don't read from a dead terminal. */ 6953 if (!terminal->name) /* Don't read from a dead terminal. */
6954 return 0; 6954 return 0;
6955 6955
6956 if (terminal->type != output_termcap 6956 if (terminal->type != output_termcap
@@ -6958,15 +6958,15 @@ tty_read_avail_input (struct terminal *terminal,
6958 abort (); 6958 abort ();
6959 6959
6960 /* XXX I think the following code should be moved to separate hook 6960 /* XXX I think the following code should be moved to separate hook
6961 functions in system-dependent files. */ 6961 functions in system-dependent files. */
6962#ifdef WINDOWSNT 6962#ifdef WINDOWSNT
6963 return 0; 6963 return 0;
6964#else /* not WINDOWSNT */ 6964#else /* not WINDOWSNT */
6965 if (! tty->term_initted) /* In case we get called during bootstrap. */ 6965 if (! tty->term_initted) /* In case we get called during bootstrap. */
6966 return 0; 6966 return 0;
6967 6967
6968 if (! tty->input) 6968 if (! tty->input)
6969 return 0; /* The terminal is suspended. */ 6969 return 0; /* The terminal is suspended. */
6970 6970
6971#ifdef MSDOS 6971#ifdef MSDOS
6972 n_to_read = dos_keysns (); 6972 n_to_read = dos_keysns ();
@@ -6992,7 +6992,7 @@ tty_read_avail_input (struct terminal *terminal,
6992 Gpm_GetEvent closes gpm_fd and clears it to -1, which is why 6992 Gpm_GetEvent closes gpm_fd and clears it to -1, which is why
6993 we save it in `fd' so close_gpm can remove it from the 6993 we save it in `fd' so close_gpm can remove it from the
6994 select masks. 6994 select masks.
6995 gpm==-1 if a protocol error or EWOULDBLOCK; the latter is normal. */ 6995 gpm==-1 if a protocol error or EWOULDBLOCK; the latter is normal. */
6996 while (gpm = Gpm_GetEvent (&event), gpm == 1) { 6996 while (gpm = Gpm_GetEvent (&event), gpm == 1) {
6997 nread += handle_one_term_event (tty, &event, &gpm_hold_quit); 6997 nread += handle_one_term_event (tty, &event, &gpm_hold_quit);
6998 } 6998 }
@@ -7012,7 +7012,7 @@ tty_read_avail_input (struct terminal *terminal,
7012 if (ioctl (fileno (tty->input), FIONREAD, &n_to_read) < 0) 7012 if (ioctl (fileno (tty->input), FIONREAD, &n_to_read) < 0)
7013 { 7013 {
7014 if (! noninteractive) 7014 if (! noninteractive)
7015 return -2; /* Close this terminal. */ 7015 return -2; /* Close this terminal. */
7016 else 7016 else
7017 n_to_read = 0; 7017 n_to_read = 0;
7018 } 7018 }
@@ -7045,16 +7045,16 @@ tty_read_avail_input (struct terminal *terminal,
7045 process group won't get SIGHUP's at logout time. BSDI adheres to 7045 process group won't get SIGHUP's at logout time. BSDI adheres to
7046 this part standard and returns -1 from read (0) with errno==EIO 7046 this part standard and returns -1 from read (0) with errno==EIO
7047 when the control tty is taken away. 7047 when the control tty is taken away.
7048 Jeffrey Honig <jch@bsdi.com> says this is generally safe. */ 7048 Jeffrey Honig <jch@bsdi.com> says this is generally safe. */
7049 if (nread == -1 && errno == EIO) 7049 if (nread == -1 && errno == EIO)
7050 return -2; /* Close this terminal. */ 7050 return -2; /* Close this terminal. */
7051#if defined (AIX) && defined (_BSD) 7051#if defined (AIX) && defined (_BSD)
7052 /* The kernel sometimes fails to deliver SIGHUP for ptys. 7052 /* The kernel sometimes fails to deliver SIGHUP for ptys.
7053 This looks incorrect, but it isn't, because _BSD causes 7053 This looks incorrect, but it isn't, because _BSD causes
7054 O_NDELAY to be defined in fcntl.h as O_NONBLOCK, 7054 O_NDELAY to be defined in fcntl.h as O_NONBLOCK,
7055 and that causes a value other than 0 when there is no input. */ 7055 and that causes a value other than 0 when there is no input. */
7056 if (nread == 0) 7056 if (nread == 0)
7057 return -2; /* Close this terminal. */ 7057 return -2; /* Close this terminal. */
7058#endif 7058#endif
7059 } 7059 }
7060 while ( 7060 while (
@@ -7132,7 +7132,7 @@ tty_read_avail_input (struct terminal *terminal,
7132 buf.code = cbuf[i]; 7132 buf.code = cbuf[i];
7133 /* Set the frame corresponding to the active tty. Note that the 7133 /* Set the frame corresponding to the active tty. Note that the
7134 value of selected_frame is not reliable here, redisplay tends 7134 value of selected_frame is not reliable here, redisplay tends
7135 to temporarily change it. */ 7135 to temporarily change it. */
7136 buf.frame_or_window = tty->top_frame; 7136 buf.frame_or_window = tty->top_frame;
7137 buf.arg = Qnil; 7137 buf.arg = Qnil;
7138 7138
@@ -7155,7 +7155,7 @@ handle_async_input (void)
7155 pending_signals = pending_atimers; 7155 pending_signals = pending_atimers;
7156#endif 7156#endif
7157/* Tell ns_read_socket() it is being called asynchronously so it can avoid 7157/* Tell ns_read_socket() it is being called asynchronously so it can avoid
7158 doing anything dangerous. */ 7158 doing anything dangerous. */
7159#ifdef HAVE_NS 7159#ifdef HAVE_NS
7160 ++handling_signal; 7160 ++handling_signal;
7161#endif 7161#endif
@@ -7213,7 +7213,7 @@ input_available_signal (int signo)
7213 This function exists so that the UNBLOCK_INPUT macro in 7213 This function exists so that the UNBLOCK_INPUT macro in
7214 blockinput.h can have some way to take care of input we put off 7214 blockinput.h can have some way to take care of input we put off
7215 dealing with, without assuming that every file which uses 7215 dealing with, without assuming that every file which uses
7216 UNBLOCK_INPUT also has #included the files necessary to get SIGIO. */ 7216 UNBLOCK_INPUT also has #included the files necessary to get SIGIO. */
7217void 7217void
7218reinvoke_input_signal (void) 7218reinvoke_input_signal (void)
7219{ 7219{
@@ -7240,7 +7240,7 @@ struct user_signal_info
7240 struct user_signal_info *next; 7240 struct user_signal_info *next;
7241}; 7241};
7242 7242
7243/* List of user signals. */ 7243/* List of user signals. */
7244static struct user_signal_info *user_signals = NULL; 7244static struct user_signal_info *user_signals = NULL;
7245 7245
7246void 7246void
@@ -7777,7 +7777,7 @@ parse_menu_item (Lisp_Object item, int inmenubar)
7777 { 7777 {
7778 tem = XCAR (item); 7778 tem = XCAR (item);
7779 if (SYMBOLP (tem) || STRINGP (tem) || VECTORP (tem)) 7779 if (SYMBOLP (tem) || STRINGP (tem) || VECTORP (tem))
7780 /* Be GC protected. Set keyhint to item instead of tem. */ 7780 /* Be GC protected. Set keyhint to item instead of tem. */
7781 keyhint = item; 7781 keyhint = item;
7782 } 7782 }
7783 else if (EQ (tem, QCkeys)) 7783 else if (EQ (tem, QCkeys))
@@ -7860,7 +7860,7 @@ parse_menu_item (Lisp_Object item, int inmenubar)
7860 if (inmenubar > 0) 7860 if (inmenubar > 0)
7861 return 1; 7861 return 1;
7862 7862
7863 { /* This is a command. See if there is an equivalent key binding. */ 7863 { /* This is a command. See if there is an equivalent key binding. */
7864 Lisp_Object keyeq = AREF (item_properties, ITEM_PROPERTY_KEYEQ); 7864 Lisp_Object keyeq = AREF (item_properties, ITEM_PROPERTY_KEYEQ);
7865 7865
7866 /* The previous code preferred :key-sequence to :keys, so we 7866 /* The previous code preferred :key-sequence to :keys, so we
@@ -8416,7 +8416,7 @@ append_tool_bar_item (void)
8416 These are done in different ways, depending on how the input will be read. 8416 These are done in different ways, depending on how the input will be read.
8417 Menus using X are done after auto-saving in read-char, getting the input 8417 Menus using X are done after auto-saving in read-char, getting the input
8418 event from Fx_popup_menu; menus using the minibuf use read_char recursively 8418 event from Fx_popup_menu; menus using the minibuf use read_char recursively
8419 and do auto-saving in the inner call of read_char. */ 8419 and do auto-saving in the inner call of read_char. */
8420 8420
8421static Lisp_Object 8421static Lisp_Object
8422read_char_x_menu_prompt (ptrdiff_t nmaps, Lisp_Object *maps, 8422read_char_x_menu_prompt (ptrdiff_t nmaps, Lisp_Object *maps,
@@ -8636,14 +8636,14 @@ read_char_minibuf_menu_prompt (int commandflag,
8636 tem 8636 tem
8637 = XVECTOR (item_properties)->contents[ITEM_PROPERTY_KEYEQ]; 8637 = XVECTOR (item_properties)->contents[ITEM_PROPERTY_KEYEQ];
8638 if (!NILP (tem)) 8638 if (!NILP (tem))
8639 /* Insert equivalent keybinding. */ 8639 /* Insert equivalent keybinding. */
8640 s = concat2 (s, tem); 8640 s = concat2 (s, tem);
8641#endif 8641#endif
8642 tem 8642 tem
8643 = XVECTOR (item_properties)->contents[ITEM_PROPERTY_TYPE]; 8643 = XVECTOR (item_properties)->contents[ITEM_PROPERTY_TYPE];
8644 if (EQ (tem, QCradio) || EQ (tem, QCtoggle)) 8644 if (EQ (tem, QCradio) || EQ (tem, QCtoggle))
8645 { 8645 {
8646 /* Insert button prefix. */ 8646 /* Insert button prefix. */
8647 Lisp_Object selected 8647 Lisp_Object selected
8648 = XVECTOR (item_properties)->contents[ITEM_PROPERTY_SELECTED]; 8648 = XVECTOR (item_properties)->contents[ITEM_PROPERTY_SELECTED];
8649 if (EQ (tem, QCradio)) 8649 if (EQ (tem, QCradio))
@@ -8877,7 +8877,7 @@ keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey,
8877 8877
8878 /* If keybuf[fkey->start..fkey->end] is bound in the 8878 /* If keybuf[fkey->start..fkey->end] is bound in the
8879 map and we're in a position to do the key remapping, replace it with 8879 map and we're in a position to do the key remapping, replace it with
8880 the binding and restart with fkey->start at the end. */ 8880 the binding and restart with fkey->start at the end. */
8881 if ((VECTORP (next) || STRINGP (next)) && doit) 8881 if ((VECTORP (next) || STRINGP (next)) && doit)
8882 { 8882 {
8883 int len = XFASTINT (Flength (next)); 8883 int len = XFASTINT (Flength (next));
@@ -9041,7 +9041,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9041 9041
9042 /* Non-zero if we are trying to map a key by changing an upper-case 9042 /* Non-zero if we are trying to map a key by changing an upper-case
9043 letter to lower case, or a shifted function key to an unshifted 9043 letter to lower case, or a shifted function key to an unshifted
9044 one. */ 9044 one. */
9045 int shift_translated = 0; 9045 int shift_translated = 0;
9046 9046
9047 /* If we receive a `switch-frame' or `select-window' event in the middle of 9047 /* If we receive a `switch-frame' or `select-window' event in the middle of
@@ -9049,7 +9049,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9049 While we're reading, we keep the event here. */ 9049 While we're reading, we keep the event here. */
9050 Lisp_Object delayed_switch_frame; 9050 Lisp_Object delayed_switch_frame;
9051 9051
9052 /* See the comment below... */ 9052 /* See the comment below... */
9053#if defined (GOBBLE_FIRST_EVENT) 9053#if defined (GOBBLE_FIRST_EVENT)
9054 Lisp_Object first_event; 9054 Lisp_Object first_event;
9055#endif 9055#endif
@@ -9324,7 +9324,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9324 if (!found) 9324 if (!found)
9325 { 9325 {
9326 /* Don't touch interrupted_kboard when it's been 9326 /* Don't touch interrupted_kboard when it's been
9327 deleted. */ 9327 deleted. */
9328 delayed_switch_frame = Qnil; 9328 delayed_switch_frame = Qnil;
9329 goto replay_entire_sequence; 9329 goto replay_entire_sequence;
9330 } 9330 }
@@ -9432,7 +9432,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9432 { 9432 {
9433 /* If we're at the beginning of a key sequence, and the caller 9433 /* If we're at the beginning of a key sequence, and the caller
9434 says it's okay, go ahead and return this event. If we're 9434 says it's okay, go ahead and return this event. If we're
9435 in the midst of a key sequence, delay it until the end. */ 9435 in the midst of a key sequence, delay it until the end. */
9436 if (t > 0 || !can_return_switch_frame) 9436 if (t > 0 || !can_return_switch_frame)
9437 { 9437 {
9438 delayed_switch_frame = key; 9438 delayed_switch_frame = key;
@@ -9729,7 +9729,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9729 Down-clicks are eliminated. 9729 Down-clicks are eliminated.
9730 Double-downs reduce to downs, then are eliminated. 9730 Double-downs reduce to downs, then are eliminated.
9731 Triple-downs reduce to double-downs, then to downs, 9731 Triple-downs reduce to double-downs, then to downs,
9732 then are eliminated. */ 9732 then are eliminated. */
9733 if (modifiers & (down_modifier | drag_modifier 9733 if (modifiers & (down_modifier | drag_modifier
9734 | double_modifier | triple_modifier)) 9734 | double_modifier | triple_modifier))
9735 { 9735 {
@@ -10838,7 +10838,7 @@ set_waiting_for_input (struct timeval *time_to_clear)
10838 waiting_for_input = 1; 10838 waiting_for_input = 1;
10839 10839
10840 /* If handle_interrupt was called before and buffered a C-g, 10840 /* If handle_interrupt was called before and buffered a C-g,
10841 make it run again now, to avoid timing error. */ 10841 make it run again now, to avoid timing error. */
10842 if (!NILP (Vquit_flag)) 10842 if (!NILP (Vquit_flag))
10843 quit_throw_to_read_char (); 10843 quit_throw_to_read_char ();
10844} 10844}
@@ -10859,7 +10859,7 @@ clear_waiting_for_input (void)
10859 10859
10860static void 10860static void
10861interrupt_signal (int signalnum) /* If we don't have an argument, some */ 10861interrupt_signal (int signalnum) /* If we don't have an argument, some */
10862 /* compilers complain in signal calls. */ 10862 /* compilers complain in signal calls. */
10863{ 10863{
10864 /* Must preserve main program's value of errno. */ 10864 /* Must preserve main program's value of errno. */
10865 int old_errno = errno; 10865 int old_errno = errno;
@@ -10867,12 +10867,12 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */
10867 10867
10868 SIGNAL_THREAD_CHECK (signalnum); 10868 SIGNAL_THREAD_CHECK (signalnum);
10869 10869
10870 /* See if we have an active terminal on our controlling tty. */ 10870 /* See if we have an active terminal on our controlling tty. */
10871 terminal = get_named_tty ("/dev/tty"); 10871 terminal = get_named_tty ("/dev/tty");
10872 if (!terminal) 10872 if (!terminal)
10873 { 10873 {
10874 /* If there are no frames there, let's pretend that we are a 10874 /* If there are no frames there, let's pretend that we are a
10875 well-behaving UN*X program and quit. */ 10875 well-behaving UN*X program and quit. */
10876 Fkill_emacs (Qnil); 10876 Fkill_emacs (Qnil);
10877 } 10877 }
10878 else 10878 else
@@ -10900,7 +10900,7 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */
10900 10900
10901 Otherwise it sets the Lisp variable quit-flag not-nil. This causes 10901 Otherwise it sets the Lisp variable quit-flag not-nil. This causes
10902 eval to throw, when it gets a chance. If quit-flag is already 10902 eval to throw, when it gets a chance. If quit-flag is already
10903 non-nil, it stops the job right away. */ 10903 non-nil, it stops the job right away. */
10904 10904
10905static void 10905static void
10906handle_interrupt (void) 10906handle_interrupt (void)
@@ -10909,7 +10909,7 @@ handle_interrupt (void)
10909 10909
10910 cancel_echoing (); 10910 cancel_echoing ();
10911 10911
10912 /* XXX This code needs to be revised for multi-tty support. */ 10912 /* XXX This code needs to be revised for multi-tty support. */
10913 if (!NILP (Vquit_flag) && get_named_tty ("/dev/tty")) 10913 if (!NILP (Vquit_flag) && get_named_tty ("/dev/tty"))
10914 { 10914 {
10915 /* If SIGINT isn't blocked, don't let us be interrupted by 10915 /* If SIGINT isn't blocked, don't let us be interrupted by
@@ -11019,7 +11019,7 @@ handle_interrupt (void)
11019 wait_reading_process_output() under HAVE_NS because of the call 11019 wait_reading_process_output() under HAVE_NS because of the call
11020 to ns_select there (needed because otherwise events aren't picked up 11020 to ns_select there (needed because otherwise events aren't picked up
11021 outside of polling since we don't get SIGIO like X and we don't have a 11021 outside of polling since we don't get SIGIO like X and we don't have a
11022 separate event loop thread like W32. */ 11022 separate event loop thread like W32. */
11023#ifndef HAVE_NS 11023#ifndef HAVE_NS
11024 if (waiting_for_input && !echoing) 11024 if (waiting_for_input && !echoing)
11025 quit_throw_to_read_char (); 11025 quit_throw_to_read_char ();
@@ -11468,7 +11468,7 @@ init_keyboard (void)
11468 session may have multiple display types, so we always handle 11468 session may have multiple display types, so we always handle
11469 SIGINT. There is special code in interrupt_signal to exit 11469 SIGINT. There is special code in interrupt_signal to exit
11470 Emacs on SIGINT when there are no termcap frames on the 11470 Emacs on SIGINT when there are no termcap frames on the
11471 controlling terminal. */ 11471 controlling terminal. */
11472 signal (SIGINT, interrupt_signal); 11472 signal (SIGINT, interrupt_signal);
11473#ifndef DOS_NT 11473#ifndef DOS_NT
11474 /* For systems with SysV TERMIO, C-g is set up for both SIGINT and 11474 /* For systems with SysV TERMIO, C-g is set up for both SIGINT and
@@ -12269,7 +12269,7 @@ Currently, the only supported values for this
12269variable are `sigusr1' and `sigusr2'. */); 12269variable are `sigusr1' and `sigusr2'. */);
12270 Vdebug_on_event = intern_c_string ("sigusr2"); 12270 Vdebug_on_event = intern_c_string ("sigusr2");
12271 12271
12272 /* Create the initial keyboard. */ 12272 /* Create the initial keyboard. */
12273 initial_kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); 12273 initial_kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
12274 init_kboard (initial_kboard); 12274 init_kboard (initial_kboard);
12275 /* Vwindow_system is left at t for now. */ 12275 /* Vwindow_system is left at t for now. */