1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-28 07:50:48 -08:00
Commit graph

120 commits

Author SHA1 Message Date
Karoly Lorentey
d290c55440 Fix splash screen loosing input events on Emacsclient frames.
* lisp/startup.el (fancy-splash-screens): Use `overriding-local-map'
  instead of `overriding-terminal-local-map' for now; the latter doesn't
  work right, it looses keypresses to another terminal.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-478
2005-12-30 06:15:47 +00:00
Karoly Lorentey
526039df1c Enhance splash screens to work better with emacsclient.
* lisp/startup.el (fancy-splash-screens): Use
  `overriding-terminal-local-map' to set up keymap.  Install a
  `delete-frame-functions' hook to catch `delete-frame' events.  Ignore
  `select-window' events to cope better with `focus-follows-mouse'.
  Don't switch back to the original buffer if the splash frame has been
  killed.  
  (normal-splash-screen): Don't let-bind `mode-line-format'; it changes
  the global binding---setq it instead.  
  (display-splash-screen): Don't do anything if the splash screen is
  already displayed elsewhere.
  (fancy-splash-exit, fancy-splash-delete-frame): New functions.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-477
2005-12-30 05:30:57 +00:00
Karoly Lorentey
6ed8eeffb3 Rename struct device' to struct terminal'. Rename some terminal-related functions similarly.
* 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
2005-12-29 18:20:26 +00:00
Karoly Lorentey
da8e8fc14f Store local environment in frame (not terminal) parameters.
* src/callproc.c (child_setup, getenv_internal, Fgetenv_internal):
  Store the local environment in a frame (not terminal) parameter.
  Update doc strings.
  (syms_of_callproc): Update doc strings.
  (Qenvironment): Moved to frame.c. 

* lisp/env.el (read-envvar-name, setenv, getenv, environment): Use frame
  parameters to store the local environment, not terminal parameters.

* server.el (server-process-filter): Store the local environment in a
  frame (not terminal) parameter.  Do not try to decode environment
  strings.

* lisp/frame.el (make-frame): Set up the 'environment frame parameter,
  when needed.

* src/frame.c (Qenvironment): Move here from callproc.c.
  (Fdelete_frame): Don't allow other frames to refer to a deleted frame
  in their 'environment parameter.
  (Fframe_with_environment): New function.
  (syms_of_frame): Defsubr it.  Initialize and staticpro Qenvironment.

* frame.h (Qenvironment): Declare.
* lisp.h (Fframe_with_environment): EXFUN it.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-467
2005-12-29 04:31:04 +00:00
Karoly Lorentey
30663b475e Fix compilation errors in previous commit.
* 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
2005-12-26 02:21:31 +00:00
Karoly Lorentey
f105f403d2 Implement automatic terminal-local environment variables via `local-environment-variables'.
* 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
2005-12-26 02:14:10 +00:00
Karoly Lorentey
ed8dad6b61 Reimplement terminal parameters in C; clean up term.c, create terminal.c.
* 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
2005-12-25 20:06:58 +00:00
Karoly Lorentey
a712a8c33b Don't let x_initialize break 8-bit input on ttys. (Reported by Joakim Verona.) Split `set-input-mode'.
* lisp/international/encoded-kb.el (encoded-kbd-setup-display): Use `set-input-meta-mode'.
* lisp/linux.el (terminal-init-linux): Ditto.

* src/keyboard.c (Fset_input_interrupt_mode, Fset_output_flow_control)
  (syms_of_keyboard): Defsubr them.
  (Fset_input_meta_mode, Fset_quit_char): New functions.
  (Fset_input_mode): Split to above functions.

* lisp.h: EXFUN the new functions.

* xterm.c (x_initialize): Use Fset_input_interrupt_mode.
* macterm.c (mac_initialize): Ditto.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-457
2005-12-23 03:00:55 +00:00
Karoly Lorentey
f35ca2fe35 Reimplement and extend support for terminal-local environment variables.
* lisp/termdev.el: New file.  Move terminal parameter-related functions
  here from frame.el.
  (terminal-getenv, with-terminal-environment): Reimplement and extend.
  (terminal-setenv, terminal-setenv-internal): New functions.

* lisp/frame.el (make-frame-on-tty, framep-on-display, suspend-frame):
  Extend doc string, update parameter names.
  (terminal-id, terminal-parameter-alist, terminal-parameters)
  (terminal-parameter-p, terminal-parameter, set-terminal-parameter)
  (terminal-handle-delete-frame, terminal-getenv, terminal-getenv)
  (with-terminal-environment): Move to termdev.el.

* lisp/loadup.el: Load termdev as well.
* lisp/Makefile.in (lisp, shortlisp): Add termdev.elc.
* lisp/makefile.MPW (shortlisp): Ditto.

* lisp/ebuff-menu.el (electric-buffer-menu-mode-map): Bind C-z to
  `suspend-frame', not `suspend-emacs'.
