diff options
| author | Dmitry Antipov | 2014-10-14 16:45:41 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2014-10-14 16:45:41 +0400 |
| commit | bb75cdf9c74ab19b75532da1f953233a47eedab4 (patch) | |
| tree | b8b4d07acaf36cdce7485fb459e7376975ebd5f7 /src/coding.c | |
| parent | 5fa75d8eba2d43408fd7831dcfd69c21e31c21f3 (diff) | |
| download | emacs-bb75cdf9c74ab19b75532da1f953233a47eedab4.tar.gz emacs-bb75cdf9c74ab19b75532da1f953233a47eedab4.zip | |
Cleanup terminal handling code.
* dispextern.h (get_named_tty): Remove prototype but...
* termhooks.h (get_named_terminal): ...resurrect it under
more meaningful name.
(get_terminal): Likewise, but with...
(decode_live_terminal): ...this name.
(decode_tty_terminal): Add prototype.
* term.c (get_tty_terminal): Remove.
(get_named_tty): Remove.
(Ftty_display_color_p, Ftty_display_color_cells, Ftty_type)
(Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty):
Use decode_tty_terminal.
(Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal.
* terminal.c (get_terminal): Refactor to...
(decode_terminal, decode_live_terminal): ...new functions.
(decode_tty_terminal): Replacement for get_tty_terminal.
(get_named_terminal): Likewise for get_named_tty.
* coding.c (Fset_terminal_coding_system_internal)
(Fterminal_coding_system, Fset_keyboard_coding_system_internal):
(Fkeyboard_coding_system):
* composite.c (Fcomposition_get_gstring):
* dispnew.c (Fsend_string_to_terminal):
* frame.c (Fmake_terminal_frame):
* nsfns.m (check_ns_display_info):
* w32fns.c, xfns.c (check_x_display_info):
* xselect.c (frame_for_x_selection): Use decode_live_terminal.
* keyboard.c (handle_interrupt_signal, handle_interrupt)
(Fset_quit_char): Use get_named_terminal.
(Fset_output_flow_control, Fset_input_meta_mode):
Use decode_tty_terminal.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/coding.c b/src/coding.c index f63d710ce9a..e4b52f6db48 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -9759,7 +9759,7 @@ DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_intern | |||
| 9759 | doc: /* Internal use only. */) | 9759 | doc: /* Internal use only. */) |
| 9760 | (Lisp_Object coding_system, Lisp_Object terminal) | 9760 | (Lisp_Object coding_system, Lisp_Object terminal) |
| 9761 | { | 9761 | { |
| 9762 | struct terminal *term = get_terminal (terminal, 1); | 9762 | struct terminal *term = decode_live_terminal (terminal); |
| 9763 | struct coding_system *terminal_coding = TERMINAL_TERMINAL_CODING (term); | 9763 | struct coding_system *terminal_coding = TERMINAL_TERMINAL_CODING (term); |
| 9764 | CHECK_SYMBOL (coding_system); | 9764 | CHECK_SYMBOL (coding_system); |
| 9765 | setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); | 9765 | setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); |
| @@ -9800,7 +9800,7 @@ frame's terminal device. */) | |||
| 9800 | (Lisp_Object terminal) | 9800 | (Lisp_Object terminal) |
| 9801 | { | 9801 | { |
| 9802 | struct coding_system *terminal_coding | 9802 | struct coding_system *terminal_coding |
| 9803 | = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); | 9803 | = TERMINAL_TERMINAL_CODING (decode_live_terminal (terminal)); |
| 9804 | Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id); | 9804 | Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id); |
| 9805 | 9805 | ||
| 9806 | /* For backward compatibility, return nil if it is `undecided'. */ | 9806 | /* For backward compatibility, return nil if it is `undecided'. */ |
| @@ -9812,7 +9812,7 @@ DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_intern | |||
| 9812 | doc: /* Internal use only. */) | 9812 | doc: /* Internal use only. */) |
| 9813 | (Lisp_Object coding_system, Lisp_Object terminal) | 9813 | (Lisp_Object coding_system, Lisp_Object terminal) |
| 9814 | { | 9814 | { |
| 9815 | struct terminal *t = get_terminal (terminal, 1); | 9815 | struct terminal *t = decode_live_terminal (terminal); |
| 9816 | CHECK_SYMBOL (coding_system); | 9816 | CHECK_SYMBOL (coding_system); |
| 9817 | if (NILP (coding_system)) | 9817 | if (NILP (coding_system)) |
| 9818 | coding_system = Qno_conversion; | 9818 | coding_system = Qno_conversion; |
| @@ -9831,7 +9831,7 @@ DEFUN ("keyboard-coding-system", | |||
| 9831 | (Lisp_Object terminal) | 9831 | (Lisp_Object terminal) |
| 9832 | { | 9832 | { |
| 9833 | return CODING_ID_NAME (TERMINAL_KEYBOARD_CODING | 9833 | return CODING_ID_NAME (TERMINAL_KEYBOARD_CODING |
| 9834 | (get_terminal (terminal, 1))->id); | 9834 | (decode_live_terminal (terminal))->id); |
| 9835 | } | 9835 | } |
| 9836 | 9836 | ||
| 9837 | 9837 | ||