Mercurial > emacs
diff src/keyboard.c @ 82991:2b26656ff804
MULTI_KBOARD support for ttys. Input-related bugfixes for X+tty sessions.
lib-src/emacsclient.c (pty_conversation): Fix errno check for read from fileno(in).
src/config.in: Unconditionally define MULTI_KBOARD.
src/frame.c (make_terminal_frame): Initialize f->kboard.
src/keyboard.c (cmd_error_internal): Don't kill Emacs if a Quit was
pressed on the tty of a X+tty session.
(read_avail_input): Initialize nread to zero. Abort if there is no
tty after a termcap read.
(interrupt_signal)[USG]: Always reset signal handler.
(init_keyboard): Always set signal handler for SIGINT/SIGQUIT if
noninteractive.
src/term.c (term_dummy_init): Initialize kboard to the initial_kboard.
(term_init): Free component structures of the initial tty. Clear xmalloced structures.
Moved rif initialization to syms_of_term.
(term_init)[MULTI_KBOARD]: Initialize tty->kboard.
(delete_tty)[MULTI_KBOARD]: Delete the keyboard.
(syms_of_term): Initialize tty_display_method_template.
src/termchar.h (tty_output)[MULTI_KBOARD]: Added kboard member.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-31
| author | Karoly Lorentey <lorentey@elte.hu> |
|---|---|
| date | Fri, 02 Jan 2004 02:54:17 +0000 |
| parents | 2ecd1f669db9 |
| children | 5de4189e659d |
line wrap: on
line diff
--- a/src/keyboard.c Fri Jan 02 01:15:26 2004 +0000 +++ b/src/keyboard.c Fri Jan 02 02:54:17 2004 +0000 @@ -1205,7 +1205,8 @@ running under a window system. */ || (!NILP (Vwindow_system) && !inhibit_window_system - && FRAME_TERMCAP_P (sf)) + && FRAME_TERMCAP_P (sf) + && !FRAME_TTY (sf)->type) /* XXX This is ugly. */ || noninteractive) { stream = Qexternal_debugging_output; @@ -6594,7 +6595,7 @@ { struct input_event buf[KBD_BUFFER_SIZE]; register int i; - int nread; + int nread = 0; for (i = 0; i < KBD_BUFFER_SIZE; i++) EVENT_INIT (buf[i]); @@ -6738,10 +6739,13 @@ #endif /* not MSDOS */ #endif /* not WINDOWSNT */ + if (!tty) + abort (); + /* Select frame corresponding to the active tty. Note that the value of selected_frame is not reliable here, redisplay tends to temporarily change it. But tty should always be non-NULL. */ - frame = (tty ? tty->top_frame : selected_frame); + frame = tty->top_frame; for (i = 0; i < nread; i++) { @@ -10245,13 +10249,10 @@ struct frame *sf = SELECTED_FRAME (); #if defined (USG) && !defined (POSIX_SIGNALS) - if (!read_socket_hook && NILP (Vwindow_system)) - { - /* USG systems forget handlers when they are used; - must reestablish each time */ - signal (SIGINT, interrupt_signal); - signal (SIGQUIT, interrupt_signal); - } + /* USG systems forget handlers when they are used; + must reestablish each time */ + signal (SIGINT, interrupt_signal); + signal (SIGQUIT, interrupt_signal); #endif /* USG */ cancel_echoing (); @@ -10626,7 +10627,7 @@ wipe_kboard (current_kboard); init_kboard (current_kboard); - if (!noninteractive && !read_socket_hook && NILP (Vwindow_system)) + if (!noninteractive) { signal (SIGINT, interrupt_signal); #if defined (HAVE_TERMIO) || defined (HAVE_TERMIOS)
