comparison src/keyboard.c @ 20365:cfba77fb710b

(echo_now, record_auto_save, cmd_error_internal, start_polling, stop_polling, bind_polling_period, timer_start_idle, timer_stop_idle, gobble_input, record_asynch_buffer_change, clear_input_pending, stuff_buffered_input, clear_waiting_for_input, quit_throw_to_read_char): Declare these as void. (Fsuspend_emacs): Delete unnecessary extern declaration for init_sys_mode.
author Kenichi Handa <handa@m17n.org>
date Thu, 27 Nov 1997 11:26:45 +0000
parents 3f3e7319341a
children 94bdb0d152a5
comparison
equal deleted inserted replaced
20364:8e58003a8d02 20365:cfba77fb710b
657 } 657 }
658 658
659 /* Display the current echo string, and begin echoing if not already 659 /* Display the current echo string, and begin echoing if not already
660 doing so. */ 660 doing so. */
661 661
662 void
662 echo_now () 663 echo_now ()
663 { 664 {
664 if (!current_kboard->immediate_echo) 665 if (!current_kboard->immediate_echo)
665 { 666 {
666 int i; 667 int i;
773 return unbind_to (count, Qnil); 774 return unbind_to (count, Qnil);
774 } 775 }
775 776
776 /* When an auto-save happens, record the "time", and don't do again soon. */ 777 /* When an auto-save happens, record the "time", and don't do again soon. */
777 778
779 void
778 record_auto_save () 780 record_auto_save ()
779 { 781 {
780 last_auto_save = num_nonmacro_input_events; 782 last_auto_save = num_nonmacro_input_events;
781 } 783 }
782 784
939 #endif 941 #endif
940 942
941 return make_number (0); 943 return make_number (0);
942 } 944 }
943 945
946 void
944 cmd_error_internal (data, context) 947 cmd_error_internal (data, context)
945 Lisp_Object data; 948 Lisp_Object data;
946 char *context; 949 char *context;
947 { 950 {
948 Lisp_Object stream; 951 Lisp_Object stream;
1548 #endif 1551 #endif
1549 1552
1550 /* Begin signals to poll for input, if they are appropriate. 1553 /* Begin signals to poll for input, if they are appropriate.
1551 This function is called unconditionally from various places. */ 1554 This function is called unconditionally from various places. */
1552 1555
1556 void
1553 start_polling () 1557 start_polling ()
1554 { 1558 {
1555 #ifdef POLL_FOR_INPUT 1559 #ifdef POLL_FOR_INPUT
1556 if (read_socket_hook && !interrupt_input) 1560 if (read_socket_hook && !interrupt_input)
1557 { 1561 {
1578 #endif 1582 #endif
1579 } 1583 }
1580 1584
1581 /* Turn off polling. */ 1585 /* Turn off polling. */
1582 1586
1587 void
1583 stop_polling () 1588 stop_polling ()
1584 { 1589 {
1585 #ifdef POLL_FOR_INPUT 1590 #ifdef POLL_FOR_INPUT
1586 if (read_socket_hook && !interrupt_input) 1591 if (read_socket_hook && !interrupt_input)
1587 { 1592 {
1617 } 1622 }
1618 1623
1619 /* Bind polling_period to a value at least N. 1624 /* Bind polling_period to a value at least N.
1620 But don't decrease it. */ 1625 But don't decrease it. */
1621 1626
1627 void
1622 bind_polling_period (n) 1628 bind_polling_period (n)
1623 int n; 1629 int n;
1624 { 1630 {
1625 #ifdef POLL_FOR_INPUT 1631 #ifdef POLL_FOR_INPUT
1626 int new = polling_period; 1632 int new = polling_period;
3022 static EMACS_TIME timer_idleness_start_time; 3028 static EMACS_TIME timer_idleness_start_time;
3023 3029
3024 /* Record the start of when Emacs is idle, 3030 /* Record the start of when Emacs is idle,
3025 for the sake of running idle-time timers. */ 3031 for the sake of running idle-time timers. */
3026 3032
3033 void
3027 timer_start_idle () 3034 timer_start_idle ()
3028 { 3035 {
3029 Lisp_Object timers; 3036 Lisp_Object timers;
3030 3037
3031 /* If we are already in the idle state, do nothing. */ 3038 /* If we are already in the idle state, do nothing. */
3047 } 3054 }
3048 } 3055 }
3049 3056
3050 /* Record that Emacs is no longer idle, so stop running idle-time timers. */ 3057 /* Record that Emacs is no longer idle, so stop running idle-time timers. */
3051 3058
3059 void
3052 timer_stop_idle () 3060 timer_stop_idle ()
3053 { 3061 {
3054 EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1); 3062 EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1);
3055 } 3063 }
3056 3064
4910 *addr = !NILP (Vquit_flag) || readable_events (do_timers_now); 4918 *addr = !NILP (Vquit_flag) || readable_events (do_timers_now);
4911 } 4919 }
4912 4920
4913 /* Interface to read_avail_input, blocking SIGIO or SIGALRM if necessary. */ 4921 /* Interface to read_avail_input, blocking SIGIO or SIGALRM if necessary. */
4914 4922
4915 int 4923 void
4916 gobble_input (expected) 4924 gobble_input (expected)
4917 int expected; 4925 int expected;
4918 { 4926 {
4919 #ifndef VMS 4927 #ifndef VMS
4920 #ifdef SIGIO 4928 #ifdef SIGIO
4942 } 4950 }
4943 4951
4944 /* Put a buffer_switch_event in the buffer 4952 /* Put a buffer_switch_event in the buffer
4945 so that read_key_sequence will notice the new current buffer. */ 4953 so that read_key_sequence will notice the new current buffer. */
4946 4954
4955 void
4947 record_asynch_buffer_change () 4956 record_asynch_buffer_change ()
4948 { 4957 {
4949 struct input_event event; 4958 struct input_event event;
4950 Lisp_Object tem; 4959 Lisp_Object tem;
4951 4960
7353 } 7362 }
7354 7363
7355 /* This is called in some cases before a possible quit. 7364 /* This is called in some cases before a possible quit.
7356 It cases the next call to detect_input_pending to recompute input_pending. 7365 It cases the next call to detect_input_pending to recompute input_pending.
7357 So calling this function unnecessarily can't do any harm. */ 7366 So calling this function unnecessarily can't do any harm. */
7367
7368 void
7358 clear_input_pending () 7369 clear_input_pending ()
7359 { 7370 {
7360 input_pending = 0; 7371 input_pending = 0;
7361 } 7372 }
7362 7373
7561 } 7572 }
7562 7573
7563 /* If STUFFSTRING is a string, stuff its contents as pending terminal input. 7574 /* If STUFFSTRING is a string, stuff its contents as pending terminal input.
7564 Then in any case stuff anything Emacs has read ahead and not used. */ 7575 Then in any case stuff anything Emacs has read ahead and not used. */
7565 7576
7577 void
7566 stuff_buffered_input (stuffstring) 7578 stuff_buffered_input (stuffstring)
7567 Lisp_Object stuffstring; 7579 Lisp_Object stuffstring;
7568 { 7580 {
7569 /* stuff_char works only in BSD, versions 4.2 and up. */ 7581 /* stuff_char works only in BSD, versions 4.2 and up. */
7570 #ifdef BSD_SYSTEM 7582 #ifdef BSD_SYSTEM
7612 make it run again now, to avoid timing error. */ 7624 make it run again now, to avoid timing error. */
7613 if (!NILP (Vquit_flag)) 7625 if (!NILP (Vquit_flag))
7614 quit_throw_to_read_char (); 7626 quit_throw_to_read_char ();
7615 } 7627 }
7616 7628
7629 void
7617 clear_waiting_for_input () 7630 clear_waiting_for_input ()
7618 { 7631 {
7619 /* Tell interrupt_signal not to throw back to read_char, */ 7632 /* Tell interrupt_signal not to throw back to read_char, */
7620 waiting_for_input = 0; 7633 waiting_for_input = 0;
7621 input_available_clear_time = 0; 7634 input_available_clear_time = 0;
7766 errno = old_errno; 7779 errno = old_errno;
7767 } 7780 }
7768 7781
7769 /* Handle a C-g by making read_char return C-g. */ 7782 /* Handle a C-g by making read_char return C-g. */
7770 7783
7784 void
7771 quit_throw_to_read_char () 7785 quit_throw_to_read_char ()
7772 { 7786 {
7773 quit_error_check (); 7787 quit_error_check ();
7774 sigfree (); 7788 sigfree ();
7775 /* Prevent another signal from doing this before we finish. */ 7789 /* Prevent another signal from doing this before we finish. */