diff options
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 184 |
1 files changed, 101 insertions, 83 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index a73f6656cd2..c0c53c82714 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -96,16 +96,25 @@ int pending_signals; | |||
| 96 | KBOARD *initial_kboard; | 96 | KBOARD *initial_kboard; |
| 97 | KBOARD *current_kboard; | 97 | KBOARD *current_kboard; |
| 98 | KBOARD *all_kboards; | 98 | KBOARD *all_kboards; |
| 99 | int single_kboard; | 99 | |
| 100 | /* Nonzero in the single-kboard state, 0 in the any-kboard state. */ | ||
| 101 | static int single_kboard; | ||
| 100 | 102 | ||
| 101 | /* Non-nil disable property on a command means | 103 | /* Non-nil disable property on a command means |
| 102 | do not execute it; call disabled-command-function's value instead. */ | 104 | do not execute it; call disabled-command-function's value instead. */ |
| 103 | Lisp_Object Qdisabled, Qdisabled_command_function; | 105 | Lisp_Object Qdisabled; |
| 106 | static Lisp_Object Qdisabled_command_function; | ||
| 104 | 107 | ||
| 105 | #define NUM_RECENT_KEYS (300) | 108 | #define NUM_RECENT_KEYS (300) |
| 106 | int recent_keys_index; /* Index for storing next element into recent_keys */ | 109 | |
| 107 | int total_keys; /* Total number of elements stored into recent_keys */ | 110 | /* Index for storing next element into recent_keys. */ |
| 108 | Lisp_Object recent_keys; /* Vector holds the last NUM_RECENT_KEYS keystrokes */ | 111 | static int recent_keys_index; |
| 112 | |||
| 113 | /* Total number of elements stored into recent_keys. */ | ||
| 114 | static int total_keys; | ||
| 115 | |||
| 116 | /* This vector holds the last NUM_RECENT_KEYS keystrokes. */ | ||
| 117 | static Lisp_Object recent_keys; | ||
| 109 | 118 | ||
| 110 | /* Vector holding the key sequence that invoked the current command. | 119 | /* Vector holding the key sequence that invoked the current command. |
| 111 | It is reused for each command, and it may be longer than the current | 120 | It is reused for each command, and it may be longer than the current |
| @@ -117,12 +126,12 @@ int this_command_key_count; | |||
| 117 | 126 | ||
| 118 | /* 1 after calling Freset_this_command_lengths. | 127 | /* 1 after calling Freset_this_command_lengths. |
| 119 | Usually it is 0. */ | 128 | Usually it is 0. */ |
| 120 | int this_command_key_count_reset; | 129 | static int this_command_key_count_reset; |
| 121 | 130 | ||
| 122 | /* This vector is used as a buffer to record the events that were actually read | 131 | /* This vector is used as a buffer to record the events that were actually read |
| 123 | by read_key_sequence. */ | 132 | by read_key_sequence. */ |
| 124 | Lisp_Object raw_keybuf; | 133 | static Lisp_Object raw_keybuf; |
| 125 | int raw_keybuf_count; | 134 | static int raw_keybuf_count; |
| 126 | 135 | ||
| 127 | #define GROW_RAW_KEYBUF \ | 136 | #define GROW_RAW_KEYBUF \ |
| 128 | if (raw_keybuf_count == XVECTOR (raw_keybuf)->size) \ | 137 | if (raw_keybuf_count == XVECTOR (raw_keybuf)->size) \ |
| @@ -130,7 +139,7 @@ int raw_keybuf_count; | |||
| 130 | 139 | ||
| 131 | /* Number of elements of this_command_keys | 140 | /* Number of elements of this_command_keys |
| 132 | that precede this key sequence. */ | 141 | that precede this key sequence. */ |
| 133 | int this_single_command_key_start; | 142 | static int this_single_command_key_start; |
| 134 | 143 | ||
| 135 | /* Record values of this_command_key_count and echo_length () | 144 | /* Record values of this_command_key_count and echo_length () |
| 136 | before this command was read. */ | 145 | before this command was read. */ |
| @@ -146,7 +155,7 @@ int waiting_for_input; | |||
| 146 | 155 | ||
| 147 | /* True while displaying for echoing. Delays C-g throwing. */ | 156 | /* True while displaying for echoing. Delays C-g throwing. */ |
| 148 | 157 | ||
| 149 | int echoing; | 158 | static int echoing; |
| 150 | 159 | ||
| 151 | /* Non-null means we can start echoing at the next input pause even | 160 | /* Non-null means we can start echoing at the next input pause even |
| 152 | though there is something in the echo area. */ | 161 | though there is something in the echo area. */ |
| @@ -206,19 +215,19 @@ size_t num_input_events; | |||
| 206 | 215 | ||
| 207 | /* Value of num_nonmacro_input_events as of last auto save. */ | 216 | /* Value of num_nonmacro_input_events as of last auto save. */ |
| 208 | 217 | ||
| 209 | int last_auto_save; | 218 | static int last_auto_save; |
| 210 | 219 | ||
| 211 | /* This is like Vthis_command, except that commands never set it. */ | 220 | /* This is like Vthis_command, except that commands never set it. */ |
| 212 | Lisp_Object real_this_command; | 221 | Lisp_Object real_this_command; |
| 213 | 222 | ||
| 214 | /* The value of point when the last command was started. */ | 223 | /* The value of point when the last command was started. */ |
| 215 | EMACS_INT last_point_position; | 224 | static EMACS_INT last_point_position; |
| 216 | 225 | ||
| 217 | /* The buffer that was current when the last command was started. */ | 226 | /* The buffer that was current when the last command was started. */ |
| 218 | Lisp_Object last_point_position_buffer; | 227 | static Lisp_Object last_point_position_buffer; |
| 219 | 228 | ||
| 220 | /* The window that was selected when the last command was started. */ | 229 | /* The window that was selected when the last command was started. */ |
| 221 | Lisp_Object last_point_position_window; | 230 | static Lisp_Object last_point_position_window; |
| 222 | 231 | ||
| 223 | /* The frame in which the last input event occurred, or Qmacro if the | 232 | /* The frame in which the last input event occurred, or Qmacro if the |
| 224 | last event came from a macro. We use this to determine when to | 233 | last event came from a macro. We use this to determine when to |
| @@ -231,39 +240,40 @@ Lisp_Object internal_last_event_frame; | |||
| 231 | X Windows wants this for selection ownership. */ | 240 | X Windows wants this for selection ownership. */ |
| 232 | unsigned long last_event_timestamp; | 241 | unsigned long last_event_timestamp; |
| 233 | 242 | ||
| 234 | Lisp_Object Qx_set_selection, QPRIMARY, Qhandle_switch_frame; | 243 | static Lisp_Object Qx_set_selection, Qhandle_switch_frame; |
| 244 | Lisp_Object QPRIMARY; | ||
| 235 | 245 | ||
| 236 | Lisp_Object Qself_insert_command; | 246 | static Lisp_Object Qself_insert_command; |
| 237 | Lisp_Object Qforward_char; | 247 | static Lisp_Object Qforward_char; |
| 238 | Lisp_Object Qbackward_char; | 248 | static Lisp_Object Qbackward_char; |
| 239 | Lisp_Object Qundefined; | 249 | Lisp_Object Qundefined; |
| 240 | Lisp_Object Qtimer_event_handler; | 250 | static Lisp_Object Qtimer_event_handler; |
| 241 | 251 | ||
| 242 | /* read_key_sequence stores here the command definition of the | 252 | /* read_key_sequence stores here the command definition of the |
| 243 | key sequence that it reads. */ | 253 | key sequence that it reads. */ |
| 244 | Lisp_Object read_key_sequence_cmd; | 254 | static Lisp_Object read_key_sequence_cmd; |
| 245 | 255 | ||
| 246 | Lisp_Object Qinput_method_function; | 256 | static Lisp_Object Qinput_method_function; |
| 247 | 257 | ||
| 248 | Lisp_Object Qdeactivate_mark; | 258 | static Lisp_Object Qdeactivate_mark; |
| 249 | 259 | ||
| 250 | Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook; | 260 | Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook; |
| 251 | 261 | ||
| 252 | Lisp_Object Qecho_area_clear_hook; | 262 | static Lisp_Object Qecho_area_clear_hook; |
| 253 | 263 | ||
| 254 | /* Hooks to run before and after each command. */ | 264 | /* Hooks to run before and after each command. */ |
| 255 | Lisp_Object Qpre_command_hook; | 265 | static Lisp_Object Qpre_command_hook; |
| 256 | Lisp_Object Qpost_command_hook; | 266 | static Lisp_Object Qpost_command_hook; |
| 257 | 267 | ||
| 258 | Lisp_Object Qdeferred_action_function; | 268 | static Lisp_Object Qdeferred_action_function; |
| 259 | 269 | ||
| 260 | Lisp_Object Qinput_method_exit_on_first_char; | 270 | static Lisp_Object Qinput_method_exit_on_first_char; |
| 261 | Lisp_Object Qinput_method_use_echo_area; | 271 | static Lisp_Object Qinput_method_use_echo_area; |
| 262 | 272 | ||
| 263 | Lisp_Object Qhelp_form_show; | 273 | static Lisp_Object Qhelp_form_show; |
| 264 | 274 | ||
| 265 | /* File in which we write all commands we read. */ | 275 | /* File in which we write all commands we read. */ |
| 266 | FILE *dribble; | 276 | static FILE *dribble; |
| 267 | 277 | ||
| 268 | /* Nonzero if input is available. */ | 278 | /* Nonzero if input is available. */ |
| 269 | int input_pending; | 279 | int input_pending; |
| @@ -293,42 +303,49 @@ static struct input_event * volatile kbd_store_ptr; | |||
| 293 | at inopportune times. */ | 303 | at inopportune times. */ |
| 294 | 304 | ||
| 295 | /* Symbols to head events. */ | 305 | /* Symbols to head events. */ |
| 296 | Lisp_Object Qmouse_movement; | 306 | static Lisp_Object Qmouse_movement; |
| 297 | Lisp_Object Qscroll_bar_movement; | 307 | static Lisp_Object Qscroll_bar_movement; |
| 298 | Lisp_Object Qswitch_frame; | 308 | Lisp_Object Qswitch_frame; |
| 299 | Lisp_Object Qdelete_frame; | 309 | static Lisp_Object Qdelete_frame; |
| 300 | Lisp_Object Qiconify_frame; | 310 | static Lisp_Object Qiconify_frame; |
| 301 | Lisp_Object Qmake_frame_visible; | 311 | static Lisp_Object Qmake_frame_visible; |
| 302 | Lisp_Object Qselect_window; | 312 | static Lisp_Object Qselect_window; |
| 303 | Lisp_Object Qhelp_echo; | 313 | Lisp_Object Qhelp_echo; |
| 304 | 314 | ||
| 305 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | 315 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) |
| 306 | Lisp_Object Qmouse_fixup_help_message; | 316 | static Lisp_Object Qmouse_fixup_help_message; |
| 307 | #endif | 317 | #endif |
| 308 | 318 | ||
| 309 | /* Symbols to denote kinds of events. */ | 319 | /* Symbols to denote kinds of events. */ |
| 310 | Lisp_Object Qfunction_key; | 320 | static Lisp_Object Qfunction_key; |
| 311 | Lisp_Object Qmouse_click; | 321 | Lisp_Object Qmouse_click; |
| 312 | #if defined (WINDOWSNT) | 322 | #if defined (WINDOWSNT) |
| 313 | Lisp_Object Qlanguage_change; | 323 | Lisp_Object Qlanguage_change; |
| 314 | #endif | 324 | #endif |
| 315 | Lisp_Object Qdrag_n_drop; | 325 | static Lisp_Object Qdrag_n_drop; |
| 316 | Lisp_Object Qsave_session; | 326 | static Lisp_Object Qsave_session; |
| 317 | #ifdef HAVE_DBUS | 327 | #ifdef HAVE_DBUS |
| 318 | Lisp_Object Qdbus_event; | 328 | static Lisp_Object Qdbus_event; |
| 319 | #endif | 329 | #endif |
| 320 | Lisp_Object Qconfig_changed_event; | 330 | static Lisp_Object Qconfig_changed_event; |
| 321 | 331 | ||
| 322 | /* Lisp_Object Qmouse_movement; - also an event header */ | 332 | /* Lisp_Object Qmouse_movement; - also an event header */ |
| 323 | 333 | ||
| 324 | /* Properties of event headers. */ | 334 | /* Properties of event headers. */ |
| 325 | Lisp_Object Qevent_kind; | 335 | Lisp_Object Qevent_kind; |
| 326 | Lisp_Object Qevent_symbol_elements; | 336 | static Lisp_Object Qevent_symbol_elements; |
| 327 | 337 | ||
| 328 | /* menu and tool bar item parts */ | 338 | /* menu and tool bar item parts */ |
| 329 | Lisp_Object Qmenu_enable; | 339 | static Lisp_Object Qmenu_enable; |
| 330 | Lisp_Object QCenable, QCvisible, QChelp, QCfilter, QCkeys, QCkey_sequence; | 340 | static Lisp_Object QCenable, QCvisible, QChelp, QCkeys, QCkey_sequence; |
| 331 | Lisp_Object QCbutton, QCtoggle, QCradio, QClabel, QCvert_only; | 341 | Lisp_Object QCfilter; |
| 342 | |||
| 343 | /* Non-nil disable property on a command means | ||
| 344 | do not execute it; call disabled-command-function's value instead. */ | ||
| 345 | Lisp_Object QCtoggle, QCradio; | ||
| 346 | static Lisp_Object QCbutton, QClabel; | ||
| 347 | |||
| 348 | static Lisp_Object QCvert_only; | ||
| 332 | 349 | ||
| 333 | /* An event header symbol HEAD may have a property named | 350 | /* An event header symbol HEAD may have a property named |
| 334 | Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS); | 351 | Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS); |
| @@ -341,23 +358,24 @@ Lisp_Object Qevent_symbol_element_mask; | |||
| 341 | Qmodifier_cache, which is an alist mapping modifier masks onto | 358 | Qmodifier_cache, which is an alist mapping modifier masks onto |
| 342 | modified versions of BASE. If present, this helps speed up | 359 | modified versions of BASE. If present, this helps speed up |
| 343 | apply_modifiers. */ | 360 | apply_modifiers. */ |
| 344 | Lisp_Object Qmodifier_cache; | 361 | static Lisp_Object Qmodifier_cache; |
| 345 | 362 | ||
| 346 | /* Symbols to use for parts of windows. */ | 363 | /* Symbols to use for parts of windows. */ |
| 347 | Lisp_Object Qmode_line; | 364 | Lisp_Object Qmode_line; |
| 348 | Lisp_Object Qvertical_line; | 365 | Lisp_Object Qvertical_line; |
| 349 | Lisp_Object Qvertical_scroll_bar; | 366 | static Lisp_Object Qvertical_scroll_bar; |
| 350 | Lisp_Object Qmenu_bar; | 367 | Lisp_Object Qmenu_bar; |
| 351 | 368 | ||
| 352 | Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void); | 369 | static Lisp_Object recursive_edit_unwind (Lisp_Object buffer); |
| 353 | Lisp_Object Fthis_command_keys (void); | 370 | static Lisp_Object command_loop (void); |
| 354 | Lisp_Object Qextended_command_history; | 371 | static Lisp_Object Qextended_command_history; |
| 355 | EMACS_TIME timer_check (void); | 372 | EMACS_TIME timer_check (void); |
| 356 | 373 | ||
| 357 | static void record_menu_key (Lisp_Object c); | 374 | static void record_menu_key (Lisp_Object c); |
| 375 | static void echo_now (void); | ||
| 358 | static int echo_length (void); | 376 | static int echo_length (void); |
| 359 | 377 | ||
| 360 | Lisp_Object Qpolling_period; | 378 | static Lisp_Object Qpolling_period; |
| 361 | 379 | ||
| 362 | /* Incremented whenever a timer is run. */ | 380 | /* Incremented whenever a timer is run. */ |
| 363 | int timers_run; | 381 | int timers_run; |
| @@ -410,7 +428,7 @@ static EMACS_TIME timer_last_idleness_start_time; | |||
| 410 | #define READABLE_EVENTS_IGNORE_SQUEEZABLES (1 << 2) | 428 | #define READABLE_EVENTS_IGNORE_SQUEEZABLES (1 << 2) |
| 411 | 429 | ||
| 412 | /* Function for init_keyboard to call with no args (if nonzero). */ | 430 | /* Function for init_keyboard to call with no args (if nonzero). */ |
| 413 | void (*keyboard_init_hook) (void); | 431 | static void (*keyboard_init_hook) (void); |
| 414 | 432 | ||
| 415 | static int read_avail_input (int); | 433 | static int read_avail_input (int); |
| 416 | static void get_input_pending (int *, int); | 434 | static void get_input_pending (int *, int); |
| @@ -430,6 +448,7 @@ static Lisp_Object modify_event_symbol (EMACS_INT, unsigned, Lisp_Object, | |||
| 430 | Lisp_Object, const char *const *, | 448 | Lisp_Object, const char *const *, |
| 431 | Lisp_Object *, unsigned); | 449 | Lisp_Object *, unsigned); |
| 432 | static Lisp_Object make_lispy_switch_frame (Lisp_Object); | 450 | static Lisp_Object make_lispy_switch_frame (Lisp_Object); |
| 451 | static int help_char_p (Lisp_Object); | ||
| 433 | static void save_getcjmp (jmp_buf); | 452 | static void save_getcjmp (jmp_buf); |
| 434 | static void restore_getcjmp (jmp_buf); | 453 | static void restore_getcjmp (jmp_buf); |
| 435 | static Lisp_Object apply_modifiers (int, Lisp_Object); | 454 | static Lisp_Object apply_modifiers (int, Lisp_Object); |
| @@ -439,7 +458,10 @@ static void interrupt_signal (int signalnum); | |||
| 439 | #ifdef SIGIO | 458 | #ifdef SIGIO |
| 440 | static void input_available_signal (int signo); | 459 | static void input_available_signal (int signo); |
| 441 | #endif | 460 | #endif |
| 461 | static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object, | ||
| 462 | Lisp_Object); | ||
| 442 | static void handle_interrupt (void); | 463 | static void handle_interrupt (void); |
| 464 | static void quit_throw_to_read_char (void) NO_RETURN; | ||
| 443 | static void timer_start_idle (void); | 465 | static void timer_start_idle (void); |
| 444 | static void timer_stop_idle (void); | 466 | static void timer_stop_idle (void); |
| 445 | static void timer_resume_idle (void); | 467 | static void timer_resume_idle (void); |
| @@ -583,7 +605,7 @@ echo_dash (void) | |||
| 583 | /* Display the current echo string, and begin echoing if not already | 605 | /* Display the current echo string, and begin echoing if not already |
| 584 | doing so. */ | 606 | doing so. */ |
| 585 | 607 | ||
| 586 | void | 608 | static void |
| 587 | echo_now (void) | 609 | echo_now (void) |
| 588 | { | 610 | { |
| 589 | if (!current_kboard->immediate_echo) | 611 | if (!current_kboard->immediate_echo) |
| @@ -750,6 +772,7 @@ record_auto_save (void) | |||
| 750 | 772 | ||
| 751 | /* Make an auto save happen as soon as possible at command level. */ | 773 | /* Make an auto save happen as soon as possible at command level. */ |
| 752 | 774 | ||
| 775 | #ifdef SIGDANGER | ||
| 753 | void | 776 | void |
| 754 | force_auto_save_soon (void) | 777 | force_auto_save_soon (void) |
| 755 | { | 778 | { |
| @@ -757,6 +780,7 @@ force_auto_save_soon (void) | |||
| 757 | 780 | ||
| 758 | record_asynch_buffer_change (); | 781 | record_asynch_buffer_change (); |
| 759 | } | 782 | } |
| 783 | #endif | ||
| 760 | 784 | ||
| 761 | DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", | 785 | DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", |
| 762 | doc: /* Invoke the editor command loop recursively. | 786 | doc: /* Invoke the editor command loop recursively. |
| @@ -1079,8 +1103,8 @@ cmd_error_internal (Lisp_Object data, const char *context) | |||
| 1079 | } | 1103 | } |
| 1080 | 1104 | ||
| 1081 | Lisp_Object command_loop_1 (void); | 1105 | Lisp_Object command_loop_1 (void); |
| 1082 | Lisp_Object command_loop_2 (Lisp_Object); | 1106 | static Lisp_Object command_loop_2 (Lisp_Object); |
| 1083 | Lisp_Object top_level_1 (Lisp_Object); | 1107 | static Lisp_Object top_level_1 (Lisp_Object); |
| 1084 | 1108 | ||
| 1085 | /* Entry to editor-command-loop. | 1109 | /* Entry to editor-command-loop. |
| 1086 | This level has the catches for exiting/returning to editor command loop. | 1110 | This level has the catches for exiting/returning to editor command loop. |
| @@ -1170,7 +1194,7 @@ This also exits all active minibuffers. */) | |||
| 1170 | Fthrow (Qtop_level, Qnil); | 1194 | Fthrow (Qtop_level, Qnil); |
| 1171 | } | 1195 | } |
| 1172 | 1196 | ||
| 1173 | Lisp_Object Fexit_recursive_edit (void) NO_RETURN; | 1197 | static Lisp_Object Fexit_recursive_edit (void) NO_RETURN; |
| 1174 | DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "", | 1198 | DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "", |
| 1175 | doc: /* Exit from the innermost recursive edit or minibuffer. */) | 1199 | doc: /* Exit from the innermost recursive edit or minibuffer. */) |
| 1176 | (void) | 1200 | (void) |
| @@ -1181,7 +1205,7 @@ DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, | |||
| 1181 | error ("No recursive edit is in progress"); | 1205 | error ("No recursive edit is in progress"); |
| 1182 | } | 1206 | } |
| 1183 | 1207 | ||
| 1184 | Lisp_Object Fabort_recursive_edit (void) NO_RETURN; | 1208 | static Lisp_Object Fabort_recursive_edit (void) NO_RETURN; |
| 1185 | DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "", | 1209 | DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "", |
| 1186 | doc: /* Abort the command that requested this recursive edit or minibuffer input. */) | 1210 | doc: /* Abort the command that requested this recursive edit or minibuffer input. */) |
| 1187 | (void) | 1211 | (void) |
| @@ -1244,6 +1268,9 @@ usage: (track-mouse BODY...) */) | |||
| 1244 | If ignore_mouse_drag_p is non-zero, ignore (implicit) mouse movement | 1268 | If ignore_mouse_drag_p is non-zero, ignore (implicit) mouse movement |
| 1245 | after resizing the tool-bar window. */ | 1269 | after resizing the tool-bar window. */ |
| 1246 | 1270 | ||
| 1271 | #if !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS | ||
| 1272 | static | ||
| 1273 | #endif | ||
| 1247 | int ignore_mouse_drag_p; | 1274 | int ignore_mouse_drag_p; |
| 1248 | 1275 | ||
| 1249 | static FRAME_PTR | 1276 | static FRAME_PTR |
| @@ -1901,7 +1928,7 @@ int poll_suppress_count; | |||
| 1901 | 1928 | ||
| 1902 | /* Asynchronous timer for polling. */ | 1929 | /* Asynchronous timer for polling. */ |
| 1903 | 1930 | ||
| 1904 | struct atimer *poll_timer; | 1931 | static struct atimer *poll_timer; |
| 1905 | 1932 | ||
| 1906 | 1933 | ||
| 1907 | #ifdef POLL_FOR_INPUT | 1934 | #ifdef POLL_FOR_INPUT |
| @@ -2168,7 +2195,6 @@ show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object, | |||
| 2168 | 2195 | ||
| 2169 | /* Input of single characters from keyboard */ | 2196 | /* Input of single characters from keyboard */ |
| 2170 | 2197 | ||
| 2171 | Lisp_Object print_help (Lisp_Object object); | ||
| 2172 | static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, int *used_mouse_menu, | 2198 | static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, int *used_mouse_menu, |
| 2173 | struct timeval *end_time); | 2199 | struct timeval *end_time); |
| 2174 | static void record_char (Lisp_Object c); | 2200 | static void record_char (Lisp_Object c); |
| @@ -3162,7 +3188,7 @@ record_menu_key (Lisp_Object c) | |||
| 3162 | 3188 | ||
| 3163 | /* Return 1 if should recognize C as "the help character". */ | 3189 | /* Return 1 if should recognize C as "the help character". */ |
| 3164 | 3190 | ||
| 3165 | int | 3191 | static int |
| 3166 | help_char_p (Lisp_Object c) | 3192 | help_char_p (Lisp_Object c) |
| 3167 | { | 3193 | { |
| 3168 | Lisp_Object tail; | 3194 | Lisp_Object tail; |
| @@ -3311,17 +3337,6 @@ record_char (Lisp_Object c) | |||
| 3311 | } | 3337 | } |
| 3312 | } | 3338 | } |
| 3313 | 3339 | ||
| 3314 | Lisp_Object | ||
| 3315 | print_help (Lisp_Object object) | ||
| 3316 | { | ||
| 3317 | struct buffer *old = current_buffer; | ||
| 3318 | Fprinc (object, Qnil); | ||
| 3319 | set_buffer_internal (XBUFFER (Vstandard_output)); | ||
| 3320 | call0 (intern ("help-mode")); | ||
| 3321 | set_buffer_internal (old); | ||
| 3322 | return Qnil; | ||
| 3323 | } | ||
| 3324 | |||
| 3325 | /* Copy out or in the info on where C-g should throw to. | 3340 | /* Copy out or in the info on where C-g should throw to. |
| 3326 | This is used when running Lisp code from within get_char, | 3341 | This is used when running Lisp code from within get_char, |
| 3327 | in case get_char is called recursively. | 3342 | in case get_char is called recursively. |
| @@ -3413,7 +3428,7 @@ readable_events (int flags) | |||
| 3413 | } | 3428 | } |
| 3414 | 3429 | ||
| 3415 | /* Set this for debugging, to have a way to get out */ | 3430 | /* Set this for debugging, to have a way to get out */ |
| 3416 | int stop_character; | 3431 | int stop_character EXTERNALLY_VISIBLE; |
| 3417 | 3432 | ||
| 3418 | static KBOARD * | 3433 | static KBOARD * |
| 3419 | event_to_kboard (struct input_event *event) | 3434 | event_to_kboard (struct input_event *event) |
| @@ -4209,7 +4224,7 @@ timer_resume_idle (void) | |||
| 4209 | } | 4224 | } |
| 4210 | 4225 | ||
| 4211 | /* This is only for debugging. */ | 4226 | /* This is only for debugging. */ |
| 4212 | struct input_event last_timer_event; | 4227 | struct input_event last_timer_event EXTERNALLY_VISIBLE; |
| 4213 | 4228 | ||
| 4214 | /* List of elisp functions to call, delayed because they were generated in | 4229 | /* List of elisp functions to call, delayed because they were generated in |
| 4215 | a context where Elisp could not be safely run (e.g. redisplay, signal, | 4230 | a context where Elisp could not be safely run (e.g. redisplay, signal, |
| @@ -5017,7 +5032,7 @@ static const char *const iso_lispy_function_keys[] = | |||
| 5017 | 5032 | ||
| 5018 | #endif /* not HAVE_NTGUI */ | 5033 | #endif /* not HAVE_NTGUI */ |
| 5019 | 5034 | ||
| 5020 | Lisp_Object Vlispy_mouse_stem; | 5035 | static Lisp_Object Vlispy_mouse_stem; |
| 5021 | 5036 | ||
| 5022 | static const char *const lispy_wheel_names[] = | 5037 | static const char *const lispy_wheel_names[] = |
| 5023 | { | 5038 | { |
| @@ -5032,9 +5047,11 @@ static const char *const lispy_drag_n_drop_names[] = | |||
| 5032 | }; | 5047 | }; |
| 5033 | 5048 | ||
| 5034 | /* Scroll bar parts. */ | 5049 | /* Scroll bar parts. */ |
| 5035 | Lisp_Object Qabove_handle, Qhandle, Qbelow_handle; | 5050 | static Lisp_Object Qabove_handle, Qhandle, Qbelow_handle; |
| 5036 | Lisp_Object Qup, Qdown, Qbottom, Qend_scroll; | 5051 | Lisp_Object Qup, Qdown, Qbottom; |
| 5037 | Lisp_Object Qtop, Qratio; | 5052 | static Lisp_Object Qend_scroll; |
| 5053 | Lisp_Object Qtop; | ||
| 5054 | static Lisp_Object Qratio; | ||
| 5038 | 5055 | ||
| 5039 | /* An array of scroll bar parts, indexed by an enum scroll_bar_part value. */ | 5056 | /* An array of scroll bar parts, indexed by an enum scroll_bar_part value. */ |
| 5040 | static Lisp_Object *const scroll_bar_parts[] = { | 5057 | static Lisp_Object *const scroll_bar_parts[] = { |
| @@ -5065,7 +5082,7 @@ static unsigned long button_down_time; | |||
| 5065 | 5082 | ||
| 5066 | /* The number of clicks in this multiple-click. */ | 5083 | /* The number of clicks in this multiple-click. */ |
| 5067 | 5084 | ||
| 5068 | int double_click_count; | 5085 | static int double_click_count; |
| 5069 | 5086 | ||
| 5070 | /* X and Y are frame-relative coordinates for a click or wheel event. | 5087 | /* X and Y are frame-relative coordinates for a click or wheel event. |
| 5071 | Return a Lisp-style event list. */ | 5088 | Return a Lisp-style event list. */ |
| @@ -7889,8 +7906,8 @@ static int ntool_bar_items; | |||
| 7889 | 7906 | ||
| 7890 | /* The symbols `:image' and `:rtl'. */ | 7907 | /* The symbols `:image' and `:rtl'. */ |
| 7891 | 7908 | ||
| 7892 | Lisp_Object QCimage; | 7909 | static Lisp_Object QCimage; |
| 7893 | Lisp_Object Qrtl; | 7910 | static Lisp_Object Qrtl; |
| 7894 | 7911 | ||
| 7895 | /* Function prototypes. */ | 7912 | /* Function prototypes. */ |
| 7896 | 7913 | ||
| @@ -10934,7 +10951,7 @@ handle_interrupt (void) | |||
| 10934 | 10951 | ||
| 10935 | /* Handle a C-g by making read_char return C-g. */ | 10952 | /* Handle a C-g by making read_char return C-g. */ |
| 10936 | 10953 | ||
| 10937 | void | 10954 | static void |
| 10938 | quit_throw_to_read_char (void) | 10955 | quit_throw_to_read_char (void) |
| 10939 | { | 10956 | { |
| 10940 | sigfree (); | 10957 | sigfree (); |
| @@ -10962,7 +10979,8 @@ quit_throw_to_read_char (void) | |||
| 10962 | _longjmp (getcjmp, 1); | 10979 | _longjmp (getcjmp, 1); |
| 10963 | } | 10980 | } |
| 10964 | 10981 | ||
| 10965 | DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode, Sset_input_interrupt_mode, 1, 1, 0, | 10982 | DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode, |
| 10983 | Sset_input_interrupt_mode, 1, 1, 0, | ||
| 10966 | doc: /* Set interrupt mode of reading keyboard input. | 10984 | doc: /* Set interrupt mode of reading keyboard input. |
| 10967 | If INTERRUPT is non-nil, Emacs will use input interrupts; | 10985 | If INTERRUPT is non-nil, Emacs will use input interrupts; |
| 10968 | otherwise Emacs uses CBREAK mode. | 10986 | otherwise Emacs uses CBREAK mode. |