Mercurial > emacs
comparison src/coding.c @ 91046:35069180a991
Fix up multi-tty merge
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-261
Creator: Stefan Monnier <monnier@iro.umontreal.ca>
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 12 Oct 2007 21:06:27 +0000 |
parents | bdb3fe0ba9fa |
children | 1251cabc40b7 |
comparison
equal
deleted
inserted
replaced
91045:39ec756a9481 | 91046:35069180a991 |
---|---|
384 int inherit_process_coding_system; | 384 int inherit_process_coding_system; |
385 | 385 |
386 /* Coding system to be used to encode text for terminal display when | 386 /* Coding system to be used to encode text for terminal display when |
387 terminal coding system is nil. */ | 387 terminal coding system is nil. */ |
388 struct coding_system safe_terminal_coding; | 388 struct coding_system safe_terminal_coding; |
389 | |
390 /* Default coding system to be used to write a file. */ | |
391 struct coding_system default_buffer_file_coding; | |
392 | 389 |
393 Lisp_Object Vfile_coding_system_alist; | 390 Lisp_Object Vfile_coding_system_alist; |
394 Lisp_Object Vprocess_coding_system_alist; | 391 Lisp_Object Vprocess_coding_system_alist; |
395 Lisp_Object Vnetwork_coding_system_alist; | 392 Lisp_Object Vnetwork_coding_system_alist; |
396 | 393 |
8327 TERMINAL may be a terminal id, a frame, or nil for the selected | 8324 TERMINAL may be a terminal id, a frame, or nil for the selected |
8328 frame's terminal device. */) | 8325 frame's terminal device. */) |
8329 (terminal) | 8326 (terminal) |
8330 Lisp_Object terminal; | 8327 Lisp_Object terminal; |
8331 { | 8328 { |
8332 Lisp_Object coding_system; | 8329 struct coding_system *terminal_coding |
8333 | 8330 = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); |
8334 coding_system = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1))->symbol; | 8331 Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id); |
8332 | |
8335 /* For backward compatibility, return nil if it is `undecided'. */ | 8333 /* For backward compatibility, return nil if it is `undecided'. */ |
8336 return (! EQ (coding_system, Qundecided) ? coding_system : Qnil); | 8334 return (! EQ (coding_system, Qundecided) ? coding_system : Qnil); |
8337 } | 8335 } |
8338 | 8336 |
8339 DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_internal, | 8337 DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_internal, |
8352 &= ~CODING_ANNOTATE_COMPOSITION_MASK; | 8350 &= ~CODING_ANNOTATE_COMPOSITION_MASK; |
8353 return Qnil; | 8351 return Qnil; |
8354 } | 8352 } |
8355 | 8353 |
8356 DEFUN ("keyboard-coding-system", | 8354 DEFUN ("keyboard-coding-system", |
8357 Fkeyboard_coding_system, Skeyboard_coding_system, 0, 0, 0, | 8355 Fkeyboard_coding_system, Skeyboard_coding_system, 0, 1, 0, |
8358 doc: /* Return coding system specified for decoding keyboard input. */) | 8356 doc: /* Return coding system specified for decoding keyboard input. */) |
8359 () | 8357 (terminal) |
8360 { | 8358 Lisp_Object terminal; |
8361 return CODING_ID_NAME (keyboard_coding.id); | 8359 { |
8360 return CODING_ID_NAME (TERMINAL_KEYBOARD_CODING | |
8361 (get_terminal (terminal, 1))->id); | |
8362 } | 8362 } |
8363 | 8363 |
8364 | 8364 |
8365 DEFUN ("find-operation-coding-system", Ffind_operation_coding_system, | 8365 DEFUN ("find-operation-coding-system", Ffind_operation_coding_system, |
8366 Sfind_operation_coding_system, 1, MANY, 0, | 8366 Sfind_operation_coding_system, 1, MANY, 0, |
8641 max_charset_id = XFASTINT (XCAR (tail)); | 8641 max_charset_id = XFASTINT (XCAR (tail)); |
8642 } | 8642 } |
8643 else | 8643 else |
8644 { | 8644 { |
8645 charset_list = Fcopy_sequence (charset_list); | 8645 charset_list = Fcopy_sequence (charset_list); |
8646 for (tail = charset_list; !NILP (tail); tail = Fcdr (tail)) | 8646 for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) |
8647 { | 8647 { |
8648 struct charset *charset; | 8648 struct charset *charset; |
8649 | 8649 |
8650 val = Fcar (tail); | 8650 val = XCAR (tail); |
8651 CHECK_CHARSET_GET_CHARSET (val, charset); | 8651 CHECK_CHARSET_GET_CHARSET (val, charset); |
8652 if (EQ (coding_type, Qiso_2022) | 8652 if (EQ (coding_type, Qiso_2022) |
8653 ? CHARSET_ISO_FINAL (charset) < 0 | 8653 ? CHARSET_ISO_FINAL (charset) < 0 |
8654 : EQ (coding_type, Qemacs_mule) | 8654 : EQ (coding_type, Qemacs_mule) |
8655 ? CHARSET_EMACS_MULE_ID (charset) < 0 | 8655 ? CHARSET_EMACS_MULE_ID (charset) < 0 |
9825 plist[15] = args[coding_arg_eol_type] = Qnil; | 9825 plist[15] = args[coding_arg_eol_type] = Qnil; |
9826 args[coding_arg_plist] = Flist (16, plist); | 9826 args[coding_arg_plist] = Flist (16, plist); |
9827 Fdefine_coding_system_internal (coding_arg_max, args); | 9827 Fdefine_coding_system_internal (coding_arg_max, args); |
9828 } | 9828 } |
9829 | 9829 |
9830 setup_coding_system (Qno_conversion, &keyboard_coding); | |
9831 setup_coding_system (Qundecided, &terminal_coding); | |
9832 setup_coding_system (Qno_conversion, &safe_terminal_coding); | 9830 setup_coding_system (Qno_conversion, &safe_terminal_coding); |
9833 | 9831 |
9834 { | 9832 { |
9835 int i; | 9833 int i; |
9836 | 9834 |