aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorDave Love2002-05-13 17:50:19 +0000
committerDave Love2002-05-13 17:50:19 +0000
commit5bad079652a9590572abce7676f6c43379b883d0 (patch)
treef08fed8a8958fe8f65a8db903638ab90f2dbc3f8 /src/coding.c
parentb2b3bb62eac2eb65ba9e7a429db253349fd441d5 (diff)
downloademacs-5bad079652a9590572abce7676f6c43379b883d0.tar.gz
emacs-5bad079652a9590572abce7676f6c43379b883d0.zip
Doc fixes.
(Fdefine_coding_system_alias): Use names, not symbols, in coding-system-alist.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/coding.c b/src/coding.c
index 375839fb2bc..8381284fc98 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -46,8 +46,8 @@ Boston, MA 02111-1307, USA. */
46 46
47CODING SYSTEM 47CODING SYSTEM
48 48
49 Coding system is an object for a encoding mechanism that contains 49 A coding system is an object for an encoding mechanism that contains
50 information about how to convert byte sequence to character 50 information about how to convert byte sequences to character
51 sequences and vice versa. When we say "decode", it means converting 51 sequences and vice versa. When we say "decode", it means converting
52 a byte sequence of a specific coding system into a character 52 a byte sequence of a specific coding system into a character
53 sequence that is represented by Emacs' internal coding system 53 sequence that is represented by Emacs' internal coding system
@@ -57,12 +57,12 @@ CODING SYSTEM
57 57
58 In Emacs Lisp, a coding system is represented by a Lisp symbol. In 58 In Emacs Lisp, a coding system is represented by a Lisp symbol. In
59 C level, a coding system is represented by a vector of attributes 59 C level, a coding system is represented by a vector of attributes
60 stored in the hash table Vcharset_hash_table. The conversion from a 60 stored in the hash table Vcharset_hash_table. The conversion from
61 coding system symbol to attributes vector is done by looking up 61 coding system symbol to attributes vector is done by looking up
62 Vcharset_hash_table by the symbol. 62 Vcharset_hash_table by the symbol.
63 63
64 Coding systems are classified into the following types depending on 64 Coding systems are classified into the following types depending on
65 the mechanism of encoding. Here's a brief descrition about type. 65 the encoding mechanism. Here's a brief description of the types.
66 66
67 o UTF-8 67 o UTF-8
68 68
@@ -71,12 +71,12 @@ CODING SYSTEM
71 o Charset-base coding system 71 o Charset-base coding system
72 72
73 A coding system defined by one or more (coded) character sets. 73 A coding system defined by one or more (coded) character sets.
74 Decoding and encoding are done by code converter defined for each 74 Decoding and encoding are done by a code converter defined for each
75 character set. 75 character set.
76 76
77 o Old Emacs' internal format (emacs-mule) 77 o Old Emacs internal format (emacs-mule)
78 78
79 The coding system adopted by an old versions of Emacs (20 and 21). 79 The coding system adopted by old versions of Emacs (20 and 21).
80 80
81 o ISO2022-base coding system 81 o ISO2022-base coding system
82 82
@@ -101,7 +101,7 @@ CODING SYSTEM
101 101
102 o CCL 102 o CCL
103 103
104 If a user wants to decode/encode a text encoded in a coding system 104 If a user wants to decode/encode text encoded in a coding system
105 not listed above, he can supply a decoder and an encoder for it in 105 not listed above, he can supply a decoder and an encoder for it in
106 CCL (Code Conversion Language) programs. Emacs executes the CCL 106 CCL (Code Conversion Language) programs. Emacs executes the CCL
107 program while decoding/encoding. 107 program while decoding/encoding.
@@ -109,7 +109,7 @@ CODING SYSTEM
109 o Raw-text 109 o Raw-text
110 110
111 A coding system for a text containing raw eight-bit data. Emacs 111 A coding system for a text containing raw eight-bit data. Emacs
112 treat each byte of source text as a character (except for 112 treats each byte of source text as a character (except for
113 end-of-line conversion). 113 end-of-line conversion).
114 114
115 o No-conversion 115 o No-conversion
@@ -119,13 +119,13 @@ CODING SYSTEM
119 119
120END-OF-LINE FORMAT 120END-OF-LINE FORMAT
121 121
122 How end-of-line of a text is encoded depends on a system. For 122 How text end-of-line is encoded depends on operating system. For
123 instance, Unix's format is just one byte of LF (line-feed) code, 123 instance, Unix's format is just one byte of LF (line-feed) code,
124 whereas DOS's format is two-byte sequence of `carriage-return' and 124 whereas DOS's format is two-byte sequence of `carriage-return' and
125 `line-feed' codes. MacOS's format is usually one byte of 125 `line-feed' codes. MacOS's format is usually one byte of
126 `carriage-return'. 126 `carriage-return'.
127 127
128 Since text characters encoding and end-of-line encoding are 128 Since text character encoding and end-of-line encoding are
129 independent, any coding system described above can take any format 129 independent, any coding system described above can take any format
130 of end-of-line (except for no-conversion). 130 of end-of-line (except for no-conversion).
131 131
@@ -134,7 +134,7 @@ STRUCT CODING_SYSTEM
134 Before using a coding system for code conversion (i.e. decoding and 134 Before using a coding system for code conversion (i.e. decoding and
135 encoding), we setup a structure of type `struct coding_system'. 135 encoding), we setup a structure of type `struct coding_system'.
136 This structure keeps various information about a specific code 136 This structure keeps various information about a specific code
137 conversion (e.g. the location of source and destination data). 137 conversion (e.g. the location of source and destination data).
138 138
139*/ 139*/
140 140
@@ -7628,7 +7628,8 @@ DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias,
7628 } 7628 }
7629 7629
7630 Fputhash (alias, spec, Vcoding_system_hash_table); 7630 Fputhash (alias, spec, Vcoding_system_hash_table);
7631 Vcoding_system_alist = Fcons (Fcons (alias, Qnil), Vcoding_system_alist); 7631 Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (alias), Qnil),
7632 Vcoding_system_alist);
7632 7633
7633 return Qnil; 7634 return Qnil;
7634} 7635}