diff options
| author | Eli Zaretskii | 2013-07-13 13:55:21 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-07-13 13:55:21 +0300 |
| commit | 1b796d6b24b3a7f56a2dffd8d2bbe9c0559a1b80 (patch) | |
| tree | 0b58b5b4cc79b0d26209e27d3944997b39d471a0 | |
| parent | f9a74c4cc26f349abaaa073d4f56a09405a6f8c3 (diff) | |
| download | emacs-1b796d6b24b3a7f56a2dffd8d2bbe9c0559a1b80.tar.gz emacs-1b796d6b24b3a7f56a2dffd8d2bbe9c0559a1b80.zip | |
Improve the documentation of prefer-utf-8 and related issues.
lisp/international/mule.el (define-coding-system): Doc fix.
etc/NEWS: Document prefer-utf-8 coding-system and the new attributes
:inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
:prefer-utf-8.
| -rw-r--r-- | etc/ChangeLog | 6 | ||||
| -rw-r--r-- | etc/NEWS | 29 | ||||
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/international/mule.el | 24 |
4 files changed, 49 insertions, 12 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index 84c5941e33f..02b13e12945 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-07-13 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * NEWS: Document prefer-utf-8 and the new attributes | ||
| 4 | :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and | ||
| 5 | :prefer-utf-8. | ||
| 6 | |||
| 1 | 2013-07-13 Leo Liu <sdl.web@gmail.com> | 7 | 2013-07-13 Leo Liu <sdl.web@gmail.com> |
| 2 | 8 | ||
| 3 | * NEWS: Mention new value for ido-use-virtual-buffers. | 9 | * NEWS: Mention new value for ido-use-virtual-buffers. |
| @@ -599,6 +599,35 @@ Emacs uses `image-default-frame-delay'. | |||
| 599 | *** New functions `image-current-frame' and `image-show-frame' for getting | 599 | *** New functions `image-current-frame' and `image-show-frame' for getting |
| 600 | and setting the current frame of a multi-frame image. | 600 | and setting the current frame of a multi-frame image. |
| 601 | 601 | ||
| 602 | ** Changes in encoding and decoding of text | ||
| 603 | |||
| 604 | --- | ||
| 605 | *** New coding-system `prefer-utf-8'. | ||
| 606 | This is like `undecided' but prefers UTF-8 on decoding if the text to | ||
| 607 | be decoded does not contain any invalid UTF-8 sequences. On encoding, | ||
| 608 | any non-ASCII characters are automatically encoded as UTF-8. | ||
| 609 | |||
| 610 | --- | ||
| 611 | *** New attributes of coding-systems whose type is `undecided'. | ||
| 612 | Two new attributes, `:inhibit-null-byte-detection' and | ||
| 613 | `:inhibit-iso-escape-detection', determine how to detect encoding of | ||
| 614 | text that includes null bytes and ISO-2022 escape sequences, | ||
| 615 | respectively. Each of these attributes can be either nil, zero, or | ||
| 616 | t. If it is t, decoding text ignores null bytes and, respectively, | ||
| 617 | ISO-2022 sequences. If it is nil, null bytes cause text to be decoded | ||
| 618 | with no-conversion and ISO-2022 sequences cause Emacs to assume the | ||
| 619 | text is encoded in one of the ISO-2022 encodings, such as | ||
| 620 | iso-2022-7bit. If the value is zero, Emacs consults the variables | ||
| 621 | inhibit-null-byte-detection and inhibit-iso-escape-detection, which | ||
| 622 | see. | ||
| 623 | The new attribute `:prefer-utf-8', if non-nil, causes Emacs to prefer | ||
| 624 | UTF-8 encoding and decoding, whenever possible. | ||
| 625 | |||
| 626 | These attributes are only meaningful for coding-systems of type | ||
| 627 | `undecided'. (The type of a coding-system is determined by its | ||
| 628 | `:coding-type' attribute and can be accessed by calling the | ||
| 629 | `coding-system-type' function.) | ||
| 630 | |||
| 602 | ** The function `set-visited-file-modtime' now accepts a 0 or -1 argument | 631 | ** The function `set-visited-file-modtime' now accepts a 0 or -1 argument |
| 603 | with the same interpretation as the returned value of `visited-file-modtime'. | 632 | with the same interpretation as the returned value of `visited-file-modtime'. |
| 604 | 633 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4bfc800913a..1c01afd8576 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2013-07-13 Eli Zaretskii <eliz@gnu.org> | 1 | 2013-07-13 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * international/mule.el (define-coding-system): Doc fix. | ||
| 4 | |||
| 3 | * simple.el (default-font-height): Don't call font-info if the | 5 | * simple.el (default-font-height): Don't call font-info if the |
| 4 | frame's default font didn't change since the frame was created. | 6 | frame's default font didn't change since the frame was created. |
| 5 | (Bug#14838) | 7 | (Bug#14838) |
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 3577e0e9152..28542835a5f 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -672,7 +672,7 @@ is unsuitable for the top-level media type \"text\". | |||
| 672 | 672 | ||
| 673 | VALUE must be a list of symbols that control the ISO-2022 converter. | 673 | VALUE must be a list of symbols that control the ISO-2022 converter. |
| 674 | Each must be a member of the list `coding-system-iso-2022-flags' | 674 | Each must be a member of the list `coding-system-iso-2022-flags' |
| 675 | \(which see). This attribute has a meaning only when `:coding-type' | 675 | \(which see). This attribute is meaningful only when `:coding-type' |
| 676 | is `iso-2022'. | 676 | is `iso-2022'. |
| 677 | 677 | ||
| 678 | `:designation' | 678 | `:designation' |
| @@ -692,7 +692,7 @@ to GN. If the list contains 96, any charsets whose whose ranges are | |||
| 692 | 96 long can be designated to GN. If the first element is a charset, | 692 | 96 long can be designated to GN. If the first element is a charset, |
| 693 | that charset is initially designated to GN. | 693 | that charset is initially designated to GN. |
| 694 | 694 | ||
| 695 | This attribute has a meaning only when `:coding-type' is `iso-2022'. | 695 | This attribute is meaningful only when `:coding-type' is `iso-2022'. |
| 696 | 696 | ||
| 697 | `:bom' | 697 | `:bom' |
| 698 | 698 | ||
| @@ -712,7 +712,7 @@ are 0xFF 0xFE, use the cdr part coding system of the value. | |||
| 712 | Otherwise, treat them as bytes for a normal character. On encoding, | 712 | Otherwise, treat them as bytes for a normal character. On encoding, |
| 713 | produce BOM bytes according to the value of `:endian'. | 713 | produce BOM bytes according to the value of `:endian'. |
| 714 | 714 | ||
| 715 | This attribute has a meaning only when `:coding-type' is `utf-16' or | 715 | This attribute is meaningful only when `:coding-type' is `utf-16' or |
| 716 | `utf-8'. | 716 | `utf-8'. |
| 717 | 717 | ||
| 718 | `:endian' | 718 | `:endian' |
| @@ -720,37 +720,37 @@ This attribute has a meaning only when `:coding-type' is `utf-16' or | |||
| 720 | VALUE must be `big' or `little' specifying big-endian and | 720 | VALUE must be `big' or `little' specifying big-endian and |
| 721 | little-endian respectively. The default value is `big'. | 721 | little-endian respectively. The default value is `big'. |
| 722 | 722 | ||
| 723 | This attribute has a meaning only when `:coding-type' is `utf-16'. | 723 | This attribute is meaningful only when `:coding-type' is `utf-16'. |
| 724 | 724 | ||
| 725 | `:ccl-decoder' | 725 | `:ccl-decoder' |
| 726 | 726 | ||
| 727 | VALUE is a symbol representing the registered CCL program used for | 727 | VALUE is a symbol representing the registered CCL program used for |
| 728 | decoding. This attribute has a meaning only when `:coding-type' is | 728 | decoding. This attribute is meaningful only when `:coding-type' is |
| 729 | `ccl'. | 729 | `ccl'. |
| 730 | 730 | ||
| 731 | `:ccl-encoder' | 731 | `:ccl-encoder' |
| 732 | 732 | ||
| 733 | VALUE is a symbol representing the registered CCL program used for | 733 | VALUE is a symbol representing the registered CCL program used for |
| 734 | encoding. This attribute has a meaning only when `:coding-type' is | 734 | encoding. This attribute is meaningful only when `:coding-type' is |
| 735 | `ccl'. | 735 | `ccl'. |
| 736 | 736 | ||
| 737 | :inhibit-null-byte-detection | 737 | `:inhibit-null-byte-detection' |
| 738 | 738 | ||
| 739 | VALUE non-nil means Emacs ignore null bytes on code detection. | 739 | VALUE non-nil means Emacs ignore null bytes on code detection. |
| 740 | See the variable `inhibit-null-byte-detection'. This attribute | 740 | See the variable `inhibit-null-byte-detection'. This attribute |
| 741 | has a meaning only when `:coding-type' is `undecided'. | 741 | is meaningful only when `:coding-type' is `undecided'. |
| 742 | 742 | ||
| 743 | :inhibit-iso-escape-detection | 743 | `:inhibit-iso-escape-detection' |
| 744 | 744 | ||
| 745 | VALUE non-nil means Emacs ignores ISO-2022 escape sequences on | 745 | VALUE non-nil means Emacs ignores ISO-2022 escape sequences on |
| 746 | code detection. See the variable `inhibit-iso-escape-detection'. | 746 | code detection. See the variable `inhibit-iso-escape-detection'. |
| 747 | This attribute has a meaning only when `:coding-type' is | 747 | This attribute is meaningful only when `:coding-type' is |
| 748 | `undecided'. | 748 | `undecided'. |
| 749 | 749 | ||
| 750 | :prefer-utf-8 | 750 | `:prefer-utf-8' |
| 751 | 751 | ||
| 752 | VALUE non-nil means Emacs prefers UTF-8 on code detection for | 752 | VALUE non-nil means Emacs prefers UTF-8 on code detection for |
| 753 | non-ASCII files. This attribute has a meaning only when | 753 | non-ASCII files. This attribute is meaningful only when |
| 754 | `:coding-type' is `undecided'." | 754 | `:coding-type' is `undecided'." |
| 755 | (let* ((common-attrs (mapcar 'list | 755 | (let* ((common-attrs (mapcar 'list |
| 756 | '(:mnemonic | 756 | '(:mnemonic |