1. 27 May, 2004 1 commit
  2. 23 May, 2004 1 commit
  3. 18 May, 2004 2 commits
  4. 08 May, 2004 1 commit
    • Karoly Lorentey's avatar
      Fixed environment variable handling during terminal initialization. · 2cd1371d
      Karoly Lorentey authored
      lisp/server.el (server-getenv): New inline function.
      
      lisp/term/rxvt.el (rxvt-set-background-mode): Use server-getenv
      instead of getenv.
      lisp/term/x-win.el (x-initialize-window-system): Ditto.
      lisp/term/xterm.el (xterm-rxvt-set-background-mode): Ditto.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-158
      2cd1371d
  5. 23 Apr, 2004 1 commit
  6. 18 Apr, 2004 2 commits
    • Karoly Lorentey's avatar
      Fix frame parameter handling in server.el. · 54021676
      Karoly Lorentey authored
      lisp/server.el (server-process-filter): Work around make-frame
      frame parameter bogosity by using modify-frame-parameters.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-145
      54021676
    • Karoly Lorentey's avatar
      Another server.el overhaul. · 9002956f
      Karoly Lorentey authored
      lib-src/emacsclient.c (xstrdup): New function.
      (quote_argument): Use xmalloc, not malloc.
      (main): Send environment variable values.
      
      lisp/server.el (server-clients): Documentation update.
      (server-ttys, server-frames): Removed.
      (server-client, server-client-get, server-client-set)
      (server-clients-with, server-add-client)
      (server-delete-client): New functions.
      (server-sentinel, server-handle-suspend-tty)
      (server-handle-delete-tty, server-handle-delete-frame)
      (server-start, server-process-filter, server-visit-files)
      (server-buffer-done, server-kill-buffer-query-function)
      (server-kill-emacs-query-function, server-switch-buffer): Use them.
      (server-log): Handle both kinds of client references.
      (server-start): Set up all hooks here.
      (server-process-filter): Cleanup.  Store version in client.
      Handle -env commands for passing environment variable values.
      (server-buffer-done): Don't close clients that were created bufferless.
      (server-switch-buffer): Only look at frameless clients.
      Don't switch away from current buffer if there is no next-buffer.
      (server-unload-hook): Remove frame/tty hooks, too.
      
      lisp/server.el (server-quote-arg, server-unquote-arg)
      (server-process-filter, server-kill-buffer-query-function)
      (server-kill-emacs-query-function): Doc update.
      (server-buffer-done, server-switch-buffer): Use buffer-live-p, not
      buffer-name.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-143
      9002956f
  7. 17 Apr, 2004 1 commit
  8. 13 Apr, 2004 1 commit
  9. 26 Mar, 2004 1 commit
    • Karoly Lorentey's avatar
      Fix cut'n'paste during a multi-display session (Mark Plaksin, Robert Chassell). · 026ad6ba
      Karoly Lorentey authored
      lisp/simple.el: Make interprogram-cut-function and
      interprogram-paste-function frame-local.  (Reported by Mark Plaksin
      and Robert Chassell).
      
      lisp/faces.el (x-create-frame-with-faces)
      (tty-create-frame-with-faces): Set the interprogram-cut-function and
      interprogram-paste-function frame parameters.
      
      lisp/x-win.el (x-initialize-window-system): Don't set
      interprogram-cut-function and interprogram-paste-function.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-124
      026ad6ba
  10. 11 Mar, 2004 2 commits
    • Karoly Lorentey's avatar
      README updates. · cd5355f9
      Karoly Lorentey authored
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-116
      cd5355f9
    • Karoly Lorentey's avatar
      Fix background-mode on terminal frames (Dan Nicolaescu). · 2666355c
      Karoly Lorentey authored
      lisp/faces.el (frame-set-background-mode): Guess the background mode
      on terminal frames from the termcap type string.
      (tty-create-frame-with-faces): Switch to the new frame during its setup.
      Load the customization library corresponding to the terminal type of the
      newly created frame.  (Reported by Dan Nicolaescu <dann at ics dot uci dot edu>.)
      
      lisp/startup.el (normal-top-level): Moved background-mode heuristic to
      frame-set-background-mode.
      
      src/dispnew.c (init_display): Update the tty-type frame parameter of
      the initial terminal frame.
      
      src/frame.h (Qtty, Qtty_type): New externs.
      
      src/term.c (term_init): Update comments.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-114
      2666355c
  11. 06 Mar, 2004 1 commit
  12. 02 Mar, 2004 1 commit
  13. 28 Feb, 2004 1 commit
    • Karoly Lorentey's avatar
      Implemented suspending of emacsclient frames. · 0b0d3e0b
      Karoly Lorentey authored
      lib-src/emacsclient.c (quote_file_name): Renamed to quote_argument.
      (unquote_argument, handle_sigcont, handle_sigtstp): New functions.
      (out, in): New global variables for communicating with the Emacs process.
      (init_signals): Set up handlers for SIGCONT, SIGTSTP and SIGTTOU.
      (main): Changed out and in to global variables.  Prepend `-eval' or
      '-file' to each argument.  Use fsync to force sending the strings to Emacs.
      Removed obsolete -bad-version code.  Support the -suspend command.
      Cleaned up newline handling.
      
      lisp/frame.el (suspend-frame): New function.
      Substitute key definition of suspend-emacs with suspend-frame.
      
      lisp/server.el (server-log): Cosmetic change in log format.
      (server-handle-delete-tty, server-handle-delete-frame): Added logging.
      (server-handle-suspend-tty, server-quote-arg): New functions.
      (server-start): Install server-handle-suspend-tty.
      (server-process-filter): Reorganized source code for clarity.
      Implemented -resume, -suspend and -ignore commands.
      
      lisp/term/x-win.el (x-initialize-window-system): Don't change the
      binding of C-z.
      
      src/cm.c: Replaced TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT calls with
      their macro expansion.
      src/dispnew.c: Ditto.
      src/frame.c: Ditto.
      src/keyboard.c: Ditto.
      src/sysdep.c: Ditto.
      
      src/keyboard.c (tty_read_avail_input): Don't read if the terminal is
      suspended.
      src/sysdep.c (discard_tty_input, init_sys_modes, reset_sys_modes): Ditto.
      src/term.c (tty_set_terminal_modes, tty_reset_terminal_modes): Ditto.
      
      src/term.c (Vsuspend_tty_functions, Vresume_tty_functions): New hooks.
      (syms_of_term): Defvar them.
      (term_init): Don't allow opening a new frame on a suspended tty device.
      (Fsuspend_tty, Fresume_tty): New functions.
      (syms_of_term): Defsubr them.
      
      src/termchar.c (struct tty_display_info): Update documentation of
      input and output.
      (TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT): Removed.
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-105
      0b0d3e0b
  14. 27 Feb, 2004 2 commits
  15. 25 Feb, 2004 1 commit
  16. 20 Feb, 2004 2 commits
    • Karoly Lorentey's avatar
      README updates. · aaaf7fe1
      Karoly Lorentey authored
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-86
      aaaf7fe1
    • Karoly Lorentey's avatar
      Changed emacsclient to open new frames by default. · e5299d8d
      Karoly Lorentey authored
      lib-src/emacsclient.c (decode_options): Handle the case when $DISPLAY
      is an empty string.  Set window_system or tty to one by default,
      depending on if there is a valid display.
      (longopts, decode_options, print_help_and_exit): Removed -w, added -c.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-85
      e5299d8d
  17. 10 Feb, 2004 1 commit
  18. 08 Feb, 2004 1 commit
    • Karoly Lorentey's avatar
      Don't hang on the tty if called from a shell script. · 4edd8a5c
      Karoly Lorentey authored
      src/sysdep.c (narrow_foreground_group): Set the process group to
      inherited_pgroup before calling EMACS_SET_TTY_PGRP.  Removed confusing
      inherited_pgroup initialization (it is done in emacs.c).  (Reported by
      Istvan Marko <mi-mtty at kismala dot com>.)
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-75
      4edd8a5c
  19. 02 Feb, 2004 1 commit
    • Karoly Lorentey's avatar
      Fix the case when emacsclient is run on Emacs's controlling tty. · 0c72d684
      Karoly Lorentey authored
      src/term.c (O_NOCTTY): Make sure it's defined.
      (no_controlling_tty): New variable.
      (init_initial_display, mark_ttys): Remove unused variable.
      (term_init): Check that the given filename is a terminal device.
      Dissociate the controlling terminal if we reopen it for other purposes.
      (Reported by Dan Nicolaescu <dann at ics dot uci dot edu>.
      (Fdelete_tty): Return nil.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-72
      0c72d684
  20. 26 Jan, 2004 1 commit
  21. 24 Jan, 2004 2 commits
    • Karoly Lorentey's avatar
      Fixed interactive temacs. · 3bbdbec9
      Karoly Lorentey authored
      src/xdisp.c (init_iterator): Always initialize the face cache if it's NULL.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-64
      3bbdbec9
    • Karoly Lorentey's avatar
      Set the keyboard of the initial frame correctly. · 2441679b
      Karoly Lorentey authored
      src/dispnew.c (init_display)[MULTI_KBOARD]: Change the kboard of the
      initial frame to that of the tty.  (Fixes --eval bug reported by
      Romain Francoise.)
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-63
      2441679b
  22. 23 Jan, 2004 1 commit
    • Karoly Lorentey's avatar
      Fixed tty faces during combo sessions. Plus other assorted bugfixes. · d448e982
      Karoly Lorentey authored
      lisp/startup.el (command-line): Always call tty-register-default-colors.
      
      src/dispextern.h (delete_tty): Added missing prototype.
      
      src/keyboard.c (read_avail_input): Close display gracefully if needed.
      Kill Emacs if the last display is to be closed.
      (tty_read_avail_input): Don't call delete_tty and don't signal hangup here;
      return -2 instead to indicate the non-transient failure to read_avail_input.
      
      src/term.c (delete_tty): Removed superflous wiping of the deleted
      frames' output_data field.
      (delete_display): Check for and close live frames that are still on the display.
      src/termhooks.h (read_socket_hook, delete_display_hook): Added detailed comment.
      src/xfaces.c (realize_face): Create a dummy face for the initial frame.
      (Reported by Robert J. Chassell (bob at rattlenake dot com).)
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-61
      d448e982
  23. 22 Jan, 2004 2 commits
    • Karoly Lorentey's avatar
      Added note about the commit mailing list. · 6c3d443b
      Karoly Lorentey authored
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-60
      6c3d443b
    • Karoly Lorentey's avatar
      Romain Francoise's and Ami Fischman's bugfixes. · e9cda827
      Karoly Lorentey authored
      src/term.c (create_tty_output): Fix syntax error.  Reported by Ami
      Fischman (ami at fischman dot org).
      
      lisp/loadup.el: Load term/x-win.el if X is available.
      
      lisp/startup.el (handle-args-function-alist)
      (window-system-initialization-alist): New variables.
      (command-line): Don't load term/x-win.el, use the above variables.
      
      lisp/x-win.el: (x-initialize-window-system): New function, move X
      initialization here.
      (x-initialized): New variable.
      
      lisp/frame.el (make-frame-on-display): Don't initialize X twice, and
      make sure to pass the correct display parameter to x-open-connection.
      Reported by Romain Francoise (romain at orebokech dot com).
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-58
      e9cda827
  24. 11 Jan, 2004 3 commits
    • Karoly Lorentey's avatar
      Support for opening X frames from a tty session. · 2246281f
      Karoly Lorentey authored
      lisp/cus-face.el (custom-declare-face): Handle multiple concurrent
      display methods correctly.
      
      lisp/faces.el (x-create-frame-with-faces): Set the window-system frame
      parameter instead of frame-creation-function.
      (tty-create-frame-with-faces): Ditto.
      
      lisp/frame.el (frame-creation-function): Removed.
      (frame-creation-function-alist): New variable.
      (frame-initialize): Use initial-window-system instead of window-system.
      Add window-system parameter to initial-frame-alist.
      Removed tty initialization, it was moved to frame-creation-function-alist.
      (frame-notice-user-settings): Use initial-window-system instead of window-system.
      (make-frame-on-display): Make sure term/x-win is loaded.  Added
      window-system parameter for make-frame.
      (make-frame-on-tty): Removed unnecessary autoload declaration.  Added
      window-system parameter for make-frame.
      (make-frame): Use frame-creation-function-alist to determine the
      function to use depending on the specified window system.
      (select-frame-by-name): Use the window-system function instead of the
      variable.
      
      lisp/startup.el (window-system):  New variable (previously built-in,
      now frame-local).
      (normal-top-level, command-line): Use initial-window-system instead
      of window-system.
      
      lisp/loadup.el:  Load startup.el before faces.el, for the
      window-system variable.
      
      lisp/term/x-win.el: Check for the x-create-frame function instead of
      window-system to see if X is available.  Don't exit Emacs if the
      display can not be opened when X is not the initial display method.
      Set up frame-creation-function-alist instead of
      frame-creation-function.  Provide the x-win feature.
      
      src/dispnew.c (Vwindow_system): Renamed to Vinitial_window_system.
      (init_display, syms_of_display): Updated to use Vinitial_window_system
      instead of Vwindow_system.
      
      src/emacs.c (shut_down_emacs): Updated to use Vinitial_window_system
      instead of Vwindow_system.
      
      src/keyboard.c (Fset_input_mode): Call reset_all_sys_modes, not
      reset_sys_modes.  Ditto for init_all_sys_modes.  Process the quit
      parameter correctly.
      
      src/sysdep.c (init_sys_modes, reset_sys_modes): Unconditionally set up
      the terminal.  We don't get called if there is nothing to do anymore.
      (sys_select): Use Vinitial_window_system, not Vwindow_system.
      
      src/window.h (Vwindow_system): Renamed to Vinitial_window_system.
      
      src/xfns.c (Fx_create_frame): Don't check_x.  We initialize it anyway.
      (x_display_info_for_name, Fx_open_connection): Don't look at
      Vinitial_window_system.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-54
      2246281f
    • Karoly Lorentey's avatar
      Don't select on stdin unconditionally. · c0707982
      Karoly Lorentey authored
      src/process.c (init_process): Don't add stdin to input_wait_mask.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-53
      c0707982
    • Karoly Lorentey's avatar
      Fix C-g handling with multiple ttys. · 4ca927b4
      Karoly Lorentey authored
      src/sysdep.c (init_sys_modes): Disable interrupt and quit keys on
      secondary terminals.  Added a big fat comment about this.
      
      lib-src/emacsclient.c (init_signals): Don't pass SIGINT and SIGQUIT to Emacs.
      
      src/keyboard.c (interrupt_signal): Exit Emacs if there are no frames
      on the controlling tty.  Otherwise set internal_last_event_frame to
      the controlling tty's top frame.
      
      src/term.c (ring_bell, tty_ring_bell): Don't look at updating_frame.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-52
      4ca927b4
  25. 10 Jan, 2004 1 commit
    • Karoly Lorentey's avatar
      Numerous bugfixes and small improvements. · 114a8b8c
      Karoly Lorentey authored
      lisp/bindings.el (mode-line-frame-identification): Use %T, not %F.
      
      lisp/faces.el (x-create-frame-with-faces): Added
      frame-creation-function parameter.
      (tty-create-frame-with-faces): Ditto.
      
      lisp/frame.el (frame-creation-function): Make it frame-local.
      (select-frame-set-input-focus): Use the window-system function, not
      the variable.
      
      lisp/server.el (server-handle-delete-tty): Make sure the client
      process is removed from server-clients after the delete-process call.
      It seems that the sentinel is not called.  Added docs.
      (server-process-filter): Immediately add the client to server-clients
      when a new termcap frame is created.  Fixed a case of `not' called
      with two parameters.  Ignore errors while sending the evaluation
      result back to the client.
      (server-kill-buffer-query-function): Don't ask the user if the server
      process is already dead.
      
      lisp/term/x-win.el: Don't change mode-line-frame-identification.
      
      src/buffer.c (syms_of_buffer): Added %T to the docs of mode-line-format.
      
      src/dispnew.c (init_display): Increment the reference count of the new
      termcap display.
      
      src/frame.c (make_terminal_frame): Set the old top frame's visibility
      to `obscured'.
      (Fmake_terminal_frame): Look at the current termcap display's name,
      not just the similar frame parameter.  Try to get the type from the
      current display first, and only then from Vdefault_frame_alist.
      
      src/keyboard.c (handle_interrupt): New function to separate the signal
      handling from C-g processing.
      (interrupt_signal): Call handle_interrupt to do the real work.
      (kbd_buffer_store_event): Use handle_interrupt instead of interrupt_signal.
      (cmd_error_internal): Use FRAME_INITIAL_P instead of ugly hacks.
      
      src/termhooks.h (initial_display): New declaration.
      
      src/xdisp.c (decode_mode_spec): Added '%T' (termcap-only frame name).
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-49
      114a8b8c
  26. 09 Jan, 2004 1 commit
    • Karoly Lorentey's avatar
      Hookified termcap devices, added bootstrap display device, plus many bugfixes. · 3224dac1
      Karoly Lorentey authored
      lisp/frame.el (display-color-cells): Pass display parameter to tty-display-color-cells.
      
      lisp/term/xterm.el (xterm-register-default-colors): Pass the selected-frame to display-color-cells.
      
      src/dispextern.h (set_terminal_modes, reset_terminal_modes): Removed declarations.
      (get_named_tty_display): New prototype.
      (tty_clear_end_of_line, term_init): Updated to new prototype.
      (initial_term_init): Renamed to init_initial_display.
      
      src/dispnew.c (Fredraw_frame): ifdef-out DOS-specific code.  Add display parameter to set_terminal_modes call.
      (update_frame): Don't flush the tty of there is no tty.
      (init_display): Set up a termcap display on the controlling tty and
      change the initial frame to use that.  Delete the initial display.
      
      src/frame.c (Fframep): Return t for the initial frame.
      (make_initial_frame): New function for creating the initial frame during bootstrap.  Use init_initial_display, not initial_term_init.
      (make_terminal_frame): Removed special cases for creating the initial frame.
      
      src/frame.h (enum output_method): New entry: output_initial for the bootstrap display.
      (FRAME_INITIAL_P): New macro.
      (make_initial_frame): New prototype.
      
      src/keyboard.c (interrupt_signal): Exit Emacs on SIGINT from the (frameless) controlling tty, if possible.  Explain this in a comment.
      (init_keyboard): Added comment about exiting on SIGINT.
      (Fset_input_mode): A termcap frame is never the initial frame anymore.
      
      src/sysdep.c (init_sys_modes): Update tty_set_terminal_modes call to the new prototype.
      (reset_sys_modes): Comment out tty_clear_end_of_line call; it doesn't work anymore.  Update tty_reset_terminal_modes call.
      
      src/termchar.h (struct tty_display_info): Added pointer to the display structure, for reset_sys_modes.
      
      src/termhooks.h (struct display): Added display parameter to set_terminal_modes_hook and reset_terminal_modes_hook.
      
      src/term.c (initial_display): New variable.
      (tty_ring_bell, tty_update_end, tty_set_terminal_window, tty_cursor_to)
      (tty_raw_cursor_to, tty_clear_to_end, tty_clear_frame, tty_clear_end_of_line)
      (tty_write_glyphs, tty_insert_glyphs, tty_delete_glyphs, tty_ins_del_lines): New functions.
      (ring_bell, update_end, set_terminal_window, cursor_to, raw_cursor_to)
      (clear_to_end, clear_frame, clear_end_of_line, write_glyphs, insert_glyphs)
      (delete_glyphs, ins_del_lines): Removed special casing of termcap displays.
      (get_tty_display): New function.
      (Ftty_display_color_p, Ftty_display_color_cells): Use it.
      (get_named_tty_display): Removed static.
      (tty_set_terminal_modes, tty_reset_terminal_modes): Changed to use a display parameter
      instead of tty_display_info for hook compatibility.
      (set_terminal_modes, reset_terminal_modes): Removed.
      (initial_term_init): Renamed to init_initial_display.  Set up an
      output_initial device, not a termcap display.
      (delete_initial_display): New function.
      (maybe_fatal): New function, for private use of term_init.
      (term_init): New parameter for choosing between fatal and simple errors.
      Removed incomprehensible special casing for the second initialization of the
      controlling tty.  Use maybe_fatal for error handling.
      Initialize termcap display hooks in the new device.
      Initialize the display pointer in the tty_display_info structure.
      (delete_tty): Replace order of reset_sys_modes and delete_display.
      
      src/window.c (init_window_once): Call make_initial_frame instead of make_terminal_frame.
      
      src/xfaces.c (realize_default_face, realize_face): Don't abort on the bootstrap display device.
      
      src/xterm.c (XTset_terminal_modes, XTreset_terminal_modes): Added display parameter.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-48
      3224dac1
  27. 05 Jan, 2004 1 commit
    • Karoly Lorentey's avatar
      Converted display hooks to be display-local. Plus many bugfixes. · 428a555e
      Karoly Lorentey authored
      lib-src/emacsclient.c (window_change_signal): Renamed to pass_signal_to_emacs.
      (init_signal): Pass SIGINT and SIGQUIT to the emacs process.
      
      lisp/faces.el (face-valid-attribute-values): Use the window-system
      function, not the variable.
      (read-face-attribute, face-spec-set-match-display, frame-set-background-mode)
      (face-set-after-frame-default): Ditto.
      
      lisp/frame.el (make-frame-on-tty): Added interactive declaration
      (suggested by Robert J. Chassell).  Use tty-create-frame-with-faces,
      not make-terminal-frame.
      
      src/termhooks.h (struct display_method): Renamed to display for brevity.
      (struct display): Added all display hook variables as members of this structure.
      Added next_display, reference_count, type and display_info components.
      (FRAME_MUST_WRITE_SPACES, FRAME_FAST_CLEAR_END_OF_LINE, FRAME_LINE_INS_DEL_OK)
      (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK, FRAME_SCROLL_REGION_COST)
      (FRAME_MEMORY_BELOW_FRAME, FRAME_RIF): Updated for struct display.
      (FRAME_DISPLAY): New macro.
      (create_display, delete_display): New prototypes.
      
      src/frame.h (struct frame): Added `display' member, removed display_method.
      (FRAME_LIVE_P): Look at f->display, not f->output_data.
      
      src/termchar.h (struct tty_display_info): Removed display_method component.
      (FRAME_TTY): Use the display structure, not output_data.
      
      src/term.c (display_list): New variable.
      (cursor_to_hook, raw_cursor_to_hook, clear_to_end_hook, clear_frame_hook)
      (clear_end_of_line_hook, ins_del_lines_hook, delete_glyphs_hook)
      (ring_bell_hook, reset_terminal_modes_hook, set_terminal_modes_hook)
      (update_begin_hook, update_end_hook, set_terminal_window_hook)
      (insert_glyphs_hook, write_glyphs_hook, delete_glyphs_hoo, read_socket_hook)
      (frame_up_to_date_hook, mouse_position_hook, frame_rehighlight_hook)
      (frame_raise_lower_hook, set_vertical_scroll_bar_hook, condemn_scroll_bars_hook)
      (redeem_scroll_bar_hook, judge_scroll_bars_hook): Moved to struct display.
      (tty_display_method_template): Removed.
      (syms_of_term): Don't initialize tty_display_method_template.
      (ring_bell, set_terminal_modes, reset_terminal_modes, update_begin)
      (update_end, set_terminal_window, cursor_to, raw_cursor_to, clear_to_end)
      (clear_frame, clear_end_of_line, write_glyphs, insert_glyphs)
      (delete_glyphs, ins_del_lines): Access display hooks through the frame pointer.
      (Ftty_display_color_p): Use the frame given as a parameter, or else return nil.
      (Ftty_display_color_cells): Ditto.
      (get_named_tty): Renamed to get_named_tty_display, changed return type to struct display.
      (term_dummy_init): Renamed to initial_term_init.  Create and return an initial display.
      (term_init): Initialize a new struct display and return a pointer to
      it instead of tty_display_info.  Removed frame initialization kludge.
      (Fdelete_tty): Updated for struct display.
      (delete_tty): The parameter type is now struct display, not tty_display_info.
      Delete the display, too.
      (create_tty_output): New function for creating tty_output structures.
      (delete_tty_output): New function for deleting tty_output structures.
      (create_display): New function for creating and registering display structures.
      (delete_display): New function for deleting and unregistering display structures.
      
      src/dispextern.h: Updated prototypes.
      
      src/dispnew.c:  Include frame.h before termhooks.h.
      (init_display): Updated term_init call to new signature.
      
      src/emacs.c: Include frame.h (for termhooks.h).
      src/keymap.c: Ditto.
      src/lread.c: Ditto.
      src/xsmfns.c: Ditto.
      
      src/process.c: Include frame.h before termhooks.h.
      
      src/frame.c (Fwindow_system): New function.
      (syms_of_frame): Initialize it.
      (make_terminal_frame): Open the terminal device before creating the new frame.
      Disable scrollbars here, term_init cannot do that anymore.
      (Fdelete_frame): Use the new delete_frame_hook, don't do display-specific
      frame deletion here.  Ditto for delete_display_hook.
      (Fmouse_position, Fmouse_pixel_position, Fraise_frame, Flower_frame)
      (Fredirect_frame_focus): Access display hooks through the frame pointer.
      
      src/keyboard.c: Include frame.h before termhooks.h.
      (start_polling, input_polling_used, stop_polling, gobble_input): Ignore read_socket_hook.
      (kbd_buffer_get_event, Fset_input_mode): Access display hooks through the frame pointer.
      (read_avail_input): Loop through all display devices for and call all read_socket_hook functions.  Check ttys even if read_socket_hook returned an error.
      
      src/sysdep.c (discard_tty_input): Ignore read_socket_hook.
      (stuff_char): Don't do anything if the current frame is not on a termcap display.
      (request_sigio, unrequest_sigio): Ignore read_socket_hook.
      (init_sys_modes): Always call narrow_foreground_group.  Set up terminal modes and sigio even under X.
      
      src/xdisp.c (message2_nolog, message3_nolog, redisplay_internal)
      (set_vertical_scroll_bar, redisplay_window): Access display hooks through the frame pointer.
      (echo_area_display): Don't be afraid of termcap frames during an X+tty combo session.
      
      src/xfaces.c: Include termhooks.h.
      (Ftty_supports_face_attributes_p): Use the given frame, not selected_frame.
      
      src/xfns.c (x_set_scroll_bar_foreground, x_set_scroll_bar_background): Access display hooks through the frame pointer.
      (Fx_create_frame, x_create_tip_frame): Initialize the frame's display structure.
      src/xmenu.c: Include termhooks.h after frame.h.
      
      src/xselect.c (x_own_selection, some_frame_on_display, x_get_foreign_selection)
      (Fx_disown_selection_internal, Fx_get_cut_buffer_internal)
      (Fx_store_cut_buffer_internal, Fx_rotate_cut_buffers_internal): Don't do anything
      if the selected frame is not an X frame.
      
      src/xterm.c (x_display_method): Removed.
      (x_create_frame_display, x_delete_frame_display): New functions for handling struct display objects.
      (x_term_init): Set up a new struct display object, too.
      (x_delete_display): Delete the struct display corresponding to the X display.
      (x_initialize): Moved hook initialization to x_create_frame_display.
      
      src/xterm.h (x_display_method): Removed.
      (struct x_display_info): Added frame_display component.
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-44
      428a555e
  28. 03 Jan, 2004 2 commits
    • Karoly Lorentey's avatar
      Added multi-tty support for talk.el. · 17086732
      Karoly Lorentey authored
      lisp/talk.el: Extended for multi-tty support.
      (talk, talk-add-tty-frame, talk-handle-delete-tty): New functions.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-37
      17086732
    • Karoly Lorentey's avatar
      Portability fixes (now it compiles & runs fine on Solaris). · 4d553a13
      Karoly Lorentey authored
      lib-src/emacsclient.c: Removed tty proxy kludge.  Emacs should just
      use the same terminal as emacsclient.
      (ec_get_tty, ec_set_tty, master, pty_name, old_tty, tty, old_tty_valid)
      (tty_erase_char, quit_char, flow_control, meta_key, _sobuf, init_tty)
      (window_change, reset_tty, init_pty, copy_from_to)
      (pty_conversation): Removed.
      (window_change_signal): Just forward the signal to Emacs, don't do
      anything else.
      (init_signals): Don't set handlers for SIGHUP & SIGINT.
      (strprefix): New function.
      (main): Don't touch the terminal, simply tell its name to Emacs.
      
      lisp/server.el (server-frames): Changed name and semantics to server-ttys.
      (server-tty-live-p): New function.
      (server-sentinel): Delete the whole tty, not just the frame.
      (server-handle-delete-frame): Removed.
      (server-handle-delete-tty): New function. Close the client connection if
      the tty is deleted.
      (server-start): Clean up server-ttys, not server-frames.  Set up
      delete-tty-after-functions.
      (server-process-filter): Set up server-ttys, not server-frames.
      Updated protocol for sending our pid to emacsclient.
      (server-buffer-done): Don't delete the client process directly, delete
      the tty instead, and rely on the delete-tty hook to close the
      connection.  Otherwise the terminal could be left in a bad state.
      
      src/cm.c (cmputc): Don't abort on write errors.
      
      src/indent.c: #include <stdio.h>, for termchar.h.
      src/window.c: Ditto.
      src/xfaces.c: Ditto.
      
      src/sysdep.c (init_sigio, reset_sigio, request_sigio)[!SIGIO]
      (unrequest_sigio)[!SIGIO]: If SIGIO is not supported, don't do
      anything. (For Solaris.)
      (init_sys_modes): Moved tty_set_terminal_modes call back to here,
      disable window system check.
      (reset_sys_modes): Reset the terminal even if X is running.
      
      src/term.c (Vdelete_tty_after_functions): New variable.
      (syms_of_term): Initialize it.
      (Fdelete_tty): Updated docs.
      (delete_tty): Run delete-tty-after-functions.
      (term_init): Removed tty_set_terminal_modes call.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-35
      4d553a13
  29. 02 Jan, 2004 2 commits
    • Karoly Lorentey's avatar
      Got rid of the rif (window-based redisplay interface) global variable. · fa971ac3
      Karoly Lorentey authored
      src/dispextern.h (PRODUCE_GLYPHS): Use the rif in IT->f, not the global rif.
      (rif): Removed.
      
      src/dispnew.c (rif): Removed.
      (direct_output_for_insert, direct_output_forward_char, update_frame)
      (redraw_overlapped_rows, redraw_overlapping_rows, update_window)
      (update_marginal_area, update_text_area, update_window_line)
      (set_window_cursor_after_update, scrolling_window): Use the rif of the
      current frame, not the global rif.
      
      src/fontset.c: #include termhooks.h, for FRAME_RIF.
      (Finternal_char_font): Use the rif of the current frame.
      
      src/frame.c (x_set_frame_parameters): Use the rif of the current frame.
      
      src/keyboard.c (detect_input_pending_run_timers): Use the rif of the
      current frame.
      
      src/minibuf.c: #include termhooks.h, for FRAME_RIF.
      (read_minibuf): Use the rif of the current frame.
      
      src/term.c (update_begin): Removed rif update hack.
      
      src/termhooks.h (FRAME_RIF): New macro.
      
      src/xdisp.c (init_iterator, expose_frame): Removed rif update hack.
      (echo_area_display, x_cursor_to, draw_fringe_bitmap)
      (try_window_reusing_current_matrix, try_window_id)
      (get_glyph_face_and_encoding, x_get_glyph_overhangs)
      (get_char_face_and_encoding, compute_overhangs_and_x, draw_glyphs)
      (x_produce_glyphs, x_insert_glyphs, x_clear_end_of_line)
      (erase_phys_cursor, display_and_set_cursor, show_mouse_face)
      (define_frame_cursor1, x_draw_vertical_border): Use the rif of the
      current frame.
      
      src/xfns.c (Fx_create_frame): Removed rif update hack.
      src/xterm.c (frame_highlight, frame_unhighlight): Ditto.
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-32
      fa971ac3
    • Karoly Lorentey's avatar
      MULTI_KBOARD support for ttys. Input-related bugfixes for X+tty sessions. · 7b00d185
      Karoly Lorentey authored
      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
      7b00d185