diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/src/coding.c b/src/coding.c index bd298a2f00d..b4bd4f0c634 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -7434,14 +7434,14 @@ DEFUN ("coding-system-p", Fcoding_system_p, Scoding_system_p, 1, 1, 0, | |||
| 7434 | doc: /* Return t if OBJECT is nil or a coding-system. | 7434 | doc: /* Return t if OBJECT is nil or a coding-system. |
| 7435 | See the documentation of `define-coding-system' for information | 7435 | See the documentation of `define-coding-system' for information |
| 7436 | about coding-system objects. */) | 7436 | about coding-system objects. */) |
| 7437 | (obj) | 7437 | (object) |
| 7438 | Lisp_Object obj; | 7438 | Lisp_Object object; |
| 7439 | { | 7439 | { |
| 7440 | if (NILP (obj) | 7440 | if (NILP (object) |
| 7441 | || CODING_SYSTEM_ID (obj) >= 0) | 7441 | || CODING_SYSTEM_ID (object) >= 0) |
| 7442 | return Qt; | 7442 | return Qt; |
| 7443 | if (! SYMBOLP (obj) | 7443 | if (! SYMBOLP (object) |
| 7444 | || NILP (Fget (obj, Qcoding_system_define_form))) | 7444 | || NILP (Fget (object, Qcoding_system_define_form))) |
| 7445 | return Qnil; | 7445 | return Qnil; |
| 7446 | return Qt; | 7446 | return Qt; |
| 7447 | } | 7447 | } |
| @@ -7821,9 +7821,9 @@ DEFUN ("detect-coding-region", Fdetect_coding_region, Sdetect_coding_region, | |||
| 7821 | Return a list of possible coding systems ordered by priority. | 7821 | Return a list of possible coding systems ordered by priority. |
| 7822 | 7822 | ||
| 7823 | If only ASCII characters are found (except for such ISO-2022 control | 7823 | If only ASCII characters are found (except for such ISO-2022 control |
| 7824 | characters ISO-2022 as ESC), it returns a list of single element | 7824 | characters as ESC), it returns a list of single element `undecided' |
| 7825 | `undecided' or its subsidiary coding system according to a detected | 7825 | or its subsidiary coding system according to a detected end-of-line |
| 7826 | end-of-line format. | 7826 | format. |
| 7827 | 7827 | ||
| 7828 | If optional argument HIGHEST is non-nil, return the coding system of | 7828 | If optional argument HIGHEST is non-nil, return the coding system of |
| 7829 | highest priority. */) | 7829 | highest priority. */) |
| @@ -7858,9 +7858,9 @@ DEFUN ("detect-coding-string", Fdetect_coding_string, Sdetect_coding_string, | |||
| 7858 | Return a list of possible coding systems ordered by priority. | 7858 | Return a list of possible coding systems ordered by priority. |
| 7859 | 7859 | ||
| 7860 | If only ASCII characters are found (except for such ISO-2022 control | 7860 | If only ASCII characters are found (except for such ISO-2022 control |
| 7861 | characters ISO-2022 as ESC), it returns a list of single element | 7861 | characters as ESC), it returns a list of single element `undecided' |
| 7862 | `undecided' or its subsidiary coding system according to a detected | 7862 | or its subsidiary coding system according to a detected end-of-line |
| 7863 | end-of-line format. | 7863 | format. |
| 7864 | 7864 | ||
| 7865 | If optional argument HIGHEST is non-nil, return the coding system of | 7865 | If optional argument HIGHEST is non-nil, return the coding system of |
| 7866 | highest priority. */) | 7866 | highest priority. */) |
| @@ -8028,7 +8028,7 @@ DEFUN ("unencodable-char-position", Funencodable_char_position, | |||
| 8028 | Sunencodable_char_position, 3, 5, 0, | 8028 | Sunencodable_char_position, 3, 5, 0, |
| 8029 | doc: /* | 8029 | doc: /* |
| 8030 | Return position of first un-encodable character in a region. | 8030 | Return position of first un-encodable character in a region. |
| 8031 | START and END specfiy the region and CODING-SYSTEM specifies the | 8031 | START and END specify the region and CODING-SYSTEM specifies the |
| 8032 | encoding to check. Return nil if CODING-SYSTEM does encode the region. | 8032 | encoding to check. Return nil if CODING-SYSTEM does encode the region. |
| 8033 | 8033 | ||
| 8034 | If optional 4th argument COUNT is non-nil, it specifies at most how | 8034 | If optional 4th argument COUNT is non-nil, it specifies at most how |
| @@ -8141,7 +8141,7 @@ START and END are buffer positions specifying the region. | |||
| 8141 | CODING-SYSTEM-LIST is a list of coding systems to check. | 8141 | CODING-SYSTEM-LIST is a list of coding systems to check. |
| 8142 | 8142 | ||
| 8143 | The value is an alist ((CODING-SYSTEM POS0 POS1 ...) ...), where | 8143 | The value is an alist ((CODING-SYSTEM POS0 POS1 ...) ...), where |
| 8144 | CODING-SYSTEM is a member of CODING-SYSTEM-LIst and can't encode the | 8144 | CODING-SYSTEM is a member of CODING-SYSTEM-LIST and can't encode the |
| 8145 | whole region, POS0, POS1, ... are buffer positions where non-encodable | 8145 | whole region, POS0, POS1, ... are buffer positions where non-encodable |
| 8146 | characters are found. | 8146 | characters are found. |
| 8147 | 8147 | ||
| @@ -8326,8 +8326,9 @@ It returns the length of the decoded text. */) | |||
| 8326 | DEFUN ("encode-coding-region", Fencode_coding_region, Sencode_coding_region, | 8326 | DEFUN ("encode-coding-region", Fencode_coding_region, Sencode_coding_region, |
| 8327 | 3, 4, "r\nzCoding system: ", | 8327 | 3, 4, "r\nzCoding system: ", |
| 8328 | doc: /* Encode the current region by specified coding system. | 8328 | doc: /* Encode the current region by specified coding system. |
| 8329 | When called from a program, takes three arguments: | 8329 | When called from a program, takes four arguments: |
| 8330 | START, END, and CODING-SYSTEM. START and END are buffer positions. | 8330 | START, END, CODING-SYSTEM and DESTINATION. |
| 8331 | START and END are buffer positions. | ||
| 8331 | 8332 | ||
| 8332 | Optional 4th arguments DESTINATION specifies where the encoded text goes. | 8333 | Optional 4th arguments DESTINATION specifies where the encoded text goes. |
| 8333 | If nil, the region between START and END is replace by the encoded text. | 8334 | If nil, the region between START and END is replace by the encoded text. |
| @@ -8410,13 +8411,13 @@ DEFUN ("decode-coding-string", Fdecode_coding_string, Sdecode_coding_string, | |||
| 8410 | Optional third arg NOCOPY non-nil means it is OK to return STRING itself | 8411 | Optional third arg NOCOPY non-nil means it is OK to return STRING itself |
| 8411 | if the decoding operation is trivial. | 8412 | if the decoding operation is trivial. |
| 8412 | 8413 | ||
| 8413 | Optional fourth arg BUFFER non-nil meant that the decoded text is | 8414 | Optional fourth arg BUFFER non-nil means that the decoded text is |
| 8414 | inserted in BUFFER instead of returned as a string. In this case, | 8415 | inserted in BUFFER instead of returned as a string. In this case, |
| 8415 | the return value is BUFFER. | 8416 | the return value is BUFFER. |
| 8416 | 8417 | ||
| 8417 | This function sets `last-coding-system-used' to the precise coding system | 8418 | This function sets `last-coding-system-used' to the precise coding system |
| 8418 | used (which may be different from CODING-SYSTEM if CODING-SYSTEM is | 8419 | used (which may be different from CODING-SYSTEM if CODING-SYSTEM is |
| 8419 | not fully specified. */) | 8420 | not fully specified.) */) |
| 8420 | (string, coding_system, nocopy, buffer) | 8421 | (string, coding_system, nocopy, buffer) |
| 8421 | Lisp_Object string, coding_system, nocopy, buffer; | 8422 | Lisp_Object string, coding_system, nocopy, buffer; |
| 8422 | { | 8423 | { |
| @@ -8431,7 +8432,7 @@ DEFUN ("encode-coding-string", Fencode_coding_string, Sencode_coding_string, | |||
| 8431 | Optional third arg NOCOPY non-nil means it is OK to return STRING | 8432 | Optional third arg NOCOPY non-nil means it is OK to return STRING |
| 8432 | itself if the encoding operation is trivial. | 8433 | itself if the encoding operation is trivial. |
| 8433 | 8434 | ||
| 8434 | Optional fourth arg BUFFER non-nil meant that the encoded text is | 8435 | Optional fourth arg BUFFER non-nil means that the encoded text is |
| 8435 | inserted in BUFFER instead of returned as a string. In this case, | 8436 | inserted in BUFFER instead of returned as a string. In this case, |
| 8436 | the return value is BUFFER. | 8437 | the return value is BUFFER. |
| 8437 | 8438 | ||
| @@ -8691,9 +8692,9 @@ whichever argument specifies the file name is TARGET. | |||
| 8691 | TARGET has a meaning which depends on OPERATION: | 8692 | TARGET has a meaning which depends on OPERATION: |
| 8692 | For file I/O, TARGET is a file name (except for the special case below). | 8693 | For file I/O, TARGET is a file name (except for the special case below). |
| 8693 | For process I/O, TARGET is a process name. | 8694 | For process I/O, TARGET is a process name. |
| 8694 | For network I/O, TARGET is a service name or a port number | 8695 | For network I/O, TARGET is a service name or a port number. |
| 8695 | 8696 | ||
| 8696 | This function looks up what specified for TARGET in, | 8697 | This function looks up what is specified for TARGET in |
| 8697 | `file-coding-system-alist', `process-coding-system-alist', | 8698 | `file-coding-system-alist', `process-coding-system-alist', |
| 8698 | or `network-coding-system-alist' depending on OPERATION. | 8699 | or `network-coding-system-alist' depending on OPERATION. |
| 8699 | They may specify a coding system, a cons of coding systems, | 8700 | They may specify a coding system, a cons of coding systems, |
| @@ -8785,10 +8786,10 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) | |||
| 8785 | DEFUN ("set-coding-system-priority", Fset_coding_system_priority, | 8786 | DEFUN ("set-coding-system-priority", Fset_coding_system_priority, |
| 8786 | Sset_coding_system_priority, 0, MANY, 0, | 8787 | Sset_coding_system_priority, 0, MANY, 0, |
| 8787 | doc: /* Assign higher priority to the coding systems given as arguments. | 8788 | doc: /* Assign higher priority to the coding systems given as arguments. |
| 8788 | If multiple coding systems belongs to the same category, | 8789 | If multiple coding systems belong to the same category, |
| 8789 | all but the first one are ignored. | 8790 | all but the first one are ignored. |
| 8790 | 8791 | ||
| 8791 | usage: (set-coding-system-priority ...) */) | 8792 | usage: (set-coding-system-priority &rest coding-systems) */) |
| 8792 | (nargs, args) | 8793 | (nargs, args) |
| 8793 | int nargs; | 8794 | int nargs; |
| 8794 | Lisp_Object *args; | 8795 | Lisp_Object *args; |
| @@ -9473,7 +9474,7 @@ DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, | |||
| 9473 | CHECK_SYMBOL (alias); | 9474 | CHECK_SYMBOL (alias); |
| 9474 | CHECK_CODING_SYSTEM_GET_SPEC (coding_system, spec); | 9475 | CHECK_CODING_SYSTEM_GET_SPEC (coding_system, spec); |
| 9475 | aliases = AREF (spec, 1); | 9476 | aliases = AREF (spec, 1); |
| 9476 | /* ALISES should be a list of length more than zero, and the first | 9477 | /* ALIASES should be a list of length more than zero, and the first |
| 9477 | element is a base coding system. Append ALIAS at the tail of the | 9478 | element is a base coding system. Append ALIAS at the tail of the |
| 9478 | list. */ | 9479 | list. */ |
| 9479 | while (!NILP (XCDR (aliases))) | 9480 | while (!NILP (XCDR (aliases))) |
| @@ -9551,7 +9552,7 @@ DEFUN ("coding-system-aliases", Fcoding_system_aliases, Scoding_system_aliases, | |||
| 9551 | DEFUN ("coding-system-eol-type", Fcoding_system_eol_type, | 9552 | DEFUN ("coding-system-eol-type", Fcoding_system_eol_type, |
| 9552 | Scoding_system_eol_type, 1, 1, 0, | 9553 | Scoding_system_eol_type, 1, 1, 0, |
| 9553 | doc: /* Return eol-type of CODING-SYSTEM. | 9554 | doc: /* Return eol-type of CODING-SYSTEM. |
| 9554 | An eol-type is integer 0, 1, 2, or a vector of coding systems. | 9555 | An eol-type is an integer 0, 1, 2, or a vector of coding systems. |
| 9555 | 9556 | ||
| 9556 | Integer values 0, 1, and 2 indicate a format of end-of-line; LF, CRLF, | 9557 | Integer values 0, 1, and 2 indicate a format of end-of-line; LF, CRLF, |
| 9557 | and CR respectively. | 9558 | and CR respectively. |