Commit 99191b89 authored by Xue Fuqiao's avatar Xue Fuqiao
Browse files

Merge from mainline.

parents ab419665 2ad0a067
2013-07-31 Eli Zaretskii <eliz@gnu.org>
* emacs.texi (Top): Remove menu item for the removed "Disabling
Multibyte" node.
2013-07-31 Xue Fuqiao <xfq.free@gmail.com>
* rmail.texi (Rmail Coding): Move here from mule.texi.
* custom.texi (Specifying File Variables): Fix cross-references.
* mule.texi (Unibyte Mode): Fix cross-references.
(Disabling Multibyte): Remove.
* macos.texi (Mac / GNUstep Basics): Mention `ns-alternate-modifier'.
* cal-xtra.texi (Advanced Calendar/Diary Usage): Update menu.
(Mayan Calendar): Move here from calendar.texi.
* emacs.texi (Top): Update menu.
2013-07-30 Xue Fuqiao <xfq.free@gmail.com>
* emacs.texi (Top): Add menu entry.
* maintaining.texi (VC Ignore): New node. Document vc-ignore.
(VC Directory Commands): Add vc-dir-ignore.
2013-07-28 Xue Fuqiao <xfq.free@gmail.com>
* glossary.texi (Glossary): Add some entries.
......
......@@ -17,6 +17,7 @@ your personal tastes.
@menu
* Calendar Customizing:: Calendar layout and hooks.
* Holiday Customizing:: Defining your own holidays.
* Mayan Calendar:: Moving to a date specified in a Mayan calendar.
* Date Display Format:: Changing the format.
* Time Display Format:: Changing the format.
* Diary Customizing:: Defaults you can set.
......@@ -260,6 +261,99 @@ visible in the calendar window, with descriptive strings, like this:
(((6 4 2012) "Lunar Eclipse") ((11 13 2012) "Solar Eclipse") ... )
@end smallexample
@node Mayan Calendar
@subsection Converting from the Mayan Calendar
@cindex Mayan calendar
Here are the commands to select dates based on the Mayan calendar:
@table @kbd
@item g m l
Move to a date specified by the long count calendar
(@code{calendar-mayan-goto-long-count-date}).
@item g m n t
Move to the next occurrence of a place in the
tzolkin calendar (@code{calendar-mayan-next-tzolkin-date}).
@item g m p t
Move to the previous occurrence of a place in the
tzolkin calendar (@code{calendar-mayan-previous-tzolkin-date}).
@item g m n h
Move to the next occurrence of a place in the
haab calendar (@code{calendar-mayan-next-haab-date}).
@item g m p h
Move to the previous occurrence of a place in the
haab calendar (@code{calendar-mayan-previous-haab-date}).
@item g m n c
Move to the next occurrence of a place in the
calendar round (@code{calendar-mayan-next-calendar-round-date}).
@item g m p c
Move to the previous occurrence of a place in the
calendar round (@code{calendar-mayan-previous-calendar-round-date}).
@end table
@cindex Mayan long count
To understand these commands, you need to understand the Mayan calendars.
The @dfn{long count} is a counting of days with these units:
@display
1 kin = 1 day@ @ @ 1 uinal = 20 kin@ @ @ 1 tun = 18 uinal
1 katun = 20 tun@ @ @ 1 baktun = 20 katun
@end display
@kindex g m @r{(Calendar mode)}
@findex calendar-mayan-goto-long-count-date
@noindent
Thus, the long count date 12.16.11.16.6 means 12 baktun, 16 katun, 11
tun, 16 uinal, and 6 kin. The Emacs calendar can handle Mayan long
count dates as early as 7.17.18.13.3, but no earlier. When you use the
@kbd{g m l} command, type the Mayan long count date with the baktun,
katun, tun, uinal, and kin separated by periods.
@findex calendar-mayan-previous-tzolkin-date
@findex calendar-mayan-next-tzolkin-date
@cindex Mayan tzolkin calendar
The Mayan tzolkin calendar is a cycle of 260 days formed by a pair of
independent cycles of 13 and 20 days. Since this cycle repeats
endlessly, Emacs provides commands to move backward and forward to the
previous or next point in the cycle. Type @kbd{g m p t} to go to the
previous tzolkin date; Emacs asks you for a tzolkin date and moves point
to the previous occurrence of that date. Similarly, type @kbd{g m n t}
to go to the next occurrence of a tzolkin date.
@findex calendar-mayan-previous-haab-date
@findex calendar-mayan-next-haab-date
@cindex Mayan haab calendar
The Mayan haab calendar is a cycle of 365 days arranged as 18 months
of 20 days each, followed by a 5-day monthless period. Like the tzolkin
cycle, this cycle repeats endlessly, and there are commands to move
backward and forward to the previous or next point in the cycle. Type
@kbd{g m p h} to go to the previous haab date; Emacs asks you for a haab
date and moves point to the previous occurrence of that date.
Similarly, type @kbd{g m n h} to go to the next occurrence of a haab
date.
@c This is omitted because it is too long for smallbook format.
@c @findex calendar-mayan-previous-calendar-round-date
@findex calendar-mayan-next-calendar-round-date
@cindex Mayan calendar round
The Maya also used the combination of the tzolkin date and the haab
date. This combination is a cycle of about 52 years called a
@emph{calendar round}. If you type @kbd{g m p c}, Emacs asks you for
both a haab and a tzolkin date and then moves point to the previous
occurrence of that combination. Use @kbd{g m n c} to move point to the
next occurrence of a combination. These commands signal an error if the
haab/tzolkin date combination you have typed is impossible.
Emacs uses strict completion
@iftex
(@pxref{Completion Exit,,, emacs, the Emacs Manual})
@end iftex
@ifnottex
(@pxref{Completion Exit})
@end ifnottex
whenever it asks you to type a Mayan name, so you don't have to worry
about spelling.
@node Date Display Format
@subsection Date Display Format
@vindex calendar-date-display-form
......
......@@ -678,7 +678,6 @@ and from several other calendars.
(aside from Gregorian).
* To Other Calendar:: Converting the selected date to various calendars.
* From Other Calendar:: Moving to a date specified in another calendar.
* Mayan Calendar:: Moving to a date specified in a Mayan calendar.
@end menu
@c FIXME perhaps most of the details should be moved to cal-xtra.
......@@ -913,93 +912,6 @@ years for the date given by point. If you are not in the calendar,
this command first asks you for the date of death and the range of
years, and then displays the list of yahrzeit dates.
@c FIXME move to emacs-xtra.
@node Mayan Calendar
@subsection Converting from the Mayan Calendar
Here are the commands to select dates based on the Mayan calendar:
@table @kbd
@item g m l
Move to a date specified by the long count calendar
(@code{calendar-mayan-goto-long-count-date}).
@item g m n t
Move to the next occurrence of a place in the
tzolkin calendar (@code{calendar-mayan-next-tzolkin-date}).
@item g m p t
Move to the previous occurrence of a place in the
tzolkin calendar (@code{calendar-mayan-previous-tzolkin-date}).
@item g m n h
Move to the next occurrence of a place in the
haab calendar (@code{calendar-mayan-next-haab-date}).
@item g m p h
Move to the previous occurrence of a place in the
haab calendar (@code{calendar-mayan-previous-haab-date}).
@item g m n c
Move to the next occurrence of a place in the
calendar round (@code{calendar-mayan-next-calendar-round-date}).
@item g m p c
Move to the previous occurrence of a place in the
calendar round (@code{calendar-mayan-previous-calendar-round-date}).
@end table
@cindex Mayan long count
To understand these commands, you need to understand the Mayan calendars.
The @dfn{long count} is a counting of days with these units:
@display
1 kin = 1 day@ @ @ 1 uinal = 20 kin@ @ @ 1 tun = 18 uinal
1 katun = 20 tun@ @ @ 1 baktun = 20 katun
@end display
@kindex g m @r{(Calendar mode)}
@findex calendar-mayan-goto-long-count-date
@noindent
Thus, the long count date 12.16.11.16.6 means 12 baktun, 16 katun, 11
tun, 16 uinal, and 6 kin. The Emacs calendar can handle Mayan long
count dates as early as 7.17.18.13.3, but no earlier. When you use the
@kbd{g m l} command, type the Mayan long count date with the baktun,
katun, tun, uinal, and kin separated by periods.
@findex calendar-mayan-previous-tzolkin-date
@findex calendar-mayan-next-tzolkin-date
@cindex Mayan tzolkin calendar
The Mayan tzolkin calendar is a cycle of 260 days formed by a pair of
independent cycles of 13 and 20 days. Since this cycle repeats
endlessly, Emacs provides commands to move backward and forward to the
previous or next point in the cycle. Type @kbd{g m p t} to go to the
previous tzolkin date; Emacs asks you for a tzolkin date and moves point
to the previous occurrence of that date. Similarly, type @kbd{g m n t}
to go to the next occurrence of a tzolkin date.
@findex calendar-mayan-previous-haab-date
@findex calendar-mayan-next-haab-date
@cindex Mayan haab calendar
The Mayan haab calendar is a cycle of 365 days arranged as 18 months
of 20 days each, followed by a 5-day monthless period. Like the tzolkin
cycle, this cycle repeats endlessly, and there are commands to move
backward and forward to the previous or next point in the cycle. Type
@kbd{g m p h} to go to the previous haab date; Emacs asks you for a haab
date and moves point to the previous occurrence of that date.
Similarly, type @kbd{g m n h} to go to the next occurrence of a haab
date.
@c This is omitted because it is too long for smallbook format.
@c @findex calendar-mayan-previous-calendar-round-date
@findex calendar-mayan-next-calendar-round-date
@cindex Mayan calendar round
The Maya also used the combination of the tzolkin date and the haab
date. This combination is a cycle of about 52 years called a
@emph{calendar round}. If you type @kbd{g m p c}, Emacs asks you for
both a haab and a tzolkin date and then moves point to the previous
occurrence of that combination. Use @kbd{g m n c} to move point to the
next occurrence of a combination. These commands signal an error if the
haab/tzolkin date combination you have typed is impossible.
Emacs uses strict completion (@pxref{Completion Exit}) whenever it
asks you to type a Mayan name, so you don't have to worry about
spelling.
@node Diary
@section The Diary
@cindex diary
......
......@@ -1166,7 +1166,10 @@ conversion of this file. @xref{Coding Systems}.
@item
@code{unibyte} says to load or compile a file of Emacs Lisp in unibyte
mode, if the value is @code{t}. @xref{Disabling Multibyte}.
mode, if the value is @code{t}. @xref{Disabling Multibyte, ,
Disabling Multibyte Characters, elisp, GNU Emacs Lisp Reference
Manual}.
@end itemize
@noindent
......
......@@ -544,7 +544,6 @@ Frames and Graphical Displays
International Character Set Support
* International Chars:: Basic concepts of multibyte characters.
* Disabling Multibyte:: Controlling whether to use multibyte characters.
* Language Environments:: Setting things up for the language you use.
* Input Methods:: Entering text characters not on your keyboard.
* Select Input Method:: Specifying your choice of input methods.
......@@ -798,6 +797,7 @@ Version Control
* Old Revisions:: Examining and comparing old versions.
* VC Change Log:: Viewing the VC Change Log.
* VC Undo:: Canceling changes before or after committing.
* VC Ignore:: Ignore files under version control system.
* VC Directory Mode:: Listing files managed by version control.
* Branches:: Multiple lines of development.
@ifnottex
......@@ -956,7 +956,6 @@ Conversion To and From Other Calendars
(aside from Gregorian).
* To Other Calendar:: Converting the selected date to various calendars.
* From Other Calendar:: Moving to a date specified in another calendar.
* Mayan Calendar:: Moving to a date specified in a Mayan calendar.
The Diary
......@@ -971,6 +970,7 @@ More advanced features of the Calendar and Diary
* Calendar Customizing:: Calendar layout and hooks.
* Holiday Customizing:: Defining your own holidays.
* Mayan Calendar:: Moving to a date specified in a Mayan calendar.
* Date Display Format:: Changing the format.
* Time Display Format:: Changing the format.
* Diary Customizing:: Defaults you can set.
......
......@@ -40,13 +40,16 @@ Emacs provides a set of key bindings using this modifier key that mimic
other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You
can change these bindings in the usual way (@pxref{Key Bindings}).
@c FIXME mention ns-alternate-modifier?
@vindex ns-alternate-modifier
@vindex ns-right-alternate-modifier
The variable @code{ns-right-alternate-modifier} controls the
behavior of the right @key{alt} and @key{option} keys. These keys
behave like the left-hand keys if the value is @code{left} (the
default). A value of @code{control}, @code{meta}, @code{alt},
@code{super}, or @code{hyper} makes them behave like the corresponding
modifier keys; a value of @code{none} tells Emacs to ignore them.
modifier keys; a value to @code{left} means be the same key as
@code{ns-alternate-modifier}; a value of @code{none} tells Emacs to
ignore them.
@kbd{S-Mouse-1} adjusts the region to the click position,
just like @kbd{Mouse-3} (@code{mouse-save-then-kill}); it does not pop
......
@c This is part of the Emacs manual.
@c This is part of the Emacs manual., Abbrevs, This is part of the Emacs manual., Top
@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2013 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
......@@ -56,6 +56,7 @@ variable @code{vc-handled-backends} to @code{nil}
* Old Revisions:: Examining and comparing old versions.
* VC Change Log:: Viewing the VC Change Log.
* VC Undo:: Canceling changes before or after committing.
* VC Ignore:: Ignore files under version control system.
* VC Directory Mode:: Listing files managed by version control.
* Branches:: Multiple lines of development.
@ifnottex
......@@ -1032,6 +1033,23 @@ unlocked; you must lock again to resume editing. You can also use
@kbd{C-x v u} to unlock a file if you lock it and then decide not to
change it.
@node VC Ignore
@subsection Ignore Version Control Files
@table @kbd
@item C-x v G
Ignore a file under current version control system. (@code{vc-ignore}).
@end table
@kindex C-x v G
@findex vc-ignore
Many source trees contain some files that do not need to be versioned,
such as editor backups, object or bytecode files, and built programs.
You can simply not add them, but then they’ll always crop up as
unknown files. You can also tell the version control system to ignore
these files by adding them to the ignore file at the top of the tree.
@kbd{C-x v G} (@code{vc-ignore}) can help you do this.
@node VC Directory Mode
@subsection VC Directory Mode
......@@ -1222,7 +1240,7 @@ Revisions}), and @w{@kbd{C-x v u}} (@pxref{VC Undo}).
The VC Directory buffer also defines some single-key shortcuts for
VC commands with the @kbd{C-x v} prefix: @kbd{=}, @kbd{+}, @kbd{l},
@kbd{i}, @kbd{D}, @kbd{L} and @kbd{v}.
@kbd{i}, @kbd{D}, @kbd{L}, @kbd{G} and @kbd{v}.
For example, you can commit a set of edited files by opening a VC
Directory buffer, where the files are listed with the @samp{edited}
......
......@@ -90,7 +90,6 @@ value to make sure Emacs interprets keyboard input correctly; see
@menu
* International Chars:: Basic concepts of multibyte characters.
* Disabling Multibyte:: Controlling whether to use multibyte characters.
* Language Environments:: Setting things up for the language you use.
* Input Methods:: Entering text characters not on your keyboard.
* Select Input Method:: Specifying your choice of input methods.
......@@ -244,79 +243,6 @@ Character code properties: customize what to show
decomposition: (65 768) ('A' '`')
@end smallexample
@c FIXME? Does this section even belong in the user manual?
@c Seems more appropriate to the lispref?
@node Disabling Multibyte
@section Disabling Multibyte Characters
By default, Emacs starts in multibyte mode: it stores the contents
of buffers and strings using an internal encoding that represents
non-@acronym{ASCII} characters using multi-byte sequences. Multibyte
mode allows you to use all the supported languages and scripts without
limitations.
@cindex turn multibyte support on or off
Under very special circumstances, you may want to disable multibyte
character support, for a specific buffer.
When multibyte characters are disabled in a buffer, we call
that @dfn{unibyte mode}. In unibyte mode, each character in the
buffer has a character code ranging from 0 through 255 (0377 octal); 0
through 127 (0177 octal) represent @acronym{ASCII} characters, and 128
(0200 octal) through 255 (0377 octal) represent non-@acronym{ASCII}
characters.
To edit a particular file in unibyte representation, visit it using
@code{find-file-literally}. @xref{Visiting}. You can convert a
multibyte buffer to unibyte by saving it to a file, killing the
buffer, and visiting the file again with @code{find-file-literally}.
Alternatively, you can use @kbd{C-x @key{RET} c}
(@code{universal-coding-system-argument}) and specify @samp{raw-text}
as the coding system with which to visit or save a file. @xref{Text
Coding}. Unlike @code{find-file-literally}, finding a file as
@samp{raw-text} doesn't disable format conversion, uncompression, or
auto mode selection.
@c Not a single file in Emacs uses this feature. Is it really worth
@c mentioning in the _user_ manual? Also, this duplicates somewhat
@c "Loading Non-ASCII" from the lispref.
@cindex Lisp files, and multibyte operation
@cindex multibyte operation, and Lisp files
@cindex unibyte operation, and Lisp files
@cindex init file, and non-@acronym{ASCII} characters
Emacs normally loads Lisp files as multibyte.
This includes the Emacs initialization
file, @file{.emacs}, and the initialization files of packages
such as Gnus. However, you can specify unibyte loading for a
particular Lisp file, by adding an entry @samp{coding: raw-text} in a file
local variables section. @xref{Specify Coding}.
Then that file is always loaded as unibyte text.
@ignore
@c I don't see the point of this statement:
The motivation for these conventions is that it is more reliable to
always load any particular Lisp file in the same way.
@end ignore
You can also load a Lisp file as unibyte, on any one occasion, by
typing @kbd{C-x @key{RET} c raw-text @key{RET}} immediately before
loading it.
@c See http://debbugs.gnu.org/11226 for lack of unibyte tooltip.
@vindex enable-multibyte-characters
The buffer-local variable @code{enable-multibyte-characters} is
non-@code{nil} in multibyte buffers, and @code{nil} in unibyte ones.
The mode line also indicates whether a buffer is multibyte or not.
@xref{Mode Line}. With a graphical display, in a multibyte buffer,
the portion of the mode line that indicates the character set has a
tooltip that (amongst other things) says that the buffer is multibyte.
In a unibyte buffer, the character set indicator is absent. Thus, in
a unibyte buffer (when using a graphical display) there is normally
nothing before the indication of the visited file's end-of-line
convention (colon, backslash, etc.), unless you are using an input
method.
@findex toggle-enable-multibyte-characters
You can turn off multibyte support in a specific buffer by invoking the
command @code{toggle-enable-multibyte-characters} in that buffer.
@node Language Environments
@section Language Environments
@cindex language environments
......@@ -919,18 +845,6 @@ pattern, are decoded correctly.
Unlike the previous two, this variable does not override any
@samp{-*-coding:-*-} tag.
@c FIXME? This seems somewhat out of place. Move to the Rmail section?
@vindex rmail-file-coding-system
When you get new mail in Rmail, each message is translated
automatically from the coding system it is written in, as if it were a
separate file. This uses the priority list of coding systems that you
have specified. If a MIME message specifies a character set, Rmail
obeys that specification. For reading and saving Rmail files
themselves, Emacs uses the coding system specified by the variable
@code{rmail-file-coding-system}. The default value is @code{nil},
which means that Rmail files are not translated (they are read and
written in the Emacs internal character code).
@node Specify Coding
@section Specifying a File's Coding System
......@@ -1591,15 +1505,13 @@ the range 0240 to 0377 octal (160 to 255 decimal) to handle the
accented letters and punctuation needed by various European languages
(and some non-European ones). Note that Emacs considers bytes with
codes in this range as raw bytes, not as characters, even in a unibyte
buffer, i.e., if you disable multibyte characters. However, Emacs
can still handle these character codes as if they belonged to
@emph{one} of the single-byte character sets at a time. To specify
@emph{which} of these codes to use, invoke @kbd{M-x
set-language-environment} and specify a suitable language environment
such as @samp{Latin-@var{n}}.
For more information about unibyte operation, see
@ref{Disabling Multibyte}.
buffer, i.e., if you disable multibyte characters. However, Emacs can
still handle these character codes as if they belonged to @emph{one}
of the single-byte character sets at a time. To specify @emph{which}
of these codes to use, invoke @kbd{M-x set-language-environment} and
specify a suitable language environment such as @samp{Latin-@var{n}}.
@xref{Disabling Multibyte, , Disabling Multibyte Characters, elisp,
GNU Emacs Lisp Reference Manual}.
@vindex unibyte-display-via-language-environment
Emacs can also display bytes in the range 160 to 255 as readable
......
......@@ -1274,6 +1274,17 @@ It reads the name of a coding system, and then redecodes the message
using the coding system you specified. If you specified the right
coding system, the result should be readable.
@vindex rmail-file-coding-system
When you get new mail in Rmail, each message is translated
automatically from the coding system it is written in, as if it were a
separate file. This uses the priority list of coding systems that you
have specified. If a MIME message specifies a character set, Rmail
obeys that specification. For reading and saving Rmail files
themselves, Emacs uses the coding system specified by the variable
@code{rmail-file-coding-system}. The default value is @code{nil},
which means that Rmail files are not translated (they are read and
written in the Emacs internal character code).
@node Rmail Editing
@section Editing Within a Message
......
2013-08-02 Xue Fuqiao <xfq.free@gmail.com>
* emacs-lisp-intro.texi (zap-to-char): Remove obsolete stuff.
2013-07-06 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi (Top):
......
......@@ -7537,20 +7537,7 @@ retrieved. @xref{Yanking, , Yanking Text Back}.
@section @code{zap-to-char}
@findex zap-to-char
 
