Merge from emacs--rel--22
[bpt/emacs.git] / man / frames.texi
index 3561bd8..a45b582 100644 (file)
@@ -1,6 +1,6 @@
 @c This is part of the Emacs manual.
 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1999, 2000,
-@c   2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+@c   2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Frames, International, Windows, Top
 @chapter Frames and Graphical Displays
@@ -27,12 +27,15 @@ it terminates all the frames.  To delete just one frame, use @kbd{C-x 5
 
   Emacs compiled for MS-DOS emulates some windowing functionality,
 so that you can use many of the features described in this chapter.
-@xref{MS-DOS Mouse}, for more information.
+@iftex
+@xref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{MS-DOS Mouse}.
+@end ifnottex
 
 @menu
-* Mouse Commands::      Moving, cutting, and pasting, with the mouse.
-* Secondary Selection:: Cutting without altering point and mark.
-* Clipboard::           Using the clipboard for selections.
+* Cut and Paste::       Mouse commands for cut and paste.
 * Mouse References::    Using the mouse to select an item from a list.
 * Menu Mouse Clicks::   Mouse clicks that bring up menus.
 * Mode Line Mouse::     Mouse clicks on the mode line.
@@ -51,11 +54,25 @@ so that you can use many of the features described in this chapter.
 * Tooltips::            Displaying information at the current mouse position.
 * Mouse Avoidance::     Moving the mouse pointer out of the way.
 * Non-Window Terminals::  Multiple frames on terminals that show only one.
-* XTerm Mouse::         Using the mouse in an XTerm terminal emulator.
+* Text-Only Mouse::     Using the mouse in text-only terminals.
+@end menu
+
+@node Cut and Paste
+@section Killing and Yanking on Graphical Displays
+
+  This section describes facilities for selecting a region, killing,
+and yanking using the mouse.
+
+@menu
+* Mouse Commands::      Moving, cutting, and pasting, with the mouse.
+* Cut/Paste Other App:: Transfering text between Emacs and other apps.
+* Word and Line Mouse:: Mouse commands for selecting whole words or lines.
+* Secondary Selection:: Cutting without altering point and mark.
+* Clipboard::           Using the clipboard for selections.
 @end menu
 
 @node Mouse Commands
-@section Mouse Commands for Editing
+@subsection Mouse Commands for Editing
 @cindex mouse buttons (what they do)
 
   The mouse commands for selecting and copying a region are mostly
@@ -148,27 +165,6 @@ entire words or lines.
 
 If you use @kbd{Mouse-3} a second time consecutively, at the same place,
 that kills the region already selected.
-
-@item Double-Mouse-1
-This key sets the region around the word which you click on.  If you
-click on a character with ``symbol'' syntax (such as underscore, in C
-mode), it sets the region around the symbol surrounding that character.
-
-If you click on a character with open-parenthesis or close-parenthesis
-syntax, it sets the region around the parenthetical grouping
-which that character starts or ends.  If you click on a character with
-string-delimiter syntax (such as a singlequote or doublequote in C), it
-sets the region around the string constant (using heuristics to figure
-out whether that character is the beginning or the end of it).
-
-@item Double-Drag-Mouse-1
-This key selects a region made up of the words you drag across.
-
-@item Triple-Mouse-1
-This key sets the region around the line you click on.
-
-@item Triple-Drag-Mouse-1
-This key selects a region made up of the lines you drag across.
 @end table
 
   The simplest way to kill text with the mouse is to press @kbd{Mouse-1}
@@ -185,6 +181,20 @@ point.  Then it does not matter where you click, or even which of the
 frame's windows you click on.  The default value is @code{nil}.  This
 variable also affects yanking the secondary selection.
 
+@cindex Delete Selection mode
+@cindex mode, Delete Selection
+@findex delete-selection-mode
+  Many graphical applications follow the convention that insertion while text
+is selected deletes the selected text.  You can make Emacs behave this
+way by enabling Delete Selection mode---with @kbd{M-x
+delete-selection-mode} or using Custom.  Another effect of this mode
+is that @key{DEL}, @kbd{C-d} and some other keys, when a selection
+exists, will kill the whole selection.  It also enables Transient Mark
+mode (@pxref{Transient Mark}).
+
+@node Cut/Paste Other App
+@subsection Cut and Paste with Other Window Applications
+
 @cindex cutting
 @cindex pasting
 @cindex X cutting and pasting
@@ -218,8 +228,36 @@ to yank, the kill ring contents are used.
 system for selections, use @kbd{C-x @key{RET} x} or @kbd{C-x @key{RET}
 X}.  @xref{Communication Coding}.
 
+@node Word and Line Mouse
+@subsection Mouse Commands for Words and Lines
+
+  These variants of @kbd{Mouse-1} select entire words or lines at a time.
+
+@table @kbd
+@item Double-Mouse-1
+This key sets the region around the word which you click on.  If you
+click on a character with ``symbol'' syntax (such as underscore, in C
+mode), it sets the region around the symbol surrounding that character.
+
+If you click on a character with open-parenthesis or close-parenthesis
+syntax, it sets the region around the parenthetical grouping
+which that character starts or ends.  If you click on a character with
+string-delimiter syntax (such as a singlequote or doublequote in C), it
+sets the region around the string constant (using heuristics to figure
+out whether that character is the beginning or the end of it).
+
+@item Double-Drag-Mouse-1
+This key selects a region made up of the words you drag across.
+
+@item Triple-Mouse-1
+This key sets the region around the line you click on.
+
+@item Triple-Drag-Mouse-1
+This key selects a region made up of the lines you drag across.
+@end table
+
 @node Secondary Selection
-@section Secondary Selection
+@subsection Secondary Selection
 @cindex secondary selection
 
   The @dfn{secondary selection} is another way of selecting text using
@@ -269,12 +307,12 @@ yanked text.
 Double or triple clicking of @kbd{M-Mouse-1} operates on words and
 lines, much like @kbd{Mouse-1}.
 
-If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-Mouse-2}
-yanks at point.  Then it does not matter precisely where you click; all
-that matters is which window you click on.  @xref{Mouse Commands}.
+If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-Mouse-2} yanks
+at point.  Then it does not matter precisely where you click, or even
+which of the frame's windows you click on.  @xref{Mouse Commands}.
 
 @node Clipboard
