1. 02 Oct, 2007 1 commit
    • Stefan Monnier's avatar
      * window.h (struct window): · d0fdb6da
      Stefan Monnier authored
      * window.c (struct save_window_data, struct saved_window):
      * termhooks.h (struct terminal):
      * process.h (struct Lisp_Process):
      * frame.h (struct frame):
      * buffer.h (struct buffer):
      * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table)
      (struct Lisp_Bool_Vector, struct Lisp_Subr, struct Lisp_Hash_Table):
      The size field of (pseudo)vectors is now unsigned.
      (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Simplify accordingly.
      d0fdb6da
  2. 27 Sep, 2007 1 commit
  3. 21 Sep, 2007 1 commit
    • Stefan Monnier's avatar
      * termhooks.h (term_gpm): Delete. Use gpm_tty's NULLness instead. · 71f44e7a
      Stefan Monnier authored
      (gpm_tty): Change its type.
      * term.c (term_gpm): Delete.  Use gpm_tty's NULLness instead.
      (gpm_tty): Change its type and initialize it.
      (Fterm_open_connection): Check the frame is indeed a tty.  Use the new gpm_tty.
      (Fterm_close_connection): Use the new gpm_tty.
      * keyboard.c (tty_read_avail_input): Use the new gpm_tty.
      * sysdep.c (init_sys_modes): term_gpm -> gpm_tty.
      71f44e7a
  4. 20 Sep, 2007 1 commit
  5. 14 Sep, 2007 1 commit
  6. 04 Sep, 2007 1 commit
  7. 08 Aug, 2007 1 commit
  8. 25 Jul, 2007 1 commit
  9. 30 May, 2007 1 commit
  10. 20 May, 2007 2 commits
  11. 19 May, 2007 1 commit
    • Dan Nicolaescu's avatar
      * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Define here. · 80ca7302
      Dan Nicolaescu authored
      * termhooks.h (union display_info): Add mac_display_info.
      
      * term.c (init_tty): Only use terminal->kboard when MULTI_KBOARD
      is defined.
      
      * macterm.h (struct mac_display_info): Add terminal.
      
      * w32term.c (w32_initialize): Make static.
      
      * macterm.c (XTset_terminal_modes): Add a terminal parameter.
      (XTreset_terminal_modes): Likewise.
      (x_clear_frame): Add a frame parameter.
      (note_mouse_movement): Get rif from the frame.
      (mac_term_init): Initialize the terminal.
      (mac_initialize): Make static and move terminal initialization ...
      (mac_create_terminal): ... in this new function.
      
      * macmenu.c: Reorder includes.
      (Fx_popup_menu): Use terminal specific mouse_position_hook.
      
      * macfns.c (x_set_mouse_color): Get rif from the frame.
      (x_set_tool_bar_lines): Don't use updating_frame.
      (mac_window): Add 2 new parameters for consistency with other
      systems.
      (Fx_create_frame): Fix doc string. Rename the parameter.
      (Fx_create_frame): Set the frame parameters following what is done
      in X11 and w32.
      (Fx_open_connection): Remove window-system check.
      (start_hourglass): Likewise.
      (x_create_tip_frame): Get the keyboard from the terminal.
      
      * w32fns.c (Fx_create_frame): Use kboard from the terminal.
      
      * term/mac-win.el: Provide mac-win.
      (mac-initialized): New variable.
      (mac-initialize-window-system): New function. Move global setup
      here.
      (handle-args-function-alist, frame-creation-function-alist):
      (window-system-initialization-alist): Add mac entries.
      
      * loadup.el: Load mac-win on a Mac.
      80ca7302
  12. 15 May, 2007 1 commit
  13. 14 Jan, 2007 1 commit
  14. 10 Nov, 2006 1 commit
  15. 20 May, 2006 2 commits
    • Karoly Lorentey's avatar
      Fix C-x 5 2 on the controlling tty; fix some possible crash conditions and a memory leak. · ab797f65
      Karoly Lorentey authored
      * src/frame.c (make_terminal_frame): Don't create frames on a terminal
        that is being deleted.
      * src/xfns.c (Fx_create_frame, x_create_tip_frame): Ditto.
      
      * src/keyboard.c (tty_read_avail_input): Don't read from a terminal that
        is being deleted.
      
      * src/term.c (get_named_tty): Abort if tty name is NULL.  Simplify accordingly.
      
      * src/term.c (Ftty_type): Return nil if terminal is not on a tty instead
        of throwing an error.  Doc update.
      
      * src/term.c (init_tty): Set name before calling `get_named_tty'.
      
      * src/term.c (delete_tty): Let delete_terminal delete the frames.  Plug
        memory leak caused by tty->name.  Remove reference to `deleting_tty'.
      
      * src/term.c (syms_of_term) <Vsuspend_tty_functions, Vresume_tty_functions>: Doc update.
      
      * src/termhooks.h (terminal) <name>: Explain why identifying terminals by
        name is a bad idea.
      
      * src/terminal.c (delete_terminal): Doc update.
      
      * src/xterm.c (XTread_socket): Disable loop on all X displays.
      
      * src/xterm.c (x_delete_display): Doc update to reflect changes in
        delete_terminal.
      
      * src/xterm.c (x_delete_terminal): Don't set terminal->deleted and let
        delete_terminal delete the frames on the terminal.
      
      * src/xterm.h (x_display_info) <terminal>: Move member earlier in the struct.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-565
      ab797f65
    • Karoly Lorentey's avatar
      Fix crashes in `delete-terminal' caused by recursive calls or X displays with live frames. · a98f1617
      Karoly Lorentey authored
      * src/termhooks.h (terminal) <deleted>: New member.
      
      * src/term.c (delete_tty): Use it.
        (deleting_tty): Remove old variable.
      
      * src/terminal.c (delete_terminal): Use terminal->deleted. 
      
      * src/xterm.c (x_delete_terminal): Use terminal->deleted.  Delete all
        frames on the display explicitly.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-562
      a98f1617
  16. 05 May, 2006 1 commit
  17. 06 Feb, 2006 1 commit
  18. 29 Dec, 2005 1 commit
    • Karoly Lorentey's avatar
      Rename `struct device' to `struct terminal'. Rename some terminal-related functions similarly. · 6ed8eeff
      Karoly Lorentey authored
      * src/termhooks.h (struct device): Rename to `terminal'.  Rename member
        `next_device' to `next_terminal'.
        (device_list): Rename to `terminal_list'.
        (FRAME_DEVICE): Rename to `FRAME_TERMINAL'.
        (DEVICE_TERMINAL_CODING): Rename to `TERMINAL_TERMINAL_CODING'.
        (TERMINAL_KEYBOARD_CODING): Rename to `TERMINAL_KEYBOARD_CODING'.
        (DEVICE_ACTIVE_P): Rename to `TERMINAL_ACTIVE_P'.
        Update declarations and macro definitions.
      
      * src/termchar.h (tty_display_info): Rename member `device' to `terminal'.
        (FRAME_TTY): Update for renames.
      
      * src/xterm.h (x_display_info): Rename member `device' to `terminal'.
      
      * src/frame.h (frame): Rename `device' member to `terminal'.
        (FRAME_KBOARD, FRAME_LIVE_P, Qdevice, Qdisplay_live_p):
        Update for renames.
      
      * src/lisp.h (set_process_environment): Rename to `set_global_environment'.
        (device): Rename to `terminal'.
      
      * src/dispextern.h: Update declarations and macro definitions.
      
      * src/terminal.c (device_list): Rename to `terminal_list'.
        (next_device_id): Rename to `next_terminal_id'.
        (initial_device): Rename to `initial_terminal'.
        (get_device): Rename to `get_terminal'.
        (create_device): Rename to `create_terminal'.
        (mark_devices): Rename to `mark_terminals'.
        (delete_device): Rename to `delete_terminal'.
        (Fdelete_display): Rename to `Fdelete_terminal'.
        (Fframe_terminal): Move here from frame.c.
        (Fdisplay_live_p): Rename to `Fterminal_live_p'.
        (Fdisplay_list): Rename to `Fterminal_list'.
        (Fdisplay_name): Rename to `Fterminal_name'.
        (init_initial_device): Rename to `init_initial_terminal'.
        (delete_initial_device): Rename to `delete_initial_terminal'.
        (ring_bell, 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, get_terminal_param, store_terminal_param)
        (Fterminal_parameters, Fterminal_parameter)
        (Fmodify_terminal_parameters, Fset_terminal_parameter)
        (syms_of_terminal): Update for renames.
      
      * src/term.c (get_tty_device): Rename to `get_tty_terminal'.  Update.
        (Fdisplay_tty_type): Rename to `Ftty_type'.
        (Fdisplay_controlling_tty_p): Rename to `Fcontrolling_tty_p'.
        (delete_tty, tty_set_terminal_modes, tty_reset_terminal_modes)
        (Ftty_display_color_p, Ftty_display_color_cells, get_named_tty)
        (Ftty_no_underline, Fsuspend_tty, Fresume_tty, create_tty_output)
        (init_tty, maybe_fatal, delete_tty, syms_of_term): Update for rename.
      
      * src/frame.c (Qdevice): Rename to `Qterminal'.
        (Qdisplay_live_p): Rename to `Qterminal_live_p'.
        (terminal_frame_count): Rename to `tty_frame_count'.
        (Fframe_display): Move to terminal.c, rename to `Fframe_terminal'.
        (make_frame_without_minibuffer, make_initial_frame)
        (make_terminal_frame, Fmodify_frame_parameters)
        (do_switch_frame, Fdelete_frame, Fmouse_position)
        (Fmouse_pixel_position, Fraise_frame, Flower_frame)
        (Fredirect_frame_focus, set_term_frame_name, syms_of_frame):
        Update for renames.
      
      * src/xdisp.c (message2_nolog, message3_nolog, redisplay_internal)
        (set_vertical_scroll_bar, redisplay_window, check_x_display_info)
        (x_set_scroll_bar_foreground, x_set_scroll_bar_background)
        (Fx_create_frame, Fxw_display_color_p, Fx_display_grayscale_p)
        (Fx_display_pixel_width, Fx_display_pixel_height)
        (Fx_display_planes, Fx_display_color_cells)
        (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
        (Fx_display_screens, Fx_display_mm_height, Fx_display_mm_width)
        (Fx_display_backing_store, Fx_display_visual_class)
        (Fx_display_save_under, Fx_close_connection, x_create_tip_frame):
        Update for renames.
      
      * xterm.c (handle_one_xevent): Initialize `f' to NULL.
        (x_delete_device): Rename to `x_delete_terminal'.
        (x_create_device): Rename to `x_create_terminal'.
        (XTset_terminal_modes, XTreset_terminal_modes)
        (XTread_socket, x_connection_closed, x_term_init)
        (x_term_init, x_delete_display): Update for renames.
      
      * src/dispnew.c (Fredraw_frame, Fsend_string_to_terminal)
        (Fsend_string_to_terminal, init_display): Update for renames.
      
      * src/keyboard.c (push_frame_kboard, pop_kboard, pop_kboard)
        (kbd_buffer_get_event, read_avail_input, tty_read_avail_input)
        (interrupt_signal, Fset_output_flow_control)
        (Fset_input_meta_mode, Fset_quit_char, delete_kboard)
        (syms_of_keyboard): Update for renames.
      
      * src/alloc.c (mark_devices): Update declaration.
        (Fgarbage_collect): Update for renames.
      
      * src/coding.c (Fset_terminal_coding_system_internal)
        (Fterminal_coding_system4)
        (Fset_keyboard_coding_system_internal)
        (Fkeyboard_coding_system): Update for renames.
      
      * src/data.c (Fterminal_local_value, Fset_terminal_local_value):
        Update for renames.
      
      * src/minibuf.c (read_minibuf): Update for renames.
      
      * src/sysdep.c (init_sys_modes, reset_sys_modes): Update for renames.
      
      * xselect.c (x_handle_selection_clear): Update for renames.
      
      * lisp/files.el (save-buffers-kill-display): Rename to `save-buffers-kill-terminal'.
        (save-buffers-kill-terminal, ctl-x-map): Update for renames.
      
      * frame.el (make-frame): Rename 'device frame parameter to 'terminal.  Update.
        (frames-on-display-list, framep-on-display, suspend-frame): Update for renames.
        (selected-display): Rename to `selected-terminal'.
      
      * server.el (server-save-buffers-kill-display): Rename to
        `server-save-buffers-kill-terminal'.
        (server-delete-client, server-handle-delete-frame)
        (server-handle-suspend-tty, server-process-filter)
        (server-switch-buffer): Update for renames.
      
      * startup.el (normal-splash-screen, normal-splash-screen): Update for renames.
      
      * talk.el (talk): Update for renames.
      
      * termdev.el (terminal-id): Update for renames.
      
      * xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
        (turn-off-xterm-mouse-tracking-on-terminal)
        (xterm-mouse-handle-delete-frame): Update for renames.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-471
      6ed8eeff
  19. 26 Dec, 2005 2 commits
    • Karoly Lorentey's avatar
      Fix compilation errors in previous commit. · 30663b47
      Karoly Lorentey authored
      * src/callproc.c (getenv_internal): Fix get_terminal_param call.
      
      * dispextern.h (get_device): Move declaration to termhooks.h.
      * termhooks.h (get_device): Move here.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-462
      30663b47
    • Karoly Lorentey's avatar
      Implement automatic terminal-local environment variables via `local-environment-variables'. · f105f403
      Karoly Lorentey authored
      * lisp/env.el (setenv, getenv): Add optional terminal parameter.  Update docs.
        (setenv): Handle `local-environment-variables'.
        (read-envvar-name): Also allow (and complete) local
        environment variables on the current terminal.
      
      * src/callproc.c: Include frame.h and termhooks.h, for terminal parameters.
        (Qenvironment): New constant.
        (Vlocal_environment_variables): New variable.
        (syms_of_callproc): Register and initialize them.
        (child_setup): Handle Vlocal_environment_variables.
        (getenv_internal): Add terminal parameter.  Handle
        Vlocal_environment_variables.
        (Fgetenv_internal): Add terminal parameter.
      
      * src/termhooks.h (get_terminal_param): Declare.
      
      * src/Makefile.in (callproc.o): Update dependencies.
      * mac/makefile.MPW (callproc.c.x): Update dependencies.
      
      * lisp/termdev.el (terminal-id): Make parameter optional.
        (terminal-getenv, terminal-setenv, with-terminal-environment): 
        Disable functions.
      
      * lisp/mule-cmds.el (set-locale-environment): Convert `terminal-getenv' calls
        to `getenv'.
      * lisp/rxvt.el (rxvt-set-background-mode): Ditto.
      * lisp/x-win.el (x-initialize-window-system): Ditto.
      * lisp/xterm.el (terminal-init-xterm): Ditto.
      
      * lisp/server.el (server-process-filter): Fix reference to the 'display frame
        parameter.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-461
      f105f403
  20. 25 Dec, 2005 1 commit
    • Karoly Lorentey's avatar
      Reimplement terminal parameters in C; clean up term.c, create terminal.c. · ed8dad6b
      Karoly Lorentey authored
      * lisp/termdev.el (terminal-parameter-alist, terminal-parameters, terminal-parameter-p)
        (terminal-parameter, set-terminal-parameter, terminal-handle-delete-frame): Remove.
      
      * src/term.c (Vring_bell_function, device_list, initial_device)
        (next_device_id, ring_bell, 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)
        (get_device, Fdisplay_name, create_device, delete_device)
        (Fdelete_display, Fdisplay_live_p, Fdisplay_list)
        Move to terminal.c.
        (syms_of_term): Move their initialization to terminal.c.
      
      * src/terminal.c: New file.
        (device_list, next_device_id, initial_device, Vring_bell_function)
        (ring_bell, 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, get_device, create_device, delete_device)
        (Fdelete_display, Fdisplay_live_p, Fdisplay_list, Fdisplay_name): Move here.
        (mark_devices, get_terminal_param, store_terminal_param)
        (Fterminal_parameters, Fterminal_parameter)
        (Fmodify_terminal_parameters, Fset_terminal_parameter)
        (init_initial_device, delete_initial_device)
        (syms_of_terminal): New functions.
      
      * lisp/simple.el (normal-erase-is-backspace-setup-frame)
        (normal-erase-is-backspace-mode): Rephrase things
        without terminal-parameter-p.
      
      * lisp/termdev.el (terminal-getenv, terminal-setenv)
        (with-terminal-environment): Ditto.
      
      * mac/makefile.MPW (EmacsObjects): Add terminal.c.x.
        ({Src}terminal.c.x): Add dependencies.
      
      * src/Makefile.in (obj): Add terminal.o.
        (terminal.o): Add dependencies.
        [HAVE_CARBON]: Make terminal.o depend on macgui.h.
      
      * src/alloc.c (mark_devices): Declare.
        (Fgarbage_collect): Call `mark_devices'.
      
      * src/dispextern.h  (set_scroll_region, turn_off_insert)
        (turn_off_highlight, background_highlight, clear_end_of_line_raw)
        (tty_clear_end_of_line, tty_setup_colors, delete_tty): Remove.
        (raw_cursor_to, clear_to_end, tty_turn_off_insert)
        (tty_turn_off_highlight): Add declaration.
      
      * src/emacs.c (main): Call `syms_of_terminal'.
      
      * src/frame.c (get_future_frame_param): New function.
        (Fmake_terminal_frame): Use it.
      
      * src/keyboard.c (pop_kboard): Remove unused variable.
        (Fset_output_flow_control): Return nil.
      
      * src/keymap.h (Fset_keymap_parent): Add EXFUN.
      
      * src/lisp.h (syms_of_terminal): Declare it.
      
      * src/sysdep.c (reset_sys_modes): Update for renames.
      
      * src/term.c (set_scroll_region): Rename to `tty_set_scroll_region'.
        (turn_on_insert): Rename to `tty_turn_on_insert'.
        (turn_off_insert): Rename to `tty_turn_off_insert'.
        (turn_off_highlight): Rename to `tty_turn_off_highlight'.
        (turn_on_highlight): Rename to `tty_turn_on_highlight'.
        (toggle_highligh): Rename to `tty_toggle_highlight'.
        (background_highlight): Rename to `tty_background_highlight'.
        (highlight_if_desired): Rename to `tty_highlight_if_desired'.
      
        (tty_ring_bell, tty_update_end, tty_set_terminal_window)
        (tty_set_scroll_region, tty_background_highlight)
        (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)
        (term_get_fkeys, tty_setup_colors, dissociate_if_controlling_tty)
        (delete_tty): Add static modifier.
      
        (tty_reset_terminal_modes, tty_set_terminal_window)
        (tty_set_scroll_region, tty_background_highlight)
        (tty_highlight_if_desired, 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, turn_on_face): 
        Update for renames.
      
      * src/termhooks.h (param_alist): New member to struct device.
      
      * src/xterm.h (x_delete_device): Declare.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-460
      ed8dad6b
  21. 19 Dec, 2005 1 commit
  22. 10 Dec, 2005 1 commit
  23. 07 Aug, 2005 1 commit
  24. 11 Jul, 2005 1 commit
    • Karoly Lorentey's avatar
      Rename `struct display' to `struct device'. Update function, parameter and... · 7e59217d
      Karoly Lorentey authored
      Rename `struct display' to `struct device'.  Update function, parameter and variable names accordingly.
      
      * src/termhooks.h (struct device): Rename to `struct device'.
        Rename member `next_display' to `next_device'.
        Rename member `delete_display_hook' to `delete_device_hook'.
        (FRAME_DISPLAY): Rename to FRAME_DEVICE.
        (DISPLAY_ACTIVE_P): Rename to DEVICE_ACTIVE_P.
        (DISPLAY_TERMINAL_CODING): Rename to DEVICE_TERMINAL_CODING.
        (DISPLAY_KEYBOARD_CODING): Rename to DEVICE_KEYBOARD_CODING.
      
      * src/frame.h (stuct frame): Rename `display' member to `device'.
      
      * src/xterm.h (x_display_info): Rename member `frame_display' to `device'.
      
      * src/termchar.h (struct tty_display_info): Rename `display' member to `device'.
      
      * src/keyboard.c (push_display_kboard): Rename to push_device_kboard.
      
      * lisp/frame.el (make-frame): Rename frame parameter `display-id' to `device'.
      * src/frame.c (Fmake_terminal_frame): Ditto.
      * src/xfns.c (Fx_create_frame): Ditto.
      
      * src/term.c (display_list): Rename to device_list.
      * src/term.c (initial_display): Rename to initial_device.
      * src/term.c (next_display_id): Rename to next_device_id.
      * src/term.c (get_display): Rename to get_device.
      * src/term.c (get_tty_display): Rename to get_tty_device.
      * src/term.c (get_named_tty_display): Rename to get_named_tty.
      * src/term.c (init_initial_display): Rename to init_initial_device.
      * src/term.c (delete_initial_display): Rename to delete_initial_device.
      * src/term.c (create_display): Rename to create_device.
      * src/term.c (delete_display): Rename to delete_device.
      
      * src/xfns.c (check_x_display_info): Document that the function allows
        display ids as well.
      
      * src/xterm.c (x_delete_frame_display): Rename to x_delete_device.
      * src/xterm.c (x_create_frame_display): Rename to x_create_device.
      
      * src/coding.c: Update.
      * src/dispextern.h: Update.
      * src/data.c: Update.
      * src/dispnew.c: Update.
      * src/frame.c: Update.
      * src/frame.h: Update.
      * src/keyboard.c: Update.
      * src/keyboard.h: Update.
      * src/lisp.h: Update.
      * src/sysdep.c: Update.
      * src/term.c: Update.
      * src/xdisp.c: Update.
      * src/xselect.c: Update.
      * src/xterm.c: Update.
      
      * src/prefix-args.c: Include stdlib.h for exit.
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-382
      7e59217d
  25. 04 Jul, 2005 1 commit
  26. 27 Jun, 2005 1 commit
    • Karoly Lorentey's avatar
      Cleanup: Move kboard fields from struct frame and device-specific descriptors to struct display. · bedb9c0e
      Karoly Lorentey authored
      * src/termhooks.h (display): New field: kboard.
      
      * src/xterm.h (x_display_info): Remove kboard field.
      * src/termchar.h (tty_display_info): Ditto.
      * src/frame.h (frame): Ditto.
        (FRAME_KBOARD): Update.
      
      * src/dispnew.c (init_display): Don't initialize kboard.
      * src/frame.c (make_frame, make_initial_frame, make_terminal_frame): Ditto.
      
      * src/frame.c (make_frame_without_minibuffer, Fdelete_frame): Update kboard access.
      * src/keyboard.c (delete_kboard): Ditto.
      * src/term.c (term_init): Ditto.
      * src/xfns.c (Fx_create_frame, x_create_tip_frame): Ditto.
      * src/xselect.c (x_handle_selection_clear): Ditto.
      * src/xterm.c (x_term_init): Ditto.
      
      * src/term.c (init_initial_display): Initialize kboard.
      * src/xterm.c (x_term_init): Ditto.
      
      * src/term.c (delete_tty): Remove kboard deletion.
        (delete_display): Delete kboard as well.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-363
      bedb9c0e
  27. 03 May, 2005 1 commit
    • Karoly Lorentey's avatar
      Fix UTF-8 tty input when first frame is an X frame. Steps towards multiple tty locale support. · 68bba4e4
      Karoly Lorentey authored
      * lisp/international/mule-cmds.el (set-locale-environment): Ignore
        window-system; always set the keyboard coding system.
      
      
      * src/termhooks.h (DISPLAY_TERMINAL_CODING, DISPLAY_KEYBOARD_CODING): New macros.
      
      * src/coding.c (Fset_terminal_coding_system_internal, Fterminal_coding_system)
        (Fset_keyboard_coding_system_internal, Fkeyboard_coding_system): Add DISPLAY
        parameter.
      
      * src/term.c (get_display): Add THROW parameter.
        (get_tty_display, Fdisplay_name, Fdisplay_tty_type, Fdisplay_controlling_tty_p)
        (Fdelete_display, Fdisplay_live_p): Update callers.
      * src/xfns.c (check_x_display_info): Ditto.
      * src/frame.c (Fmake_terminal_frame, Fframe_display): Ditto.
      
      * src/dispextern.h (get_display): Update prototype.
      
      * lisp/international/mule.el (set-terminal-coding-system)
        (set-keyboard-coding-system): Add DISPLAY parameter.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-338
      68bba4e4
  28. 12 Apr, 2005 1 commit
  29. 04 Jul, 2004 1 commit
    • Karoly Lorentey's avatar
      Implemented display ids for multiple emacsclients on the same tty. Plus assorted bugfixes. · b6660415
      Karoly Lorentey authored
      * lisp/frame.el (make-frame-on-display): Update doc.
      (make-frame): Handle display-id parameter.  Update doc.
      (frames-on-display-list): Update for display ids.
      (framep-on-display): Ditto.
      (suspend-frame): Use display-name, not frame-tty-name.
      (selected-display): New function.
      
      * lisp/server.el (server-delete-client): Use delete-display, not delete-tty.
      (server-tty-live-p, server-handle-delete-tty): Removed.
      (server-handle-delete-frame): Delete tty clients, if needed.
      (server-process-filter): Set the display parameter, and use it when appropriate.
      (server-handle-suspend-tty): Use the display parameter.
      (server-start, server-unload-hook): Removed obsolete delete-tty hook.
      
      * lisp/talk.el (talk): Always use talk-add-display.
      (talk-add-tty-frame, talk-handle-delete-tty): Removed.
      (talk-handle-delete-frame): New function.
      (talk-add-display): Open a new frame only if parameter was not a frame.
      
      * src/dispextern.h (get_display, Fdisplay_tty_type):  New prototypes.
      (Fframe_tty_type): Removed.
      
      * src/dispnew.c (init_display): Use Fdisplay_tty_type, not Fframe_tty_type.
      
      * src/frame.c (Qdisplay_id, Qdisplay_live_p): New symbols.
      (make_terminal_frame): Get display as a parameter.
      (Fmake_terminal_frame): Get/create display here; pass it to
      make_terminal_frame.
      (Fframe_display): New function.
      (Fdelete_frame): Stop if the hook deleted the frame.
      (syms_of_frame): Register new stuff.
      
      * src/frame.h (Qdisplay_id, Qdisplay_live_p, make_terminal_frame):
      Updated prototypes.
      
      * src/keyboard.c (interrupt_signal): Updated comment.
      
      * src/term.c (Vdelete_tty_after_functions): Removed variable.
      (Qframe_tty_name, Qframe_tty_type): Removed.
      (next_display_id): New var.
      (tty_ring_bell): Don't do anything on suspended frames.
      (Ftty_display_color_p, Ftty_display_color_cells): Doc update.
      (get_display): New function.
      (get_tty_display): Use it.
      (get_named_tty_display): Ignore suspended displays.
      (Fframe_tty_name): Renamed to Fdisplay_name.  Handle all kinds of
      displays.
      (Fframe_tty_type): Renamed to Fdisplay_tty_type.
      (init_initial_display): Set display name.
      (term_init): Allow more displays on the same device.  Set display name.
      (Fdelete_tty): Removed.
      (delete_tty): Don't run hooks.
      (create_display): Set display id.
      (delete_display): Free display name.
      (Fdelete_display, Fdisplay_live_p, Fdisplay_list): New functions.
      (Fsuspend_tty): Call hook with display id.  Doc update.
      (Fresume_tty): Refuse to resume when there is already an active display
      on the same device.  Call hook with display id.  Doc update.
      (syms_of_term): Reflect above changes.
      
      * src/termhooks.h (struct display): Added `id' and `name' members.
      (DISPLAY_ACTIVE_P): New macro.
      
      * src/xfns.c (check_x_display_info): Handle display ids.
      (Fx_create_frame): Try to get display from `display-id' parameter.
      
      * src/xterm.c (x_term_init): Set display name.
      (x_delete_display): Handle the case when `font_table' is NULL.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-207
      b6660415
  30. 23 May, 2004 1 commit
    • Karoly Lorentey's avatar
      Make terminal_coding and keyboard_coding display-local. · b8299c66
      Karoly Lorentey authored
      src/coding.c: Include frame.h and termhooks.h.
      (terminal_coding, keyboard_coding): Remove.
      (Fset_terminal_coding_system_internal, Fterminal_coding_system):
      Use the selected frame's terminal coding system.
      (Fset_safe_terminal_coding_system_internal): Fix typo.
      (Fset_keyboard_coding_system_internal, Fkeyboard_coding_system):
      Use the selected frame's keyboard coding system.
      (init_coding_once): Don't initialize keyboard_coding and terminal_coding.
      
      src/coding.h (terminal_coding, keyboard_coding): Remove.
      
      src/termhooks.h (terminal_coding, keyboard_coding): New members of
      struct display.
      (FRAME_TERMINAL_CODING, FRAME_KEYBOARD_CODING): New macros.
      
      src/termchar.h (kboard): Cosmetic change.
      
      src/term.c (encode_terminal_code): Add coding parameter.
      (tty_write_glyphs): Use the display-local terminal coding system.
      (create_display): Allocate and initialize coding systems.
      (delete_display): Free coding systems.
      
      src/xdisp.c (decode_mode_spec): Use display-local coding systems.
      
      src/Makefile.in: Fix dependencies for termchar.h and termhooks.h.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-167
      b8299c66
  31. 16 Apr, 2004 1 commit
    • Karoly Lorentey's avatar
      Eliminated updating_frame. · 385ed61f
      Karoly Lorentey authored
      src/termhooks.h (cursor_to_hook, raw_cursor_to_hook)
      (clear_to_end_hook, clear_end_of_line_hook, clear_frame_hook)
      (ins_del_lines_hook, insert_glyphs_hook, write_glyphs_hook)
      (delete_glyphs_hook, ring_bell_hook, set_terminal_window_hook):
      Added frame parameter.
      
      src/term.c (ring_bell, tty_ring_bell, set_terminal_window)
      (tty_set_terminal_window, set_scroll_region, cursor_to)
      (tty_cursor_to, raw_cursor_to, tty_raw_cursor_to, clear_to_end)
      (tty_clear_to_end, clear_frame, tty_clear_frame, clear_end_of_line)
      (tty_clear_end_of_line, write_glyphs, tty_write_glyphs, insert_glyphs)
      (tty_insert_glyphs, delete_glyphs, tty_delete_glyphs, ins_del_lines)
      (tty_ins_del_lines): Added frame parameter.
      
      src/xterm.c (x_delete_glyphs, x_clear_frame, x_ins_del_lines):
      Added frame parameter.
      
      src/scroll.c (do_direct_scrolling, do_scrolling): Added frame parameter.
      
      src/term.c (update_begin, update_end): Don't set updating_frame.
      
      src/xfns.c (x_set_tool_bar_lines): Ditto.
      
      src/term.c (updating_frame): Removed.
      
      src/dispextern.h: Updated prototypes.
      
      src/dispnew.c (Fredraw_frame, direct_output_for_insert)
      (direct_output_forward_char, update_frame_1, update_frame_line)
      (ding, bitch_at_user): Added frame parameter to calls to redisplay.
      
      src/xdisp.c (try_window_id): Ditto.
      
      src/scroll.c (do_scrolling, do_direct_scrolling, scrolling_1): Ditto.
      src/fileio.c (auto_save_error): Ditto.
      
      src/term.c (tty_ring_bell): Flush the output stream after beeping.
      src/dispnew.c (ding, bitch_at_user): Don't fflush CURTTY.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-140
      385ed61f
  32. 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
  33. 27 Feb, 2004 1 commit
  34. 20 Feb, 2004 1 commit
  35. 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
  36. 11 Jan, 2004 1 commit
    • Karoly Lorentey's avatar
      Changed tty input code to use read_socket_hook. · 8f1ce423
      Karoly Lorentey authored
      src/keyboard.c (read_avail_input): Removed tty-related code.
      (tty_read_avail_input): New function.
      
      src/keyboard.h (tty_read_avail_input): New prototype.
      
      src/term.c (term_init): Set read_socket_hook.  Removed bogus baud rate
      initialization.
      
      src/termhooks.h (read_socket_hook): Added display parameter.
      
      src/xterm.c (XTread_socket): Added display parameter (unused).
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-51
      8f1ce423
  37. 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