From b8299c66e3307372c1d5021cf420493db5d501b4 Mon Sep 17 00:00:00 2001 From: Karoly Lorentey Date: Sun, 23 May 2004 01:53:23 +0000 Subject: Make terminal_coding and keyboard_coding display-local. 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 --- src/coding.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'src/coding.c') diff --git a/src/coding.c b/src/coding.c index 76ef3026a2d..7e90b985143 100644 --- a/src/coding.c +++ b/src/coding.c @@ -346,6 +346,8 @@ encode_coding_XXX (coding, source, destination, src_bytes, dst_bytes) #include "coding.h" #include "window.h" #include "intervals.h" +#include "frame.h" +#include "termhooks.h" #else /* not emacs */ @@ -428,16 +430,10 @@ int inhibit_iso_escape_detection; /* Flag to make buffer-file-coding-system inherit from process-coding. */ int inherit_process_coding_system; -/* Coding system to be used to encode text for terminal display. */ -struct coding_system terminal_coding; - /* Coding system to be used to encode text for terminal display when terminal coding system is nil. */ struct coding_system safe_terminal_coding; -/* Coding system of what is sent from terminal keyboard. */ -struct coding_system keyboard_coding; - /* Default coding system to be used to write a file. */ struct coding_system default_buffer_file_coding; @@ -7184,16 +7180,17 @@ DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_intern (coding_system) Lisp_Object coding_system; { + struct coding_system *terminal_coding = FRAME_TERMINAL_CODING (SELECTED_FRAME ()); CHECK_SYMBOL (coding_system); - setup_coding_system (Fcheck_coding_system (coding_system), &terminal_coding); + setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); /* We had better not send unsafe characters to terminal. */ - terminal_coding.mode |= CODING_MODE_INHIBIT_UNENCODABLE_CHAR; + terminal_coding->mode |= CODING_MODE_INHIBIT_UNENCODABLE_CHAR; /* Character composition should be disabled. */ - terminal_coding.composing = COMPOSITION_DISABLED; + terminal_coding->composing = COMPOSITION_DISABLED; /* Error notification should be suppressed. */ - terminal_coding.suppress_error = 1; - terminal_coding.src_multibyte = 1; - terminal_coding.dst_multibyte = 0; + terminal_coding->suppress_error = 1; + terminal_coding->src_multibyte = 1; + terminal_coding->dst_multibyte = 0; return Qnil; } @@ -7209,7 +7206,7 @@ DEFUN ("set-safe-terminal-coding-system-internal", Fset_safe_terminal_coding_sys /* Character composition should be disabled. */ safe_terminal_coding.composing = COMPOSITION_DISABLED; /* Error notification should be suppressed. */ - terminal_coding.suppress_error = 1; + safe_terminal_coding.suppress_error = 1; safe_terminal_coding.src_multibyte = 1; safe_terminal_coding.dst_multibyte = 0; return Qnil; @@ -7220,7 +7217,7 @@ DEFUN ("terminal-coding-system", Fterminal_coding_system, doc: /* Return coding system specified for terminal output. */) () { - return terminal_coding.symbol; + return FRAME_TERMINAL_CODING (SELECTED_FRAME ())->symbol; } DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_internal, @@ -7230,9 +7227,10 @@ DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_intern Lisp_Object coding_system; { CHECK_SYMBOL (coding_system); - setup_coding_system (Fcheck_coding_system (coding_system), &keyboard_coding); + setup_coding_system (Fcheck_coding_system (coding_system), + FRAME_KEYBOARD_CODING (SELECTED_FRAME ())); /* Character composition should be disabled. */ - keyboard_coding.composing = COMPOSITION_DISABLED; + FRAME_KEYBOARD_CODING (SELECTED_FRAME ())->composing = COMPOSITION_DISABLED; return Qnil; } @@ -7241,7 +7239,7 @@ DEFUN ("keyboard-coding-system", Fkeyboard_coding_system, doc: /* Return coding system specified for decoding keyboard input. */) () { - return keyboard_coding.symbol; + return FRAME_KEYBOARD_CODING (SELECTED_FRAME ())->symbol; } @@ -7488,8 +7486,6 @@ init_coding_once () iso_code_class[ISO_CODE_SS3] = ISO_single_shift_3; iso_code_class[ISO_CODE_CSI] = ISO_control_sequence_introducer; - setup_coding_system (Qnil, &keyboard_coding); - setup_coding_system (Qnil, &terminal_coding); setup_coding_system (Qnil, &safe_terminal_coding); setup_coding_system (Qnil, &default_buffer_file_coding); -- cgit v1.2.1 From 68bba4e4b3ced56b5608ee0495f94d24e7e3f40c Mon Sep 17 00:00:00 2001 From: Karoly Lorentey Date: Tue, 3 May 2005 01:49:33 +0000 Subject: 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 --- src/coding.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'src/coding.c') diff --git a/src/coding.c b/src/coding.c index b914574bbca..f7da394def1 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7305,12 +7305,13 @@ Return the corresponding character code in Big5. */) } DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_internal, - Sset_terminal_coding_system_internal, 1, 1, 0, + Sset_terminal_coding_system_internal, 1, 2, 0, doc: /* Internal use only. */) - (coding_system) + (coding_system, display) Lisp_Object coding_system; + Lisp_Object display; { - struct coding_system *terminal_coding = FRAME_TERMINAL_CODING (SELECTED_FRAME ()); + struct coding_system *terminal_coding = DISPLAY_TERMINAL_CODING (get_display (display, 1)); CHECK_SYMBOL (coding_system); setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); /* We had better not send unsafe characters to terminal. */ @@ -7343,33 +7344,39 @@ DEFUN ("set-safe-terminal-coding-system-internal", Fset_safe_terminal_coding_sys } DEFUN ("terminal-coding-system", Fterminal_coding_system, - Sterminal_coding_system, 0, 0, 0, - doc: /* Return coding system specified for terminal output. */) - () + Sterminal_coding_system, 0, 1, 0, + doc: /* Return coding system specified for terminal output on the given display. +DISPLAY may be a display id, a frame, or nil for the selected frame's display. */) + (display) + Lisp_Object display; { - return FRAME_TERMINAL_CODING (SELECTED_FRAME ())->symbol; + return DISPLAY_TERMINAL_CODING (get_display (display, 1))->symbol; } DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_internal, - Sset_keyboard_coding_system_internal, 1, 1, 0, + Sset_keyboard_coding_system_internal, 1, 2, 0, doc: /* Internal use only. */) - (coding_system) + (coding_system, display) Lisp_Object coding_system; + Lisp_Object display; { + struct display *d = get_display (display, 1); CHECK_SYMBOL (coding_system); + setup_coding_system (Fcheck_coding_system (coding_system), - FRAME_KEYBOARD_CODING (SELECTED_FRAME ())); + DISPLAY_KEYBOARD_CODING (d)); /* Character composition should be disabled. */ - FRAME_KEYBOARD_CODING (SELECTED_FRAME ())->composing = COMPOSITION_DISABLED; + DISPLAY_KEYBOARD_CODING (d)->composing = COMPOSITION_DISABLED; return Qnil; } DEFUN ("keyboard-coding-system", Fkeyboard_coding_system, - Skeyboard_coding_system, 0, 0, 0, + Skeyboard_coding_system, 0, 1, 0, doc: /* Return coding system specified for decoding keyboard input. */) - () + (display) + Lisp_Object display; { - return FRAME_KEYBOARD_CODING (SELECTED_FRAME ())->symbol; + return DISPLAY_KEYBOARD_CODING (get_display (display, 1))->symbol; } -- cgit v1.2.1 From 7e59217d2639c9913c2c76cd9d9825dabe78251a Mon Sep 17 00:00:00 2001 From: Karoly Lorentey Date: Mon, 11 Jul 2005 00:05:55 +0000 Subject: 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 --- src/coding.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'src/coding.c') diff --git a/src/coding.c b/src/coding.c index 79b1c93cb3a..808f1e7d9c2 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7307,11 +7307,11 @@ Return the corresponding character code in Big5. */) DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_internal, Sset_terminal_coding_system_internal, 1, 2, 0, doc: /* Internal use only. */) - (coding_system, display) + (coding_system, device) Lisp_Object coding_system; - Lisp_Object display; + Lisp_Object device; { - struct coding_system *terminal_coding = DISPLAY_TERMINAL_CODING (get_display (display, 1)); + struct coding_system *terminal_coding = DEVICE_TERMINAL_CODING (get_device (device, 1)); CHECK_SYMBOL (coding_system); setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); /* We had better not send unsafe characters to terminal. */ @@ -7345,38 +7345,39 @@ DEFUN ("set-safe-terminal-coding-system-internal", Fset_safe_terminal_coding_sys DEFUN ("terminal-coding-system", Fterminal_coding_system, Sterminal_coding_system, 0, 1, 0, - doc: /* Return coding system specified for terminal output on the given display. -DISPLAY may be a display id, a frame, or nil for the selected frame's display. */) - (display) - Lisp_Object display; + doc: /* Return coding system specified for terminal output on the given device. +DEVICE may be a display device id, a frame, or nil for the selected +frame's display device. */) + (device) + Lisp_Object device; { - return DISPLAY_TERMINAL_CODING (get_display (display, 1))->symbol; + return DEVICE_TERMINAL_CODING (get_device (device, 1))->symbol; } DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_internal, Sset_keyboard_coding_system_internal, 1, 2, 0, doc: /* Internal use only. */) - (coding_system, display) + (coding_system, device) Lisp_Object coding_system; - Lisp_Object display; + Lisp_Object device; { - struct display *d = get_display (display, 1); + struct device *d = get_device (device, 1); CHECK_SYMBOL (coding_system); setup_coding_system (Fcheck_coding_system (coding_system), - DISPLAY_KEYBOARD_CODING (d)); + DEVICE_KEYBOARD_CODING (d)); /* Character composition should be disabled. */ - DISPLAY_KEYBOARD_CODING (d)->composing = COMPOSITION_DISABLED; + DEVICE_KEYBOARD_CODING (d)->composing = COMPOSITION_DISABLED; return Qnil; } DEFUN ("keyboard-coding-system", Fkeyboard_coding_system, Skeyboard_coding_system, 0, 1, 0, doc: /* Return coding system specified for decoding keyboard input. */) - (display) - Lisp_Object display; + (device) + Lisp_Object device; { - return DISPLAY_KEYBOARD_CODING (get_display (display, 1))->symbol; + return DEVICE_KEYBOARD_CODING (get_device (device, 1))->symbol; } -- cgit v1.2.1 From d68058039e1ff5635b2e44509fc242de4f0a286f Mon Sep 17 00:00:00 2001 From: Karoly Lorentey Date: Mon, 12 Dec 2005 02:37:01 +0000 Subject: 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 --- src/coding.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/coding.c') diff --git a/src/coding.c b/src/coding.c index 5658a8ab09a..d032f8c9483 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7411,7 +7411,9 @@ DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_intern DEFUN ("keyboard-coding-system", Fkeyboard_coding_system, Skeyboard_coding_system, 0, 1, 0, - doc: /* Return coding system specified for decoding keyboard input. */) + doc: /* Return coding system for decoding keyboard input on DEVICE. +DEVICE may be a display device id, a frame, or nil for the selected +frame's display device. */) (device) Lisp_Object device; { -- cgit v1.2.1 From 6ed8eeffb3a2c5cbbd8622a7ccd0726c3bf92946 Mon Sep 17 00:00:00 2001 From: Karoly Lorentey Date: Thu, 29 Dec 2005 18:20:26 +0000 Subject: 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 --- src/coding.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/coding.c') diff --git a/src/coding.c b/src/coding.c index 759a97567c1..14f8fd33285 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7351,11 +7351,11 @@ Return the corresponding character code in Big5. */) DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_internal, Sset_terminal_coding_system_internal, 1, 2, 0, doc: /* Internal use only. */) - (coding_system, device) + (coding_system, terminal) Lisp_Object coding_system; - Lisp_Object device; + Lisp_Object terminal; { - struct coding_system *terminal_coding = DEVICE_TERMINAL_CODING (get_device (device, 1)); + struct coding_system *terminal_coding = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); CHECK_SYMBOL (coding_system); setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); /* We had better not send unsafe characters to terminal. */ @@ -7389,41 +7389,41 @@ DEFUN ("set-safe-terminal-coding-system-internal", Fset_safe_terminal_coding_sys DEFUN ("terminal-coding-system", Fterminal_coding_system, Sterminal_coding_system, 0, 1, 0, - doc: /* Return coding system specified for terminal output on the given device. -DEVICE may be a display device id, a frame, or nil for the selected -frame's display device. */) - (device) - Lisp_Object device; + doc: /* Return coding system specified for terminal output on the given terminal. +TERMINAL may be a terminal id, a frame, or nil for the selected +frame's terminal device. */) + (terminal) + Lisp_Object terminal; { - return DEVICE_TERMINAL_CODING (get_device (device, 1))->symbol; + return TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1))->symbol; } DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_internal, Sset_keyboard_coding_system_internal, 1, 2, 0, doc: /* Internal use only. */) - (coding_system, device) + (coding_system, terminal) Lisp_Object coding_system; - Lisp_Object device; + Lisp_Object terminal; { - struct device *d = get_device (device, 1); + struct terminal *t = get_terminal (terminal, 1); CHECK_SYMBOL (coding_system); setup_coding_system (Fcheck_coding_system (coding_system), - DEVICE_KEYBOARD_CODING (d)); + TERMINAL_KEYBOARD_CODING (t)); /* Character composition should be disabled. */ - DEVICE_KEYBOARD_CODING (d)->composing = COMPOSITION_DISABLED; + TERMINAL_KEYBOARD_CODING (t)->composing = COMPOSITION_DISABLED; return Qnil; } DEFUN ("keyboard-coding-system", Fkeyboard_coding_system, Skeyboard_coding_system, 0, 1, 0, - doc: /* Return coding system for decoding keyboard input on DEVICE. -DEVICE may be a display device id, a frame, or nil for the selected -frame's display device. */) - (device) - Lisp_Object device; + doc: /* Return coding system for decoding keyboard input on TERMINAL. +TERMINAL may be a terminal id, a frame, or nil for the selected +frame's terminal device. */) + (terminal) + Lisp_Object terminal; { - return DEVICE_KEYBOARD_CODING (get_device (device, 1))->symbol; + return TERMINAL_KEYBOARD_CODING (get_terminal (terminal, 1))->symbol; } -- cgit v1.2.1