@c FIXME remove obsolete stuff
The @code{zap-to-char} function changed little between GNU Emacs
version 19 and GNU Emacs version 22. However, @code{zap-to-char}
calls another function, @code{kill-region}, which enjoyed a major
rewrite.
The @code{kill-region} function in Emacs 19 is complex, but does not
use code that is important at this time. We will skip it.
The @code{kill-region} function in Emacs 22 is easier to read than the
same function in Emacs 19 and introduces a very important concept,
that of error handling. We will walk through the function.
But first, let us look at the interactive @code{zap-to-char} function.
Let us look at the interactive @code{zap-to-char} function.
 
@menu
* Complete zap-to-char:: The complete implementation.
......
2013-08-02 Xue Fuqiao <xfq.free@gmail.com>
* display.texi (Face Functions): Add an index.
* variables.texi (Variable Aliases): Add an index.
* functions.texi (Defining Functions): Add an index.
* nonascii.texi (Coding System Basics): Add an index.
2013-07-31 Xue Fuqiao <xfq.free@gmail.com>
* nonascii.texi (Non-ASCII Characters): Update menu.
(Disabling Multibyte): Move here from doc/emacs/mule.texi. Fix cross-references.
* elisp.texi (Top): Update menu.
2013-07-30 Xue Fuqiao <xfq.free@gmail.com>
* windows.texi (Window History): Mention the default value of
......
......@@ -2738,6 +2738,7 @@ differently from the default face.
@end defun
@cindex face alias
@cindex alias, for faces
A @dfn{face alias} provides an equivalent name for a face. You can
define a face alias by giving the alias symbol the @code{face-alias}
property, with a value of the target face name. The following example
......
......@@ -1194,6 +1194,7 @@ Text Properties
Non-@acronym{ASCII} Characters
* Text Representations:: How Emacs represents text.
* Disabling Multibyte:: Controlling whether to use multibyte characters.
* Converting Representations:: Converting unibyte to multibyte and vice versa.
* Selecting a Representation:: Treating a byte sequence as unibyte or multi.
* Character Codes:: How unibyte and multibyte relate to
......
......@@ -580,6 +580,7 @@ redefinition from unintentional redefinition.
@end defmac
@cindex function aliases
@cindex alias, for functions
@defun defalias name definition &optional doc
@anchor{Definition of defalias}
This function defines the symbol @var{name} as a function, with
......
......@@ -13,6 +13,7 @@ how they are stored in strings and buffers.
@menu
* Text Representations:: How Emacs represents text.
* Disabling Multibyte:: Controlling whether to use multibyte characters.
* Converting Representations:: Converting unibyte to multibyte and vice versa.
* Selecting a Representation:: Treating a byte sequence as unibyte or multi.
* Character Codes:: How unibyte and multibyte relate to
......@@ -140,6 +141,55 @@ This function concatenates all its argument @var{bytes} and makes the
result a unibyte string.
@end defun
@node Disabling Multibyte
@section Disabling Multibyte Characters
@cindex disabling multibyte
By default, Emacs starts in multibyte mode: it stores the contents
of buffers and strings using an internal encoding that represents
non-@acronym{ASCII} characters using multi-byte sequences. Multibyte
mode allows you to use all the supported languages and scripts without
limitations.
@cindex turn multibyte support on or off
Under very special circumstances, you may want to disable multibyte
character support, for a specific buffer.
When multibyte characters are disabled in a buffer, we call
that @dfn{unibyte mode}. In unibyte mode, each character in the
buffer has a character code ranging from 0 through 255 (0377 octal); 0
through 127 (0177 octal) represent @acronym{ASCII} characters, and 128
(0200 octal) through 255 (0377 octal) represent non-@acronym{ASCII}
characters.
To edit a particular file in unibyte representation, visit it using
@code{find-file-literally}. @xref{Visiting Functions}. You can
convert a multibyte buffer to unibyte by saving it to a file, killing
the buffer, and visiting the file again with
@code{find-file-literally}. Alternatively, you can use @kbd{C-x
@key{RET} c} (@code{universal-coding-system-argument}) and specify
@samp{raw-text} as the coding system with which to visit or save a
file. @xref{Text Coding, , Specifying a Coding System for File Text,
emacs, GNU Emacs Manual}. Unlike @code{find-file-literally}, finding
a file as @samp{raw-text} doesn't disable format conversion,
uncompression, or auto mode selection.
@c See http://debbugs.gnu.org/11226 for lack of unibyte tooltip.
@vindex enable-multibyte-characters
The buffer-local variable @code{enable-multibyte-characters} is
non-@code{nil} in multibyte buffers, and @code{nil} in unibyte ones.
The mode line also indicates whether a buffer is multibyte or not.
With a graphical display, in a multibyte buffer, the portion of the
mode line that indicates the character set has a tooltip that (amongst
other things) says that the buffer is multibyte. In a unibyte buffer,
the character set indicator is absent. Thus, in a unibyte buffer
(when using a graphical display) there is normally nothing before the
indication of the visited file's end-of-line convention (colon,
backslash, etc.), unless you are using an input method.
@findex toggle-enable-multibyte-characters
You can turn off multibyte support in a specific buffer by invoking the
command @code{toggle-enable-multibyte-characters} in that buffer.
@node Converting Representations
@section Converting Text Representations