* lisp/echistory.el (electric-history-map): Ditto.
* lisp/ebrowse.el (ebrowse-electric-list-mode-map): Ditto.
* lisp/ebrowse.el (ebrowse-electric-position-mode-map): Ditto.

* lisp/startup.el (normal-splash-screen): Use `save-buffers-kill-display'
  instead of `save-buffers-kill-emacs'.

* lisp/x-win.el (x-initialize-window-system): Add 'global-ok option to
  `terminal-getenv'.

* src/term.c (suspend-tty): Update doc string.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-456
2005-12-22 21:02:45 +00:00
Karoly Lorentey
bedeffcffb Work around Emacs crash on Konsole detach. (Tom Schutzer-Weissmann)
* src/dispnew.c (window_change_signal): Don't believe width/height values
  that are impossibly small.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-452
2005-12-13 19:03:29 +00:00
Karoly Lorentey
f369f10bdc README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-451
2005-12-12 03:32:16 +00:00
Karoly Lorentey
5f6a587f30 Prevent core dumps with GTK by disabling secondary X connections there.
* src/xterm.c (x_term_init) [!HAVE_GTK_MULTIDISPLAY]:
  Refuse to create secondary X connections.

* configure.in (HAVE_GTK_MULTIDISPLAY): Disable test, unconditionally undefine.
* configure: Regenerate.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-450
2005-12-12 03:15:52 +00:00
Karoly Lorentey
d68058039e Fix "first non-ASCII character on new tty frames" problem.
* src/keyboard.c (kbd_buffer_store_event_hold): Simplify condition.
  (read_key_sequence): Reinitialize fkey and keytran at each replay.

* src/coding.c (Fkeyboard_coding_system): Update doc.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-449
2005-12-12 02:37:01 +00:00
Karoly Lorentey
9684e4c92f Update frames-on-display-list to accept terminal id numbers.
* lisp/frame.el (frames-on-display-list): Use terminal-id to get the
  display id.
  (terminal-id): Also accept X display strings and tty device names.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-436
2005-11-07 14:17:18 +00:00
Karoly Lorentey
2e4782930a Change `keyboard-translate-table' to be terminal-local.
* lisp/subr.el (keyboard-translate): Use `terminal-local-value' to access `keyboard-translate-table'.
* lisp/obsolete/keyswap.el: Ditto.

* src/keyboard.c (Vkeyboard_translate_table): Moved to struct kboard.
* src/keyboard.h (Vkeyboard_translate_table): Moved to struct kboard.

* src/keyboard.c (read_char): Use current_kboard to access Vkeyboard_translate_table.
* src/keymap.c (Fdescribe_buffer_bindings): Ditto.

* src/keyboard.c (init_kboard): Initialize Vkeyboard_translate_table.

* src/keyboard.c (syms_of_keyboard): Use DEFVAR_KBOARD to define
  Vkeyboard_translate_table. Update doc strings.






git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-431
2005-10-28 14:29:24 +00:00
Karoly Lorentey
30a2fded2e Fix Delete key on X by adapting normal-erase-is-backspace-mode for multi-tty. (Reported by Dan Waber and Dan Nicolaescu.)
* lisp/frame.el (terminal-parameter-p): New function.
  (terminal-parameter): Use it.

* lisp/simple.el (normal-erase-is-backspace): Add 'maybe option, set it as default.
  (normal-erase-is-backspace-mode): Rewrite for multiple display support.
  (normal-erase-is-backspace-setup-frame): New function.

