comparison src/coding.c @ 95356:90b4a0dc21cc

(Fdecode_coding_region, Fencode_coding_region, Fencode_coding_string): (syms_of_coding) <coding-system-for-read, coding-system-for-write>: <latin-extra-code-table>: Fix typos in docstrings. (syms_of_coding) <coding-system-alist>: Doc fix. (syms_of_coding) <translation-table-for-input>: Reflow docstring.
author Juanma Barranquero <lekktu@gmail.com>
date Wed, 28 May 2008 09:11:59 +0000
parents 96d35f50fe34
children c99f0a16c077
comparison
equal deleted inserted replaced
95355:b2d851c43596 95356:90b4a0dc21cc
8313 START and END are buffer positions. 8313 START and END are buffer positions.
8314 8314
8315 Optional 4th arguments DESTINATION specifies where the decoded text goes. 8315 Optional 4th arguments DESTINATION specifies where the decoded text goes.
8316 If nil, the region between START and END is replaced by the decoded text. 8316 If nil, the region between START and END is replaced by the decoded text.
8317 If buffer, the decoded text is inserted in the buffer. 8317 If buffer, the decoded text is inserted in the buffer.
8318 In those cases, the length of the decoded text is returned.. 8318 In those cases, the length of the decoded text is returned.
8319 If DESTINATION is t, the decoded text is returned. 8319 If DESTINATION is t, the decoded text is returned.
8320 8320
8321 This function sets `last-coding-system-used' to the precise coding system 8321 This function sets `last-coding-system-used' to the precise coding system
8322 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is 8322 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is
8323 not fully specified.) */) 8323 not fully specified.) */)
8335 START and END are buffer positions. 8335 START and END are buffer positions.
8336 8336
8337 Optional 4th arguments DESTINATION specifies where the encoded text goes. 8337 Optional 4th arguments DESTINATION specifies where the encoded text goes.
8338 If nil, the region between START and END is replace by the encoded text. 8338 If nil, the region between START and END is replace by the encoded text.
8339 If buffer, the encoded text is inserted in the buffer. 8339 If buffer, the encoded text is inserted in the buffer.
8340 In those cases, the length of the encoded text is returned.. 8340 In those cases, the length of the encoded text is returned.
8341 If DESTINATION is t, the encoded text is returned. 8341 If DESTINATION is t, the encoded text is returned.
8342 8342
8343 This function sets `last-coding-system-used' to the precise coding system 8343 This function sets `last-coding-system-used' to the precise coding system
8344 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is 8344 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is
8345 not fully specified.) */) 8345 not fully specified.) */)
8436 Optional third arg NOCOPY non-nil means it is OK to return STRING 8436 Optional third arg NOCOPY non-nil means it is OK to return STRING
8437 itself if the encoding operation is trivial. 8437 itself if the encoding operation is trivial.
8438 8438
8439 Optional fourth arg BUFFER non-nil means that the encoded text is 8439 Optional fourth arg BUFFER non-nil means that the encoded text is
8440 inserted in BUFFER instead of returned as a string. In this case, 8440 inserted in BUFFER instead of returned as a string. In this case,
8441 the return value is the length of the encoded.text. 8441 the return value is the length of the encoded text.
8442 8442
8443 This function sets `last-coding-system-used' to the precise coding system 8443 This function sets `last-coding-system-used' to the precise coding system
8444 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is 8444 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is
8445 not fully specified.) */) 8445 not fully specified.) */)
8446 (string, coding_system, nocopy, buffer) 8446 (string, coding_system, nocopy, buffer)
9832 Vcoding_system_list = Qnil; 9832 Vcoding_system_list = Qnil;
9833 9833
9834 DEFVAR_LISP ("coding-system-alist", &Vcoding_system_alist, 9834 DEFVAR_LISP ("coding-system-alist", &Vcoding_system_alist,
9835 doc: /* Alist of coding system names. 9835 doc: /* Alist of coding system names.
9836 Each element is one element list of coding system name. 9836 Each element is one element list of coding system name.
9837 This variable is given to `completing-read' as TABLE argument. 9837 This variable is given to `completing-read' as COLLECTION argument.
9838 9838
9839 Do not alter the value of this variable manually. This variable should be 9839 Do not alter the value of this variable manually. This variable should be
9840 updated by the functions `make-coding-system' and 9840 updated by the functions `make-coding-system' and
9841 `define-coding-system-alias'. */); 9841 `define-coding-system-alias'. */);
9842 Vcoding_system_alist = Qnil; 9842 Vcoding_system_alist = Qnil;
9862 9862
9863 DEFVAR_LISP ("coding-system-for-read", &Vcoding_system_for_read, 9863 DEFVAR_LISP ("coding-system-for-read", &Vcoding_system_for_read,
9864 doc: /* Specify the coding system for read operations. 9864 doc: /* Specify the coding system for read operations.
9865 It is useful to bind this variable with `let', but do not set it globally. 9865 It is useful to bind this variable with `let', but do not set it globally.
9866 If the value is a coding system, it is used for decoding on read operation. 9866 If the value is a coding system, it is used for decoding on read operation.
9867 If not, an appropriate element is used from one of the coding system alists: 9867 If not, an appropriate element is used from one of the coding system alists.
9868 There are three such tables, `file-coding-system-alist', 9868 There are three such tables: `file-coding-system-alist',
9869 `process-coding-system-alist', and `network-coding-system-alist'. */); 9869 `process-coding-system-alist', and `network-coding-system-alist'. */);
9870 Vcoding_system_for_read = Qnil; 9870 Vcoding_system_for_read = Qnil;
9871 9871
9872 DEFVAR_LISP ("coding-system-for-write", &Vcoding_system_for_write, 9872 DEFVAR_LISP ("coding-system-for-write", &Vcoding_system_for_write,
9873 doc: /* Specify the coding system for write operations. 9873 doc: /* Specify the coding system for write operations.
9874 Programs bind this variable with `let', but you should not set it globally. 9874 Programs bind this variable with `let', but you should not set it globally.
9875 If the value is a coding system, it is used for encoding of output, 9875 If the value is a coding system, it is used for encoding of output,
9876 when writing it to a file and when sending it to a file or subprocess. 9876 when writing it to a file and when sending it to a file or subprocess.
9877 9877
9878 If this does not specify a coding system, an appropriate element 9878 If this does not specify a coding system, an appropriate element
9879 is used from one of the coding system alists: 9879 is used from one of the coding system alists.
9880 There are three such tables, `file-coding-system-alist', 9880 There are three such tables: `file-coding-system-alist',
9881 `process-coding-system-alist', and `network-coding-system-alist'. 9881 `process-coding-system-alist', and `network-coding-system-alist'.
9882 For output to files, if the above procedure does not specify a coding system, 9882 For output to files, if the above procedure does not specify a coding system,
9883 the value of `buffer-file-coding-system' is used. */); 9883 the value of `buffer-file-coding-system' is used. */);
9884 Vcoding_system_for_write = Qnil; 9884 Vcoding_system_for_write = Qnil;
9885 9885
10035 If Nth element is non-nil, the existence of code N in a file 10035 If Nth element is non-nil, the existence of code N in a file
10036 \(or output of subprocess) doesn't prevent it to be detected as 10036 \(or output of subprocess) doesn't prevent it to be detected as
10037 a coding system of ISO 2022 variant which has a flag 10037 a coding system of ISO 2022 variant which has a flag
10038 `accept-latin-extra-code' t (e.g. iso-latin-1) on reading a file 10038 `accept-latin-extra-code' t (e.g. iso-latin-1) on reading a file
10039 or reading output of a subprocess. 10039 or reading output of a subprocess.
10040 Only 128th through 159th elements has a meaning. */); 10040 Only 128th through 159th elements have a meaning. */);
10041 Vlatin_extra_code_table = Fmake_vector (make_number (256), Qnil); 10041 Vlatin_extra_code_table = Fmake_vector (make_number (256), Qnil);
10042 10042
10043 DEFVAR_LISP ("select-safe-coding-system-function", 10043 DEFVAR_LISP ("select-safe-coding-system-function",
10044 &Vselect_safe_coding_system_function, 10044 &Vselect_safe_coding_system_function,
10045 doc: /* 10045 doc: /*
10091 escape sequence (e.g `latin-1') on reading by \\[universal-coding-system-argument]. */); 10091 escape sequence (e.g `latin-1') on reading by \\[universal-coding-system-argument]. */);
10092 inhibit_iso_escape_detection = 0; 10092 inhibit_iso_escape_detection = 0;
10093 10093
10094 DEFVAR_LISP ("translation-table-for-input", &Vtranslation_table_for_input, 10094 DEFVAR_LISP ("translation-table-for-input", &Vtranslation_table_for_input,
10095 doc: /* Char table for translating self-inserting characters. 10095 doc: /* Char table for translating self-inserting characters.
10096 This is applied to the result of input methods, not their input. See also 10096 This is applied to the result of input methods, not their input.
10097 `keyboard-translate-table'. */); 10097 See also `keyboard-translate-table'. */);
10098 Vtranslation_table_for_input = Qnil; 10098 Vtranslation_table_for_input = Qnil;
10099 10099
10100 { 10100 {
10101 Lisp_Object args[coding_arg_max]; 10101 Lisp_Object args[coding_arg_max];
10102 Lisp_Object plist[16]; 10102 Lisp_Object plist[16];