aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-11-27 16:22:37 +0800
committerChong Yidong2011-11-27 16:22:37 +0800
commitb63a8e8ed5cd5c36ea420c417de2a51101f1a411 (patch)
tree1ee7bfc63e0637acb2b4015595e2e22b3949f819
parente47695319fc758da7ff07d7084386258b6c8b677 (diff)
downloademacs-b63a8e8ed5cd5c36ea420c417de2a51101f1a411.tar.gz
emacs-b63a8e8ed5cd5c36ea420c417de2a51101f1a411.zip
More updates for the Frames chapter in Emacs manual.
* doc/emacs/frames.texi (Creating Frames): Move frame parameter example to Frame Parameters node. (Frame Commands): C-x 5 o does not warp the mouse by default. (Fonts): Add more GTK-style properties; also, they should be capitalized. (Special Buffer Frames): Node deleted; special-display is on the way out. (Frame Parameters): Example moved here from Creating Frames. Clarify that default-frame-alist affects the initial frame too. Delete auto-raise-mode and auto-lower-mode. (Wheeled Mice): Node deleted. Content moved to Mouse Commands. (Dialog Boxes): Delete x-gtk-use-old-file-dialog. * doc/emacs/windows.texi (Window Choice): Add xref to Lisp manual for special-display-*.
-rw-r--r--doc/emacs/ChangeLog18
-rw-r--r--doc/emacs/display.texi2
-rw-r--r--doc/emacs/emacs.texi2
-rw-r--r--doc/emacs/frames.texi432
-rw-r--r--doc/emacs/windows.texi3
5 files changed, 180 insertions, 277 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 9abed71d1c7..4f68215b7ff 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,21 @@
12011-11-27 Chong Yidong <cyd@gnu.org>
2
3 * frames.texi (Creating Frames): Move frame parameter example to
4 Frame Parameters node.
5 (Frame Commands): C-x 5 o does not warp the mouse by default.
6 (Fonts): Add more GTK-style properties; also, they should be
7 capitalized.
8 (Special Buffer Frames): Node deleted; special-display is on the
9 way out.
10 (Frame Parameters): Example moved here from Creating Frames.
11 Clarify that default-frame-alist affects the initial frame too.
12 Delete auto-raise-mode and auto-lower-mode.
13 (Wheeled Mice): Node deleted. Content moved to Mouse Commands.
14 (Dialog Boxes): Delete x-gtk-use-old-file-dialog.
15
16 * windows.texi (Window Choice): Add xref to Lisp manual for
17 special-display-*.
18
12011-11-26 Eli Zaretskii <eliz@gnu.org> 192011-11-26 Eli Zaretskii <eliz@gnu.org>
2 20
3 * display.texi (Text Display): Update the description, 21 * display.texi (Text Display): Update the description,
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 4334d99461f..88b2758828e 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -122,7 +122,7 @@ moving it to the topmost or bottommost line. With any other
122non-@code{nil} value, Emacs adjusts point this way even if the scroll 122non-@code{nil} value, Emacs adjusts point this way even if the scroll
123command leaves point in the window. This variable affects all the 123command leaves point in the window. This variable affects all the
124scroll commands documented in this section, as well as scrolling with 124scroll commands documented in this section, as well as scrolling with
125the mouse wheel (@pxref{Wheeled Mice}); in general, it affects any 125the mouse wheel (@pxref{Mouse Commands}); in general, it affects any
126command that has a non-@code{nil} @code{scroll-command} property. 126command that has a non-@code{nil} @code{scroll-command} property.
127@xref{Property Lists,,, elisp, The Emacs Lisp Reference Manual}. 127@xref{Property Lists,,, elisp, The Emacs Lisp Reference Manual}.
128 128
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 55fdb9ec875..9c54e396603 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -505,10 +505,8 @@ Frames and Graphical Displays
505* Fonts:: Changing the frame font. 505* Fonts:: Changing the frame font.
506* Speedbar:: How to make and use a speedbar frame. 506* Speedbar:: How to make and use a speedbar frame.
507* Multiple Displays:: How one Emacs job can talk to several displays. 507* Multiple Displays:: How one Emacs job can talk to several displays.
508* Special Buffer Frames:: You can make certain buffers have their own frames.
509* Frame Parameters:: Changing the colors and other modes of frames. 508* Frame Parameters:: Changing the colors and other modes of frames.
510* Scroll Bars:: How to enable and disable scroll bars; how to use them. 509* Scroll Bars:: How to enable and disable scroll bars; how to use them.
511* Wheeled Mice:: Using mouse wheels for scrolling.
512* Drag and Drop:: Using drag and drop to open files and insert text. 510* Drag and Drop:: Using drag and drop to open files and insert text.
513* Menu Bars:: Enabling and disabling the menu bar. 511* Menu Bars:: Enabling and disabling the menu bar.
514* Tool Bars:: Enabling and disabling the tool bar. 512* Tool Bars:: Enabling and disabling the tool bar.
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 22333fc0971..704b53c2f36 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -8,7 +8,7 @@
8 8
9 When Emacs is started on a graphical display, e.g. on the X Window 9 When Emacs is started on a graphical display, e.g. on the X Window
10System, it occupies a graphical system-level ``window''. In this 10System, it occupies a graphical system-level ``window''. In this
11manual, we call this a @dfn{frame}; we reserve the word ``window'' for 11manual, we call this a @dfn{frame}, reserving the word ``window'' for
12the part of the frame used for displaying a buffer. A frame initially 12the part of the frame used for displaying a buffer. A frame initially
13contains one window, but it can be subdivided into multiple windows 13contains one window, but it can be subdivided into multiple windows
14(@pxref{Windows}). A frame normally also contains a menu bar, tool 14(@pxref{Windows}). A frame normally also contains a menu bar, tool
@@ -53,10 +53,8 @@ for doing so on MS-DOS).
53* Fonts:: Changing the frame font. 53* Fonts:: Changing the frame font.
54* Speedbar:: How to make and use a speedbar frame. 54* Speedbar:: How to make and use a speedbar frame.
55* Multiple Displays:: How one Emacs job can talk to several displays. 55* Multiple Displays:: How one Emacs job can talk to several displays.
56* Special Buffer Frames:: You can make certain buffers have their own frames.
57* Frame Parameters:: Changing the colors and other modes of frames. 56* Frame Parameters:: Changing the colors and other modes of frames.
58* Scroll Bars:: How to enable and disable scroll bars; how to use them. 57* Scroll Bars:: How to enable and disable scroll bars; how to use them.
59* Wheeled Mice:: Using mouse wheels for scrolling.
60* Drag and Drop:: Using drag and drop to open files and insert text. 58* Drag and Drop:: Using drag and drop to open files and insert text.
61* Menu Bars:: Enabling and disabling the menu bar. 59* Menu Bars:: Enabling and disabling the menu bar.
62* Tool Bars:: Enabling and disabling the tool bar. 60* Tool Bars:: Enabling and disabling the tool bar.
@@ -95,7 +93,7 @@ ring; on a second click, kill it (@code{mouse-save-then-kill}).
95 93
96@findex mouse-set-point 94@findex mouse-set-point
97 The most basic mouse command is @code{mouse-set-point}, which is 95 The most basic mouse command is @code{mouse-set-point}, which is
98called by clicking with the left mouse button, @kbd{Mouse-1}, in the 96invoked by clicking with the left mouse button, @kbd{Mouse-1}, in the
99text area of a window. This moves point to the position where you 97text area of a window. This moves point to the position where you
100clicked. If that window was not the selected window, it becomes the 98clicked. If that window was not the selected window, it becomes the
101selected window. 99selected window.
@@ -190,6 +188,22 @@ described above, the mark will be deactivated by any subsequent
190unshifted cursor motion command, in addition to the usual ways of 188unshifted cursor motion command, in addition to the usual ways of
191deactivating the mark. @xref{Shift Selection}. 189deactivating the mark. @xref{Shift Selection}.
192 190
191@cindex mouse wheel
192@findex mouse-wheel-mode
193@cindex Mouse Wheel minor mode
194@cindex mode, Mouse Wheel
195@vindex mouse-wheel-follow-mouse
196@vindex mouse-wheel-scroll-amount
197@vindex mouse-wheel-progressive-speed
198 Some mice have a ``wheel'' which can be used for scrolling. Emacs
199supports scrolling windows with the mouse wheel, by default, on most
200graphical displays. To toggle this feature, use @kbd{M-x
201mouse-wheel-mode}. The variables @code{mouse-wheel-follow-mouse} and
202@code{mouse-wheel-scroll-amount} determine where and by how much
203buffers are scrolled. The variable
204@code{mouse-wheel-progressive-speed} determines whether the scroll
205speed is linked to how fast you move the wheel.
206
193@node Word and Line Mouse 207@node Word and Line Mouse
194@section Mouse Commands for Words and Lines 208@section Mouse Commands for Words and Lines
195 209
@@ -366,13 +380,13 @@ boundary to the left or right.
366@cindex creating frames 380@cindex creating frames
367 381
368@kindex C-x 5 382@kindex C-x 5
369 The prefix key @kbd{C-x 5} is analogous to @kbd{C-x 4}, with 383 The prefix key @kbd{C-x 5} is analogous to @kbd{C-x 4}. Whereas
370parallel subcommands. The difference is that @kbd{C-x 5} commands 384each @kbd{C-x 4} command pops up a buffer in a different window in the
371create a new frame rather than just a new window in the selected frame 385selected frame (@pxref{Pop Up Window}), the @kbd{C-x 5} commands use a
372(@pxref{Pop Up Window}). If an existing visible or iconified 386different frame. If an existing visible or iconified (``minimized'')
373(``minimized'') frame already displays the requested material, these 387frame already displays the requested buffer, that frame is raised and
374commands use the existing frame, after raising or deiconifying 388deiconified (``un-minimized''); otherwise, a new frame is created on
375(``un-minimizing'') as necessary. 389the current display terminal.
376 390
377 The various @kbd{C-x 5} commands differ in how they find or create the 391 The various @kbd{C-x 5} commands differ in how they find or create the
378buffer to select: 392buffer to select:
@@ -407,56 +421,32 @@ frame. This runs @code{find-file-read-only-other-frame}.
407@xref{Visiting}. 421@xref{Visiting}.
408@end table 422@end table
409 423
410@cindex default-frame-alist 424 You can control the appearance and behavior of the newly-created
411@cindex initial-frame-alist 425frames by specifying @dfn{frame parameters}. @xref{Frame Parameters}.
412@cindex face customization, in init file
413@cindex color customization, in init file
414 You can control the appearance of new frames you create by setting the
415frame parameters in @code{default-frame-alist}. You can use the
416variable @code{initial-frame-alist} to specify parameters that affect
417only the initial frame. @xref{Initial Parameters,,, elisp, The Emacs
418Lisp Reference Manual}, for more information.
419
420@cindex font (default)
421 Here is an example of using @code{default-frame-alist} to specify
422the default foreground color and font:
423
424@example
425(add-to-list 'default-frame-alist '(font . "10x20"))
426(add-to-list 'default-frame-alist
427 '(foreground-color . "blue"))
428@end example
429
430@noindent
431By putting such customizations in your init file, you can control the
432appearance of all the frames Emacs creates, including the initial one
433(@pxref{Init File}). @xref{Fonts}, for other ways to set the default
434font.
435 426
436@node Frame Commands 427@node Frame Commands
437@section Frame Commands 428@section Frame Commands
438 429
439 The following commands let you create, delete and operate on frames: 430 The following commands are used to delete and operate on frames:
440 431
441@table @kbd 432@table @kbd
433@item C-x 5 0
434@kindex C-x 5 0
435@findex delete-frame
436Delete the selected frame (@code{delete-frame}). This signals an
437error if there is only one frame.
438
442@item C-z 439@item C-z
443@kindex C-z @r{(X windows)} 440@kindex C-z @r{(X windows)}
444@findex suspend-frame 441@findex suspend-frame
445Minimize (or ``iconify) the selected Emacs frame 442Minimize (or ``iconify) the selected Emacs frame
446(@code{suspend-frame}). @xref{Exiting}. 443(@code{suspend-frame}). @xref{Exiting}.
447 444
448@item C-x 5 0
449@kindex C-x 5 0
450@findex delete-frame
451Delete the selected frame (@code{delete-frame}). This is not allowed
452if there is only one frame.
453
454@item C-x 5 o 445@item C-x 5 o
455@kindex C-x 5 o 446@kindex C-x 5 o
456@findex other-frame 447@findex other-frame
457Select another frame, raise it, and warp the mouse to it. If you 448Select another frame, and raise it. If you repeat this command, it
458repeat this command, it cycles through all the frames on your 449cycles through all the frames on your terminal.
459terminal.
460 450
461@item C-x 5 1 451@item C-x 5 1
462@kindex C-x 5 1 452@kindex C-x 5 1
@@ -464,43 +454,37 @@ terminal.
464Delete all frames on the current terminal, except the selected one. 454Delete all frames on the current terminal, except the selected one.
465@end table 455@end table
466 456
467 The @kbd{C-x 5 0} (@code{delete-frame}) command never deletes the 457 The @kbd{C-x 5 0} (@code{delete-frame}) command deletes the selected
468last frame. This prevents you from losing the ability to interact 458frame. However, it will refuse to delete the last frame in an Emacs
469with the Emacs process. Note that when Emacs is run as a daemon 459session, to prevent you from losing the ability to interact with the
470(@pxref{Emacs Server}), there is always a ``virtual frame'' that 460Emacs session. Note that when Emacs is run as a daemon (@pxref{Emacs
471remains after all the ordinary, interactive frames are deleted. In 461Server}), there is always a ``virtual frame'' that remains after all
472this case, @kbd{C-x 5 0} can delete the last interactive frame; you 462the ordinary, interactive frames are deleted. In this case, @kbd{C-x
473can use @command{emacsclient} to reconnect to the Emacs session. 4635 0} can delete the last interactive frame; you can use
474 464@command{emacsclient} to reconnect to the Emacs session.
475 The @kbd{C-x 5 1} (@code{delete-other-frames}) command only deletes 465
476frames on the current terminal. For example, if you call it from an X 466 The @kbd{C-x 5 1} (@code{delete-other-frames}) command deletes all
477frame, it deletes the other frames on that X display; if the Emacs 467other frames on the current terminal (this terminal refers to either a
478process has frames open on other X displays or text terminals, those 468graphical display, or a text-only terminal; @pxref{Non-Window
479are not deleted. 469Terminals}). If the Emacs session has frames open on other graphical
470displays or text terminals, those are not deleted.
480 471
481@vindex focus-follows-mouse 472@vindex focus-follows-mouse
482 On X, you may have to tell Emacs how the window manager handles 473 The @kbd{C-x 5 o} (@code{other-frame}) command selects the next
483focus-switching between windows, in order for @kbd{C-x 5 o} 474frame on the current terminal. If you are using Emacs on the X Window
484(@code{other-frame}) to work properly. Unfortunately, there is no way 475System with a window manager that selects (or @dfn{gives focus to})
485for Emacs to detect this automatically, so you should set the variable 476whatever frame the mouse cursor is over, you have to change the
486@code{focus-follows-mouse}. The default is @code{nil}, meaning you 477variable @code{focus-follows-mouse} to @code{t} in order for this
487have to click on the window to select it (the default for most modern 478command to work properly. Then invoking @kbd{C-x 5 o} will also warp
488window managers). You should change it to @code{t} if your window 479the mouse cursor to the chosen frame.
489manager selects a window and gives it focus anytime you move the mouse
490onto the window.
491
492 The window manager that is part of MS-Windows always gives focus to
493a frame that raises, so this variable has no effect in the native
494MS-Windows build of Emacs. However, you may still wish to set this
495variable to @code{t} to have Emacs automatically move the mouse
496pointer to the raised frame.
497 480
498@node Fonts 481@node Fonts
499@section Fonts 482@section Fonts
500@cindex fonts 483@cindex fonts
501 484
502 By default, Emacs displays text in X using a 12-point monospace 485 By default, Emacs displays text on graphical displays using a
503font. There are several different ways to specify a different font: 48612-point monospace font. There are several different ways to specify
487a different font:
504 488
505@itemize 489@itemize
506@item 490@item
@@ -514,7 +498,7 @@ variable @code{default-frame-alist} to specify the @code{font}
514parameter (@pxref{Creating Frames}), like this: 498parameter (@pxref{Creating Frames}), like this:
515 499
516@smallexample 500@smallexample
517(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12")) 501(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-10"))
518@end smallexample 502@end smallexample
519 503
520@cindex X defaults file 504@cindex X defaults file
@@ -536,18 +520,16 @@ font in your X resources file, you should not quote it.
536If you are running Emacs on the GNOME desktop, you can tell Emacs to 520If you are running Emacs on the GNOME desktop, you can tell Emacs to
537use the default system font by setting the variable 521use the default system font by setting the variable
538@code{font-use-system-font} to @code{t} (the default is @code{nil}). 522@code{font-use-system-font} to @code{t} (the default is @code{nil}).
539For this to work, Emacs must be compiled with Gconf support; this is 523For this to work, Emacs must have been compiled with Gconf support.
540done automatically if the libraries are present at compile time.
541 524
542@item 525@item
543Use the command line option @samp{-fn} (or @samp{--font}). @xref{Font 526Use the command line option @samp{-fn} (or @samp{--font}). @xref{Font
544X}. 527X}.
545@end itemize 528@end itemize
546 529
547To check what font you're currently using, the @kbd{C-u C-x =} 530 To check what font you're currently using, the @kbd{C-u C-x =}
548command can be helpful. It'll describe the character under point, and 531command can be helpful. It describes the character at point, and
549also say what font it's rendered in, if the window system you're 532names the font that it's rendered in.
550running under supports that.
551 533
552@cindex fontconfig 534@cindex fontconfig
553 On X, there are four different ways to express a ``font name''. The 535 On X, there are four different ways to express a ``font name''. The
@@ -561,7 +543,7 @@ the following form:
561@noindent 543@noindent
562Within this format, any of the elements in braces may be omitted. 544Within this format, any of the elements in braces may be omitted.
563Here, @var{fontname} is the @dfn{family name} of the font, such as 545Here, @var{fontname} is the @dfn{family name} of the font, such as
564@samp{Monospace} or @samp{DejaVu Serif}; @var{fontsize} is the 546@samp{Monospace} or @samp{DejaVu Sans Mono}; @var{fontsize} is the
565@dfn{point size} of the font (one @dfn{printer's point} is about 1/72 547@dfn{point size} of the font (one @dfn{printer's point} is about 1/72
566of an inch); and the @samp{@var{name}=@var{values}} entries specify 548of an inch); and the @samp{@var{name}=@var{values}} entries specify
567settings such as the slant and weight of the font. Each @var{values} 549settings such as the slant and weight of the font. Each @var{values}
@@ -574,7 +556,7 @@ Here is a list of common font properties:
574 556
575@table @samp 557@table @samp
576@item slant 558@item slant
577One of @samp{italic}, @samp{oblique} or @samp{roman}. 559One of @samp{italic}, @samp{oblique}, or @samp{roman}.
578 560
579@item weight 561@item weight
580One of @samp{light}, @samp{medium}, @samp{demibold}, @samp{bold} or 562One of @samp{light}, @samp{medium}, @samp{demibold}, @samp{bold} or
@@ -608,8 +590,9 @@ For a more detailed description of Fontconfig patterns, see the
608Fontconfig manual, which is distributed with Fontconfig and available 590Fontconfig manual, which is distributed with Fontconfig and available
609online at @url{http://fontconfig.org/fontconfig-user.html}. 591online at @url{http://fontconfig.org/fontconfig-user.html}.
610 592
611 The second way to specify a font is to use a @dfn{GTK font 593@cindex GTK font pattern
612description}. These have the syntax 594 The second way to specify a font is to use a @dfn{GTK font pattern}.
595These have the syntax
613 596
614@smallexample 597@smallexample
615@var{fontname} [@var{properties}] [@var{fontsize}] 598@var{fontname} [@var{properties}] [@var{fontsize}]
@@ -618,20 +601,24 @@ description}. These have the syntax
618@noindent 601@noindent
619where @var{fontname} is the family name, @var{properties} is a list of 602where @var{fontname} is the family name, @var{properties} is a list of
620property values separated by spaces, and @var{fontsize} is the point 603property values separated by spaces, and @var{fontsize} is the point
621size. The properties that you may specify are as follows: 604size. The properties that you may specify for GTK font patterns are
605as follows:
622 606
623@table @samp 607@itemize
624@item style 608@item
625One of @samp{roman}, @samp{italic} or @samp{oblique}. If omitted, the 609Slant properties: @samp{Italic} or @samp{Oblique}. If omitted, the
626@samp{roman} style is used. 610default (roman) slant is implied.
627@item weight 611@item
628One of @samp{medium}, @samp{ultra-light}, @samp{light}, 612Weight properties: @samp{Bold}, @samp{Book}, @samp{Light},
629@samp{semi-bold}, or @samp{bold}. If omitted, @samp{medium} weight is 613@samp{Medium}, @samp{Semi-bold}, or @samp{Ultra-light}. If omitted,
630used. 614@samp{Medium} weight is implied.
631@end table 615@item
616Width properties: @samp{Semi-Condensed} or @samp{Condensed}. If
617omitted, a default width is used.
618@end itemize
632 619
633@noindent 620@noindent
634Here are some examples of GTK font descriptions: 621Here are some examples of GTK font patterns:
635 622
636@smallexample 623@smallexample
637Monospace 12 624Monospace 12
@@ -683,8 +670,8 @@ The font width---normally @samp{normal}, @samp{condensed},
683@samp{extended}, or @samp{semicondensed} (some font names support 670@samp{extended}, or @samp{semicondensed} (some font names support
684other values). 671other values).
685@item style 672@item style
686An optional additional style name. Usually it is empty---most long 673An optional additional style name. Usually it is empty---most XLFDs
687font names have two hyphens in a row at this point. 674have two hyphens in a row at this point.
688@item pixels 675@item pixels
689The font height, in pixels. 676The font height, in pixels.
690@item height 677@item height
@@ -853,116 +840,40 @@ input stream for each server. Each server also has its own selected
853frame. The commands you enter with a particular X server apply to 840frame. The commands you enter with a particular X server apply to
854that server's selected frame. 841that server's selected frame.
855 842
856 It is even possible to use this feature to let two or more users 843@node Frame Parameters
857type simultaneously on the two displays, within the same Emacs job. 844@section Frame Parameters
858In practice, however, the different users can easily interfere with 845@cindex default-frame-alist
859each others' edits if they are not careful.
860
861@node Special Buffer Frames
862@section Special Buffer Frames
863
864@vindex special-display-buffer-names
865 You can make certain chosen buffers, which Emacs normally displays
866in ``some other window'' (@pxref{Displaying Buffers}), appear in
867special frames of their own. To do this, set the variable
868@code{special-display-buffer-names} to a list of buffer names; any
869buffer whose name is in that list automatically gets a special frame.
870@xref{Window Choice}, for how this fits in with the other ways for
871Emacs to choose a window to display in.
872
873 For example, if you set the variable this way,
874 846
875@example 847 You can control the default appearance and behavior of all frames by
876(setq special-display-buffer-names 848specifying a default list of @dfn{frame parameters} in the variable
877 '("*Completions*" "*grep*" "*tex-shell*")) 849@code{default-frame-alist}. Its value should be a list of entries,
878@end example 850each specifying a parameter name and a value for that parameter.
851These entries take effect whenever Emacs creates a new frame,
852including the initial frame.
879 853
880@noindent 854@cindex frame size, specifying default
881then completion lists, @code{grep} output and the @TeX{} mode shell 855 For example, you can add the following lines to your init file
882buffer get individual frames of their own. These frames, and the 856(@pxref{Init File}) to set the default frame width to 90 character
883windows in them, are never automatically split or reused for any other 857columns, the default frame height to 40 character rows, and the
884buffers. They continue to show the buffers they were created for, 858default font to @samp{Monospace-10}:
885unless you alter them by hand. Killing the special buffer deletes its
886frame automatically.
887
888@vindex special-display-regexps
889 More generally, you can set @code{special-display-regexps} to a list
890of regular expressions; then a buffer gets its own frame if its name
891matches any of those regular expressions. (Once again, this applies only
892to buffers that normally get displayed for you in ``another window.'')
893
894@vindex special-display-frame-alist
895 The variable @code{special-display-frame-alist} specifies the frame
896parameters for these frames. It has a default value, so you don't need
897to set it.
898
899 For those who know Lisp, an element of
900@code{special-display-buffer-names} or @code{special-display-regexps}
901can also be a list. Then the first element is the buffer name or
902regular expression; the rest of the list specifies how to create the
903frame. It can be an association list specifying frame parameter
904values; these values take precedence over parameter values specified
905in @code{special-display-frame-alist}. If you specify the symbol
906@code{same-window} as a ``frame parameter'' in this list, with a
907non-@code{nil} value, that means to use the selected window if
908possible. If you use the symbol @code{same-frame} as a ``frame
909parameter'' in this list, with a non-@code{nil} value, that means to
910use the selected frame if possible.
911
912 Alternatively, the value can have this form:
913 859
914@example 860@example
915(@var{function} @var{args}...) 861(add-to-list 'default-frame-alist '(width . 90))
862(add-to-list 'default-frame-alist '(height . 40))
863(add-to-list 'default-frame-alist '(font . "Monospace-10"))
916@end example 864@end example
917 865
918@noindent 866 For a list of frame parameters and their effects, see @ref{Frame
919where @var{function} is a symbol. Then the frame is constructed by 867Parameters,,, elisp, The Emacs Lisp Reference Manual}.
920calling @var{function}; its first argument is the buffer, and its
921remaining arguments are @var{args}.
922
923@node Frame Parameters
924@section Setting Frame Parameters
925@cindex Auto-Raise mode
926@cindex Auto-Lower mode
927
928 These commands are available for controlling the window management
929behavior of the selected frame:
930 868
931@table @kbd 869@cindex initial-frame-alist
932@findex auto-raise-mode 870 You can also specify a list of frame parameters which apply to just
933@item M-x auto-raise-mode 871the initial frame, by customizing the variable
934Toggle whether or not the selected frame should auto-raise. Auto-raise 872@code{initial-frame-alist}.
935means that every time you move the mouse onto the frame, it raises the
936frame.
937
938Some window managers also implement auto-raise. If you enable
939auto-raise for Emacs frames in your window manager, it will work, but
940it is beyond Emacs' control, so @code{auto-raise-mode} has no effect
941on it.
942
943@findex auto-lower-mode
944@item M-x auto-lower-mode
945Toggle whether or not the selected frame should auto-lower.
946Auto-lower means that every time you move the mouse off the frame,
947the frame moves to the bottom of the stack on the screen.
948
949The command @code{auto-lower-mode} has no effect on auto-lower
950implemented by the window manager. To control that, you must use the
951appropriate window manager features.
952@end table
953 873
954 In Emacs versions that use an X toolkit, the color-setting and 874 If Emacs is compiled to use an X toolkit, frame parameters that
955font-setting functions don't affect menus and the menu bar, since they 875specify colors and fonts don't affect menus and the menu bar, since
956are displayed by their own widget classes. To change the appearance of 876those are drawn by the toolkit and not directly by Emacs.
957the menus and menu bar, you must use X resources (@pxref{Resources}).
958@xref{Colors}, regarding colors. @xref{Font X}, regarding choice of
959font.
960
961 Colors, fonts, and other attributes of the frame's display can also
962be customized by setting frame parameters in the variable
963@code{default-frame-alist} (@pxref{Creating Frames}). For a detailed
964description of frame parameters and customization, see @ref{Frame
965Parameters,,, elisp, The Emacs Lisp Reference Manual}.
966 877
967@node Scroll Bars 878@node Scroll Bars
968@section Scroll Bars 879@section Scroll Bars
@@ -1007,41 +918,17 @@ or disable the scroll bars (@pxref{Resources}). To control the scroll
1007bar width, change the @code{scroll-bar-width} frame parameter 918bar width, change the @code{scroll-bar-width} frame parameter
1008(@pxref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}). 919(@pxref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}).
1009 920
1010@node Wheeled Mice
1011@section Scrolling With ``Wheeled'' Mice
1012
1013@cindex mouse wheel
1014@cindex wheel, mouse
1015@findex mouse-wheel-mode
1016@cindex Mouse Wheel minor mode
1017@cindex mode, Mouse Wheel
1018 Some mice have a ``wheel'' instead of a third button. You can
1019usually click the wheel to act as either @kbd{Mouse-2} or
1020@kbd{Mouse-3}, depending on the setup. You can also use the wheel to
1021scroll windows instead of using the scroll bar or keyboard commands.
1022Mouse wheel support only works if the system generates appropriate
1023events; whenever possible, it is turned on by default. To toggle this
1024feature, use @kbd{M-x mouse-wheel-mode}.
1025
1026@vindex mouse-wheel-follow-mouse
1027@vindex mouse-wheel-scroll-amount
1028@vindex mouse-wheel-progressive-speed
1029 The two variables @code{mouse-wheel-follow-mouse} and
1030@code{mouse-wheel-scroll-amount} determine where and by how much
1031buffers are scrolled. The variable
1032@code{mouse-wheel-progressive-speed} determines whether the scroll
1033speed is linked to how fast you move the wheel.
1034
1035@node Drag and Drop 921@node Drag and Drop
1036@section Drag and Drop 922@section Drag and Drop
1037@cindex drag and drop 923@cindex drag and drop
1038 924
1039 Emacs supports @dfn{drag and drop} using the mouse. For instance, 925 In most graphical desktop environments, Emacs has basic support for
1040dropping text onto an Emacs frame inserts the text where it is dropped. 926@dfn{drag and drop} operations. For instance, dropping text onto an
1041Dropping a file onto an Emacs frame visits that file. As a special 927Emacs frame inserts the text where it is dropped. Dropping a file
1042case, dropping the file on a Dired buffer moves or copies the file 928onto an Emacs frame visits that file. As a special case, dropping the
1043(according to the conventions of the application it came from) into the 929file on a Dired buffer moves or copies the file (according to the
1044directory displayed in that buffer. 930conventions of the application it came from) into the directory
931displayed in that buffer.
1045 932
1046@vindex dnd-open-file-other-window 933@vindex dnd-open-file-other-window
1047 Dropping a file normally visits it in the window you drop it on. If 934 Dropping a file normally visits it in the window you drop it on. If
@@ -1058,13 +945,12 @@ protocol, are currently supported.
1058@findex menu-bar-mode 945@findex menu-bar-mode
1059@vindex menu-bar-mode 946@vindex menu-bar-mode
1060 947
1061 You can turn display of menu bars on or off with @kbd{M-x 948 You can toggle the use of menu bars with @kbd{M-x menu-bar-mode}.
1062menu-bar-mode} or by customizing the variable @code{menu-bar-mode}. 949With no argument, this command toggles Menu Bar mode, a global minor
1063With no argument, this command toggles Menu Bar mode, a 950mode. With an argument, the command turns Menu Bar mode on if the
1064minor mode. With an argument, the command turns Menu Bar mode on if the 951argument is positive, off if the argument is not positive. To control
1065argument is positive, off if the argument is not positive. You can use 952the use of menu bars at startup, customize the variable
1066the X resource @samp{menuBar} to control the initial setting of 953@code{menu-bar-mode}.
1067Menu Bar mode. @xref{Resources}.
1068 954
1069@kindex C-Mouse-3 @r{(when menu bar is disabled)} 955@kindex C-Mouse-3 @r{(when menu bar is disabled)}
1070 Expert users often turn off the menu bar, especially on text-only 956 Expert users often turn off the menu bar, especially on text-only
@@ -1148,47 +1034,39 @@ toggle to be activated by default, change the variable
1148help text to the GTK+ file chooser dialog; to disable this help text, 1034help text to the GTK+ file chooser dialog; to disable this help text,
1149change the variable @code{x-gtk-file-dialog-help-text} to @code{nil}. 1035change the variable @code{x-gtk-file-dialog-help-text} to @code{nil}.
1150 1036
1151@vindex x-gtk-use-old-file-dialog
1152 In GTK+ versions 2.4 through 2.10, you can choose to use an older
1153version of the GTK+ file dialog by setting the variable
1154@code{x-gtk-use-old-file-dialog} to a non-@code{nil} value. If Emacs
1155is built with a GTK+ version that has only one file dialog, this
1156variable has no effect.
1157
1158@node Tooltips 1037@node Tooltips
1159@section Tooltips 1038@section Tooltips
1160@cindex tooltips 1039@cindex tooltips
1161 1040
1162 @dfn{Tooltips} are small windows that display text information at the 1041 @dfn{Tooltips} are small windows that display text information at
1163current mouse position. They activate when there is a pause in mouse 1042the current mouse position. They activate when there is a pause in
1164movement. There are two types of tooltip: help tooltips and GUD 1043mouse movement over some significant piece of text in a window, or the
1165tooltips. 1044mode line, or some other part of the Emacs frame such as a tool bar
1166 1045button or menu item.
1167 @dfn{Help tooltips} typically display over text---including the mode
1168line---but are also available for other parts of the Emacs frame, such
1169as the tool bar and menu items.
1170 1046
1171@findex tooltip-mode 1047@findex tooltip-mode
1172 You can toggle display of help tooltips (Tooltip mode) with the 1048 You can toggle the use of tooltips with the command @kbd{M-x
1173command @kbd{M-x tooltip-mode}. When Tooltip mode is disabled, the 1049tooltip-mode}. When Tooltip mode is disabled, the help text is
1174help text is displayed in the echo area instead. 1050displayed in the echo area instead. To control the use of tooltips at
1175 1051startup, customize the variable @code{tooltip-mode}.
1176 @dfn{GUD tooltips} show values of variables. They are useful when
1177you are debugging a program. @xref{Debugger Operation}.
1178 1052
1179@vindex tooltip-delay 1053@vindex tooltip-delay
1180 The variables @code{tooltip-delay} specifies how long Emacs should 1054 The variables @code{tooltip-delay} specifies how long Emacs should
1181wait before displaying a tooltip. For additional customization 1055wait before displaying a tooltip. For additional customization
1182options for displaying tooltips, use @kbd{M-x customize-group 1056options for displaying tooltips, use @kbd{M-x customize-group
1183@key{RET} tooltip @key{RET}}. @xref{X Resources}, for information on 1057@key{RET} tooltip @key{RET}}.
1184customizing the windows that display tooltips.
1185 1058
1186@vindex x-gtk-use-system-tooltips 1059@vindex x-gtk-use-system-tooltips
1187 If Emacs is built with GTK+ support, it displays tooltips via GTK+, 1060 If Emacs is built with GTK+ support, it displays tooltips via GTK+,
1188using the default appearance of GTK+ tooltips. To disable this, 1061using the default appearance of GTK+ tooltips. To disable this,
1189change the variable @code{x-gtk-use-system-tooltips} to @code{nil}. 1062change the variable @code{x-gtk-use-system-tooltips} to @code{nil}.
1190If you do this, or if Emacs is built without GTK+ support, the 1063If you do this, or if Emacs is built without GTK+ support, most
1191@code{tooltip} face specifies most attributes of the tooltip text. 1064attributes of the tooltip text are specified by the @code{tooltip}
1065face, and by X resources (@pxref{X Resources}).
1066
1067 @dfn{GUD tooltips} are special tooltips that show the values of
1068variables when debugging a program with GUD. @xref{Debugger
1069Operation}.
1192 1070
1193@node Mouse Avoidance 1071@node Mouse Avoidance
1194@section Mouse Avoidance 1072@section Mouse Avoidance
@@ -1261,23 +1139,31 @@ to select a frame according to its name. The name you specify appears
1261in the mode line when the frame is selected. 1139in the mode line when the frame is selected.
1262 1140
1263@node Text-Only Mouse 1141@node Text-Only Mouse
1264@section Using a Mouse in Terminal Emulators 1142@section Using a Mouse in Text-only Terminals
1265@cindex mouse support 1143@cindex mouse support
1266@cindex terminal emulators, mouse support 1144@cindex terminal emulators, mouse support
1267 1145
1268Some text-only terminals support mouse clicks in the terminal window. 1146Some text-only terminals support mouse clicks in the terminal window.
1269 1147
1270@cindex xterm 1148@cindex xterm
1271In a terminal emulator which is compatible with @code{xterm}, 1149 In a terminal emulator which is compatible with @command{xterm}, you
1272you can use @kbd{M-x xterm-mouse-mode} to give Emacs control over 1150can use @kbd{M-x xterm-mouse-mode} to give Emacs control over simple
1273simple use of the mouse---basically, only non-modified single clicks 1151uses of the mouse---basically, only non-modified single clicks are
1274are supported. The normal @code{xterm} mouse functionality for such 1152supported. The normal @command{xterm} mouse functionality for such
1275clicks is still available by holding down the @kbd{SHIFT} key when you 1153clicks is still available by holding down the @kbd{SHIFT} key when you
1276press the mouse button. Xterm Mouse mode is a global minor mode 1154press the mouse button. Xterm Mouse mode is a global minor mode
1277(@pxref{Minor Modes}). Repeating the command turns the mode off 1155(@pxref{Minor Modes}). Repeating the command turns the mode off
1278again. 1156again.
1279 1157
1280@findex gpm-mouse-mode 1158@findex gpm-mouse-mode
1281In the console on GNU/Linux, you can use @kbd{M-x gpm-mouse-mode} to 1159 In the console on GNU/Linux, you can use @kbd{M-x gpm-mouse-mode} to
1282enable terminal mouse support. You must have the gpm package 1160enable mouse support. You must have the gpm server installed and
1283installed and running on your system in order for this to work. 1161running on your system in order for this to work.
1162
1163@iftex
1164@pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features},
1165@end iftex
1166@ifnottex
1167@pxref{MS-DOS Mouse},
1168@end ifnottex
1169for information about mouse support on MS-DOS.
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index c44b67454a2..dec6ba9a4f8 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -385,7 +385,8 @@ change @code{pop-up-frames} (see below) to @code{t}.
385@item 385@item
386Otherwise, if you specified that the buffer should be displayed in a 386Otherwise, if you specified that the buffer should be displayed in a
387special frame by customizing @code{special-display-buffer-names} or 387special frame by customizing @code{special-display-buffer-names} or
388@code{special-display-regexps}, do so. @xref{Special Buffer Frames}. 388@code{special-display-regexps}, do so. @xref{Choosing Window
389Options,,, elisp, The Emacs Lisp Reference Manual}.
389 390
390@vindex pop-up-frames 391@vindex pop-up-frames
391@item 392@item