aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/FOR-RELEASE9
-rw-r--r--doc/emacs/ChangeLog34
-rw-r--r--doc/emacs/ack.texi4
-rw-r--r--doc/emacs/basic.texi10
-rw-r--r--doc/emacs/building.texi34
-rw-r--r--doc/emacs/cmdargs.texi4
-rw-r--r--doc/emacs/commands.texi2
-rw-r--r--doc/emacs/display.texi44
-rw-r--r--doc/emacs/emacs.texi2
-rw-r--r--doc/emacs/entering.texi16
-rw-r--r--doc/emacs/files.texi2
-rw-r--r--doc/emacs/fixit.texi6
-rw-r--r--doc/emacs/frames.texi33
-rw-r--r--doc/emacs/glossary.texi18
-rw-r--r--doc/emacs/misc.texi94
-rw-r--r--doc/emacs/msdog-xtra.texi2
-rw-r--r--doc/emacs/msdog.texi10
-rw-r--r--doc/emacs/mule.texi211
-rw-r--r--doc/emacs/screen.texi37
-rw-r--r--doc/emacs/trouble.texi19
-rw-r--r--doc/emacs/windows.texi4
-rw-r--r--doc/lispref/ChangeLog20
-rw-r--r--doc/lispref/anti.texi18
-rw-r--r--doc/lispref/processes.texi145
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/emacs-lisp/easy-mmode.el2
-rw-r--r--lisp/international/mule-cmds.el6
-rw-r--r--lisp/simple.el10
28 files changed, 470 insertions, 339 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index f1bfa35a2b8..adbeeaa296c 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -155,13 +155,8 @@ mini.texi rgm
155misc.texi cyd 155misc.texi cyd
156modes.texi cyd 156modes.texi cyd
157msdog.texi rgm (can't actually test any of it though) 157msdog.texi rgm (can't actually test any of it though)
158 It was not obvious to me that the following is true (it could well be though):
159
160 Emacs on Windows automatically determines your default printer and
161 sets the variable `printer-name' to that printer's name.
162
163msdog-xtra.texi rgm (can't actually test any of it though) 158msdog-xtra.texi rgm (can't actually test any of it though)
164mule.texi 159mule.texi rgm (not 100% sure about "Fontsets")
165m-x.texi cyd 160m-x.texi cyd
166package.texi cyd 161package.texi cyd
167picture-xtra.texi rgm 162picture-xtra.texi rgm
@@ -182,7 +177,7 @@ xresources.texi cyd
182 177
183abbrevs.texi rgm 178abbrevs.texi rgm
184advice.texi cyd 179advice.texi cyd
185anti.texi 180anti.texi rgm
186back.texi rgm 181back.texi rgm
187backups.texi cyd 182backups.texi cyd
188buffers.texi cyd 183buffers.texi cyd
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 156f59471f6..63ccb880d40 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,37 @@
12012-04-15 Chong Yidong <cyd@gnu.org>
2
3 * misc.texi (emacsclient Options): More clarifications.
4
52012-04-15 Glenn Morris <rgm@gnu.org>
6
7 * msdog.texi (Windows Printing): It doesn't set printer-name.
8
9 * mule.texi (Language Environments): Move font info to "Fontsets".
10 (Fontsets): Move intlfonts etc here from "Language Environments".
11 Copyedits.
12 (Defining Fontsets, Modifying Fontsets, Undisplayable Characters)
13 (Unibyte Mode, Charsets, Bidirectional Editing): Copyedits.
14
152012-04-15 Chong Yidong <cyd@gnu.org>
16
17 * glossary.texi (Glossary): Standardize on "text terminal"
18 terminology. All callers changed.
19
20 * misc.texi (emacsclient Options): Document "client frame" concept
21 and its effect on C-x C-c more carefully.
22
232012-04-15 Glenn Morris <rgm@gnu.org>
24
25 * frames.texi (Scroll Bars):
26 * glossary.texi (Glossary): Use consistent case for "X Window System".
27
28 * mule.texi (Select Input Method, Coding Systems):
29 State command names in kbd tables.
30 (Recognize Coding): Add cross-ref.
31 (Output Coding): Don't mention message mode in particular.
32 (Text Coding, Communication Coding, File Name Coding, Terminal Coding):
33 Copyedits.
34
12012-04-14 Glenn Morris <rgm@gnu.org> 352012-04-14 Glenn Morris <rgm@gnu.org>
2 36
3 * mule.texi (Select Input Method, Coding Systems, Recognize Coding): 37 * mule.texi (Select Input Method, Coding Systems, Recognize Coding):
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi
index 17054c30329..51f6d70bd90 100644
--- a/doc/emacs/ack.texi
+++ b/doc/emacs/ack.texi
@@ -690,8 +690,8 @@ directory-local variables; and the @code{info-finder} feature that
690creates a virtual Info manual of package keywords. 690creates a virtual Info manual of package keywords.
691 691
692@item 692@item
693Károly L@H{o}rentey wrote the ``multi-terminal'' code, which allows Emacs to 693Károly L@H{o}rentey wrote the ``multi-terminal'' code, which allows
694run on graphical and text-only terminals simultaneously. 694Emacs to run on graphical and text terminals simultaneously.
695 695
696@item 696@item
697Martin Lorentzon wrote @file{vc-annotate.el}, support for version 697Martin Lorentzon wrote @file{vc-annotate.el}, support for version
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 3e768ab54d7..5ad48eb48ef 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -372,7 +372,7 @@ the text in the region. @xref{Mark}, for a description of the region.
372 On most keyboards, @key{DEL} is labeled @key{Backspace}, but we 372 On most keyboards, @key{DEL} is labeled @key{Backspace}, but we
373refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL} 373refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL}
374with the @key{Delete} key; we will discuss @key{Delete} momentarily.) 374with the @key{Delete} key; we will discuss @key{Delete} momentarily.)
375On some text-only terminals, Emacs may not recognize the @key{DEL} key 375On some text terminals, Emacs may not recognize the @key{DEL} key
376properly. @xref{DEL Does Not Delete}, if you encounter this problem. 376properly. @xref{DEL Does Not Delete}, if you encounter this problem.
377 377
378 The @key{delete} (@code{delete-forward-char}) command deletes in the 378 The @key{delete} (@code{delete-forward-char}) command deletes in the
@@ -530,7 +530,7 @@ too long to fit in the window, and Emacs displays it as two or more
530@dfn{continuation}, and the long logical line is called a 530@dfn{continuation}, and the long logical line is called a
531@dfn{continued line}. On a graphical display, Emacs indicates line 531@dfn{continued line}. On a graphical display, Emacs indicates line
532wrapping with small bent arrows in the left and right window fringes. 532wrapping with small bent arrows in the left and right window fringes.
533On a text-only terminal, Emacs indicates line wrapping by displaying a 533On a text terminal, Emacs indicates line wrapping by displaying a
534@samp{\} character at the right margin. 534@samp{\} character at the right margin.
535 535
536 Most commands that act on lines act on logical lines, not screen 536 Most commands that act on lines act on logical lines, not screen
@@ -545,9 +545,9 @@ and up, respectively, by one screen line (@pxref{Moving Point}).
545continuing them. This means that every logical line occupies a single 545continuing them. This means that every logical line occupies a single
546screen line; if it is longer than the width of the window, the rest of 546screen line; if it is longer than the width of the window, the rest of
547the line is not displayed. On a graphical display, a truncated line 547the line is not displayed. On a graphical display, a truncated line
548is indicated by a small straight arrow in the right fringe; on a 548is indicated by a small straight arrow in the right fringe; on a text
549text-only terminal, it is indicated by a @samp{$} character in the 549terminal, it is indicated by a @samp{$} character in the right margin.
550right margin. @xref{Line Truncation}. 550@xref{Line Truncation}.
551 551
552 By default, continued lines are wrapped at the right window edge. 552 By default, continued lines are wrapped at the right window edge.
553Since the wrapping may occur in the middle of a word, continued lines 553Since the wrapping may occur in the middle of a word, continued lines
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 61ddc283e31..fef7d2b2828 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -227,13 +227,13 @@ is determined by the variable @code{next-error-highlight}.
227 If the @file{*compilation*} buffer is shown in a window with a left 227 If the @file{*compilation*} buffer is shown in a window with a left
228fringe (@pxref{Fringes}), the locus-visiting commands put an arrow in 228fringe (@pxref{Fringes}), the locus-visiting commands put an arrow in
229the fringe, pointing to the current error message. If the window has 229the fringe, pointing to the current error message. If the window has
230no left fringe, such as on a text-only terminal, these commands scroll 230no left fringe, such as on a text terminal, these commands scroll the
231the window so that the current message is at the top of the window. 231window so that the current message is at the top of the window. If
232If you change the variable @code{compilation-context-lines} to an 232you change the variable @code{compilation-context-lines} to an integer
233integer value @var{n}, these commands scroll the window so that the 233value @var{n}, these commands scroll the window so that the current
234current error message is @var{n} lines from the top, whether or not 234error message is @var{n} lines from the top, whether or not there is a
235there is a fringe; the default value, @code{nil}, gives the behavior 235fringe; the default value, @code{nil}, gives the behavior described
236described above. 236above.
237 237
238@vindex compilation-error-regexp-alist 238@vindex compilation-error-regexp-alist
239@vindex grep-regexp-alist 239@vindex grep-regexp-alist
@@ -572,12 +572,12 @@ for special commands that can be used in the GUD interaction buffer.
572 572
573 As you debug a program, Emacs displays the relevant source files by 573 As you debug a program, Emacs displays the relevant source files by
574visiting them in Emacs buffers, with an arrow in the left fringe 574visiting them in Emacs buffers, with an arrow in the left fringe
575indicating the current execution line. (On a text-only terminal, the 575indicating the current execution line. (On a text terminal, the arrow
576arrow appears as @samp{=>}, overlaid on the first two text columns.) 576appears as @samp{=>}, overlaid on the first two text columns.) Moving
577Moving point in such a buffer does not move the arrow. You are free 577point in such a buffer does not move the arrow. You are free to edit
578to edit these source files, but note that inserting or deleting lines 578these source files, but note that inserting or deleting lines will
579will throw off the arrow's positioning, as Emacs has no way to figure 579throw off the arrow's positioning, as Emacs has no way to figure out
580out which edited source line corresponds to the line reported by the 580which edited source line corresponds to the line reported by the
581debugger subprocess. To update this information, you typically have 581debugger subprocess. To update this information, you typically have
582to recompile and restart the program. 582to recompile and restart the program.
583 583
@@ -936,7 +936,7 @@ already exists there, the click removes it. A @kbd{C-Mouse-1} click
936enables or disables an existing breakpoint; a breakpoint that is 936enables or disables an existing breakpoint; a breakpoint that is
937disabled, but not unset, is indicated by a gray dot. 937disabled, but not unset, is indicated by a gray dot.
938 938
939 On a text-only terminal, or when fringes are disabled, enabled 939 On a text terminal, or when fringes are disabled, enabled
940breakpoints are indicated with a @samp{B} character in the left margin 940breakpoints are indicated with a @samp{B} character in the left margin
941of the window. Disabled breakpoints are indicated with @samp{b}. 941of the window. Disabled breakpoints are indicated with @samp{b}.
942(The margin is only displayed if a breakpoint is present.) 942(The margin is only displayed if a breakpoint is present.)
@@ -1079,9 +1079,9 @@ debugger}.
1079 1079
1080@findex gdb-frames-select 1080@findex gdb-frames-select
1081 On graphical displays, the selected stack frame is indicated by an 1081 On graphical displays, the selected stack frame is indicated by an
1082arrow in the fringe. On text-only terminals, or when fringes are 1082arrow in the fringe. On text terminals, or when fringes are disabled,
1083disabled, the selected stack frame is displayed in reverse contrast. 1083the selected stack frame is displayed in reverse contrast. To select
1084To select a stack frame, move point in its line and type @key{RET} 1084a stack frame, move point in its line and type @key{RET}
1085(@code{gdb-frames-select}), or click @kbd{Mouse-2} on it. Doing so 1085(@code{gdb-frames-select}), or click @kbd{Mouse-2} on it. Doing so
1086also updates the Locals buffer 1086also updates the Locals buffer
1087@ifnottex 1087@ifnottex
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 56af8d426f6..4c6d6ef7bad 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -849,8 +849,8 @@ emacs -ms coral -cr 'slate blue' &
849 You can reverse the foreground and background colors through the 849 You can reverse the foreground and background colors through the
850@samp{-rv} option or with the X resource @samp{reverseVideo}. 850@samp{-rv} option or with the X resource @samp{reverseVideo}.
851 851
852 The @samp{-fg}, @samp{-bg}, and @samp{-rv} options function on 852 The @samp{-fg}, @samp{-bg}, and @samp{-rv} options function on text
853text-only terminals as well as on graphical displays. 853terminals as well as on graphical displays.
854 854
855@node Window Size X 855@node Window Size X
856@appendixsec Options for Window Size and Position 856@appendixsec Options for Window Size and Position
diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi
index f2a71b045f8..3285b65e57b 100644
--- a/doc/emacs/commands.texi
+++ b/doc/emacs/commands.texi
@@ -62,7 +62,7 @@ starting with @key{ESC}. Thus, you can enter @kbd{M-a} by typing
62C-a}. Unlike @key{Meta}, @key{ESC} is entered as a separate 62C-a}. Unlike @key{Meta}, @key{ESC} is entered as a separate
63character. You don't hold down @key{ESC} while typing the next 63character. You don't hold down @key{ESC} while typing the next
64character; instead, press @key{ESC} and release it, then enter the 64character; instead, press @key{ESC} and release it, then enter the
65next character. This feature is useful on certain text-only terminals 65next character. This feature is useful on certain text terminals
66where the @key{Meta} key does not function reliably. 66where the @key{Meta} key does not function reliably.
67 67
68@cindex keys stolen by window manager 68@cindex keys stolen by window manager
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 54dbc0a78e1..da33d352698 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -286,8 +286,8 @@ scrolling whenever point moves off the left or right edge of the
286screen. To disable automatic horizontal scrolling, set the variable 286screen. To disable automatic horizontal scrolling, set the variable
287@code{auto-hscroll-mode} to @code{nil}. Note that when the automatic 287@code{auto-hscroll-mode} to @code{nil}. Note that when the automatic
288horizontal scrolling is turned off, if point moves off the edge of the 288horizontal scrolling is turned off, if point moves off the edge of the
289screen, the cursor disappears to indicate that. (On text-only 289screen, the cursor disappears to indicate that. (On text terminals,
290terminals, the cursor is left at the edge instead.) 290the cursor is left at the edge instead.)
291 291
292@vindex hscroll-margin 292@vindex hscroll-margin
293 The variable @code{hscroll-margin} controls how close point can get 293 The variable @code{hscroll-margin} controls how close point can get
@@ -479,9 +479,9 @@ prompts for a regular expression, and displays only faces with names
479matching that regular expression (@pxref{Regexps}). 479matching that regular expression (@pxref{Regexps}).
480 480
481 It's possible for a given face to look different in different 481 It's possible for a given face to look different in different
482frames. For instance, some text-only terminals do not support all 482frames. For instance, some text terminals do not support all face
483face attributes, particularly font, height, and width, and some 483attributes, particularly font, height, and width, and some support a
484support a limited range of colors. 484limited range of colors.
485 485
486@cindex background color 486@cindex background color
487@cindex default face 487@cindex default face
@@ -529,13 +529,13 @@ or an @dfn{RGB triplet}.
529@samp{medium sea green}. To view a list of color names, type @kbd{M-x 529@samp{medium sea green}. To view a list of color names, type @kbd{M-x
530list-colors-display}. To control the order in which colors are shown, 530list-colors-display}. To control the order in which colors are shown,
531customize @code{list-colors-sort}. If you run this command on a 531customize @code{list-colors-sort}. If you run this command on a
532graphical display, it shows the full range of color names known to Emacs 532graphical display, it shows the full range of color names known to
533(these are the standard X11 color names, defined in X's @file{rgb.txt} 533Emacs (these are the standard X11 color names, defined in X's
534file). If you run the command on a text-only terminal, it shows only a 534@file{rgb.txt} file). If you run the command on a text terminal, it
535small subset of colors that can be safely displayed on such terminals. 535shows only a small subset of colors that can be safely displayed on
536However, Emacs understands X11 color names even on text-only terminals; 536such terminals. However, Emacs understands X11 color names even on
537if a face is given a color specified by an X11 color name, it is 537text terminals; if a face is given a color specified by an X11 color
538displayed using the closest-matching terminal color. 538name, it is displayed using the closest-matching terminal color.
539 539
540 An RGB triplet is a string of the form @samp{#RRGGBB}. Each of the 540 An RGB triplet is a string of the form @samp{#RRGGBB}. Each of the
541R, G, and B components is a hexadecimal number specifying the 541R, G, and B components is a hexadecimal number specifying the
@@ -651,8 +651,8 @@ at the top of a window just as the mode line appears at the bottom.
651Most windows do not have a header line---only some special modes, such 651Most windows do not have a header line---only some special modes, such
652Info mode, create one. 652Info mode, create one.
653@item vertical-border 653@item vertical-border
654This face is used for the vertical divider between windows on 654This face is used for the vertical divider between windows on text
655text-only terminals. 655terminals.
656@item minibuffer-prompt 656@item minibuffer-prompt
657@cindex @code{minibuffer-prompt} face 657@cindex @code{minibuffer-prompt} face
658@vindex minibuffer-prompt-properties 658@vindex minibuffer-prompt-properties
@@ -679,9 +679,9 @@ This face determines the color of the mouse pointer.
679@end table 679@end table
680 680
681 The following faces likewise control the appearance of parts of the 681 The following faces likewise control the appearance of parts of the
682Emacs frame, but only on text-only terminals, or when Emacs is built 682Emacs frame, but only on text terminals, or when Emacs is built on X
683on X with no toolkit support. (For all other cases, the appearance of 683with no toolkit support. (For all other cases, the appearance of the
684the respective frame elements is determined by system-wide settings.) 684respective frame elements is determined by system-wide settings.)
685 685
686@table @code 686@table @code
687@item scroll-bar 687@item scroll-bar
@@ -1453,9 +1453,9 @@ global-hl-line-mode} enables or disables the same mode globally.
1453Emacs can display long lines by @dfn{truncation}. This means that all 1453Emacs can display long lines by @dfn{truncation}. This means that all
1454the characters that do not fit in the width of the screen or window do 1454the characters that do not fit in the width of the screen or window do
1455not appear at all. On graphical displays, a small straight arrow in 1455not appear at all. On graphical displays, a small straight arrow in
1456the fringe indicates truncation at either end of the line. On 1456the fringe indicates truncation at either end of the line. On text
1457text-only terminals, this is indicated with @samp{$} signs in the 1457terminals, this is indicated with @samp{$} signs in the leftmost
1458leftmost and/or rightmost columns. 1458and/or rightmost columns.
1459 1459
1460@vindex truncate-lines 1460@vindex truncate-lines
1461@findex toggle-truncate-lines 1461@findex toggle-truncate-lines
@@ -1577,7 +1577,7 @@ of an overline above the text, including the height of the overline
1577itself, in pixels; the default is 2. 1577itself, in pixels; the default is 2.
1578 1578
1579@findex tty-suppress-bold-inverse-default-colors 1579@findex tty-suppress-bold-inverse-default-colors
1580 On some text-only terminals, bold face and inverse video together 1580 On some text terminals, bold face and inverse video together result
1581result in text that is hard to read. Call the function 1581in text that is hard to read. Call the function
1582@code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} 1582@code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil}
1583argument to suppress the effect of bold-face in this case. 1583argument to suppress the effect of bold-face in this case.
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index a842f412356..25e5bb2af0d 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -511,7 +511,7 @@ Frames and Graphical Displays
511* Tooltips:: Displaying information at the current mouse position. 511* Tooltips:: Displaying information at the current mouse position.
512* Mouse Avoidance:: Moving the mouse pointer out of the way. 512* Mouse Avoidance:: Moving the mouse pointer out of the way.
513* Non-Window Terminals:: Multiple frames on terminals that show only one. 513* Non-Window Terminals:: Multiple frames on terminals that show only one.
514* Text-Only Mouse:: Using the mouse in text-only terminals. 514* Text-Only Mouse:: Using the mouse in text terminals.
515 515
516International Character Set Support 516International Character Set Support
517 517
diff --git a/doc/emacs/entering.texi b/doc/emacs/entering.texi
index 3ec7f739e6c..3ec51ddfb60 100644
--- a/doc/emacs/entering.texi
+++ b/doc/emacs/entering.texi
@@ -148,14 +148,14 @@ stopping the program temporarily and returning control to the parent
148process (usually a shell); in most shells, you can resume Emacs after 148process (usually a shell); in most shells, you can resume Emacs after
149suspending it with the shell command @command{%emacs}. 149suspending it with the shell command @command{%emacs}.
150 150
151 Text-only terminals usually listen for certain special characters 151 Text terminals usually listen for certain special characters whose
152whose meaning is to kill or suspend the program you are running. 152meaning is to kill or suspend the program you are running. @b{This
153@b{This terminal feature is turned off while you are in Emacs.} The 153terminal feature is turned off while you are in Emacs.} The meanings
154meanings of @kbd{C-z} and @kbd{C-x C-c} as keys in Emacs were inspired 154of @kbd{C-z} and @kbd{C-x C-c} as keys in Emacs were inspired by the
155by the use of @kbd{C-z} and @kbd{C-c} on several operating systems as 155use of @kbd{C-z} and @kbd{C-c} on several operating systems as the
156the characters for stopping or killing a program, but that is their 156characters for stopping or killing a program, but that is their only
157only relationship with the operating system. You can customize these 157relationship with the operating system. You can customize these keys
158keys to run any commands of your choice (@pxref{Keymaps}). 158to run any commands of your choice (@pxref{Keymaps}).
159 159
160@ifnottex 160@ifnottex
161@lowersections 161@lowersections
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index d85e7756816..10ba9ed1fa6 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1853,7 +1853,7 @@ When typing a file name in the minibuffer, @kbd{C-@key{tab}}
1853(@code{file-cache-minibuffer-complete}) completes it using the file 1853(@code{file-cache-minibuffer-complete}) completes it using the file
1854name cache. If you repeat @kbd{C-@key{tab}}, that cycles through the 1854name cache. If you repeat @kbd{C-@key{tab}}, that cycles through the
1855possible completions of what you had originally typed. (However, note 1855possible completions of what you had originally typed. (However, note
1856that the @kbd{C-@key{tab}} character cannot be typed on most text-only 1856that the @kbd{C-@key{tab}} character cannot be typed on most text
1857terminals.) 1857terminals.)
1858 1858
1859 The file name cache does not fill up automatically. Instead, you 1859 The file name cache does not fill up automatically. Instead, you
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index 16feb939b33..85fac2b146b 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -57,9 +57,9 @@ Undo one entry in the current buffer's undo records (@code{undo}).
57@kbd{C-x u})@footnote{Aside from @kbd{C-/}, the @code{undo} command is 57@kbd{C-x u})@footnote{Aside from @kbd{C-/}, the @code{undo} command is
58also bound to @kbd{C-x u} because that is more straightforward for 58also bound to @kbd{C-x u} because that is more straightforward for
59beginners to remember: @samp{u} stands for ``undo''. It is also bound 59beginners to remember: @samp{u} stands for ``undo''. It is also bound
60to @kbd{C-_} because typing @kbd{C-/} on some text-only terminals 60to @kbd{C-_} because typing @kbd{C-/} on some text terminals actually
61actually enters @kbd{C-_}.}. This undoes the most recent change in 61enters @kbd{C-_}.}. This undoes the most recent change in the buffer,
62the buffer, and moves point back to where it was before that change. 62and moves point back to where it was before that change.
63 63
64 Consecutive repetitions of @kbd{C-/} (or its aliases) undo earlier 64 Consecutive repetitions of @kbd{C-/} (or its aliases) undo earlier
65and earlier changes in the current buffer. If all the recorded 65and earlier changes in the current buffer. If all the recorded
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 8d6a39665da..9e9909e8bca 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -27,13 +27,12 @@ displays (@pxref{Exiting}). To close just the selected frame, type
27 27
28 This chapter describes Emacs features specific to graphical displays 28 This chapter describes Emacs features specific to graphical displays
29(particularly mouse commands), and features for managing multiple 29(particularly mouse commands), and features for managing multiple
30frames. On text-only terminals, many of these features are 30frames. On text terminals, many of these features are unavailable.
31unavailable. However, it is still possible to create multiple 31However, it is still possible to create multiple ``frames'' on text
32``frames'' on text-only terminals; such frames are displayed one at a 32terminals; such frames are displayed one at a time, filling the entire
33time, filling the entire terminal screen (@pxref{Non-Window 33terminal screen (@pxref{Non-Window Terminals}). It is also possible
34Terminals}). It is also possible to use the mouse on some text-only 34to use the mouse on some text terminals (@pxref{Text-Only Mouse}, for
35terminals (@pxref{Text-Only Mouse}, for doing so on GNU and Unix 35doing so on GNU and Unix systems; and
36systems; and
37@iftex 36@iftex
38@pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}, 37@pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features},
39@end iftex 38@end iftex
@@ -62,7 +61,7 @@ for doing so on MS-DOS).
62* Tooltips:: Displaying information at the current mouse position. 61* Tooltips:: Displaying information at the current mouse position.
63* Mouse Avoidance:: Preventing the mouse pointer from obscuring text. 62* Mouse Avoidance:: Preventing the mouse pointer from obscuring text.
64* Non-Window Terminals:: Multiple frames on terminals that show only one. 63* Non-Window Terminals:: Multiple frames on terminals that show only one.
65* Text-Only Mouse:: Using the mouse in text-only terminals. 64* Text-Only Mouse:: Using the mouse in text terminals.
66@end menu 65@end menu
67 66
68@node Mouse Commands 67@node Mouse Commands
@@ -465,9 +464,9 @@ the ordinary, interactive frames are deleted. In this case, @kbd{C-x
465 464
466 The @kbd{C-x 5 1} (@code{delete-other-frames}) command deletes all 465 The @kbd{C-x 5 1} (@code{delete-other-frames}) command deletes all
467other frames on the current terminal (this terminal refers to either a 466other frames on the current terminal (this terminal refers to either a
468graphical display, or a text-only terminal; @pxref{Non-Window 467graphical display, or a text terminal; @pxref{Non-Window Terminals}).
469Terminals}). If the Emacs session has frames open on other graphical 468If the Emacs session has frames open on other graphical displays or
470displays or text terminals, those are not deleted. 469text terminals, those are not deleted.
471 470
472@vindex focus-follows-mouse 471@vindex focus-follows-mouse
473 The @kbd{C-x 5 o} (@code{other-frame}) command selects the next 472 The @kbd{C-x 5 o} (@code{other-frame}) command selects the next
@@ -908,7 +907,7 @@ scroll bars on the right side of windows), @code{left} (put them on
908the left), or @code{nil} (disable scroll bars). By default, Emacs 907the left), or @code{nil} (disable scroll bars). By default, Emacs
909puts scroll bars on the right if it was compiled with GTK+ support on 908puts scroll bars on the right if it was compiled with GTK+ support on
910the X Window System, and on MS-Windows or Mac OS; Emacs puts scroll 909the X Window System, and on MS-Windows or Mac OS; Emacs puts scroll
911bars on the left if compiled on the X Window system without GTK+ 910bars on the left if compiled on the X Window System without GTK+
912support (following the old convention for X applications). 911support (following the old convention for X applications).
913 912
914@vindex scroll-bar-width 913@vindex scroll-bar-width
@@ -953,7 +952,7 @@ the use of menu bars at startup, customize the variable
953@code{menu-bar-mode}. 952@code{menu-bar-mode}.
954 953
955@kindex C-Mouse-3 @r{(when menu bar is disabled)} 954@kindex C-Mouse-3 @r{(when menu bar is disabled)}
956 Expert users often turn off the menu bar, especially on text-only 955 Expert users often turn off the menu bar, especially on text
957terminals, where this makes one additional line available for text. 956terminals, where this makes one additional line available for text.
958If the menu bar is off, you can still pop up a menu of its contents 957If the menu bar is off, you can still pop up a menu of its contents
959with @kbd{C-Mouse-3} on a display which supports pop-up menus. 958with @kbd{C-Mouse-3} on a display which supports pop-up menus.
@@ -1112,9 +1111,9 @@ raises the frame.
1112 1111
1113@node Non-Window Terminals 1112@node Non-Window Terminals
1114@section Non-Window Terminals 1113@section Non-Window Terminals
1115@cindex text-only terminal 1114@cindex text terminal
1116 1115
1117 On a text-only terminal, Emacs can display only one Emacs frame at a 1116 On a text terminal, Emacs can display only one Emacs frame at a
1118time. However, you can still create multiple Emacs frames, and switch 1117time. However, you can still create multiple Emacs frames, and switch
1119between them. Switching frames on these terminals is much like 1118between them. Switching frames on these terminals is much like
1120switching between different window configurations. 1119switching between different window configurations.
@@ -1139,11 +1138,11 @@ to select a frame according to its name. The name you specify appears
1139in the mode line when the frame is selected. 1138in the mode line when the frame is selected.
1140 1139
1141@node Text-Only Mouse 1140@node Text-Only Mouse
1142@section Using a Mouse in Text-only Terminals 1141@section Using a Mouse in Text Terminals
1143@cindex mouse support 1142@cindex mouse support
1144@cindex terminal emulators, mouse support 1143@cindex terminal emulators, mouse support
1145 1144
1146Some text-only terminals support mouse clicks in the terminal window. 1145Some text terminals support mouse clicks in the terminal window.
1147 1146
1148@cindex xterm 1147@cindex xterm
1149 In a terminal emulator which is compatible with @command{xterm}, you 1148 In a terminal emulator which is compatible with @command{xterm}, you
diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi
index 765a4b59053..44c59eea668 100644
--- a/doc/emacs/glossary.texi
+++ b/doc/emacs/glossary.texi
@@ -181,7 +181,7 @@ Emacs supports a number of character sets, each of which represents a
181particular alphabet or script. @xref{International}. 181particular alphabet or script. @xref{International}.
182 182
183@item Character Terminal 183@item Character Terminal
184@xref{Glossary - Text-only Terminal}. 184@xref{Glossary - Text Terminal}.
185 185
186@item Click Event 186@item Click Event
187A click event is the kind of input event (q.v.@:) generated when you 187A click event is the kind of input event (q.v.@:) generated when you
@@ -193,7 +193,7 @@ press a mouse button and release it without moving the mouse.
193 193
194@item Clipboard 194@item Clipboard
195A clipboard is a buffer provided by the window system for transferring 195A clipboard is a buffer provided by the window system for transferring
196text between applications. On the X Window system, the clipboard is 196text between applications. On the X Window System, the clipboard is
197provided in addition to the primary selection (q.v.@:); on MS-Windows and Mac, 197provided in addition to the primary selection (q.v.@:); on MS-Windows and Mac,
198the clipboard is used @emph{instead} of the primary selection. 198the clipboard is used @emph{instead} of the primary selection.
199@xref{Clipboard}. 199@xref{Clipboard}.
@@ -1329,12 +1329,12 @@ Data consisting of written human language (as opposed to programs),
1329or following the stylistic conventions of human language. 1329or following the stylistic conventions of human language.
1330@end itemize 1330@end itemize
1331 1331
1332@anchor{Glossary - Text-only Terminal} 1332@anchor{Glossary - Text Terminal}
1333@item Text-only Terminal 1333@item Text Terminal
1334A text-only terminal is a display that is limited to displaying text in 1334A text terminal, or character terminal, is a display that is limited
1335character units. Such a terminal cannot control individual pixels it 1335to displaying text in character units. Such a terminal cannot control
1336displays. Emacs supports a subset of display features on text-only 1336individual pixels it displays. Emacs supports a subset of display
1337terminals. 1337features on text terminals.
1338 1338
1339@item Text Properties 1339@item Text Properties
1340Text properties are annotations recorded for particular characters in 1340Text properties are annotations recorded for particular characters in
@@ -1384,7 +1384,7 @@ displaying it. @xref{Continuation Lines,Truncation}, and
1384@ref{Glossary - Continuation Line}. 1384@ref{Glossary - Continuation Line}.
1385 1385
1386@item TTY 1386@item TTY
1387@xref{Glossary - Text-only Terminal}. 1387@xref{Glossary - Text Terminal}.
1388 1388
1389@item Undoing 1389@item Undoing
1390Undoing means making your previous editing go in reverse, bringing 1390Undoing means making your previous editing go in reverse, bringing
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index b291aff0ba4..50b68767991 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1405,7 +1405,7 @@ signaled.) Currently, this feature is mainly useful for developers.
1405the shell command @samp{emacsclient @var{file}}, where @var{file} is a 1405the shell command @samp{emacsclient @var{file}}, where @var{file} is a
1406file name. This connects to an Emacs server, and tells that Emacs 1406file name. This connects to an Emacs server, and tells that Emacs
1407process to visit @var{file} in one of its existing frames---either a 1407process to visit @var{file} in one of its existing frames---either a
1408graphical frame, or one in a text-only terminal (@pxref{Frames}). You 1408graphical frame, or one in a text terminal (@pxref{Frames}). You
1409can then select that frame to begin editing. 1409can then select that frame to begin editing.
1410 1410
1411 If there is no Emacs server, the @command{emacsclient} program halts 1411 If there is no Emacs server, the @command{emacsclient} program halts
@@ -1415,12 +1415,12 @@ Server})---then Emacs opens a frame on the terminal in which you
1415called @command{emacsclient}. 1415called @command{emacsclient}.
1416 1416
1417 You can also force @command{emacsclient} to open a new frame on a 1417 You can also force @command{emacsclient} to open a new frame on a
1418graphical display, or on a text-only terminal, using the @samp{-c} and 1418graphical display, or on a text terminal, using the @samp{-c} and
1419@samp{-t} options. @xref{emacsclient Options}. 1419@samp{-t} options. @xref{emacsclient Options}.
1420 1420
1421 If you are running on a single text-only terminal, you can switch 1421 If you are running on a single text terminal, you can switch between
1422between @command{emacsclient}'s shell and the Emacs server using one 1422@command{emacsclient}'s shell and the Emacs server using one of two
1423of two methods: (i) run the Emacs server and @command{emacsclient} on 1423methods: (i) run the Emacs server and @command{emacsclient} on
1424different virtual terminals, and switch to the Emacs server's virtual 1424different virtual terminals, and switch to the Emacs server's virtual
1425terminal after calling @command{emacsclient}; or (ii) call 1425terminal after calling @command{emacsclient}; or (ii) call
1426@command{emacsclient} from within the Emacs server itself, using Shell 1426@command{emacsclient} from within the Emacs server itself, using Shell
@@ -1502,16 +1502,24 @@ The environment variable @env{ALTERNATE_EDITOR} has the same effect as
1502the @samp{-a} option. If both are present, the latter takes 1502the @samp{-a} option. If both are present, the latter takes
1503precedence. 1503precedence.
1504 1504
1505@cindex client frame
1505@item -c 1506@item -c
1506Create a new graphical frame, instead of using an existing Emacs 1507Create a new graphical @dfn{client frame}, instead of using an
1507frame. Emacs can create a graphical frame even if it was started in a 1508existing Emacs frame. If you omit a filename argument while supplying
1508text-only terminal, provided it is able to connect to a graphical 1509the @samp{-c} option, the new frame displays the @file{*scratch*}
1509display. If Emacs is unable to connect to a graphical display, and on 1510buffer (@pxref{Buffers}). See below for the special behavior of
1510systems, such as MS-Windows (@pxref{Windows Startup, emacsclient}), 1511@kbd{C-x C-c} in a client frame.
1511where it cannot create graphical frames when started from a text-only 1512
1512terminal, it creates a new text-only terminal frame (@pxref{Frames}). 1513If Emacs is unable to create a new graphical frame (e.g.@: if it is
1513If you omit a filename argument while supplying the @samp{-c} option, 1514unable to connect to the X server), it tries to create a text terminal
1514the new frame displays the @file{*scratch*} buffer (@pxref{Buffers}). 1515client frame, as though you had supplied the @samp{-t} option instead
1516(see below).
1517
1518On MS-Windows, a single Emacs session cannot display frames on both
1519graphical and text terminals, nor on multiple text terminals. Thus,
1520if the Emacs server is running on a text terminal, the @samp{-c}
1521option, like the @samp{-t} option, creates a new frame in the server's
1522current text terminal. @xref{Windows Startup}.
1515 1523
1516@item -F @var{alist} 1524@item -F @var{alist}
1517@itemx --frame-parameters=@var{alist} 1525@itemx --frame-parameters=@var{alist}
@@ -1593,28 +1601,46 @@ server it finds. (This option is not supported on MS-Windows.)
1593@item -t 1601@item -t
1594@itemx --tty 1602@itemx --tty
1595@itemx -nw 1603@itemx -nw
1596Create a new Emacs frame on the current text-only terminal, instead of 1604Create a new client frame on the current text terminal, instead of
1597using an existing Emacs frame. Emacs can open a text-only terminal 1605using an existing Emacs frame. This is similar to the @samp{-c}
1598even if it was started in another text-only terminal, or on a 1606option, above, except that it creates a text terminal frame
1599graphical display. On systems, such as MS-Windows, where this is 1607(@pxref{Non-Window Terminals}). If you omit a filename argument while
1600impossible, Emacs will create a new frame, either GUI or text-only, on 1608supplying this option, the new frame displays the @file{*scratch*}
1601the same terminal where it was started (@pxref{Windows Startup, 1609buffer (@pxref{Buffers}). See below for the special behavior of
1602emacsclient}). If you omit a filename argument while supplying this 1610@kbd{C-x C-c} in a client frame.
1603option, the new frame displays the @file{*scratch*} buffer. 1611
1604@xref{Buffers}. 1612On MS-Windows, a single Emacs session cannot display frames on both
1613graphical and text terminals, nor on multiple text terminals. Thus,
1614if the Emacs server is using the graphical display, @samp{-t} behaves
1615like @samp{-c} (see above); whereas if the Emacs server is running on
1616a text terminal, it creates a new frame in its current text terminal.
1617@xref{Windows Startup}.
1605@end table 1618@end table
1606 1619
1607 If you type @kbd{C-x C-c} (@code{save-buffers-kill-terminal}) in an 1620 The new graphical or text terminal frames created by the @samp{-c}
1608Emacs frame created with @command{emacsclient}, via the @samp{-c} or 1621or @samp{-t} options are considered @dfn{client frames}. Any new
1609@samp{-t} options, Emacs deletes the frame instead of killing the 1622frame that you create from a client frame is also considered a client
1610Emacs process itself. On a text-only terminal frame created with the 1623frame. If you type @kbd{C-x C-c} (@code{save-buffers-kill-terminal})
1611@samp{-t} option, this returns control to the terminal. Emacs also 1624in a client frame, that command does not kill the Emacs session as it
1612marks all the server buffers for the client as finished, as though you 1625normally does (@pxref{Exiting}). Instead, Emacs deletes the client
1613had typed @kbd{C-x #} in all of them. 1626frame; furthermore, if the client frame has an @command{emacsclient}
1614 1627waiting to regain control (i.e.@: if you did not supply the @samp{-n}
1615 When Emacs is started as a daemon, all frames are considered client 1628option), Emacs deletes all other frames of the same client, and marks
1616frames, so @kbd{C-x C-c} will never kill Emacs. To kill the Emacs 1629the client's server buffers as finished, as though you had typed
1617process, type @kbd{M-x kill-emacs}. 1630@kbd{C-x #} in all of them. If it so happens that there are no
1631remaining frames after the client frame(s) are deleted, the Emacs
1632session exits.
1633
1634 As an exception, when Emacs is started as a daemon, all frames are
1635considered client frames, and @kbd{C-x C-c} never kills Emacs. To
1636kill a daemon session, type @kbd{M-x kill-emacs}.
1637
1638 Note that the @samp{-t} and @samp{-n} options are contradictory:
1639@samp{-t} says to take control of the current text terminal to create
1640a new client frame, while @samp{-n} says not to take control of the
1641text terminal. If you supply both options, Emacs visits the specified
1642files(s) in an existing frame rather than a new client frame, negating
1643the effect of @samp{-t}.
1618 1644
1619@node Printing, Sorting, Emacs Server, Top 1645@node Printing, Sorting, Emacs Server, Top
1620@section Printing Hard Copies 1646@section Printing Hard Copies
diff --git a/doc/emacs/msdog-xtra.texi b/doc/emacs/msdog-xtra.texi
index 2191d799a2b..af8882a1fd4 100644
--- a/doc/emacs/msdog-xtra.texi
+++ b/doc/emacs/msdog-xtra.texi
@@ -247,7 +247,7 @@ begins at the top of the character cell.
247 247
248@cindex frames on MS-DOS 248@cindex frames on MS-DOS
249 The MS-DOS terminal can only display a single frame at a time. The 249 The MS-DOS terminal can only display a single frame at a time. The
250Emacs frame facilities work on MS-DOS much as they do on text-only 250Emacs frame facilities work on MS-DOS much as they do on text
251terminals 251terminals
252@iftex 252@iftex
253(@pxref{Frames,,,emacs, the Emacs Manual}). 253(@pxref{Frames,,,emacs, the Emacs Manual}).
diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi
index af948f113a4..96a919cfaf8 100644
--- a/doc/emacs/msdog.texi
+++ b/doc/emacs/msdog.texi
@@ -121,8 +121,8 @@ Emacs will always create a new text-mode frame in the same
121created only if the server runs in a GUI session. Similarly, if you 121created only if the server runs in a GUI session. Similarly, if you
122invoke @command{emacsclient} with the @option{-t} option, Emacs will 122invoke @command{emacsclient} with the @option{-t} option, Emacs will
123create a GUI frame if the server runs in a GUI session, or a text-mode 123create a GUI frame if the server runs in a GUI session, or a text-mode
124frame when the session runs in text-only mode in a @dfn{Command 124frame when the session runs in text mode in a @dfn{Command Prompt}
125Prompt} window. @xref{emacsclient Options}. 125window. @xref{emacsclient Options}.
126 126
127@node Text and Binary 127@node Text and Binary
128@section Text Files and Binary Files 128@section Text Files and Binary Files
@@ -729,9 +729,9 @@ Posix-style @code{lpr} program is unavailable. The same Emacs
729variables control printing on all systems, but in some cases they have 729variables control printing on all systems, but in some cases they have
730different default values on MS-DOS and MS-Windows. 730different default values on MS-DOS and MS-Windows.
731 731
732 Emacs on Windows automatically determines your default printer and 732 Emacs on MS Windows attempts to determine your default printer
733sets the variable @code{printer-name} to that printer's name. But in 733automatically (using the function @code{default-printer-name}).
734some rare cases this can fail, or you may wish to use a different 734But in some rare cases this can fail, or you may wish to use a different
735printer from within Emacs. The rest of this section explains how to 735printer from within Emacs. The rest of this section explains how to
736tell Emacs which printer to use. 736tell Emacs which printer to use.
737 737
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index 4cf66c14138..df2d687114b 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -60,7 +60,7 @@ for each command; see @ref{Text Coding}.
60@item 60@item
61You can display non-@acronym{ASCII} characters encoded by the various 61You can display non-@acronym{ASCII} characters encoded by the various
62scripts. This works by using appropriate fonts on graphics displays 62scripts. This works by using appropriate fonts on graphics displays
63(@pxref{Defining Fontsets}), and by sending special codes to text-only 63(@pxref{Defining Fontsets}), and by sending special codes to text
64displays (@pxref{Terminal Coding}). If some characters are displayed 64displays (@pxref{Terminal Coding}). If some characters are displayed
65incorrectly, refer to @ref{Undisplayable Characters}, which describes 65incorrectly, refer to @ref{Undisplayable Characters}, which describes
66possible problems and explains how to solve them. 66possible problems and explains how to solve them.
@@ -210,7 +210,7 @@ What keys to type to input the character in the current input method
210 210
211@item 211@item
212If you are running Emacs on a graphical display, the font name and 212If you are running Emacs on a graphical display, the font name and
213glyph code for the character. If you are running Emacs on a text-only 213glyph code for the character. If you are running Emacs on a text
214terminal, the code(s) sent to the terminal. 214terminal, the code(s) sent to the terminal.
215 215
216@item 216@item
@@ -365,25 +365,8 @@ UTF-8), Ukrainian, Vietnamese, Welsh, and Windows-1255 (for a setup
365which prefers Cyrillic characters and files encoded in Windows-1255). 365which prefers Cyrillic characters and files encoded in Windows-1255).
366@end quotation 366@end quotation
367 367
368@cindex fonts for various scripts
369@cindex Intlfonts package, installation
370 To display the script(s) used by your language environment on a 368 To display the script(s) used by your language environment on a
371graphical display, you need to have a suitable font. If some of the 369graphical display, you need to have suitable fonts.
372characters appear as empty boxes or hex codes, you should install
373extra fonts. Your operating system may have optional fonts that
374you can install; or you can install the
375GNU Intlfonts package, which includes fonts for most supported
376scripts.@footnote{If you run Emacs on X, you may need to inform the X
377server about the location of the newly installed fonts with
378commands such as:
379@c FIXME? I feel like this may be out of date.
380@c Eg the intlfonts tarfile is ~ 10 years old.
381
382@example
383 xset fp+ /usr/local/share/emacs/fonts
384 xset fp rehash
385@end example
386}
387@xref{Fontsets}, for more details about setting up your fonts. 370@xref{Fontsets}, for more details about setting up your fonts.
388 371
389@findex set-locale-environment 372@findex set-locale-environment
@@ -577,10 +560,10 @@ Text}.
577 560
578@table @kbd 561@table @kbd
579@item C-\ 562@item C-\
580Enable or disable use of the selected input method. 563Enable or disable use of the selected input method (@code{toggle-input-method}).
581 564
582@item C-x @key{RET} C-\ @var{method} @key{RET} 565@item C-x @key{RET} C-\ @var{method} @key{RET}
583Select a new input method for the current buffer. 566Select a new input method for the current buffer (@code{set-input-method}).
584 567
585@item C-h I @var{method} @key{RET} 568@item C-h I @var{method} @key{RET}
586@itemx C-h C-\ @var{method} @key{RET} 569@itemx C-h C-\ @var{method} @key{RET}
@@ -716,7 +699,7 @@ carriage-return (``mac'').
716 699
717@table @kbd 700@table @kbd
718@item C-h C @var{coding} @key{RET} 701@item C-h C @var{coding} @key{RET}
719Describe coding system @var{coding}. 702Describe coding system @var{coding} (@code{describe-coding-system}).
720 703
721@item C-h C @key{RET} 704@item C-h C @key{RET}
722Describe the coding systems currently in use. 705Describe the coding systems currently in use.
@@ -921,7 +904,7 @@ escape sequence detection.
921the strongest way to specify the coding system for certain patterns of 904the strongest way to specify the coding system for certain patterns of
922file names, or for files containing certain patterns, respectively. 905file names, or for files containing certain patterns, respectively.
923These variables even override @samp{-*-coding:-*-} tags in the file 906These variables even override @samp{-*-coding:-*-} tags in the file
924itself. For example, Emacs 907itself (@pxref{Specify Coding}). For example, Emacs
925uses @code{auto-coding-alist} for tar and archive files, to prevent it 908uses @code{auto-coding-alist} for tar and archive files, to prevent it
926from being confused by a @samp{-*-coding:-*-} tag in a member of the 909from being confused by a @samp{-*-coding:-*-} tag in a member of the
927archive and thinking it applies to the archive file as a whole. 910archive and thinking it applies to the archive file as a whole.
@@ -1006,6 +989,7 @@ and asks you to choose one of those coding systems.
1006 989
1007 If you insert the unsuitable characters in a mail message, Emacs 990 If you insert the unsuitable characters in a mail message, Emacs
1008behaves a bit differently. It additionally checks whether the 991behaves a bit differently. It additionally checks whether the
992@c What determines this?
1009most-preferred coding system is recommended for use in MIME messages; 993most-preferred coding system is recommended for use in MIME messages;
1010if not, Emacs tells you that the most-preferred coding system is not 994if not, Emacs tells you that the most-preferred coding system is not
1011recommended and prompts you for another coding system. This is so you 995recommended and prompts you for another coding system. This is so you
@@ -1014,17 +998,22 @@ recipient's mail software will have difficulty decoding. (You can
1014still use an unsuitable coding system if you type its name in response 998still use an unsuitable coding system if you type its name in response
1015to the question.) 999to the question.)
1016 1000
1001@c It seems that select-message-coding-system does this.
1002@c Both sendmail.el and smptmail.el call it; i.e. smtpmail.el still
1003@c obeys sendmail-coding-system.
1017@vindex sendmail-coding-system 1004@vindex sendmail-coding-system
1018 When you send a message with Message mode (@pxref{Sending Mail}), 1005 When you send a mail message (@pxref{Sending Mail}),
1019Emacs has four different ways to determine the coding system to use 1006Emacs has four different ways to determine the coding system to use
1020for encoding the message text. It tries the buffer's own value of 1007for encoding the message text. It tries the buffer's own value of
1021@code{buffer-file-coding-system}, if that is non-@code{nil}. 1008@code{buffer-file-coding-system}, if that is non-@code{nil}.
1022Otherwise, it uses the value of @code{sendmail-coding-system}, if that 1009Otherwise, it uses the value of @code{sendmail-coding-system}, if that
1023is non-@code{nil}. The third way is to use the default coding system 1010is non-@code{nil}. The third way is to use the default coding system
1024for new files, which is controlled by your choice of language 1011for new files, which is controlled by your choice of language
1012@c i.e., default-sendmail-coding-system
1025environment, if that is non-@code{nil}. If all of these three values 1013environment, if that is non-@code{nil}. If all of these three values
1026are @code{nil}, Emacs encodes outgoing mail using the Latin-1 coding 1014are @code{nil}, Emacs encodes outgoing mail using the Latin-1 coding
1027system. 1015system.
1016@c FIXME? Where does the Latin-1 default come in?
1028 1017
1029@node Text Coding 1018@node Text Coding
1030@section Specifying a Coding System for File Text 1019@section Specifying a Coding System for File Text
@@ -1035,8 +1024,8 @@ one:
1035 1024
1036@table @kbd 1025@table @kbd
1037@item C-x @key{RET} f @var{coding} @key{RET} 1026@item C-x @key{RET} f @var{coding} @key{RET}
1038Use coding system @var{coding} to save or revisit the visited file in 1027Use coding system @var{coding} to save or revisit the file in
1039the current buffer (@code{set-buffer-file-coding-system}) 1028the current buffer (@code{set-buffer-file-coding-system}).
1040 1029
1041@item C-x @key{RET} c @var{coding} @key{RET} 1030@item C-x @key{RET} c @var{coding} @key{RET}
1042Specify coding system @var{coding} for the immediately following 1031Specify coding system @var{coding} for the immediately following
@@ -1066,8 +1055,8 @@ buffer.
1066 You can also use this command to specify the end-of-line conversion 1055 You can also use this command to specify the end-of-line conversion
1067(@pxref{Coding Systems, end-of-line conversion}) for encoding the 1056(@pxref{Coding Systems, end-of-line conversion}) for encoding the
1068current buffer. For example, @kbd{C-x @key{RET} f dos @key{RET}} will 1057current buffer. For example, @kbd{C-x @key{RET} f dos @key{RET}} will
1069cause Emacs to save the current buffer's text with DOS-style CRLF line 1058cause Emacs to save the current buffer's text with DOS-style
1070endings. 1059carriage-return linefeed line endings.
1071 1060
1072@kindex C-x RET c 1061@kindex C-x RET c
1073@findex universal-coding-system-argument 1062@findex universal-coding-system-argument
@@ -1155,7 +1144,7 @@ coding system for the next selection made in Emacs or read by Emacs.
1155 The variable @code{x-select-request-type} specifies the data type to 1144 The variable @code{x-select-request-type} specifies the data type to
1156request from the X Window System for receiving text selections from 1145request from the X Window System for receiving text selections from
1157other applications. If the value is @code{nil} (the default), Emacs 1146other applications. If the value is @code{nil} (the default), Emacs
1158tries @code{COMPOUND_TEXT} and @code{UTF8_STRING}, in this order, and 1147tries @code{UTF8_STRING} and @code{COMPOUND_TEXT}, in this order, and
1159uses various heuristics to choose the more appropriate of the two 1148uses various heuristics to choose the more appropriate of the two
1160results; if none of these succeed, Emacs falls back on @code{STRING}. 1149results; if none of these succeed, Emacs falls back on @code{STRING}.
1161If the value of @code{x-select-request-type} is one of the symbols 1150If the value of @code{x-select-request-type} is one of the symbols
@@ -1187,8 +1176,8 @@ current language environment.
1187 The variable @code{locale-coding-system} specifies a coding system 1176 The variable @code{locale-coding-system} specifies a coding system
1188to use when encoding and decoding system strings such as system error 1177to use when encoding and decoding system strings such as system error
1189messages and @code{format-time-string} formats and time stamps. That 1178messages and @code{format-time-string} formats and time stamps. That
1190coding system is also used for decoding non-@acronym{ASCII} keyboard input on X 1179coding system is also used for decoding non-@acronym{ASCII} keyboard
1191Window systems. You should choose a coding system that is compatible 1180input on the X Window System. You should choose a coding system that is compatible
1192with the underlying system's text representation, which is normally 1181with the underlying system's text representation, which is normally
1193specified by one of the environment variables @env{LC_ALL}, 1182specified by one of the environment variables @env{LC_ALL},
1194@env{LC_CTYPE}, and @env{LANG}. (The first one, in the order 1183@env{LC_CTYPE}, and @env{LANG}. (The first one, in the order
@@ -1201,27 +1190,29 @@ the text representation.)
1201@table @kbd 1190@table @kbd
1202@item C-x @key{RET} F @var{coding} @key{RET} 1191@item C-x @key{RET} F @var{coding} @key{RET}
1203Use coding system @var{coding} for encoding and decoding file 1192Use coding system @var{coding} for encoding and decoding file
1204@emph{names} (@code{set-file-name-coding-system}). 1193names (@code{set-file-name-coding-system}).
1205@end table 1194@end table
1206 1195
1207@vindex file-name-coding-system
1208@cindex file names with non-@acronym{ASCII} characters
1209 The variable @code{file-name-coding-system} specifies a coding
1210system to use for encoding file names. It has no effect on reading
1211and writing the @emph{contents} of files.
1212
1213@findex set-file-name-coding-system 1196@findex set-file-name-coding-system
1214@kindex C-x @key{RET} F 1197@kindex C-x @key{RET} F
1215 If you set the variable to a coding system name (as a Lisp symbol or 1198@cindex file names with non-@acronym{ASCII} characters
1216a string), Emacs encodes file names using that coding system for all 1199 The command @kbd{C-x @key{RET} F} (@code{set-file-name-coding-system})
1217file operations. This makes it possible to use non-@acronym{ASCII} 1200specifies a coding system to use for encoding file @emph{names}. It
1218characters in file names---or, at least, those non-@acronym{ASCII} 1201has no effect on reading and writing the @emph{contents} of files.
1219characters which the specified coding system can encode. Use @kbd{C-x 1202
1220@key{RET} F} (@code{set-file-name-coding-system}) to specify this 1203@vindex file-name-coding-system
1221interactively. 1204 In fact, all this command does is set the value of the variable
1205@code{file-name-coding-system}. If you set the variable to a coding
1206system name (as a Lisp symbol or a string), Emacs encodes file names
1207using that coding system for all file operations. This makes it
1208possible to use non-@acronym{ASCII} characters in file names---or, at
1209least, those non-@acronym{ASCII} characters that the specified coding
1210system can encode.
1222 1211
1223 If @code{file-name-coding-system} is @code{nil}, Emacs uses a 1212 If @code{file-name-coding-system} is @code{nil}, Emacs uses a
1224default coding system determined by the selected language environment. 1213default coding system determined by the selected language environment,
1214and stored in the @code{default-file-name-coding-system} variable.
1215@c FIXME? Is this correct? What is the "default language environment"?
1225In the default language environment, non-@acronym{ASCII} characters in 1216In the default language environment, non-@acronym{ASCII} characters in
1226file names are not encoded specially; they appear in the file system 1217file names are not encoded specially; they appear in the file system
1227using the internal Emacs representation. 1218using the internal Emacs representation.
@@ -1232,7 +1223,7 @@ result if you have already visited files whose names were encoded using
1232the earlier coding system and cannot be encoded (or are encoded 1223the earlier coding system and cannot be encoded (or are encoded
1233differently) under the new coding system. If you try to save one of 1224differently) under the new coding system. If you try to save one of
1234these buffers under the visited file name, saving may use the wrong file 1225these buffers under the visited file name, saving may use the wrong file
1235name, or it may get an error. If such a problem happens, use @kbd{C-x 1226name, or it may encounter an error. If such a problem happens, use @kbd{C-x
1236C-w} to specify a new file name for that buffer. 1227C-w} to specify a new file name for that buffer.
1237 1228
1238@findex recode-file-name 1229@findex recode-file-name
@@ -1245,13 +1236,13 @@ system, and the coding system to which you wish to convert.
1245@section Coding Systems for Terminal I/O 1236@section Coding Systems for Terminal I/O
1246 1237
1247@table @kbd 1238@table @kbd
1248@item C-x @key{RET} k @var{coding} @key{RET}
1249Use coding system @var{coding} for keyboard input
1250(@code{set-keyboard-coding-system}).
1251
1252@item C-x @key{RET} t @var{coding} @key{RET} 1239@item C-x @key{RET} t @var{coding} @key{RET}
1253Use coding system @var{coding} for terminal output 1240Use coding system @var{coding} for terminal output
1254(@code{set-terminal-coding-system}). 1241(@code{set-terminal-coding-system}).
1242
1243@item C-x @key{RET} k @var{coding} @key{RET}
1244Use coding system @var{coding} for keyboard input
1245(@code{set-keyboard-coding-system}).
1255@end table 1246@end table
1256 1247
1257@kindex C-x RET t 1248@kindex C-x RET t
@@ -1274,8 +1265,8 @@ your locale specification (@pxref{Language Environments}).
1274@kindex C-x RET k 1265@kindex C-x RET k
1275@findex set-keyboard-coding-system 1266@findex set-keyboard-coding-system
1276@vindex keyboard-coding-system 1267@vindex keyboard-coding-system
1277 The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system}) 1268 The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system}),
1278or the variable @code{keyboard-coding-system} specifies the coding 1269or the variable @code{keyboard-coding-system}, specifies the coding
1279system for keyboard input. Character-code translation of keyboard 1270system for keyboard input. Character-code translation of keyboard
1280input is useful for terminals with keys that send non-@acronym{ASCII} 1271input is useful for terminals with keys that send non-@acronym{ASCII}
1281graphic characters---for example, some terminals designed for ISO 1272graphic characters---for example, some terminals designed for ISO
@@ -1310,30 +1301,49 @@ non-graphic characters.
1310 A font typically defines shapes for a single alphabet or script. 1301 A font typically defines shapes for a single alphabet or script.
1311Therefore, displaying the entire range of scripts that Emacs supports 1302Therefore, displaying the entire range of scripts that Emacs supports
1312requires a collection of many fonts. In Emacs, such a collection is 1303requires a collection of many fonts. In Emacs, such a collection is
1313called a @dfn{fontset}. A fontset is defined by a list of font specs, 1304called a @dfn{fontset}. A fontset is defined by a list of font specifications,
1314each assigned to handle a range of character codes, and may fall back 1305each assigned to handle a range of character codes, and may fall back
1315on another fontset for characters which are not covered by the fonts 1306on another fontset for characters that are not covered by the fonts
1316it specifies. 1307it specifies.
1317 1308
1309@cindex fonts for various scripts
1310@cindex Intlfonts package, installation
1318 Each fontset has a name, like a font. However, while fonts are 1311 Each fontset has a name, like a font. However, while fonts are
1319stored in the system and the available font names are defined by the 1312stored in the system and the available font names are defined by the
1320system, fontsets are defined within Emacs itself. Once you have 1313system, fontsets are defined within Emacs itself. Once you have
1321defined a fontset, you can use it within Emacs by specifying its name, 1314defined a fontset, you can use it within Emacs by specifying its name,
1322anywhere that you could use a single font. Of course, Emacs fontsets 1315anywhere that you could use a single font. Of course, Emacs fontsets
1323can use only the fonts that the system supports; if certain characters 1316can use only the fonts that the system supports. If some characters
1324appear on the screen as hollow boxes, this means that the fontset in 1317appear on the screen as empty boxes or hex codes, this means that the
1325use for them has no font for those characters.@footnote{The Emacs 1318fontset in use for them has no font for those characters. In this
1326installation instructions have information on additional font 1319case, or if the characters are shown, but not as well as you would
1327support.} 1320like, you may need to install extra fonts. Your operating system may
1321have optional fonts that you can install; or you can install the GNU
1322Intlfonts package, which includes fonts for most supported
1323scripts.@footnote{If you run Emacs on X, you may need to inform the X
1324server about the location of the newly installed fonts with commands
1325such as:
1326@c FIXME? I feel like this may be out of date.
1327@c Eg the intlfonts tarfile is ~ 10 years old.
1328
1329@example
1330 xset fp+ /usr/local/share/emacs/fonts
1331 xset fp rehash
1332@end example
1333}
1328 1334
1329 Emacs creates three fontsets automatically: the @dfn{standard 1335 Emacs creates three fontsets automatically: the @dfn{standard
1330fontset}, the @dfn{startup fontset} and the @dfn{default fontset}. 1336fontset}, the @dfn{startup fontset} and the @dfn{default fontset}.
1337@c FIXME? The doc of *standard*-fontset-spec says:
1338@c "You have the biggest chance to display international characters
1339@c with correct glyphs by using the *standard* fontset." (my emphasis)
1331The default fontset is most likely to have fonts for a wide variety of 1340The default fontset is most likely to have fonts for a wide variety of
1332non-@acronym{ASCII} characters and is the default fallback for the 1341non-@acronym{ASCII} characters, and is the default fallback for the
1333other two fontsets, and if you set a default font rather than fontset. 1342other two fontsets, and if you set a default font rather than fontset.
1334However it does not specify font family names, so results can be 1343However, it does not specify font family names, so results can be
1335somewhat random if you use it directly. You can specify use of a 1344somewhat random if you use it directly. You can specify use of a
1336specific fontset with the @samp{-fn} option. For example, 1345particular fontset by starting Emacs with the @samp{-fn} option.
1346For example,
1337 1347
1338@example 1348@example
1339emacs -fn fontset-standard 1349emacs -fn fontset-standard
@@ -1372,10 +1382,12 @@ of @code{standard-fontset-spec}. This fontset's name is
1372@noindent 1382@noindent
1373or just @samp{fontset-standard} for short. 1383or just @samp{fontset-standard} for short.
1374 1384
1375 On GNUstep and Mac, fontset-standard is created using the value of 1385 On GNUstep and Mac OS X, the standard fontset is created using the value of
1376@code{ns-standard-fontset-spec}, and on Windows it is 1386@code{ns-standard-fontset-spec}, and on MS Windows it is
1377created using the value of @code{w32-standard-fontset-spec}. 1387created using the value of @code{w32-standard-fontset-spec}.
1378 1388
1389@c FIXME? How does one access these, or do anything with them?
1390@c Does it matter?
1379 Bold, italic, and bold-italic variants of the standard fontset are 1391 Bold, italic, and bold-italic variants of the standard fontset are
1380created automatically. Their names have @samp{bold} instead of 1392created automatically. Their names have @samp{bold} instead of
1381@samp{medium}, or @samp{i} instead of @samp{r}, or both. 1393@samp{medium}, or @samp{i} instead of @samp{r}, or both.
@@ -1390,8 +1402,15 @@ started. This is the @dfn{startup fontset} and its name is
1390@var{charset_encoding} field with @samp{startup}, then using the 1402@var{charset_encoding} field with @samp{startup}, then using the
1391resulting string to specify a fontset. 1403resulting string to specify a fontset.
1392 1404
1393 For instance, if you start Emacs this way, 1405 For instance, if you start Emacs with a font of this form,
1394 1406
1407@c FIXME? I think this is a little misleading, because you cannot (?)
1408@c actually specify a font with wildcards, it has to be a complete spec.
1409@c Also, an X font specification of this form hasn't (?) been
1410@c mentioned before now, and is somewhat obsolete these days.
1411@c People are more likely to use a form like
1412@c emacs -fn "DejaVu Sans Mono-12"
1413@c How does any of this apply in that case?
1395@example 1414@example
1396emacs -fn "*courier-medium-r-normal--14-140-*-iso8859-1" 1415emacs -fn "*courier-medium-r-normal--14-140-*-iso8859-1"
1397@end example 1416@end example
@@ -1404,8 +1423,8 @@ window frame:
1404-*-courier-medium-r-normal-*-14-140-*-*-*-*-fontset-startup 1423-*-courier-medium-r-normal-*-14-140-*-*-*-*-fontset-startup
1405@end example 1424@end example
1406 1425
1407 The startup fontset will use the font that you specify or a variant 1426 The startup fontset will use the font that you specify, or a variant
1408with a different registry and encoding for all the characters which 1427with a different registry and encoding, for all the characters that
1409are supported by that font, and fallback on @samp{fontset-default} for 1428are supported by that font, and fallback on @samp{fontset-default} for
1410other characters. 1429other characters.
1411 1430
@@ -1413,7 +1432,8 @@ other characters.
1413just like an actual font name. But be careful not to specify a fontset 1432just like an actual font name. But be careful not to specify a fontset
1414name in a wildcard resource like @samp{Emacs*Font}---that wildcard 1433name in a wildcard resource like @samp{Emacs*Font}---that wildcard
1415specification matches various other resources, such as for menus, and 1434specification matches various other resources, such as for menus, and
1416menus cannot handle fontsets. 1435@c FIXME is this still true?
1436menus cannot handle fontsets. @xref{X Resources}.
1417 1437
1418 You can specify additional fontsets using X resources named 1438 You can specify additional fontsets using X resources named
1419@samp{Fontset-@var{n}}, where @var{n} is an integer starting from 0. 1439@samp{Fontset-@var{n}}, where @var{n} is an integer starting from 0.
@@ -1424,7 +1444,8 @@ The resource value should have this form:
1424@end smallexample 1444@end smallexample
1425 1445
1426@noindent 1446@noindent
1427@var{fontpattern} should have the form of a standard X font name, except 1447@var{fontpattern} should have the form of a standard X font name (see
1448the previous fontset-startup example), except
1428for the last two fields. They should have the form 1449for the last two fields. They should have the form
1429@samp{fontset-@var{alias}}. 1450@samp{fontset-@var{alias}}.
1430 1451
@@ -1446,7 +1467,7 @@ that describe the character set. For the @acronym{ASCII} character font,
1446 In addition, when several consecutive fields are wildcards, Emacs 1467 In addition, when several consecutive fields are wildcards, Emacs
1447collapses them into a single wildcard. This is to prevent use of 1468collapses them into a single wildcard. This is to prevent use of
1448auto-scaled fonts. Fonts made by scaling larger fonts are not usable 1469auto-scaled fonts. Fonts made by scaling larger fonts are not usable
1449for editing, and scaling a smaller font is not useful because it is 1470for editing, and scaling a smaller font is not also useful, because it is
1450better to use the smaller font in its own size, which is what Emacs 1471better to use the smaller font in its own size, which is what Emacs
1451does. 1472does.
1452 1473
@@ -1472,8 +1493,8 @@ and the font specification for Chinese GB2312 characters would be this:
1472 1493
1473 You may not have any Chinese font matching the above font 1494 You may not have any Chinese font matching the above font
1474specification. Most X distributions include only Chinese fonts that 1495specification. Most X distributions include only Chinese fonts that
1475have @samp{song ti} or @samp{fangsong ti} in @var{family} field. In 1496have @samp{song ti} or @samp{fangsong ti} in the @var{family} field. In
1476such a case, @samp{Fontset-@var{n}} can be specified as below: 1497such a case, @samp{Fontset-@var{n}} can be specified as:
1477 1498
1478@smallexample 1499@smallexample
1479Emacs.Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-24,\ 1500Emacs.Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-24,\
@@ -1507,8 +1528,8 @@ script.
1507 1528
1508Fontsets can be modified using the function @code{set-fontset-font}, 1529Fontsets can be modified using the function @code{set-fontset-font},
1509specifying a character, a charset, a script, or a range of characters 1530specifying a character, a charset, a script, or a range of characters
1510to modify the font for, and a font-spec for the font to be used. Some 1531to modify the font for, and a font specification for the font to be
1511examples are: 1532used. Some examples are:
1512 1533
1513@example 1534@example
1514;; Use Liberation Mono for latin-3 charset. 1535;; Use Liberation Mono for latin-3 charset.
@@ -1535,10 +1556,10 @@ examples are:
1535@node Undisplayable Characters 1556@node Undisplayable Characters
1536@section Undisplayable Characters 1557@section Undisplayable Characters
1537 1558
1538 There may be a some non-@acronym{ASCII} characters that your terminal cannot 1559 There may be some non-@acronym{ASCII} characters that your
1539display. Most text-only terminals support just a single character 1560terminal cannot display. Most text terminals support just a single
1540set (use the variable @code{default-terminal-coding-system} 1561character set (use the variable @code{default-terminal-coding-system}
1541(@pxref{Terminal Coding}) to tell Emacs which one); characters which 1562to tell Emacs which one, @ref{Terminal Coding}); characters that
1542can't be encoded in that coding system are displayed as @samp{?} by 1563can't be encoded in that coding system are displayed as @samp{?} by
1543default. 1564default.
1544 1565
@@ -1570,17 +1591,15 @@ the range 0240 to 0377 octal (160 to 255 decimal) to handle the
1570accented letters and punctuation needed by various European languages 1591accented letters and punctuation needed by various European languages
1571(and some non-European ones). Note that Emacs considers bytes with 1592(and some non-European ones). Note that Emacs considers bytes with
1572codes in this range as raw bytes, not as characters, even in a unibyte 1593codes in this range as raw bytes, not as characters, even in a unibyte
1573session, i.e.@: if you disable multibyte characters. However, Emacs 1594buffer, i.e.@: if you disable multibyte characters. However, Emacs
1574can still handle these character codes as if they belonged to 1595can still handle these character codes as if they belonged to
1575@emph{one} of the single-byte character sets at a time. To specify 1596@emph{one} of the single-byte character sets at a time. To specify
1576@emph{which} of these codes to use, invoke @kbd{M-x 1597@emph{which} of these codes to use, invoke @kbd{M-x
1577set-language-environment} and specify a suitable language environment 1598set-language-environment} and specify a suitable language environment
1578such as @samp{Latin-@var{n}}. 1599such as @samp{Latin-@var{n}}.
1579 1600
1580 For more information about unibyte operation, see @ref{Disabling 1601 For more information about unibyte operation, see
1581Multibyte}. Note particularly that you probably want to ensure that 1602@ref{Disabling Multibyte}.
1582your initialization files are read as unibyte if they contain
1583non-@acronym{ASCII} characters.
1584 1603
1585@vindex unibyte-display-via-language-environment 1604@vindex unibyte-display-via-language-environment
1586 Emacs can also display bytes in the range 160 to 255 as readable 1605 Emacs can also display bytes in the range 160 to 255 as readable
@@ -1599,8 +1618,8 @@ them as raw bytes, not as characters.
1599set, Emacs can display these characters as @acronym{ASCII} sequences which at 1618set, Emacs can display these characters as @acronym{ASCII} sequences which at
1600least give you a clear idea of what the characters are. To do this, 1619least give you a clear idea of what the characters are. To do this,
1601load the library @code{iso-ascii}. Similar libraries for other 1620load the library @code{iso-ascii}. Similar libraries for other
1602Latin-@var{n} character sets could be implemented, but we don't have 1621Latin-@var{n} character sets could be implemented, but have not been
1603them yet. 1622so far.
1604 1623
1605@findex standard-display-8bit 1624@findex standard-display-8bit
1606@cindex 8-bit display 1625@cindex 8-bit display
@@ -1624,9 +1643,9 @@ If your keyboard can generate character codes 128 (decimal) and up,
1624representing non-@acronym{ASCII} characters, you can type those character codes 1643representing non-@acronym{ASCII} characters, you can type those character codes
1625directly. 1644directly.
1626 1645
1627On a graphical display, you should not need to do anything special to use 1646On a graphical display, you should not need to do anything special to
1628these keys; they should simply work. On a text-only terminal, you 1647use these keys; they should simply work. On a text terminal, you
1629should use the command @code{M-x set-keyboard-coding-system} or the 1648should use the command @code{M-x set-keyboard-coding-system} or customize the
1630variable @code{keyboard-coding-system} to specify which coding system 1649variable @code{keyboard-coding-system} to specify which coding system
1631your keyboard uses (@pxref{Terminal Coding}). Enabling this feature 1650your keyboard uses (@pxref{Terminal Coding}). Enabling this feature
1632will probably require you to use @kbd{ESC} to type Meta characters; 1651will probably require you to use @kbd{ESC} to type Meta characters;
@@ -1694,8 +1713,9 @@ internal representation within Emacs.
1694@findex list-character-sets 1713@findex list-character-sets
1695 @kbd{M-x list-character-sets} displays a list of all supported 1714 @kbd{M-x list-character-sets} displays a list of all supported
1696charsets. The list gives the names of charsets and additional 1715charsets. The list gives the names of charsets and additional
1697information to identity each charset (see 1716information to identity each charset; see the
1698@url{http://www.itscj.ipsj.or.jp/ISO-IR/} for details). In this list, 1717@url{http://www.itscj.ipsj.or.jp/ISO-IR/, International Register of
1718Coded Character Sets} for more details. In this list,
1699charsets are divided into two categories: @dfn{normal charsets} are 1719charsets are divided into two categories: @dfn{normal charsets} are
1700listed first, followed by @dfn{supplementary charsets}. A 1720listed first, followed by @dfn{supplementary charsets}. A
1701supplementary charset is one that is used to define another charset 1721supplementary charset is one that is used to define another charset
@@ -1715,8 +1735,8 @@ Chars}).
1715Hebrew, whose natural ordering of horizontal text for display is from 1735Hebrew, whose natural ordering of horizontal text for display is from
1716right to left. However, digits and Latin text embedded in these 1736right to left. However, digits and Latin text embedded in these
1717scripts are still displayed left to right. It is also not uncommon to 1737scripts are still displayed left to right. It is also not uncommon to
1718have small portions of text in Arabic or Hebrew embedded in otherwise 1738have small portions of text in Arabic or Hebrew embedded in an otherwise
1719Latin document, e.g., as comments and strings in a program source 1739Latin document; e.g., as comments and strings in a program source
1720file. For these reasons, text that uses these scripts is actually 1740file. For these reasons, text that uses these scripts is actually
1721@dfn{bidirectional}: a mixture of runs of left-to-right and 1741@dfn{bidirectional}: a mixture of runs of left-to-right and
1722right-to-left characters. 1742right-to-left characters.
@@ -1744,6 +1764,7 @@ directionality when they are displayed. The default value is
1744 1764
1745 Each paragraph of bidirectional text can have its own @dfn{base 1765 Each paragraph of bidirectional text can have its own @dfn{base
1746direction}, either right-to-left or left-to-right. (Paragraph 1766direction}, either right-to-left or left-to-right. (Paragraph
1767@c paragraph-separate etc have no influence on this?
1747boundaries are empty lines, i.e.@: lines consisting entirely of 1768boundaries are empty lines, i.e.@: lines consisting entirely of
1748whitespace characters.) Text in left-to-right paragraphs begins at 1769whitespace characters.) Text in left-to-right paragraphs begins at
1749the left margin of the window and is truncated or continued when it 1770the left margin of the window and is truncated or continued when it
@@ -1780,5 +1801,5 @@ commands move point in the logical order, so the cursor will sometimes
1780jump when point traverses reordered bidirectional text. Similarly, a 1801jump when point traverses reordered bidirectional text. Similarly, a
1781highlighted region covering a contiguous range of character positions 1802highlighted region covering a contiguous range of character positions
1782may look discontinuous if the region spans reordered text. This is 1803may look discontinuous if the region spans reordered text. This is
1783normal and similar to behavior of other programs that support 1804normal and similar to the behavior of other programs that support
1784bidirectional text. 1805bidirectional text.
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi
index fdc69a78cfc..fbea52523ba 100644
--- a/doc/emacs/screen.texi
+++ b/doc/emacs/screen.texi
@@ -8,12 +8,12 @@
8@cindex frame 8@cindex frame
9 9
10 On a graphical display, such as on GNU/Linux using the X Window 10 On a graphical display, such as on GNU/Linux using the X Window
11System, Emacs occupies a ``graphical window''. On a text-only 11System, Emacs occupies a ``graphical window''. On a text terminal,
12terminal, Emacs occupies the entire terminal screen. We will use the 12Emacs occupies the entire terminal screen. We will use the term
13term @dfn{frame} to mean a graphical window or terminal screen 13@dfn{frame} to mean a graphical window or terminal screen occupied by
14occupied by Emacs. Emacs behaves very similarly on both kinds of 14Emacs. Emacs behaves very similarly on both kinds of frames. It
15frames. It normally starts out with just one frame, but you can 15normally starts out with just one frame, but you can create additional
16create additional frames if you wish (@pxref{Frames}). 16frames if you wish (@pxref{Frames}).
17 17
18 Each frame consists of several distinct regions. At the top of the 18 Each frame consists of several distinct regions. At the top of the
19frame is a @dfn{menu bar}, which allows you to access commands via a 19frame is a @dfn{menu bar}, which allows you to access commands via a
@@ -178,7 +178,7 @@ unselected windows, in order to make it stand out.
178@end example 178@end example
179 179
180@noindent 180@noindent
181On a text-only terminal, this text is followed by a series of dashes 181On a text terminal, this text is followed by a series of dashes
182extending to the right edge of the window. These dashes are omitted 182extending to the right edge of the window. These dashes are omitted
183on a graphical display. 183on a graphical display.
184 184
@@ -195,7 +195,7 @@ means no conversion whatsoever, and is usually used for files
195containing non-textual data. Other characters represent various 195containing non-textual data. Other characters represent various
196@dfn{coding systems}---for example, @samp{1} represents ISO Latin-1. 196@dfn{coding systems}---for example, @samp{1} represents ISO Latin-1.
197 197
198 On a text-only terminal, @var{cs} is preceded by two additional 198 On a text terminal, @var{cs} is preceded by two additional
199characters that describe the coding systems for keyboard input and 199characters that describe the coding systems for keyboard input and
200terminal output. Furthermore, if you are using an input method, 200terminal output. Furthermore, if you are using an input method,
201@var{cs} is preceded by a string that identifies the input method 201@var{cs} is preceded by a string that identifies the input method
@@ -228,7 +228,7 @@ However, if the default-directory for the current buffer is on a
228remote machine, @samp{@@} is displayed instead (@pxref{File Names}). 228remote machine, @samp{@@} is displayed instead (@pxref{File Names}).
229 229
230 @var{fr} gives the selected frame name (@pxref{Frames}). It appears 230 @var{fr} gives the selected frame name (@pxref{Frames}). It appears
231only on text-only terminals. The initial frame's name is @samp{F1}. 231only on text terminals. The initial frame's name is @samp{F1}.
232 232
233 @var{buf} is the name of the buffer displayed in the window. 233 @var{buf} is the name of the buffer displayed in the window.
234Usually, this is the same as the name of a file you are editing. 234Usually, this is the same as the name of a file you are editing.
@@ -307,13 +307,12 @@ You can then navigate the menus with the arrow keys. To activate a
307selected menu item, press @key{RET}; to cancel menu navigation, press 307selected menu item, press @key{RET}; to cancel menu navigation, press
308@key{ESC}. 308@key{ESC}.
309 309
310 On a text-only terminal, you can use the menu bar by typing 310 On a text terminal, you can use the menu bar by typing @kbd{M-`} or
311@kbd{M-`} or @key{F10} (these run the command @code{tmm-menubar}). 311@key{F10} (these run the command @code{tmm-menubar}). This lets you
312This lets you select a menu item with the keyboard. A provisional 312select a menu item with the keyboard. A provisional choice appears in
313choice appears in the echo area. You can use the up and down arrow 313the echo area. You can use the up and down arrow keys to move through
314keys to move through the menu to different items, and then you can 314the menu to different items, and then you can type @key{RET} to select
315type @key{RET} to select the item. Each menu item is also designated 315the item. Each menu item is also designated by a letter or digit
316by a letter or digit (usually the initial of some word in the item's 316(usually the initial of some word in the item's name). This letter or
317name). This letter or digit is separated from the item name by 317digit is separated from the item name by @samp{=>}. You can type the
318@samp{=>}. You can type the item's letter or digit to select the 318item's letter or digit to select the item.
319item.
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index c4f291bde82..b118295ab1a 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -172,20 +172,19 @@ used to delete forwards. If this key deletes backward in Emacs, that
172too suggests Emacs got the wrong information---but in the opposite 172too suggests Emacs got the wrong information---but in the opposite
173sense. 173sense.
174 174
175 On a text-only terminal, if you find that @key{Backspace} prompts 175 On a text terminal, if you find that @key{Backspace} prompts for a
176for a Help command, like @kbd{Control-h}, instead of deleting a 176Help command, like @kbd{Control-h}, instead of deleting a character,
177character, it means that key is actually sending the @key{BS} 177it means that key is actually sending the @key{BS} character. Emacs
178character. Emacs ought to be treating @key{BS} as @key{DEL}, but it 178ought to be treating @key{BS} as @key{DEL}, but it isn't.
179isn't.
180 179
181@findex normal-erase-is-backspace-mode 180@findex normal-erase-is-backspace-mode
182 In all of those cases, the immediate remedy is the same: use the 181 In all of those cases, the immediate remedy is the same: use the
183command @kbd{M-x normal-erase-is-backspace-mode}. This toggles 182command @kbd{M-x normal-erase-is-backspace-mode}. This toggles
184between the two modes that Emacs supports for handling @key{DEL}, so 183between the two modes that Emacs supports for handling @key{DEL}, so
185if Emacs starts in the wrong mode, this should switch to the right 184if Emacs starts in the wrong mode, this should switch to the right
186mode. On a text-only terminal, if you want to ask for help when 185mode. On a text terminal, if you want to ask for help when @key{BS}
187@key{BS} is treated as @key{DEL}, use @key{F1}; @kbd{C-?} may also 186is treated as @key{DEL}, use @key{F1}; @kbd{C-?} may also work, if it
188work, if it sends character code 127. 187sends character code 127.
189 188
190 To fix the problem in every Emacs session, put one of the following 189 To fix the problem in every Emacs session, put one of the following
191lines into your initialization file (@pxref{Init File}). For the 190lines into your initialization file (@pxref{Init File}). For the
@@ -327,8 +326,8 @@ not make a backup of its old contents.
327@node Emergency Escape 326@node Emergency Escape
328@subsection Emergency Escape 327@subsection Emergency Escape
329 328
330 On text-only terminals, the @dfn{emergency escape} feature suspends 329 On text terminals, the @dfn{emergency escape} feature suspends Emacs
331Emacs immediately if you type @kbd{C-g} a second time before Emacs can 330immediately if you type @kbd{C-g} a second time before Emacs can
332actually respond to the first one by quitting. This is so you can 331actually respond to the first one by quitting. This is so you can
333always get out of GNU Emacs no matter how badly it might be hung. 332always get out of GNU Emacs no matter how badly it might be hung.
334When things are working properly, Emacs recognizes and handles the 333When things are working properly, Emacs recognizes and handles the
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index 3733eed3eca..ee0f0027454 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -36,8 +36,8 @@ has its own value of point.
36 At any time, one Emacs window is the @dfn{selected window}; the 36 At any time, one Emacs window is the @dfn{selected window}; the
37buffer this window is displaying is the current buffer. On graphical 37buffer this window is displaying is the current buffer. On graphical
38displays, the point is indicated by a solid blinking cursor in the 38displays, the point is indicated by a solid blinking cursor in the
39selected window, and by a hollow box in non-selected windows. On 39selected window, and by a hollow box in non-selected windows. On text
40text-only terminals, the cursor is drawn only in the selected window. 40terminals, the cursor is drawn only in the selected window.
41@xref{Cursor Display}. 41@xref{Cursor Display}.
42 42
43 Commands to move point affect the value of point for the selected 43 Commands to move point affect the value of point for the selected
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 6b3aba6d799..b5a25cb1c51 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,23 @@
12012-04-15 Glenn Morris <rgm@gnu.org>
2
3 * processes.texi (Processes, Subprocess Creation, Shell Arguments):
4 (Synchronous Processes, Asynchronous Processes, Deleting Processes):
5 Copyedits.
6 (Subprocess Creation): Discourage modifying exec-path directly.
7 (Synchronous Processes, Asynchronous Processes):
8 Update some example output.
9 (Process Information): Fix typo.
10 (Bindat Spec): Use Texinfo-recommended form of quote+punctuation.
11
122012-04-15 Glenn Morris <rgm@gnu.org>
13
14 * anti.texi (Antinews): Copyedits. Don't @dfn anything here.
15 open-network-stream does exist in Emacs 23, but is simpler.
16
172012-04-15 Chong Yidong <cyd@gnu.org>
18
19 * customize.texi (Custom Themes): Also document load-theme etc.
20
12012-04-14 Chong Yidong <cyd@gnu.org> 212012-04-14 Chong Yidong <cyd@gnu.org>
2 22
3 * customize.texi (Applying Customizations): 23 * customize.texi (Applying Customizations):
diff --git a/doc/lispref/anti.texi b/doc/lispref/anti.texi
index 0e3c9eadeae..59f8f91c855 100644
--- a/doc/lispref/anti.texi
+++ b/doc/lispref/anti.texi
@@ -65,9 +65,9 @@ Emacs windows now have most of their internal state hidden from Lisp.
65Internal windows are no longer visible to Lisp; functions such as 65Internal windows are no longer visible to Lisp; functions such as
66@code{window-parent}, window parameters related to window arrangement, 66@code{window-parent}, window parameters related to window arrangement,
67and window-local buffer lists have all been removed. Functions for 67and window-local buffer lists have all been removed. Functions for
68resizing windows can delete windows if when they become too small. 68resizing windows can delete windows if they become too small.
69 69
70The @dfn{action function} feature for controlling buffer display has 70The ``action function'' feature for controlling buffer display has
71been removed, including @code{display-buffer-overriding-action} and 71been removed, including @code{display-buffer-overriding-action} and
72related variables, as well as the @var{action} argument to 72related variables, as well as the @var{action} argument to
73@code{display-buffer} and other functions. The way to 73@code{display-buffer} and other functions. The way to
@@ -80,7 +80,7 @@ variables.
80The standard completion interface has been simplified, eliminating the 80The standard completion interface has been simplified, eliminating the
81@code{completion-extra-properties} variable, the @code{metadata} 81@code{completion-extra-properties} variable, the @code{metadata}
82action flag for completion functions, and the concept of 82action flag for completion functions, and the concept of
83@dfn{completion categories}. Lisp programmers may now find the choice 83``completion categories''. Lisp programmers may now find the choice
84of methods for tuning completion less bewildering, but if a package 84of methods for tuning completion less bewildering, but if a package
85finds the streamlined interface insufficient for its needs, it must 85finds the streamlined interface insufficient for its needs, it must
86implement its own specialized completion feature. 86implement its own specialized completion feature.
@@ -123,17 +123,19 @@ an additional @var{cache} entry in their definitions, like this:
123The @var{cache} entry is used internally by Emacs to record equivalent 123The @var{cache} entry is used internally by Emacs to record equivalent
124keyboard key sequences for invoking the same command; Lisp programs 124keyboard key sequences for invoking the same command; Lisp programs
125should never use it. 125should never use it.
126@c Not really NEWS-worthy then...
126 127
127@item 128@item
128The @code{open-network-stream} function has been removed, and so has 129The @code{gnutls} library has been removed, and the function
129the @code{gnutls} library. Lisp programs that want an encrypted 130@code{open-network-stream} correspondingly simplified.
130network connection must now call external utilities such as 131Lisp programs that want an encrypted network connection must now call
131@command{starttls} or @command{gnutls-cli}. 132external utilities such as @command{starttls} or @command{gnutls-cli}.
132 133
133@item 134@item
134Tool bars can no longer display separators, which frees up several 135Tool bars can no longer display separators, which frees up several
135pixels of space on each graphical frame. 136pixels of space on each graphical frame.
136 137
137@item 138@item
138Many other functions and variables have been eliminated. 139As part of the ongoing quest for simplicity, many other functions and
140variables have been eliminated.
139@end itemize 141@end itemize
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index ce5cfd12c87..5a08fc9711e 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -22,7 +22,7 @@ subprocess, the Lisp program waits for the subprocess to terminate
22before continuing execution. When you create an asynchronous 22before continuing execution. When you create an asynchronous
23subprocess, it can run in parallel with the Lisp program. This kind of 23subprocess, it can run in parallel with the Lisp program. This kind of
24subprocess is represented within Emacs by a Lisp object which is also 24subprocess is represented within Emacs by a Lisp object which is also
25called a ``process.'' Lisp programs can use this object to communicate 25called a ``process''. Lisp programs can use this object to communicate
26with the subprocess or to control it. For example, you can send 26with the subprocess or to control it. For example, you can send
27signals, obtain status information, receive output from the process, or 27signals, obtain status information, receive output from the process, or
28send input to it. 28send input to it.
@@ -69,7 +69,9 @@ a program. One of them, @code{start-process}, creates an asynchronous
69process and returns a process object (@pxref{Asynchronous Processes}). 69process and returns a process object (@pxref{Asynchronous Processes}).
70The other two, @code{call-process} and @code{call-process-region}, 70The other two, @code{call-process} and @code{call-process-region},
71create a synchronous process and do not return a process object 71create a synchronous process and do not return a process object
72(@pxref{Synchronous Processes}). 72(@pxref{Synchronous Processes}). There are various higher-level
73functions that make use of these primitives to run particular types of
74process.
73 75
74 Synchronous and asynchronous processes are explained in the following 76 Synchronous and asynchronous processes are explained in the following
75sections. Since the three functions are all called in a similar 77sections. Since the three functions are all called in a similar
@@ -103,16 +105,19 @@ system-dependent.
103 105
104 @strong{Please note:} The argument @var{program} contains only the 106 @strong{Please note:} The argument @var{program} contains only the
105name of the program; it may not contain any command-line arguments. You 107name of the program; it may not contain any command-line arguments. You
106must use @var{args} to provide those. 108must use a separate argument, @var{args}, to provide those, as
109described below.
107 110
108 Each of the subprocess-creating functions has a @var{buffer-or-name} 111 Each of the subprocess-creating functions has a @var{buffer-or-name}
109argument which specifies where the standard output from the program will 112argument that specifies where the standard output from the program will
110go. It should be a buffer or a buffer name; if it is a buffer name, 113go. It should be a buffer or a buffer name; if it is a buffer name,
111that will create the buffer if it does not already exist. It can also 114that will create the buffer if it does not already exist. It can also
112be @code{nil}, which says to discard the output unless a filter function 115be @code{nil}, which says to discard the output unless a filter function
113handles it. (@xref{Filter Functions}, and @ref{Read and Print}.) 116handles it. (@xref{Filter Functions}, and @ref{Read and Print}.)
114Normally, you should avoid having multiple processes send output to the 117Normally, you should avoid having multiple processes send output to the
115same buffer because their output would be intermixed randomly. 118same buffer because their output would be intermixed randomly.
119For synchronous processes, you can send the output to a file instead
120of a buffer.
116 121
117@cindex program arguments 122@cindex program arguments
118 All three of the subprocess-creating functions have a @code{&rest} 123 All three of the subprocess-creating functions have a @code{&rest}
@@ -121,18 +126,16 @@ supplied to @var{program} as separate command line arguments. Wildcard
121characters and other shell constructs have no special meanings in these 126characters and other shell constructs have no special meanings in these
122strings, since the strings are passed directly to the specified program. 127strings, since the strings are passed directly to the specified program.
123 128
124 The subprocess gets its current directory from the value of
125@code{default-directory} (@pxref{File Name Expansion}).
126
127@cindex environment variables, subprocesses 129@cindex environment variables, subprocesses
128 The subprocess inherits its environment from Emacs, but you can 130 The subprocess inherits its environment from Emacs, but you can
129specify overrides for it with @code{process-environment}. @xref{System 131specify overrides for it with @code{process-environment}. @xref{System
130Environment}. 132Environment}. The subprocess gets its current directory from the
133value of @code{default-directory}.
131 134
132@defvar exec-directory 135@defvar exec-directory
133@pindex movemail 136@pindex movemail
134The value of this variable is a string, the name of a directory that 137The value of this variable is a string, the name of a directory that
135contains programs that come with GNU Emacs, programs intended for Emacs 138contains programs that come with GNU Emacs and are intended for Emacs
136to invoke. The program @code{movemail} is an example of such a program; 139to invoke. The program @code{movemail} is an example of such a program;
137Rmail uses it to fetch new mail from an inbox. 140Rmail uses it to fetch new mail from an inbox.
138@end defvar 141@end defvar
@@ -147,6 +150,11 @@ directory (which is the value of @code{default-directory}).
147The value of @code{exec-path} is used by @code{call-process} and 150The value of @code{exec-path} is used by @code{call-process} and
148@code{start-process} when the @var{program} argument is not an absolute 151@code{start-process} when the @var{program} argument is not an absolute
149file name. 152file name.
153
154Generally, you should not modify @code{exec-path} directly. Instead,
155ensure that your @env{PATH} environment variable is set appropriately
156before starting Emacs. Trying to modify @code{exec-path}
157independently of @env{PATH} can lead to confusing results.
150@end defopt 158@end defopt
151 159
152@node Shell Arguments 160@node Shell Arguments
@@ -162,7 +170,7 @@ occur in the file name, they will confuse the shell. To handle these
162characters, use the function @code{shell-quote-argument}: 170characters, use the function @code{shell-quote-argument}:
163 171
164@defun shell-quote-argument argument 172@defun shell-quote-argument argument
165This function returns a string which represents, in shell syntax, 173This function returns a string that represents, in shell syntax,
166an argument whose actual contents are @var{argument}. It should 174an argument whose actual contents are @var{argument}. It should
167work reliably to concatenate the return value into a shell command 175work reliably to concatenate the return value into a shell command
168and then pass it to a shell for execution. 176and then pass it to a shell for execution.
@@ -200,10 +208,10 @@ a shell command:
200 The following two functions are useful for combining a list of 208 The following two functions are useful for combining a list of
201individual command-line argument strings into a single string, and 209individual command-line argument strings into a single string, and
202taking a string apart into a list of individual command-line 210taking a string apart into a list of individual command-line
203arguments. These functions are mainly intended to be used for 211arguments. These functions are mainly intended for
204converting user input in the minibuffer, a Lisp string, into a list of 212converting user input in the minibuffer, a Lisp string, into a list of
205string arguments to be passed to @code{call-process} or 213string arguments to be passed to @code{call-process} or
206@code{start-process}, or for the converting such lists of arguments in 214@code{start-process}, or for converting such lists of arguments into
207a single Lisp string to be presented in the minibuffer or echo area. 215a single Lisp string to be presented in the minibuffer or echo area.
208 216
209@defun split-string-and-unquote string &optional separators 217@defun split-string-and-unquote string &optional separators
@@ -347,7 +355,7 @@ In the examples below, the buffer @samp{foo} is current.
347 @result{} 0 355 @result{} 0
348 356
349---------- Buffer: foo ---------- 357---------- Buffer: foo ----------
350/usr/user/lewis/manual 358/home/lewis/manual
351---------- Buffer: foo ---------- 359---------- Buffer: foo ----------
352@end group 360@end group
353 361
@@ -356,18 +364,18 @@ In the examples below, the buffer @samp{foo} is current.
356 @result{} 0 364 @result{} 0
357 365
358---------- Buffer: bar ---------- 366---------- Buffer: bar ----------
359lewis:5LTsHm66CSWKg:398:21:Bil Lewis:/user/lewis:/bin/csh 367lewis:x:1001:1001:Bil Lewis,,,,:/home/lewis:/bin/bash
360 368
361---------- Buffer: bar ---------- 369---------- Buffer: bar ----------
362@end group 370@end group
363@end smallexample 371@end smallexample
364 372
365Here is a good example of the use of @code{call-process}, which used to 373Here is an example of the use of @code{call-process}, as used to
366be found in the definition of @code{insert-directory}: 374be found in the definition of the @code{insert-directory} function:
367 375
368@smallexample 376@smallexample
369@group 377@group
370(call-process insert-directory-program nil t nil @var{switches} 378(call-process insert-directory-program nil t nil switches
371 (if full-directory-p 379 (if full-directory-p
372 (concat (file-name-as-directory file) ".") 380 (concat (file-name-as-directory file) ".")
373 file)) 381 file))
@@ -377,9 +385,9 @@ be found in the definition of @code{insert-directory}:
377 385
378@defun process-file program &optional infile buffer display &rest args 386@defun process-file program &optional infile buffer display &rest args
379This function processes files synchronously in a separate process. It 387This function processes files synchronously in a separate process. It
380is similar to @code{call-process} but may invoke a file handler based 388is similar to @code{call-process}, but may invoke a file handler based
381on the value of the variable @code{default-directory}. The current 389on the value of the variable @code{default-directory}, which specifies
382working directory of the subprocess is @code{default-directory}. 390the current working directory of the subprocess.
383 391
384The arguments are handled in almost the same way as for 392The arguments are handled in almost the same way as for
385@code{call-process}, with the following differences: 393@code{call-process}, with the following differences:
@@ -392,15 +400,15 @@ file handlers might not support separating standard output and error
392output by way of the @var{buffer} argument. 400output by way of the @var{buffer} argument.
393 401
394If a file handler is invoked, it determines the program to run based 402If a file handler is invoked, it determines the program to run based
395on the first argument @var{program}. For instance, consider that a 403on the first argument @var{program}. For instance, suppose that a
396handler for remote files is invoked. Then the path that is used for 404handler for remote files is invoked. Then the path that is used for
397searching the program might be different than @code{exec-path}. 405searching for the program might be different from @code{exec-path}.
398 406
399The second argument @var{infile} may invoke a file handler. The file 407The second argument @var{infile} may invoke a file handler. The file
400handler could be different from the handler chosen for the 408handler could be different from the handler chosen for the
401@code{process-file} function itself. (For example, 409@code{process-file} function itself. (For example,
402@code{default-directory} could be on a remote host, whereas 410@code{default-directory} could be on one remote host, and
403@var{infile} is on another remote host. Or @code{default-directory} 411@var{infile} on a different remote host. Or @code{default-directory}
404could be non-special, whereas @var{infile} is on a remote host.) 412could be non-special, whereas @var{infile} is on a remote host.)
405 413
406If @var{buffer} is a list of the form @code{(@var{real-destination} 414If @var{buffer} is a list of the form @code{(@var{real-destination}
@@ -417,16 +425,16 @@ file names.
417@end defun 425@end defun
418 426
419@defvar process-file-side-effects 427@defvar process-file-side-effects
420This variable indicates, whether a call of @code{process-file} changes 428This variable indicates whether a call of @code{process-file} changes
421remote files. 429remote files.
422 430
423Per default, this variable is always set to @code{t}, meaning that a 431By default, this variable is always set to @code{t}, meaning that a
424call of @code{process-file} could potentially change any file on a 432call of @code{process-file} could potentially change any file on a
425remote host. When set to @code{nil}, a file handler could optimize 433remote host. When set to @code{nil}, a file handler could optimize
426its behavior with respect to remote file attributes caching. 434its behavior with respect to remote file attribute caching.
427 435
428This variable should never be changed by @code{setq}. Instead of, it 436You should only ever change this variable with a let-binding; never
429shall be set only by let-binding. 437with @code{setq}.
430@end defvar 438@end defvar
431 439
432@defun call-process-region start end program &optional delete destination display &rest args 440@defun call-process-region start end program &optional delete destination display &rest args
@@ -442,7 +450,7 @@ as it comes in. For details, see the description of
442@code{call-process}, above. If @var{destination} is the integer 0, 450@code{call-process}, above. If @var{destination} is the integer 0,
443@code{call-process-region} discards the output and returns @code{nil} 451@code{call-process-region} discards the output and returns @code{nil}
444immediately, without waiting for the subprocess to finish (this only 452immediately, without waiting for the subprocess to finish (this only
445works if asynchronous subprocesses are supported). 453works if asynchronous subprocesses are supported; i.e. not on MS-DOS).
446 454
447The remaining arguments, @var{args}, are strings that specify command 455The remaining arguments, @var{args}, are strings that specify command
448line arguments for the program. 456line arguments for the program.
@@ -476,20 +484,21 @@ inputinput@point{}
476@end group 484@end group
477@end smallexample 485@end smallexample
478 486
479 The @code{shell-command-on-region} command uses 487 For example, the @code{shell-command-on-region} command uses
480@code{call-process-region} like this: 488@code{call-process-region} in a manner similar to this:
481 489
482@smallexample 490@smallexample
483@group 491@group
484(call-process-region 492(call-process-region
485 start end 493 start end
486 shell-file-name ; @r{Name of program.} 494 shell-file-name ; @r{name of program}
487 nil ; @r{Do not delete region.} 495 nil ; @r{do not delete region}
488 buffer ; @r{Send output to @code{buffer}.} 496 buffer ; @r{send output to @code{buffer}}
489 nil ; @r{No redisplay during output.} 497 nil ; @r{no redisplay during output}
490 "-c" command) ; @r{Arguments for the shell.} 498 "-c" command) ; @r{arguments for the shell}
491@end group 499@end group
492@end smallexample 500@end smallexample
501@c It actually uses shell-command-switch, but no need to mention that here.
493@end defun 502@end defun
494 503
495@defun call-process-shell-command command &optional infile destination display &rest args 504@defun call-process-shell-command command &optional infile destination display &rest args
@@ -510,6 +519,9 @@ This function executes @var{command} (a string) as a shell command,
510then returns the command's output as a string. 519then returns the command's output as a string.
511@end defun 520@end defun
512 521
522@c There is also shell-command-on-region, but that is more of a user
523@c command, not something to use in programs.
524
513@defun process-lines program &rest args 525@defun process-lines program &rest args
514This function runs @var{program}, waits for it to finish, and returns 526This function runs @var{program}, waits for it to finish, and returns
515its output as a list of strings. Each string in the list holds a 527its output as a list of strings. Each string in the list holds a
@@ -553,7 +565,8 @@ The remaining arguments, @var{args}, are strings that specify command
553line arguments for the program. 565line arguments for the program.
554 566
555In the example below, the first process is started and runs (rather, 567In the example below, the first process is started and runs (rather,
556sleeps) for 100 seconds. Meanwhile, the second process is started, and 568sleeps) for 100 seconds (the output buffer @samp{foo} is created
569immediately). Meanwhile, the second process is started, and
557given the name @samp{my-process<1>} for the sake of uniqueness. It 570given the name @samp{my-process<1>} for the sake of uniqueness. It
558inserts the directory listing at the end of the buffer @samp{foo}, 571inserts the directory listing at the end of the buffer @samp{foo},
559before the first process finishes. Then it finishes, and a message to 572before the first process finishes. Then it finishes, and a message to
@@ -567,13 +580,15 @@ finishes, and another message is inserted in the buffer for it.
567@end group 580@end group
568 581
569@group 582@group
570(start-process "my-process" "foo" "ls" "-l" "/user/lewis/bin") 583(start-process "my-process" "foo" "ls" "-l" "/bin")
571 @result{} #<process my-process<1>> 584 @result{} #<process my-process<1>>
572 585
573---------- Buffer: foo ---------- 586---------- Buffer: foo ----------
574total 2 587total 8336
575lrwxrwxrwx 1 lewis 14 Jul 22 10:12 gnuemacs --> /emacs 588-rwxr-xr-x 1 root root 971384 Mar 30 10:14 bash
576-rwxrwxrwx 1 lewis 19 Jul 30 21:02 lemon 589-rwxr-xr-x 1 root root 146920 Jul 5 2011 bsd-csh
590@dots{}
591-rwxr-xr-x 1 root root 696880 Feb 28 15:55 zsh4
577 592
578Process my-process<1> finished 593Process my-process<1> finished
579 594
@@ -586,45 +601,49 @@ Process my-process finished
586@defun start-file-process name buffer-or-name program &rest args 601@defun start-file-process name buffer-or-name program &rest args
587Like @code{start-process}, this function starts a new asynchronous 602Like @code{start-process}, this function starts a new asynchronous
588subprocess running @var{program} in it, and returns its process 603subprocess running @var{program} in it, and returns its process
589object---when @code{default-directory} is not a magic file name. 604object.
590 605
591If @code{default-directory} is magic, the function invokes its file 606The difference from @code{start-process} is that this function may
592handler instead. This handler ought to run @var{program}, perhaps on 607invoked a file handler based on the value of @code{default-directory}.
593the local host, perhaps on a remote host that corresponds to 608This handler ought to run @var{program}, perhaps on the local host,
594@code{default-directory}. In the latter case, the local part of 609perhaps on a remote host that corresponds to @code{default-directory}.
595@code{default-directory} becomes the working directory of the process. 610In the latter case, the local part of @code{default-directory} becomes
611the working directory of the process.
596 612
597This function does not try to invoke file name handlers for 613This function does not try to invoke file name handlers for
598@var{program} or for the @var{program-args}. 614@var{program} or for the @var{program-args}.
599 615
600Depending on the implementation of the file handler, it might not be 616Depending on the implementation of the file handler, it might not be
601possible to apply @code{process-filter} or @code{process-sentinel} to 617possible to apply @code{process-filter} or @code{process-sentinel} to
602the resulting process object (@pxref{Filter Functions}, @pxref{Sentinels}). 618the resulting process object. @xref{Filter Functions}, and @ref{Sentinels}.
603 619
620@c FIXME Can we find a better example (i.e. a more modern function
621@c that is actually documented).
604Some file handlers may not support @code{start-file-process} (for 622Some file handlers may not support @code{start-file-process} (for
605example @code{ange-ftp-hook-function}). In such cases, the function 623example the function @code{ange-ftp-hook-function}). In such cases,
606does nothing and returns @code{nil}. 624this function does nothing and returns @code{nil}.
607@end defun 625@end defun
608 626
609@defun start-process-shell-command name buffer-or-name command 627@defun start-process-shell-command name buffer-or-name command
610This function is like @code{start-process} except that it uses a shell 628This function is like @code{start-process}, except that it uses a shell
611to execute the specified command. The argument @var{command} is a shell 629to execute the specified command. The argument @var{command} is a shell
612command name. The variable @code{shell-file-name} specifies which shell to 630command name. The variable @code{shell-file-name} specifies which shell to
613use. 631use.
614 632
615The point of running a program through the shell, rather than directly 633The point of running a program through the shell, rather than directly
616with @code{start-process}, is so that you can employ shell features such 634with @code{start-process}, is so that you can employ shell features such
617as wildcards in the arguments. It follows that if you include an 635as wildcards in the arguments. It follows that if you include any
618arbitrary user-specified arguments in the command, you should quote it 636arbitrary user-specified arguments in the command, you should quote them
619with @code{shell-quote-argument} first, so that any special shell 637with @code{shell-quote-argument} first, so that any special shell
620characters do @emph{not} have their special shell meanings. @xref{Shell 638characters do @emph{not} have their special shell meanings. @xref{Shell
621Arguments}. 639Arguments}. Of course, when executing commands based on user input
640you should also consider the security implications.
622@end defun 641@end defun
623 642
624@defun start-file-process-shell-command name buffer-or-name command 643@defun start-file-process-shell-command name buffer-or-name command
625This function is like @code{start-process-shell-command}, but uses 644This function is like @code{start-process-shell-command}, but uses
626@code{start-file-process} internally. By this, @var{command} can be 645@code{start-file-process} internally. Because of this, @var{command}
627executed also on remote hosts, depending on @code{default-directory}. 646can also be executed on remote hosts, depending on @code{default-directory}.
628@end defun 647@end defun
629 648
630@defvar process-connection-type 649@defvar process-connection-type
@@ -649,7 +668,7 @@ with one subprocess by binding the variable around the call to
649 668
650@smallexample 669@smallexample
651@group 670@group
652(let ((process-connection-type nil)) ; @r{Use a pipe.} 671(let ((process-connection-type nil)) ; @r{use a pipe}
653 (start-process @dots{})) 672 (start-process @dots{}))
654@end group 673@end group
655@end smallexample 674@end smallexample
@@ -666,9 +685,9 @@ Information}).
666 @dfn{Deleting a process} disconnects Emacs immediately from the 685 @dfn{Deleting a process} disconnects Emacs immediately from the
667subprocess. Processes are deleted automatically after they terminate, 686subprocess. Processes are deleted automatically after they terminate,
668but not necessarily right away. You can delete a process explicitly 687but not necessarily right away. You can delete a process explicitly
669at any time. If you delete a terminated process explicitly before it 688at any time. If you explicitly delete a terminated process before it
670is deleted automatically, no harm results. Deleting a running 689is deleted automatically, no harm results. Deleting a running
671process sends a signal to terminate it (and its child processes if 690process sends a signal to terminate it (and its child processes, if
672any), and calls the process sentinel if it has one. @xref{Sentinels}. 691any), and calls the process sentinel if it has one. @xref{Sentinels}.
673 692
674 When a process is deleted, the process object itself continues to 693 When a process is deleted, the process object itself continues to
@@ -866,7 +885,7 @@ closed the connection, or Emacs did @code{delete-process}.
866@end defun 885@end defun
867 886
868@defun process-live-p process 887@defun process-live-p process
869This function returns nin-@code{nil} if @var{process} is alive. A 888This function returns non-@code{nil} if @var{process} is alive. A
870process is considered alive if its status is @code{run}, @code{open}, 889process is considered alive if its status is @code{run}, @code{open},
871@code{listen}, @code{connect} or @code{stop}. 890@code{listen}, @code{connect} or @code{stop}.
872@end defun 891@end defun
@@ -2664,7 +2683,7 @@ specification}, a special nested list describing named and typed
2664@dfn{fields}. This specification controls length of each field to be 2683@dfn{fields}. This specification controls length of each field to be
2665processed, and how to pack or unpack it. We normally keep bindat specs 2684processed, and how to pack or unpack it. We normally keep bindat specs
2666in variables whose names end in @samp{-bindat-spec}; that kind of name 2685in variables whose names end in @samp{-bindat-spec}; that kind of name
2667is automatically recognized as ``risky.'' 2686is automatically recognized as ``risky''.
2668 2687
2669@cindex endianness 2688@cindex endianness
2670@cindex big endian 2689@cindex big endian
@@ -2674,7 +2693,7 @@ is automatically recognized as ``risky.''
2674that the field represents and, in the case of multibyte fields, how 2693that the field represents and, in the case of multibyte fields, how
2675the bytes are ordered within the field. The two possible orderings 2694the bytes are ordered within the field. The two possible orderings
2676are ``big endian'' (also known as ``network byte ordering'') and 2695are ``big endian'' (also known as ``network byte ordering'') and
2677``little endian.'' For instance, the number @code{#x23cd} (decimal 2696``little endian''. For instance, the number @code{#x23cd} (decimal
26789165) in big endian would be the two bytes @code{#x23} @code{#xcd}; 26979165) in big endian would be the two bytes @code{#x23} @code{#xcd};
2679and in little endian, @code{#xcd} @code{#x23}. Here are the possible 2698and in little endian, @code{#xcd} @code{#x23}. Here are the possible
2680type values: 2699type values:
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3d935d5b01f..b2a3f135109 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
12012-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 Avoid the use of ((lambda ...) ...) in lexical-binding code.
4 * emacs-lisp/easy-mmode.el (define-minor-mode):Use funcall (bug#11241).
5
62012-04-15 Glenn Morris <rgm@gnu.org>
7
8 * simple.el (process-file-side-effects): Doc fix.
9
102012-04-15 Glenn Morris <rgm@gnu.org>
11
12 * international/mule-cmds.el (set-language-environment): Doc fix.
13
12012-04-14 Juanma Barranquero <lekktu@gmail.com> 142012-04-14 Juanma Barranquero <lekktu@gmail.com>
2 15
3 * server.el (server-auth-key, server-generate-key): Doc fixes. 16 * server.el (server-auth-key, server-generate-key): Doc fixes.
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 88698a1f069..0d6716a2e63 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -260,7 +260,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
260 ;; repeat-command still does the toggling correctly. 260 ;; repeat-command still does the toggling correctly.
261 (interactive (list (or current-prefix-arg 'toggle))) 261 (interactive (list (or current-prefix-arg 'toggle)))
262 (let ((,last-message (current-message))) 262 (let ((,last-message (current-message)))
263 (,@(if setter (list setter) 263 (,@(if setter `(funcall #',setter)
264 (list (if (symbolp mode) 'setq 'setf) mode)) 264 (list (if (symbolp mode) 'setq 'setf) mode))
265 (if (eq arg 'toggle) 265 (if (eq arg 'toggle)
266 (not ,mode) 266 (not ,mode)
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 6d609b67d63..02d37f86da0 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -1834,7 +1834,11 @@ The default status is as follows:
1834This sets the coding system priority and the default input method 1834This sets the coding system priority and the default input method
1835and sometimes other things. LANGUAGE-NAME should be a string 1835and sometimes other things. LANGUAGE-NAME should be a string
1836which is the name of a language environment. For example, \"Latin-1\" 1836which is the name of a language environment. For example, \"Latin-1\"
1837specifies the character set for the major languages of Western Europe." 1837specifies the character set for the major languages of Western Europe.
1838
1839If there is a prior value for `current-language-environment', this
1840runs the hook `exit-language-environment-hook'. After setting up
1841the new language environment, it runs `set-language-environment-hook'."
1838 (interactive (list (read-language-name 1842 (interactive (list (read-language-name
1839 nil 1843 nil
1840 "Set language environment (default English): "))) 1844 "Set language environment (default English): ")))
diff --git a/lisp/simple.el b/lisp/simple.el
index b8422f9923a..09fe1807d8f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1,6 +1,6 @@
1;;; simple.el --- basic editing commands for Emacs 1;;; simple.el --- basic editing commands for Emacs
2 2
3;; Copyright (C) 1985-1987, 1993-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1985-1987, 1993-2012 Free Software Foundation, Inc.
4 4
5;; Maintainer: FSF 5;; Maintainer: FSF
6;; Keywords: internal 6;; Keywords: internal
@@ -2677,13 +2677,13 @@ value passed."
2677(defvar process-file-side-effects t 2677(defvar process-file-side-effects t
2678 "Whether a call of `process-file' changes remote files. 2678 "Whether a call of `process-file' changes remote files.
2679 2679
2680Per default, this variable is always set to `t', meaning that a 2680By default, this variable is always set to `t', meaning that a
2681call of `process-file' could potentially change any file on a 2681call of `process-file' could potentially change any file on a
2682remote host. When set to `nil', a file handler could optimize 2682remote host. When set to `nil', a file handler could optimize
2683its behavior with respect to remote file attributes caching. 2683its behavior with respect to remote file attribute caching.
2684 2684
2685This variable should never be changed by `setq'. Instead of, it 2685You should only ever change this variable with a let-binding;
2686shall be set only by let-binding.") 2686never with `setq'.")
2687 2687
2688(defun start-file-process (name buffer program &rest program-args) 2688(defun start-file-process (name buffer program &rest program-args)
2689 "Start a program in a subprocess. Return the process object for it. 2689 "Start a program in a subprocess. Return the process object for it.