diff options
| author | Xue Fuqiao | 2013-07-31 20:59:10 +0800 |
|---|---|---|
| committer | Xue Fuqiao | 2013-07-31 20:59:10 +0800 |
| commit | 64a695bd9196d2036ecfbc02d69dcfdfd4ffe866 (patch) | |
| tree | 9c0dfd83ee907d755a6f8725ef6543221859179a | |
| parent | f435830ea42db6073ed8714452dae302a3c855c5 (diff) | |
| download | emacs-64a695bd9196d2036ecfbc02d69dcfdfd4ffe866.tar.gz emacs-64a695bd9196d2036ecfbc02d69dcfdfd4ffe866.zip | |
Doc fix.
* doc/emacs/custom.texi (Specifying File Variables): Fix cross-references.
* doc/emacs/mule.texi (Unibyte Mode): Fix cross-references.
* doc/lispref/nonascii.texi (Non-ASCII Characters): Update menu.
(Disabling Multibyte): Move here from doc/emacs/mule.texi. Fix cross-references.
* doc/lispref/elisp.texi (Top): Update menu.
| -rw-r--r-- | doc/emacs/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/emacs/custom.texi | 5 | ||||
| -rw-r--r-- | doc/emacs/mule.texi | 90 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 50 |
6 files changed, 73 insertions, 84 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 775bb9fc26b..2e962bc08fe 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2013-07-31 Xue Fuqiao <xfq.free@gmail.com> | 1 | 2013-07-31 Xue Fuqiao <xfq.free@gmail.com> |
| 2 | 2 | ||
| 3 | * custom.texi (Specifying File Variables): Fix cross-references. | ||
| 4 | |||
| 5 | * mule.texi (Unibyte Mode): Fix cross-references. | ||
| 6 | |||
| 3 | * macos.texi (Mac / GNUstep Basics): Mention `ns-alternate-modifier'. | 7 | * macos.texi (Mac / GNUstep Basics): Mention `ns-alternate-modifier'. |
| 4 | 8 | ||
| 5 | * cal-xtra.texi (Advanced Calendar/Diary Usage): Update menu. | 9 | * cal-xtra.texi (Advanced Calendar/Diary Usage): Update menu. |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 45fa45191f3..f3e07fd8ba0 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -1166,7 +1166,10 @@ conversion of this file. @xref{Coding Systems}. | |||
| 1166 | 1166 | ||
| 1167 | @item | 1167 | @item |
| 1168 | @code{unibyte} says to load or compile a file of Emacs Lisp in unibyte | 1168 | @code{unibyte} says to load or compile a file of Emacs Lisp in unibyte |
| 1169 | mode, if the value is @code{t}. @xref{Disabling Multibyte}. | 1169 | mode, if the value is @code{t}. @xref{Disabling Multibyte, , |
| 1170 | Disabling Multibyte Characters, elisp, GNU Emacs Lisp Reference | ||
| 1171 | Manual}. | ||
| 1172 | |||
| 1170 | @end itemize | 1173 | @end itemize |
| 1171 | 1174 | ||
| 1172 | @noindent | 1175 | @noindent |
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index c8bd5027fa0..2ee7d2018a5 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi | |||
| @@ -90,7 +90,6 @@ value to make sure Emacs interprets keyboard input correctly; see | |||
| 90 | 90 | ||
| 91 | @menu | 91 | @menu |
| 92 | * International Chars:: Basic concepts of multibyte characters. | 92 | * International Chars:: Basic concepts of multibyte characters. |
| 93 | * Disabling Multibyte:: Controlling whether to use multibyte characters. | ||
| 94 | * Language Environments:: Setting things up for the language you use. | 93 | * Language Environments:: Setting things up for the language you use. |
| 95 | * Input Methods:: Entering text characters not on your keyboard. | 94 | * Input Methods:: Entering text characters not on your keyboard. |
| 96 | * Select Input Method:: Specifying your choice of input methods. | 95 | * Select Input Method:: Specifying your choice of input methods. |
| @@ -244,79 +243,6 @@ Character code properties: customize what to show | |||
| 244 | decomposition: (65 768) ('A' '`') | 243 | decomposition: (65 768) ('A' '`') |
| 245 | @end smallexample | 244 | @end smallexample |
| 246 | 245 | ||
| 247 | @c FIXME? Does this section even belong in the user manual? | ||
| 248 | @c Seems more appropriate to the lispref? | ||
| 249 | @node Disabling Multibyte | ||
| 250 | @section Disabling Multibyte Characters | ||
| 251 | |||
| 252 | By default, Emacs starts in multibyte mode: it stores the contents | ||
| 253 | of buffers and strings using an internal encoding that represents | ||
| 254 | non-@acronym{ASCII} characters using multi-byte sequences. Multibyte | ||
| 255 | mode allows you to use all the supported languages and scripts without | ||
| 256 | limitations. | ||
| 257 | |||
| 258 | @cindex turn multibyte support on or off | ||
| 259 | Under very special circumstances, you may want to disable multibyte | ||
| 260 | character support, for a specific buffer. | ||
| 261 | When multibyte characters are disabled in a buffer, we call | ||
| 262 | that @dfn{unibyte mode}. In unibyte mode, each character in the | ||
| 263 | buffer has a character code ranging from 0 through 255 (0377 octal); 0 | ||
| 264 | through 127 (0177 octal) represent @acronym{ASCII} characters, and 128 | ||
| 265 | (0200 octal) through 255 (0377 octal) represent non-@acronym{ASCII} | ||
| 266 | characters. | ||
| 267 | |||
| 268 | To edit a particular file in unibyte representation, visit it using | ||
| 269 | @code{find-file-literally}. @xref{Visiting}. You can convert a | ||
| 270 | multibyte buffer to unibyte by saving it to a file, killing the | ||
| 271 | buffer, and visiting the file again with @code{find-file-literally}. | ||
| 272 | Alternatively, you can use @kbd{C-x @key{RET} c} | ||
| 273 | (@code{universal-coding-system-argument}) and specify @samp{raw-text} | ||
| 274 | as the coding system with which to visit or save a file. @xref{Text | ||
| 275 | Coding}. Unlike @code{find-file-literally}, finding a file as | ||
| 276 | @samp{raw-text} doesn't disable format conversion, uncompression, or | ||
| 277 | auto mode selection. | ||
| 278 | |||
| 279 | @c Not a single file in Emacs uses this feature. Is it really worth | ||
| 280 | @c mentioning in the _user_ manual? Also, this duplicates somewhat | ||
| 281 | @c "Loading Non-ASCII" from the lispref. | ||
| 282 | @cindex Lisp files, and multibyte operation | ||
| 283 | @cindex multibyte operation, and Lisp files | ||
| 284 | @cindex unibyte operation, and Lisp files | ||
| 285 | @cindex init file, and non-@acronym{ASCII} characters | ||
| 286 | Emacs normally loads Lisp files as multibyte. | ||
| 287 | This includes the Emacs initialization | ||
| 288 | file, @file{.emacs}, and the initialization files of packages | ||
| 289 | such as Gnus. However, you can specify unibyte loading for a | ||
| 290 | particular Lisp file, by adding an entry @samp{coding: raw-text} in a file | ||
| 291 | local variables section. @xref{Specify Coding}. | ||
| 292 | Then that file is always loaded as unibyte text. | ||
| 293 | @ignore | ||
| 294 | @c I don't see the point of this statement: | ||
| 295 | The motivation for these conventions is that it is more reliable to | ||
| 296 | always load any particular Lisp file in the same way. | ||
| 297 | @end ignore | ||
| 298 | You can also load a Lisp file as unibyte, on any one occasion, by | ||
| 299 | typing @kbd{C-x @key{RET} c raw-text @key{RET}} immediately before | ||
| 300 | loading it. | ||
| 301 | |||
| 302 | @c See http://debbugs.gnu.org/11226 for lack of unibyte tooltip. | ||
| 303 | @vindex enable-multibyte-characters | ||
| 304 | The buffer-local variable @code{enable-multibyte-characters} is | ||
| 305 | non-@code{nil} in multibyte buffers, and @code{nil} in unibyte ones. | ||
| 306 | The mode line also indicates whether a buffer is multibyte or not. | ||
| 307 | @xref{Mode Line}. With a graphical display, in a multibyte buffer, | ||
| 308 | the portion of the mode line that indicates the character set has a | ||
| 309 | tooltip that (amongst other things) says that the buffer is multibyte. | ||
| 310 | In a unibyte buffer, the character set indicator is absent. Thus, in | ||
| 311 | a unibyte buffer (when using a graphical display) there is normally | ||
| 312 | nothing before the indication of the visited file's end-of-line | ||
| 313 | convention (colon, backslash, etc.), unless you are using an input | ||
| 314 | method. | ||
| 315 | |||
| 316 | @findex toggle-enable-multibyte-characters | ||
| 317 | You can turn off multibyte support in a specific buffer by invoking the | ||
| 318 | command @code{toggle-enable-multibyte-characters} in that buffer. | ||
| 319 | |||
| 320 | @node Language Environments | 246 | @node Language Environments |
| 321 | @section Language Environments | 247 | @section Language Environments |
| 322 | @cindex language environments | 248 | @cindex language environments |
| @@ -1591,15 +1517,13 @@ the range 0240 to 0377 octal (160 to 255 decimal) to handle the | |||
| 1591 | accented letters and punctuation needed by various European languages | 1517 | accented letters and punctuation needed by various European languages |
| 1592 | (and some non-European ones). Note that Emacs considers bytes with | 1518 | (and some non-European ones). Note that Emacs considers bytes with |
| 1593 | codes in this range as raw bytes, not as characters, even in a unibyte | 1519 | codes in this range as raw bytes, not as characters, even in a unibyte |
| 1594 | buffer, i.e., if you disable multibyte characters. However, Emacs | 1520 | buffer, i.e., if you disable multibyte characters. However, Emacs can |
| 1595 | can still handle these character codes as if they belonged to | 1521 | still handle these character codes as if they belonged to @emph{one} |
| 1596 | @emph{one} of the single-byte character sets at a time. To specify | 1522 | of the single-byte character sets at a time. To specify @emph{which} |
| 1597 | @emph{which} of these codes to use, invoke @kbd{M-x | 1523 | of these codes to use, invoke @kbd{M-x set-language-environment} and |
| 1598 | set-language-environment} and specify a suitable language environment | 1524 | specify a suitable language environment such as @samp{Latin-@var{n}}. |
| 1599 | such as @samp{Latin-@var{n}}. | 1525 | @xref{Disabling Multibyte, , Disabling Multibyte Characters, elisp, |
| 1600 | 1526 | GNU Emacs Lisp Reference Manual}. | |
| 1601 | For more information about unibyte operation, see | ||
| 1602 | @ref{Disabling Multibyte}. | ||
| 1603 | 1527 | ||
| 1604 | @vindex unibyte-display-via-language-environment | 1528 | @vindex unibyte-display-via-language-environment |
| 1605 | Emacs can also display bytes in the range 160 to 255 as readable | 1529 | Emacs can also display bytes in the range 160 to 255 as readable |
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 | ||