Merged in changes from CVS trunk.
authorKaroly Lorentey <lorentey@elte.hu>
Thu, 23 Dec 2004 16:43:51 +0000 (16:43 +0000)
committerKaroly Lorentey <lorentey@elte.hu>
Thu, 23 Dec 2004 16:43:51 +0000 (16:43 +0000)
Patches applied:

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-726
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-727
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-728
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-729
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-730
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-731
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-732
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-733
   Update from CVS: man/calc.texi: Fix some TeX definitions.

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-734
   Merge from gnus--rel--5.10

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-735
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-736
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-737
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-738
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-739
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-740
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-741
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-742
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-743
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-744
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-745
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-746
   Update from CVS

 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-75
   Merge from emacs--cvs-trunk--0

 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-76
   Update from CVS

 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-77
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-277

23 files changed:
1  2 
etc/TODO
lisp/bindings.el
lisp/faces.el
lisp/files.el
lisp/simple.el
lisp/subr.el
src/alloc.c
src/dispnew.c
src/emacs.c
src/fileio.c
src/indent.c
src/keyboard.c
src/lisp.h
src/macterm.c
src/minibuf.c
src/process.c
src/sysdep.c
src/syssignal.h
src/term.c
src/w32term.c
src/xdisp.c
src/xselect.c
src/xterm.c

diff --cc etc/TODO
Simple merge
Simple merge
diff --cc lisp/faces.el
Simple merge
diff --cc lisp/files.el
Simple merge
diff --cc lisp/simple.el
Simple merge
diff --cc lisp/subr.el
Simple merge
diff --cc src/alloc.c
Simple merge
diff --cc src/dispnew.c
@@@ -6003,32 -5994,31 +6003,34 @@@ window_change_signal (signalnum) /* If 
  #endif
    int old_errno = errno;
  
 -  get_frame_size (&width, &height);
 +  struct tty_display_info *tty;
 +
+   signal (SIGWINCH, window_change_signal);
+   SIGNAL_THREAD_CHECK (signalnum);
 +  /* The frame size change obviously applies to a single
 +     termcap-controlled terminal, but we can't decide which.
 +     Therefore, we resize the frames corresponding to each tty.
 +  */
 +  for (tty = tty_list; tty; tty = tty->next) {
  
 -  /* The frame size change obviously applies to a termcap-controlled
 -     frame.  Find such a frame in the list, and assume it's the only
 -     one (since the redisplay code always writes to stdout, not a
 -     FILE * specified in the frame structure).  Record the new size,
 -     but don't reallocate the data structures now.  Let that be done
 -     later outside of the signal handler.  */
 +    if (! tty->term_initted)
 +      continue;
  
 -  {
 -    Lisp_Object tail, frame;
 -
 -    FOR_EACH_FRAME (tail, frame)
 -      {
 -      if (FRAME_TERMCAP_P (XFRAME (frame)))
 -        {
 -          change_frame_size (XFRAME (frame), height, width, 0, 1, 0);
 -          break;
 -        }
 -      }
 +    get_tty_size (fileno (tty->input), &width, &height);
 +    
 +    {
 +      Lisp_Object tail, frame;
 +      
 +      FOR_EACH_FRAME (tail, frame)
 +        if (FRAME_TERMCAP_P (XFRAME (frame)) && FRAME_TTY (XFRAME (frame)) == tty)
 +          /* Record the new sizes, but don't reallocate the data
 +             structures now.  Let that be done later outside of the
 +             signal handler.  */
 +          change_frame_size (XFRAME (frame), height, width, 0, 1, 0);
 +    }
    }
 -
 +  
-   signal (SIGWINCH, window_change_signal);
    errno = old_errno;
  }
  #endif /* SIGWINCH */
diff --cc src/emacs.c
Simple merge
diff --cc src/fileio.c
Simple merge
diff --cc src/indent.c
Simple merge
diff --cc src/keyboard.c
@@@ -10327,61 -10249,24 +10318,62 @@@ static SIGTYP
  interrupt_signal (signalnum)  /* If we don't have an argument, */
       int signalnum;           /* some compilers complain in signal calls. */
  {
 -  char c;
    /* Must preserve main program's value of errno.  */
    int old_errno = errno;
 -  struct frame *sf = SELECTED_FRAME ();
 +  struct display *display;
  
  #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);
 +#endif /* USG */
 +
 +  /* See if we have an active display on our controlling terminal. */
 +  display = get_named_tty_display (NULL);
 +  if (!display)
      {
 -      /* USG systems forget handlers when they are used;
 -       must reestablish each time */
 -      signal (SIGINT, interrupt_signal);
 -      signal (SIGQUIT, interrupt_signal);
 +      /* If there are no frames there, let's pretend that we are a
 +         well-behaving UN*X program and quit. */
 +      fatal_error_signal (SIGTERM);
      }
 -#endif /* USG */
 +  else
 +    {
 +      /* Otherwise, the SIGINT was probably generated by C-g.  */
 +
 +      /* Set internal_last_event_frame to the top frame of the
 +         controlling tty, if we have a frame there.  We disable the
 +         interrupt key on secondary ttys, so the SIGINT must have come
 +         from the controlling tty.  */
 +      internal_last_event_frame = display->display_info.tty->top_frame;
 +
 +      handle_interrupt ();
 +    }
 +
 +  errno = old_errno;
 +}
 +
 +/* This routine is called at interrupt level in response to C-g.
 +
 +   It is called from the SIGINT handler or kbd_buffer_store_event.
 +
 +   If `waiting_for_input' is non zero, then unless `echoing' is
 +   nonzero, immediately throw back to read_char.
 +
 +   Otherwise it sets the Lisp variable quit-flag not-nil.  This causes
 +   eval to throw, when it gets a chance.  If quit-flag is already
 +   non-nil, it stops the job right away. */
 +
 +static void
 +handle_interrupt ()
 +{
 +  char c;
 +  struct frame *sf = SELECTED_FRAME ();
  
+   SIGNAL_THREAD_CHECK (signalnum);
    cancel_echoing ();
  
 +  /* XXX This code needs to be revised for multi-tty support. */
    if (!NILP (Vquit_flag)
        && (FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf)))
      {
diff --cc src/lisp.h
Simple merge
diff --cc src/macterm.c
Simple merge
diff --cc src/minibuf.c
Simple merge
diff --cc src/process.c
Simple merge
diff --cc src/sysdep.c
Simple merge
diff --cc src/syssignal.h
Simple merge
diff --cc src/term.c
Simple merge
diff --cc src/w32term.c
Simple merge
diff --cc src/xdisp.c
Simple merge
diff --cc src/xselect.c
Simple merge
diff --cc src/xterm.c
Simple merge