-@section Using the Clipboard
+@subsection Using the Clipboard
 @cindex clipboard
 @vindex x-select-enable-clipboard
 @findex menu-bar-enable-clipboard
@@ -293,7 +331,7 @@ names, all use the clipboard.
 the Emacs yank functions consult the clipboard before the primary
 selection, and to make the kill functions to store in the clipboard as
 well as the primary selection.  Otherwise they do not access the
-clipboard at all.  Using the clipboard is the default on MS-Windows,
+clipboard at all.  Using the clipboard is the default on MS-Windows and Mac,
 but not on other systems.
 
 @node Mouse References
@@ -477,6 +515,8 @@ frame.  This runs @code{find-file-read-only-other-frame}.
 
 @cindex default-frame-alist
 @cindex initial-frame-alist
+@cindex face customization, in @file{~/.emacs}
+@cindex color customization, in @file{~/.emacs}
   You can control the appearance of new frames you create by setting the
 frame parameters in @code{default-frame-alist}.  You can use the
 variable @code{initial-frame-alist} to specify parameters that affect
@@ -500,6 +540,11 @@ Here's a similar example for specifying a foreground color:
 (add-to-list 'default-frame-alist '(foreground-color . "blue"))
 @end example
 
+@noindent
+By putting such customizations in your @file{~/.emacs} init file, you
+can control the appearance of all the frames Emacs creates, including
+the initial one.
+
 @node Frame Commands
 @section Frame Commands
 
@@ -510,10 +555,12 @@ Here's a similar example for specifying a foreground color:
 @kindex C-z @r{(X windows)}
 @findex iconify-or-deiconify-frame
 Iconify the selected Emacs frame (@code{iconify-or-deiconify-frame}).
-The normal meaning of @kbd{C-z}, to suspend Emacs, is not useful under a
-window system, so it has a different binding in that case.
+When typed on an Emacs frame's icon, deiconify instead.
 
-If you type this command on an Emacs frame's icon, it deiconifies the frame.
+The normal meaning of @kbd{C-z}, to suspend Emacs, is not useful under
+a graphical display that allows multiple applications to operate
+simultaneously in their own windows, so Emacs gives @kbd{C-z} a
+different binding in that case.
 
 @item C-x 5 0
 @kindex C-x 5 0
@@ -539,12 +586,18 @@ Delete all frames except the selected one.
 how the system (or the window manager) generally handles
 focus-switching between windows.  There are two possibilities: either
 simply moving the mouse onto a window selects it (gives it focus), or
-you have to click on it in a suitable way to do so.  Unfortunately
-there is no way Emacs can find out automatically which way the system
-handles this, so you have to explicitly say, by setting the variable
-@code{focus-follows-mouse}.  If just moving the mouse onto a window
-selects it, that variable should be @code{t}; if a click is necessary,
-the variable should be @code{nil}.
+you have to click on it in a suitable way to do so.  On X, this focus
+policy also affects whether the focus is given to a frame that Emacs
+raises.  Unfortunately there is no way Emacs can find out
+automatically which way the system handles this, so you have to
+explicitly say, by setting the variable @code{focus-follows-mouse}.
+If just moving the mouse onto a window selects it, that variable
+should be @code{t}; if a click is necessary, the variable should be
+@code{nil}.
+
+The window manager that is part of MS-Windows always gives focus to a
+frame that raises, so this variable has no effect in the native
+MS-Windows build of Emacs.
 
 @node Speedbar
 @section Speedbar Frames
