diff options
| author | Karoly Lorentey | 2005-05-03 01:49:33 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-05-03 01:49:33 +0000 |
| commit | 68bba4e4b3ced56b5608ee0495f94d24e7e3f40c (patch) | |
| tree | 43067ff161298f52824bd833e6d16b65dddf23e9 /src/coding.c | |
| parent | 941d4811d5b6660e2cdb5f668d52792c7e5920e8 (diff) | |
| download | emacs-68bba4e4b3ced56b5608ee0495f94d24e7e3f40c.tar.gz emacs-68bba4e4b3ced56b5608ee0495f94d24e7e3f40c.zip | |
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
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 35 |
1 files changed, 21 insertions, 14 deletions
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. */) | |||
| 7305 | } | 7305 | } |
| 7306 | 7306 | ||
| 7307 | DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_internal, | 7307 | DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_internal, |
| 7308 | Sset_terminal_coding_system_internal, 1, 1, 0, | 7308 | Sset_terminal_coding_system_internal, 1, 2, 0, |
| 7309 | doc: /* Internal use only. */) | 7309 | doc: /* Internal use only. */) |
| 7310 | (coding_system) | 7310 | (coding_system, display) |
| 7311 | Lisp_Object coding_system; | 7311 | Lisp_Object coding_system; |
| 7312 | Lisp_Object display; | ||
| 7312 | { | 7313 | { |
| 7313 | struct coding_system *terminal_coding = FRAME_TERMINAL_CODING (SELECTED_FRAME ()); | 7314 | struct coding_system *terminal_coding = DISPLAY_TERMINAL_CODING (get_display (display, 1)); |
| 7314 | CHECK_SYMBOL (coding_system); | 7315 | CHECK_SYMBOL (coding_system); |
| 7315 | setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); | 7316 | setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); |
| 7316 | /* We had better not send unsafe characters to terminal. */ | 7317 | /* 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 | |||
| 7343 | } | 7344 | } |
| 7344 | 7345 | ||
| 7345 | DEFUN ("terminal-coding-system", Fterminal_coding_system, | 7346 | DEFUN ("terminal-coding-system", Fterminal_coding_system, |
| 7346 | Sterminal_coding_system, 0, 0, 0, | 7347 | Sterminal_coding_system, 0, 1, 0, |
| 7347 | doc: /* Return coding system specified for terminal output. */) | 7348 | doc: /* Return coding system specified for terminal output on the given display. |
| 7348 | () | 7349 | DISPLAY may be a display id, a frame, or nil for the selected frame's display. */) |
| 7350 | (display) | ||
| 7351 | Lisp_Object display; | ||
| 7349 | { | 7352 | { |
| 7350 | return FRAME_TERMINAL_CODING (SELECTED_FRAME ())->symbol; | 7353 | return DISPLAY_TERMINAL_CODING (get_display (display, 1))->symbol; |
| 7351 | } | 7354 | } |
| 7352 | 7355 | ||
| 7353 | DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_internal, | 7356 | DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_internal, |
| 7354 | Sset_keyboard_coding_system_internal, 1, 1, 0, | 7357 | Sset_keyboard_coding_system_internal, 1, 2, 0, |
| 7355 | doc: /* Internal use only. */) | 7358 | doc: /* Internal use only. */) |
| 7356 | (coding_system) | 7359 | (coding_system, display) |
| 7357 | Lisp_Object coding_system; | 7360 | Lisp_Object coding_system; |
| 7361 | Lisp_Object display; | ||
| 7358 | { | 7362 | { |
| 7363 | struct display *d = get_display (display, 1); | ||
| 7359 | CHECK_SYMBOL (coding_system); | 7364 | CHECK_SYMBOL (coding_system); |
| 7365 | |||
| 7360 | setup_coding_system (Fcheck_coding_system (coding_system), | 7366 | setup_coding_system (Fcheck_coding_system (coding_system), |
| 7361 | FRAME_KEYBOARD_CODING (SELECTED_FRAME ())); | 7367 | DISPLAY_KEYBOARD_CODING (d)); |
| 7362 | /* Character composition should be disabled. */ | 7368 | /* Character composition should be disabled. */ |
| 7363 | FRAME_KEYBOARD_CODING (SELECTED_FRAME ())->composing = COMPOSITION_DISABLED; | 7369 | DISPLAY_KEYBOARD_CODING (d)->composing = COMPOSITION_DISABLED; |
| 7364 | return Qnil; | 7370 | return Qnil; |
| 7365 | } | 7371 | } |
| 7366 | 7372 | ||
| 7367 | DEFUN ("keyboard-coding-system", Fkeyboard_coding_system, | 7373 | DEFUN ("keyboard-coding-system", Fkeyboard_coding_system, |
| 7368 | Skeyboard_coding_system, 0, 0, 0, | 7374 | Skeyboard_coding_system, 0, 1, 0, |
| 7369 | doc: /* Return coding system specified for decoding keyboard input. */) | 7375 | doc: /* Return coding system specified for decoding keyboard input. */) |
| 7370 | () | 7376 | (display) |
| 7377 | Lisp_Object display; | ||
| 7371 | { | 7378 | { |
| 7372 | return FRAME_KEYBOARD_CODING (SELECTED_FRAME ())->symbol; | 7379 | return DISPLAY_KEYBOARD_CODING (get_display (display, 1))->symbol; |
| 7373 | } | 7380 | } |
| 7374 | 7381 | ||
| 7375 | 7382 | ||