* lisp/frame.el (make-frame): Call it.
* lisp/startup.el (command-line): Call it.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-427
2005-10-23 22:11:22 +00:00
Karoly Lorentey
3fb8e5d73e Fix assertion on kboard->kbd_queue and other such crashes.
* src/keyboard.c (pop_kboard): Set current_kboard to the kboard of the
  selected frame when the stored kboard object has been deleted before
  pop_kboard.  
  (restore_kboard_configuration): Call pop_kboard only after setting up
  single_kboard mode.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-418
2005-09-11 09:34:22 +00:00
Karoly Lorentey
256c9c3a61 Fix crash after y-or-n-p prompt triggered by emacsclient. (Reported by Han Boetes, analysis by Kalle Olavi Niemitalo.)
* src/keyboard.c (temporarily_switch_to_single_kboard)
  (record_single_kboard_state, restore_kboard_configuration):  New functions.
  (timer_check): Use record_single_kboard_state instead of
  naive single_kboard state management.

* src/fns.c: Include termhooks.h.
  (Fy_or_n_p): Use temporarily_switch_to_single_kboard to prevent crashes
  caused by bogus longjmps in read_char.

* src/callint.c (Fcall_interactively): Use
  temporarily_switch_to_single_kboard instead of single_kboard_state.
  Make sure it is correctly unwinded.

* src/keyboard.c (recursive_edit_unwind): Remove single_kboard stuff.
  (Frecursive_edit): Use temporarily_switch_to_single_kboard for
  single_kboard state management.

* src/minibuf.c (read_minibuf): Use temporarily_switch_to_single_kboard
  instead of simply calling single_kboard_state.

* src/keyboard.c (push_device_kboard): Remove function.
  (push_kboard): New function.
  (push_frame_kboard): Use it.
  (pop_frame_kboard): Rename to pop_kboard.

* src/xdisp.c (display_mode_line, Fformat_mode_line): Update uses.

* src/data.c: Include termhooks.h.
  (Fterminal_local_value, Fset_terminal_local_value): Update.

* src/Makefile.in (data.o, fns.o): Add termhooks.h dependency.

* src/keyboard.h (push_device_kboard, pop_frame_kboard): Remove declarations.
  (push_kboard, pop_kboard, temporarily_switch_to_single_kboard)
  (record_single_kboard_state): New declarations.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-414
2005-09-11 06:42:03 +00:00
Karoly Lorentey
ee0bcfbce6 Set Emacs version number to 22.0.51 to allow parallel installations of CVS trunk and the multi-tty branch.
* README: Set Emacs version to 22.0.51.
* lispref/elisp.texi (EMACSVER): Set to 22.0.51.
* man/emacs.texi (EMACSVER): Set to 22.0.51.
* lisp/version.el (emacs-version): Set to 22.0.51.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-413
2005-09-11 04:10:45 +00:00
Karoly Lorentey
b8ccaf6fb3 Make `emacsclient -n <filename>' open new X frames when possible. (Reported by Bas Kok.)
* lib-src/emacsclient.c (decode_options): Change --no-wait to imply
  --current-frame only on ttys and only when there are extra arguments.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-411
2005-09-11 03:49:47 +00:00
Karoly Lorentey
6bac161607 Make xt-mouse.el multi-tty-compatible.
* lisp/xt-mouse.el (xterm-mouse-x, xterm-mouse-y): Convert to terminal parameters.
  (xterm-mouse-position-function, xterm-mouse-event): Update.
  (xterm-mouse-mode): Don't depend on current value of window-system.
  (turn-on-xterm-mouse-tracking, turn-off-xterm-mouse-tracking): Update
  for multi-tty.
  (turn-on-xterm-mouse-tracking-on-terminal) 
  (turn-off-xterm-mouse-tracking-on-terminal) 
  (xterm-mouse-handle-delete-frame): New functions.
  (delete-frame-functions, after-make-frame-functions) 
  (suspend-tty-functions, resume-tty-functions): Install extra hooks for multi-tty.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-409
2005-09-11 03:06:33 +00:00
Karoly Lorentey
92071250fa Fix `emacsclient -ne '(+ 2 2)'' (reported by Han Boetes), and clean up some corner cases in Emacs server.
* lib-src/emacsclient.c (decode_options): Make --no-wait imply
  --current-frame, except when it is the only option given.  Make sure no
  frame is opened when --current-frame is set.  
  (main): Pass --current-frame to server.el.