@@ -828,7 +881,7 @@ feature, use @kbd{M-x mouse-wheel-mode}.
 @vindex mouse-wheel-follow-mouse
 @vindex mouse-wheel-scroll-amount
 @vindex mouse-wheel-progressive-speed
-  The variables @code{mouse-wheel-follow-mouse} and
+  The two variables @code{mouse-wheel-follow-mouse} and
 @code{mouse-wheel-scroll-amount} determine where and by how much
 buffers are scrolled.  The variable
 @code{mouse-wheel-progressive-speed} determines whether the scroll
@@ -857,6 +910,8 @@ protocol, are currently supported.
 @section Menu Bars
 @cindex Menu Bar mode
 @cindex mode, Menu Bar
+@findex menu-bar-mode
+@vindex menu-bar-mode
 
   You can turn display of menu bars on or off with @kbd{M-x
 menu-bar-mode} or by customizing the variable @code{menu-bar-mode}.
@@ -896,6 +951,8 @@ global tool bar.
 XPM icons if Emacs was built with XPM support.  Otherwise, the tool
 bar uses monochrome icons (PBM or XBM format).
 
+@findex tool-bar-mode
+@vindex tool-bar-mode
   You can turn display of tool bars on or off with @kbd{M-x
 tool-bar-mode} or by customizing the option @code{tool-bar-mode}.
 
@@ -927,11 +984,18 @@ of hidden files (files starting with a dot) in that dialog.  The
 variable @code{x-gtk-show-hidden-files} controls whether to show
 hidden files by default.
 
-@vindex x-use-old-gtk-file-dialog
-  For Gtk+ version 2.4 and 2.6, you can make Emacs use the old file dialog
-by setting the variable @code{x-use-old-gtk-file-dialog} to a non-@code{nil}
-value.  If Emacs is built with a Gtk+ version that has only one file dialog,
-the setting of this variable has no effect.
+@vindex x-gtk-use-old-file-dialog
+  For Gtk+ versions 2.4 through 2.10, you can select the old file
+dialog (@code{gtk-file-selector}) by setting the variable
+@code{x-gtk-use-old-file-dialog} to a non-@code{nil} value.  If it is
+@code{nil}, Emacs uses @code{gtk-file-chooser}.  If Emacs is built
+with a Gtk+ version that has only one file dialog, this variable has
+no effect.
+
+@vindex x-gtk-file-dialog-help-text
+  Emacs adds help text to the Gtk+ file chooser dialog.  The variable
+@code{x-gtk-file-dialog-help-text} specifies the text to add; if it is
+@code{nil}, that disables the added text.
 
 @node Tooltips
 @section Tooltips
@@ -967,8 +1031,8 @@ customizing the windows that display tooltips.
 @cindex mouse avoidance
 
 @vindex mouse-avoidance-mode
-Mouse Avoidance mode keeps the window system mouse pointer away from
-point, to avoid obscuring text.  Whenever it moves the mouse, it also
+Mouse Avoidance mode keeps the mouse pointer away from point, to avoid
+obscuring text you want to edit.  Whenever it moves the mouse, it also
 raises the frame.  To use Mouse Avoidance mode, customize the variable
 @code{mouse-avoidance-mode}.  You can set this to various values to
 move the mouse in several ways:
@@ -1023,21 +1087,26 @@ and use @kbd{M-x select-frame-by-name @key{RET} @var{name} @key{RET}}
 to select a frame according to its name.  The name you specify appears
 in the mode line when the frame is selected.
 
-@node XTerm Mouse
+@node Text-Only Mouse
 @section Using a Mouse in Terminal Emulators
-@cindex xterm, mouse support
+@cindex mouse support
 @cindex terminal emulators, mouse support
 
-  Some terminal emulators under X support mouse clicks in the terminal
-window.  In a terminal emulator which is compatible with @code{xterm},
+Some terminal emulators support mouse clicks in the terminal window.
+
+@cindex xterm
+In a terminal emulator which is compatible with @code{xterm},
 you can use @kbd{M-x xterm-mouse-mode} to give Emacs control over
 simple use of the mouse---basically, only non-modified single clicks
 are supported.  The normal @code{xterm} mouse functionality for such
 clicks is still available by holding down the @kbd{SHIFT} key when you
-press the mouse button.
+press the mouse button.  Xterm Mouse mode is a global minor mode
+(@pxref{Minor Modes}).  Repeating the command turns the mode off
+again.
 
-  Xterm Mouse mode is a global minor mode (@pxref{Minor Modes}).
-Repeating the command turns the mode off again.
+In the console on GNU/Linux, you can use @kbd{M-x t-mouse-mode}.  You
+need to have the gpm package installed and running on your system in
+order for this to work.
 
 @ignore
    arch-tag: 7dcf3a31-a43b-45d4-a900-445b10d77e49