From: Kenichi Handa Date: Tue, 6 May 2003 12:29:02 +0000 (+0000) Subject: (define-coding-system): Fix docstring about :bom and :endian. X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~52 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0ea1a6ca28aa172454d2b4b4a46df2af69459b15;p=emacs.git (define-coding-system): Fix docstring about :bom and :endian. --- diff --git a/lisp/international/mule.el b/lisp/international/mule.el index df3455ab4d0..1be00688428 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -439,9 +439,6 @@ of ASCII. If `use-oldjis' is specified, JIS0208-1976 is designated instead of JIS0208-1983.") -;; Fixme: Are translation tables still relevant? (Not currently -;; implemented, anyway.) -;; Fixme: What does cons :bom mean? Explanation of :endian. (defun define-coding-system (name docstring &rest props) "Define NAME (a symbol) as a coding system with DOCSTRING and attributes. The remaining arguments must come in pairs ATTRIBUTE VALUE. ATTRIBUTE @@ -559,11 +556,24 @@ This attributes specifies whether the coding system uses a `byte order mark'. VALUE must nil, t, or cons of coding systems whose `:coding-type' is `utf-16'. +If the value is nil, on decoding, don't treat the first two-byte as +BOM, and on encoding, don't produce BOM bytes. + +If the value is t, on decoding, skip the first two-byte as BOM, and on +encoding, produce BOM bytes accoding to the value of `:endian'. + +If the value is cons, on decoding, check the first two-byte. If theyq +are 0xFE 0xFF, use the car part coding system of the value. If they +are 0xFF 0xFE, use the car part coding system of the value. +Otherwise, treat them as bytes for a normal character. On encoding, +produce BOM bytes accoding to the value of `:endian'. + This attribute has a meaning only when `:coding-type' is `utf-16'. `:endian' -VALUE must be t or nil. See the above description for the detail. +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'.