* lisp/server.el (server-process-filter): Handle -current-frame command.
  Don't create frames when it is given.  Don't bind X frames to the
  client when we are in -no-wait mode.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-407
2005-09-10 23:51:08 +00:00
Karoly Lorentey
01c6298238 README update.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-405
2005-09-09 20:53:18 +00:00
Karoly Lorentey
af520c4a4e Fix function-key-map massaging vs `C-x 5 2' in lisp/term/*.el. (Submitted by Dan Nicolaescu.)
* term/lk201.el (terminal-init-lk201): 
* term/iris-ansi.el (terminal-init-iris-ansi): 
* term/rxvt.el (terminal-init-rxvt): Protect function-key-map
  against multiple invocations from the same terminal.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-403
2005-09-09 19:04:34 +00:00
Karoly Lorentey
5b65d888a6 Enforce the presence of window-system' and tty-type' frame parameters in all frames.
* src/dispnew.c (init_display): Set up `window-system' and `tty-type'
  frame parameters in the initial tty frame.

* src/frame.c (Fmake_terminal_frame): Look up the `tty-type' frame
  parameter, not `tty' when discovering the tty type of the new frame.
  Initialize `tty' and `tty-type' frame parameters in the new frame.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-402
2005-09-07 23:28:54 +00:00
Karoly Lorentey
b8c89bf638 Prevent resource allocation explosion when C-x 5 2 is used on xterms.
* lisp/term/xterm.el (terminal-init-xterm): Protect function-key-map
  against multiple invocations on the same terminal.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-401
2005-09-07 23:17:07 +00:00
Karoly Lorentey
cd85984a2d Slightly refactor the terminal initialization code for simplicity.
* lisp/faces.el (tty-run-terminal-initialization): New function.
  (tty-create-frame-with-faces): Use it.

* lisp/startup.el (command-line): Replace duplicated code with a call to
  tty-run-terminal-initialization.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-399
2005-09-07 02:29:18 +00:00
Karoly Lorentey
f0caabd962 Add two pending bugs to README.multi-tty.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-392
2005-08-25 12:03:34 +00:00
Karoly Lorentey
d51abf2262 Work around crashes in X session management after normal shutdown of X server.
* src/xsmfns.c (x_session_close): New function.
* src/xterm.h: Declare it.

* src/xterm.c (XTread_socket): Don't call x_session_check_input for
  secondary displays.
  (x_term_init): Do not initialize X session management when the initial
  display was a tty frame.
  (x_delete_display): Close X session management when we close its display.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-390
