diff options
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 50 |
3 files changed, 58 insertions, 0 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 38262f05355..b7d9bbc08c5 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-07-31 Xue Fuqiao <xfq.free@gmail.com> | ||
| 2 | |||
| 3 | * nonascii.texi (Non-ASCII Characters): Update menu. | ||
| 4 | (Disabling Multibyte): Move here from doc/emacs/mule.texi. Fix cross-references. | ||
| 5 | |||
| 6 | * elisp.texi (Top): Update menu. | ||
| 7 | |||
| 1 | 2013-07-30 Xue Fuqiao <xfq.free@gmail.com> | 8 | 2013-07-30 Xue Fuqiao <xfq.free@gmail.com> |
| 2 | 9 | ||
| 3 | * windows.texi (Window History): Mention the default value of | 10 | * windows.texi (Window History): Mention the default value of |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 4b8cc36b4ea..230da1867dd 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -1194,6 +1194,7 @@ Text Properties | |||
| 1194 | Non-@acronym{ASCII} Characters | 1194 | Non-@acronym{ASCII} Characters |
| 1195 | 1195 | ||
| 1196 | * Text Representations:: How Emacs represents text. | 1196 | * Text Representations:: How Emacs represents text. |
| 1197 | * Disabling Multibyte:: Controlling whether to use multibyte characters. | ||
| 1197 | * Converting Representations:: Converting unibyte to multibyte and vice versa. | 1198 | * Converting Representations:: Converting unibyte to multibyte and vice versa. |
| 1198 | * Selecting a Representation:: Treating a byte sequence as unibyte or multi. | 1199 | * Selecting a Representation:: Treating a byte sequence as unibyte or multi. |
| 1199 | * Character Codes:: How unibyte and multibyte relate to | 1200 | * Character Codes:: How unibyte and multibyte relate to |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index b8b62325bb4..3189d8796d6 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -13,6 +13,7 @@ how they are stored in strings and buffers. | |||
| 13 | 13 | ||
| 14 | @menu | 14 | @menu |
| 15 | * Text Representations:: How Emacs represents text. | 15 | * Text Representations:: How Emacs represents text. |
| 16 | * Disabling Multibyte:: Controlling whether to use multibyte characters. | ||
| 16 | * Converting Representations:: Converting unibyte to multibyte and vice versa. | 17 | * Converting Representations:: Converting unibyte to multibyte and vice versa. |
| 17 | * Selecting a Representation:: Treating a byte sequence as unibyte or multi. | 18 | * Selecting a Representation:: Treating a byte sequence as unibyte or multi. |
| 18 | * Character Codes:: How unibyte and multibyte relate to | 19 | * Character Codes:: How unibyte and multibyte relate to |
| @@ -140,6 +141,55 @@ This function concatenates all its argument @var{bytes} and makes the | |||
| 140 | result a unibyte string. | 141 | result a unibyte string. |
| 141 | @end defun | 142 | @end defun |
| 142 | 143 | ||
| 144 | @node Disabling Multibyte | ||
| 145 | @section Disabling Multibyte Characters | ||
| 146 | @cindex disabling multibyte | ||
| 147 | |||
| 148 | By default, Emacs starts in multibyte mode: it stores the contents | ||
| 149 | of buffers and strings using an internal encoding that represents | ||
| 150 | non-@acronym{ASCII} characters using multi-byte sequences. Multibyte | ||
| 151 | mode allows you to use all the supported languages and scripts without | ||
| 152 | limitations. | ||
| 153 | |||
| 154 | @cindex turn multibyte support on or off | ||
| 155 | Under very special circumstances, you may want to disable multibyte | ||
| 156 | character support, for a specific buffer. | ||
| 157 | When multibyte characters are disabled in a buffer, we call | ||
| 158 | that @dfn{unibyte mode}. In unibyte mode, each character in the | ||
| 159 | buffer has a character code ranging from 0 through 255 (0377 octal); 0 | ||
| 160 | through 127 (0177 octal) represent @acronym{ASCII} characters, and 128 | ||
| 161 | (0200 octal) through 255 (0377 octal) represent non-@acronym{ASCII} | ||
| 162 | characters. | ||
| 163 | |||
| 164 | To edit a particular file in unibyte representation, visit it using | ||
| 165 | @code{find-file-literally}. @xref{Visiting Functions}. You can | ||
| 166 | convert a multibyte buffer to unibyte by saving it to a file, killing | ||
| 167 | the buffer, and visiting the file again with | ||
| 168 | @code{find-file-literally}. Alternatively, you can use @kbd{C-x | ||
| 169 | @key{RET} c} (@code{universal-coding-system-argument}) and specify | ||
| 170 | @samp{raw-text} as the coding system with which to visit or save a | ||
| 171 | file. @xref{Text Coding, , Specifying a Coding System for File Text, | ||
| 172 | emacs, GNU Emacs Manual}. Unlike @code{find-file-literally}, finding | ||
| 173 | a file as @samp{raw-text} doesn't disable format conversion, | ||
| 174 | uncompression, or auto mode selection. | ||
| 175 | |||
| 176 | @c See http://debbugs.gnu.org/11226 for lack of unibyte tooltip. | ||
| 177 | @vindex enable-multibyte-characters | ||
| 178 | The buffer-local variable @code{enable-multibyte-characters} is | ||
| 179 | non-@code{nil} in multibyte buffers, and @code{nil} in unibyte ones. | ||
| 180 | The mode line also indicates whether a buffer is multibyte or not. | ||
| 181 | With a graphical display, in a multibyte buffer, the portion of the | ||
| 182 | mode line that indicates the character set has a tooltip that (amongst | ||
| 183 | other things) says that the buffer is multibyte. In a unibyte buffer, | ||
| 184 | the character set indicator is absent. Thus, in a unibyte buffer | ||
| 185 | (when using a graphical display) there is normally nothing before the | ||
| 186 | indication of the visited file's end-of-line convention (colon, | ||
| 187 | backslash, etc.), unless you are using an input method. | ||
| 188 | |||
| 189 | @findex toggle-enable-multibyte-characters | ||
| 190 | You can turn off multibyte support in a specific buffer by invoking the | ||
| 191 | command @code{toggle-enable-multibyte-characters} in that buffer. | ||
| 192 | |||
| 143 | @node Converting Representations | 193 | @node Converting Representations |
| 144 | @section Converting Text Representations | 194 | @section Converting Text Representations |
| 145 | 195 | ||