1. 27 Dec, 2003 3 commits
    • Karoly Lorentey's avatar
      Implemented automatic deletion of terminals. · 8303ba32
      Karoly Lorentey authored
      lisp/server.el (server-process-filter): Switch to the new terminal frame.
      src/frame.c (Fdelete_frame): Delete the tty if this was its the last frame.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-12
    • Karoly Lorentey's avatar
      Fully eliminated global tty state variables. · fca177d4
      Karoly Lorentey authored
      lib-src/emacsclient.c (main.c): Fix error message.
      lisp/frame.el (make-frame-on-tty): New function.
      lisp/server.el (server-process-filter): Notify emacsclient if there
      was on error during evaluation.
      src/cm.c: Fix remaining cases of direct Wcm references.
      src/dispextern.h: Updated prototypes.
      src/dispnew.c (Fredraw_frame): Fix set_terminal_modes call.
      (init_display): Remove reference to meta_key.
      src/frame.c (make_terminal_frame): Renamed first parameter to
      tty_name.  Call term_init before creating the frame.
      (Fmake_terminal_frame): Look up the `tty' and `tty-type' frame
      parameters from the currently selected terminal before the global
      (Fdelete_frame): Make sure that the new selected frame is live.
      src/keyboard.c (meta_key): Moved to struct tty_output.
      (read_avail_input): Fix C syntax.  Update references to meta_key.
      (Fsuspend_emacs): pass current tty to init_sys_modes via
      (Fset_input_mode): Update references to meta_key.
      (Fcurrent_input_mode): Ditto.
      src/sysdep.c (init_sys_modes): Updated old_tty and meta_key
      references.  Don't call set_terminal_modes, it needs termcap strings.
      (reset_sys_modes): Call tty_reset_terminal_modes instead of
      reset_terminal_modes.  Updated old_tty references.
      src/term.c: Massive updates throuout the file.
      (TS_*, TN_*): Moved to struct tty_output.
      (RPov, delete_in_insert_mode se_is_so, costs_set, insert_mode): Ditto.
      (standout_mode, specified_window, tty_cursor_hidden): Ditto.
      (tty_set_terminal_modes, tty_reset_terminal_modes): New functions.
      (turn_on_insert, turn_off_insert): Added tty parameter.
      (turn_on_highlight, turn_off_highlight, toggle_highlight): Added tty parameter.
      (tty_hide_cursor, tty_show_cursor): Ditto.
      (background_highlight, highlight_if_desired): Ditto.
      (tty_capable_p): Changed first parameter to tty_output.
      (term_init): Make sure top_frame is initialized.  Don't exit on errors
      if this would have been a secondary terminal.  Call set_terminal_modes
      on the end.
      (delete_tty): New function.
      (delete_tty_1): New function.
      (print_all_frames): New function, marginally useful for debugging.
      src/termchar.h (struct tty_output): Changed old_tty to be a pointer.
      Removed old_tty_valid member.  Added tty-specific variables from term.c.
      src/xfaces.c (Ftty_supports_face_attributes_p): Update for new
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-9
    • Karoly Lorentey's avatar
      Full support for multiple terminal I/O (with some rough edges). · 6548cf00
      Karoly Lorentey authored
      lib-src/emacsclient.c (emacs_pid): New variable.  
      (window_change): Forward the SIGWINCH signal to the Emacs process
      after copying the size parameters to the proxy terminal.
      (copy_from_to): New parameter (sigio), kill Emacs with SIGIO if it is
      (main): Set emacs_pid.
      lisp/server.el (server-process-filter): Send the pid of Emacs to emacsclient.
      src/cm.c: Added tty parameters to all functions and all Wcm macro calls.
      src/cm.h: Added tty parameters to all macros.   Updated function prototypes.
      (Wcm): Moved to struct tty_output.
      src/dispextern.h: Updated function prototypes.
      src/dispnew.c: Added tty parameters to all Wcm macro calls.
      (do_switch_frame): Make old frame obscured, not invisible, to solve
      problems with other-frame.
      (Wcm): Moved to struct tty_output.
      src/keyboard.c (read_avail_input): Select the frame corresponding to
      the tty that was read.  Slight rearrangement of tty loop.
      src/lisp.h (tabs_safe_p): Removed duplicate prototype.
      src/sysdep.c (hft_init, hft_reset): Added tty_output parameter.
      (discard_tty_input): Discard input from all ttys on APOLLO, too.
      Whatever it is.
      (narrow_foreground_group, widen_foreground_group): Added tty parameter
      (not really useful, the functions only work on the controlling tty.)
      (tabs_safe_p): Added tty parameter.
      src/term.c Added tty parameters to all Wcm macro calls.
      Standardised updating_frame vs. selected frame and tty_output access.
      (term_init): Allocate Wcm.
      (syms_of_term): Provide the `multi-tty' feature.
      src/termchar.h (struct tty_output): Added Wcm.
      src/xdisp.c (try_window_id): Make sure we use the tty device
      corresponding to the current frame.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-8
  2. 26 Dec, 2003 1 commit
    • Karoly Lorentey's avatar
      lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work. · 9628b887
      Karoly Lorentey authored
      (here): New variable.
      (decode_options): Use it.
      (ec_get_tty, ec_set_tty, init_tty, window_change, hang_up_signal): New functions.
      (window_change_signal, init_signals, reset_tty, init_pty, copy_from_to): Ditto.
      (pty_conversation): Ditto.
      (main): Use them.
      (master, pty_name, old_tty, tty, old_tty_valid, tty_erase_char): New variables.
      (flow_control, meta_key, _sobuf, in_conversation, quit_conversation): Ditto.
      lisp/server.el (server-process-filter): Added support for opening a new terminal frame.
      dispextern.h (get_frame_size): Renamed to get_tty_size, added tty_output parameter.
      dispnew.c (Fredraw_frame): fflush the current terminal instead of stdout.
      (direct_output_for_insert, direct_output_forward_char, update_frame_1): Ditto.
      (Fding, bitch_at_user): Ditto.
      (update_frame_1): Count pending output for current terminal instead of stdout.
      (window_change_signal): Resize all terminals.
      (change_frame_size): Don't resize all terminals to the same size.
      frame.c (Vterminal_frame): Removed.
      (syms_of_frame): Removed declaration of Vterminal_frame.
      (make_terminal_frame): Set the top frame of the terminal to the new frame.
      (Fmake_terminal_frame): Get a new frame size from get_tty_size, don't copy it.
      (do_switch_frame): Handle terminal frame visibility.
      (next_frame, prev_frame): Skip over frames on different terminals.
      frame.h (Vterminal_frame): Removed.
      keyboard.c (input_fd): Removed.
      (read_avail_input): Removed first argument from read_socket_hook.
      Try to read from each available tty, until one succeeds.
      (Fsuspend_emacs): Don't suspend if there are multiple terminals.
      lisp.h (get_frame_size): Removed superflous declaration.
      xterm.c (Xtread_socket): Removed first parameter.
      macterm.h (XTread_socket): Ditto.
      w32inevt.c (w32_console_read_socket): Ditto.
      w32term.c (w32_read_socket): Ditto.
      sysdep.c (input_fd): Removed.
      (change_input_fd): Removed.
      (discard_tty_input): Discard pending input on _all_ input descriptors.
      (stuff_char, tabs_safe_p): Use current terminal instead of input_fd.
      (init_baud_rate, request_sigio, unrequest_sigio): Ditto.
      (init_sys_modes, reset_sys_modes): Ditto.
      (narrow_foreground_group, widen_foreground_group): Use stdin.
      (init_sys_modes, reset_sys_modes): otty parameter renamed to tty_out.
      (get_frame_size): Renamed to get_tty_size, added tty_out parameter.
      term.c (read_socket_hook): Removed first parameter.
      (clear_end_of_line): Use updating_frame, if possible.
      (write_glyphs, insert_glyphs, ins_del_lines): Ditto.
      (term_init): Renamed get_frame_size to get_tty_size.
      termchar.h (struct tty_output): New entries: top_frame,
      termhooks.h (read_socket_hook): Removed first parameter.
      window.c (init_window_once): Removed reference to Vterminal_frame.
      xdisp.c (previous_terminal_frame): Moved to struct tty_output.
      (redisplay_internal): Updated to use previous_terminal_frame in tty_output.
      Allow for simultaneous refresh of multiple ttys.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-5
  3. 01 Sep, 2003 1 commit
  4. 25 Jul, 2003 1 commit
  5. 12 Apr, 2003 2 commits
  6. 10 Feb, 2003 1 commit
  7. 15 Jan, 2003 1 commit
  8. 13 Jan, 2003 2 commits
  9. 02 Nov, 2002 1 commit
  10. 29 Oct, 2002 1 commit
  11. 27 Sep, 2002 2 commits
  12. 25 Sep, 2002 1 commit
    • Stefan Monnier's avatar
      Use built-in network primitives. · 0c851d78
      Stefan Monnier authored
      (server-program, server-previous-string): Remove.
      (server-previous-strings): New var.
      (server-socket-name): New var.
      (server-log): Minor change to the output format.
      (server-sentinel): Clean up global state when a client disconnects.
      (server-unquote-arg): New fun.
      (server-start): Use server-socket-name and make-network-process.
      (server-process-filter): Now talks to the clients directly.
      Normalize file name after unquoting and decoding.
      (server-buffer-done): Just close the connection.
      (server-switch-buffer): Handle the case where all windows are
      dedicated or minibuffers.
  13. 18 Sep, 2002 2 commits
    • Stefan Monnier's avatar
      (server-done): Fix harmlessly wrong arg to save-buffer. · ca0c7250
      Stefan Monnier authored
      (server-switch-buffer): Only select a different window if
      next-buffer is non-nil.  Don't switch in a dedicated window.
      If next-buffer is already displayed, reuse that window.
    • Stefan Monnier's avatar
      (server-log): Add `client' arg. · 8b3e840e
      Stefan Monnier authored
      (server-start): Don't bother canceling the sentinel.
      (server-process-filter): Use replace-regexp-in-string and
      handle the new &n quoting.  Use push.  Use server-log's new arg.
      Don't output the C-x # message if `nowait'.
      (server-buffer-done): Use server-log's new arg.
  14. 15 Aug, 2002 1 commit
  15. 18 Dec, 2001 1 commit
  16. 15 Nov, 2001 1 commit
  17. 13 Nov, 2001 1 commit
  18. 11 Nov, 2001 1 commit
  19. 07 Sep, 2001 1 commit
  20. 20 Jul, 2001 1 commit
  21. 17 Jul, 2001 1 commit
  22. 15 Jul, 2001 1 commit
  23. 10 Jun, 2001 1 commit
  24. 09 Apr, 2001 1 commit
  25. 22 Feb, 2001 1 commit
  26. 21 Dec, 2000 1 commit
  27. 18 Dec, 2000 1 commit
  28. 07 Dec, 2000 1 commit
  29. 21 Aug, 2000 1 commit
    • Gerd Moellmann's avatar
      (server-kill-new-buffers): New user option. · c6a117f0
      Gerd Moellmann authored
      (server-existing-buffer): New buffer-local variable.
      (server-visit-files): When using an existing buffer, set
      server-existing-buffer to t.
      (server-buffer-done): If server-kill-new-buffers is t, kill the
      buffer, unless it was already present before visiting it with
      Emacs server.
  30. 03 Jul, 2000 1 commit
  31. 16 Aug, 1999 1 commit
  32. 13 Mar, 1999 1 commit
  33. 05 May, 1998 1 commit
    • Richard M. Stallman's avatar
      (server-buffer-done): Bind server-kill-buffer-running · 599f9a5c
      Richard M. Stallman authored
      around places that might kill the buffer.
      Do something reasonable if server-done-hook kills the buffer.
      (server-kill-buffer-running): Doc fix.
      (server-kill-buffer): Do nothing unless server-buffer-clients.
      (server-done): Doc fix.
      (server-buffer-done): Test of for-killing was backwards.
  34. 18 Aug, 1997 1 commit