2005-08-04 00:46:55 +00:00
Karoly Lorentey
a9d63618b0 README update.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-385
2005-07-11 00:21:10 +00:00
Karoly Lorentey
7e59217d26 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
2005-07-11 00:05:55 +00:00
Karoly Lorentey
3e6f836c7b README update.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-380
2005-07-10 22:18:46 +00:00
Karoly Lorentey
4400e7648c Implement rudimentary Lisp-level terminal parameters.
* lisp/frame.el (terminal-id, terminal-parameters, terminal-parameter) 
  (set-terminal-parameter, terminal-handle-delete-frame): New functions.
  (delete-frame-functions): Add to `delete-frame-functions' hook.
  (terminal-parameter-alist): New variable.

* lisp/international/encoded-kb.el (saved-input-mode): Delete variable.
  (encoded-kbd-setup-display): Store the saved input method as a terminal
  parameter.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-373
2005-07-06 00:41:41 +00:00
Karoly Lorentey
7d6d7d1a61 Speed up loading of term/xterm.el (Dan Nicolaescu).
* lisp/term/xterm.el: Move key substitutions back before the
  define-keys.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-368
2005-06-28 15:06:17 +00:00
Karoly Lorentey
2a42d44084 Work around nondeterministic binding of terminal-local variables. (Fixes national character input on ttys.)
* src/data.c (Fterminal_local_value, Fset_terminal_local_value): New functions.
  (syms_of_data): Defsubr them.

* lisp/international/encoded-kb.el (encoded-kbd-setup-keymap): Add keymap
  parameter.  Use it instead of changing key-translation-map directly.
  (encoded-kbd-setup-display): Use terminal-local-value and
  set-terminal-local-value to access key-translation-map.  Remove
  debugging messages.

* lisp/international/mule.el (keyboard-coding-system): Test for
  encoded-kbd-setup-display, not encoded-kbd-mode.

* src/keyboard.c (syms_of_keyboard): Expand docs of terminal-local
  variables to warn about their random bindings.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-365
2005-06-27 02:08:34 +00:00
Karoly Lorentey
1fb8c4adcb Work around mysterious breakage of arrow key recognition under screen (see first TODO in README).
* src/keyboard.c (Fset_input_mode): Call reset_sys_modes and
  init_sys_modes on the selected device only; do not use the bulk
  functions reset_all_sys_modes and init_all_sys_modes.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-358
2005-06-26 04:35:44 +00:00
Karoly Lorentey
97c57fb2b8 Support for ttys with different character locale settings.
* lisp/server.el (server-process-filter): Set locale environment
  variables from client while creating tty frames.

* lisp/faces.el (tty-create-frame-with-faces): Call set-locale-environment.

* lisp/international/mule-cmds.el (set-display-table-and-terminal-coding-system): 
  Add DISPLAY parameter.  Pass it to set-terminal-coding-system.
  (set-locale-environment): Add DISPLAY parameter.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-340
2005-05-03 03:01:09 +00:00
Karoly Lorentey
68bba4e4b3 Fix UTF-8 tty input when first frame is an X frame. Steps towards multiple tty locale support.
* 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
2005-05-03 01:49:33 +00:00
Karoly Lorentey
ea4c170ae4 README update. (Fix identifier names in emacs background preloader example.)
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-322
2005-03-28 04:13:53 +00:00
Karoly Lorentey
779d7de939 README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-314
2005-03-22 15:00:17 +00:00
Karoly Lorentey
1a27213c2f Fix crash condition when an X server connection is broken. (Reported by Vincent Bernat.)
* src/xterm.c (x_flush): Return immediately when redisplay is inhibited.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-304
2005-03-07 16:39:57 +00:00
Karoly Lorentey
44d7460c77 README updates. (Reported by Xavier Mallard)
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-287
2005-02-04 14:06:45 +00:00
Karoly Lorentey
97b977dbee README update.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-275
2004-12-09 00:43:19 +00:00
Karoly Lorentey
9d3d44ba8f Trivial changes in x_create_tip_frame.
* src/xfns.c (x_create_tip_frame): Copy color slot initialization
  safeguards from x-create-frame.  Trivial doc update.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-274
2004-12-08 23:58:40 +00:00
Karoly Lorentey
856dd47583 Remove remaining references to updating_frame.
* src/dispextern.h (updated_window): Remove comment reference to
  updating_frame.

* src/dispnew.c (update_window): Remove bogus xassert.

* src/xterm.c: (x_clear_frame): Update comment.
  (x_draw_window_cursor): Remove reference to updating_frame.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-270
2004-11-28 14:39:06 +00:00
Karoly Lorentey
ec16044407 Fix core dump in redisplay window. (Reported by Yoshiaki Kasahara.) Plus cleanups.
* src/xdisp.c (handle_single_display_prop): Use FRAME_WINDOW_P instead of
  checking against specific frame types.  Ignore images on non-window
  frames.
  (echo_area_display): Use FRAME_INITIAL_P to check for initial frame.
  (redisplay_preserve_echo_area): Update for multi-tty support.
  (redisplay_window): Don't bother with toolbars, fringe bitmaps or
  vertical borders on tty frames.
  (display_line): Remove superflous #ifdefs.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-260
2004-10-14 14:58:43 +00:00
Karoly Lorentey
90e06c2e20 README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-248
2004-09-20 13:59:19 +00:00
Karoly Lorentey
5cd4323386 Inhibit redisplay while frames are being deleted after an X disconnect.
* src/xterm.c (x_connection_closed): Inhibit redisplay while frames are
  being deleted.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-243
2004-09-10 18:07:22 +00:00
Karoly Lorentey
90376e6f17 Fix typo in server.el (Han Boetes, Ted Morse, Ami Fischman)
* lisp/server.el ("\C-x#"): Fix typo.  (Thanks Han Boetes, Ted Morse and
  Ami Fischman.)


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-235
2004-08-23 08:50:01 +00:00
Karoly Lorentey
ccc84c2458 README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-233
2004-08-19 14:30:16 +00:00