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.
+2013-07-13 Eli Zaretskii <eliz@gnu.org>
+
+ * NEWS: Document prefer-utf-8 and the new attributes
+ :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
+ :prefer-utf-8.
+
2013-07-13 Leo Liu <sdl.web@gmail.com>
* NEWS: Mention new value for ido-use-virtual-buffers.
*** New functions `image-current-frame' and `image-show-frame' for getting
and setting the current frame of a multi-frame image.
+** Changes in encoding and decoding of text
+
+---
+*** New coding-system `prefer-utf-8'.
+This is like `undecided' but prefers UTF-8 on decoding if the text to
+be decoded does not contain any invalid UTF-8 sequences. On encoding,
+any non-ASCII characters are automatically encoded as UTF-8.
+
+---
+*** New attributes of coding-systems whose type is `undecided'.
+Two new attributes, `:inhibit-null-byte-detection' and
+`:inhibit-iso-escape-detection', determine how to detect encoding of
+text that includes null bytes and ISO-2022 escape sequences,
+respectively. Each of these attributes can be either nil, zero, or
+t. If it is t, decoding text ignores null bytes and, respectively,
+ISO-2022 sequences. If it is nil, null bytes cause text to be decoded
+with no-conversion and ISO-2022 sequences cause Emacs to assume the
+text is encoded in one of the ISO-2022 encodings, such as
+iso-2022-7bit. If the value is zero, Emacs consults the variables
+inhibit-null-byte-detection and inhibit-iso-escape-detection, which
+see.
+The new attribute `:prefer-utf-8', if non-nil, causes Emacs to prefer
+UTF-8 encoding and decoding, whenever possible.
+
+These attributes are only meaningful for coding-systems of type
+`undecided'. (The type of a coding-system is determined by its
+`:coding-type' attribute and can be accessed by calling the
+`coding-system-type' function.)
+
** The function `set-visited-file-modtime' now accepts a 0 or -1 argument
with the same interpretation as the returned value of `visited-file-modtime'.
2013-07-13 Eli Zaretskii <eliz@gnu.org>
+ * international/mule.el (define-coding-system): Doc fix.
+
* simple.el (default-font-height): Don't call font-info if the
frame's default font didn't change since the frame was created.
(Bug#14838)
VALUE must be a list of symbols that control the ISO-2022 converter.
Each must be a member of the list `coding-system-iso-2022-flags'
-\(which see). This attribute has a meaning only when `:coding-type'
+\(which see). This attribute is meaningful only when `:coding-type'
is `iso-2022'.
`:designation'
96 long can be designated to GN. If the first element is a charset,
that charset is initially designated to GN.
-This attribute has a meaning only when `:coding-type' is `iso-2022'.
+This attribute is meaningful only when `:coding-type' is `iso-2022'.
`:bom'
Otherwise, treat them as bytes for a normal character. On encoding,
produce BOM bytes according to the value of `:endian'.
-This attribute has a meaning only when `:coding-type' is `utf-16' or
+This attribute is meaningful only when `:coding-type' is `utf-16' or
`utf-8'.
`:endian'
VALUE must be `big' or `little' specifying big-endian and
little-endian respectively. The default value is `big'.
-This attribute has a meaning only when `:coding-type' is `utf-16'.
+This attribute is meaningful only when `:coding-type' is `utf-16'.
`:ccl-decoder'
VALUE is a symbol representing the registered CCL program used for
-decoding. This attribute has a meaning only when `:coding-type' is
+decoding. This attribute is meaningful only when `:coding-type' is
`ccl'.
`:ccl-encoder'
VALUE is a symbol representing the registered CCL program used for
-encoding. This attribute has a meaning only when `:coding-type' is
+encoding. This attribute is meaningful only when `:coding-type' is
`ccl'.
-:inhibit-null-byte-detection
+`:inhibit-null-byte-detection'
VALUE non-nil means Emacs ignore null bytes on code detection.
See the variable `inhibit-null-byte-detection'. This attribute
-has a meaning only when `:coding-type' is `undecided'.
+is meaningful only when `:coding-type' is `undecided'.
-:inhibit-iso-escape-detection
+`:inhibit-iso-escape-detection'
VALUE non-nil means Emacs ignores ISO-2022 escape sequences on
code detection. See the variable `inhibit-iso-escape-detection'.
-This attribute has a meaning only when `:coding-type' is
+This attribute is meaningful only when `:coding-type' is
`undecided'.
-:prefer-utf-8
+`:prefer-utf-8'
VALUE non-nil means Emacs prefers UTF-8 on code detection for
-non-ASCII files. This attribute has a meaning only when
+non-ASCII files. This attribute is meaningful only when
`:coding-type' is `undecided'."
(let* ((common-attrs (mapcar 'list
'(:mnemonic