aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/emacs/frames.texi255
1 files changed, 119 insertions, 136 deletions
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 54e64b052e9..b5457f22a3d 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -202,7 +202,7 @@ always kill the region if one exists.
202time. Emacs activates the region around the selected text, which is 202time. Emacs activates the region around the selected text, which is
203also copied to the kill ring. 203also copied to the kill ring.
204 204
205@table @kbd 205@table @key
206@item Double-Mouse-1 206@item Double-Mouse-1
207Select the text around the word which you click on. 207Select the text around the word which you click on.
208 208
@@ -299,10 +299,10 @@ second similar facility known as the @dfn{secondary selection}.
299Nowadays, few X applications make use of the secondary selection, but 299Nowadays, few X applications make use of the secondary selection, but
300you can access it using the following Emacs commands: 300you can access it using the following Emacs commands:
301 301
302@table @kbd 302@table @key
303@findex mouse-set-secondary 303@findex mouse-set-secondary
304@kindex M-Drag-Mouse-1 304@kindex M-Drag-Mouse-1
305@item M-@key{Drag-Mouse-1} 305@item M-Drag-Mouse-1
306Set the secondary selection, with one end at the place where you press 306Set the secondary selection, with one end at the place where you press
307down the button, and the other end at the place where you release it 307down the button, and the other end at the place where you release it
308(@code{mouse-set-secondary}). The selected text is highlighted, using 308(@code{mouse-set-secondary}). The selected text is highlighted, using
@@ -314,13 +314,13 @@ This command does not alter the kill ring.
314 314
315@findex mouse-start-secondary 315@findex mouse-start-secondary
316@kindex M-Mouse-1 316@kindex M-Mouse-1
317@item M-@key{Mouse-1} 317@item M-Mouse-1
318Set one endpoint for the @dfn{secondary selection} 318Set one endpoint for the @dfn{secondary selection}
319(@code{mouse-start-secondary}). 319(@code{mouse-start-secondary}).
320 320
321@findex mouse-secondary-save-then-kill 321@findex mouse-secondary-save-then-kill
322@kindex M-Mouse-3 322@kindex M-Mouse-3
323@item M-@key{Mouse-3} 323@item M-Mouse-3
324Set the secondary selection, with one end at the position clicked and 324Set the secondary selection, with one end at the position clicked and
325the other at the position specified with @kbd{M-Mouse-1} 325the other at the position specified with @kbd{M-Mouse-1}
326(@code{mouse-secondary-save-then-kill}). This also puts the selected 326(@code{mouse-secondary-save-then-kill}). This also puts the selected
@@ -329,18 +329,17 @@ place kills the secondary selection just made.
329 329
330@findex mouse-yank-secondary 330@findex mouse-yank-secondary
331@kindex M-Mouse-2 331@kindex M-Mouse-2
332@item M-@key{Mouse-2} 332@item M-Mouse-2
333Insert the secondary selection where you click, placing point at the 333Insert the secondary selection where you click, placing point at the
334end of the yanked text (@code{mouse-yank-secondary}). 334end of the yanked text (@code{mouse-yank-secondary}).
335@end table 335@end table
336 336
337Double or triple clicking of @kbd{M-@key{Mouse-1}} operates on words 337Double or triple clicking of @key{M-Mouse-1} operates on words and
338and lines, much like @key{Mouse-1}. 338lines, much like @key{Mouse-1}.
339 339
340If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-@key{Mouse-2}} 340If @code{mouse-yank-at-point} is non-@code{nil}, @key{M-Mouse-2} yanks
341yanks at point. Then it does not matter precisely where you click, or 341at point. Then it does not matter precisely where you click, or even
342even which of the frame's windows you click on. @xref{Mouse 342which of the frame's windows you click on. @xref{Mouse Commands}.
343Commands}.
344 343
345@node Clipboard 344@node Clipboard
346@subsection Using the Clipboard 345@subsection Using the Clipboard
@@ -381,50 +380,46 @@ MS-Windows and Mac OS, but not on other systems.
381@kindex Mouse-1 @r{(selection)} 380@kindex Mouse-1 @r{(selection)}
382@kindex Mouse-2 @r{(selection)} 381@kindex Mouse-2 @r{(selection)}
383 382
384 Some Emacs buffers include references you can follow, or commands 383@vindex mouse-highlight
385you can activate. These include names of files, of buffers, of 384 Some Emacs buffers include @dfn{buttons} which perform some action,
386possible completions, of matches for a pattern, as well as the buttons 385such as following a reference. A button is a stretch of text that
387in Help buffers and customization buffers. You can follow the 386usually stands out in some way; it may be underlined, or a box may be
388reference or activate the command by moving point to it and typing 387drawn around it. If you move the mouse over a button, the shape of
389@key{RET}. You can also do this with the mouse, using either 388the mouse cursor changes and the button lights up (if you change the
390@kbd{Mouse-1} or @kbd{Mouse-2}. 389variable @code{mouse-highlight} to @code{nil}, Emacs disables this
391 390highlighting).
392 Since yanking text into a read-only buffer is not allowed, these 391
393buffers generally define @kbd{Mouse-2} to follow a reference or 392 You can activate a button by moving point to it and typing
394activate a command. For example, if you click @kbd{Mouse-2} on a file 393@key{RET}, or by clicking either @kbd{Mouse-1} or @kbd{Mouse-2} on the
395name in a Dired buffer, you visit that file. If you click 394button. For example, typing @key{RET} or clicking on a file name in a
396@kbd{Mouse-2} on an error message in the @samp{*Compilation*} buffer, 395Dired buffer visits that file (@pxref{Dired}). Doing it on an error
397you go to the source code for that error message. If you click 396message in the @samp{*Compilation*} buffer goes to the source code for
398@kbd{Mouse-2} on a completion in the @samp{*Completions*} buffer, you 397that error message (@pxref{Compilation}). Doing it on a completion in
399choose that completion. 398the @samp{*Completions*} buffer chooses that completion
400 399(@pxref{Completion}).
401 However, most applications use @kbd{Mouse-1} to do this sort of 400
402thing, so Emacs implements this too. If you click @kbd{Mouse-1} 401 Although clicking @key{Mouse-1} on a button usually activates that
403quickly on a reference or button, it follows or activates. If you 402button, if you hold the mouse button down for a short period of time
404click slowly, it moves point as usual. Dragging, meaning moving the 403before releasing it (specifically, for more than 450 milliseconds),
405mouse while it is held down, also has its usual behavior of setting 404then Emacs moves point where you clicked instead. This behavior
406the region. 405allows you to use the mouse to move point over a button without
406following it. Dragging, meaning moving the mouse while it is held
407down, has its usual behavior of setting the region.
407 408
408@vindex mouse-1-click-in-non-selected-windows 409@vindex mouse-1-click-in-non-selected-windows
409 Normally, the @kbd{Mouse-1} click behavior is performed on links in 410 Normally, clicking @key{Mouse-1} on a button activates the button
410any window. The variable @code{mouse-1-click-in-non-selected-windows} 411even if it is in an un-selected window. If you change the variable
411controls whether @kbd{Mouse-1} has this behavior even in non-selected 412@code{mouse-1-click-in-non-selected-windows} to @code{nil}, clicking
412windows, or only in the selected window. 413@key{Mouse-1} on a button in an un-selected window moves point to the
413 414clicked position and selects that window, without activating the
414@vindex mouse-highlight 415button.
415 You can usually tell when @kbd{Mouse-1} and @kbd{Mouse-2} have this
416special sort of meaning because the sensitive text highlights when you
417move the mouse over it. The variable @code{mouse-highlight} controls
418whether to do this highlighting always (even when such text appears
419where the mouse already is), never, or only immediately after you move
420the mouse.
421 416
422@vindex mouse-1-click-follows-link 417@vindex mouse-1-click-follows-link
423 In Emacs versions before 22, only @kbd{Mouse-2} follows links and 418 In Emacs versions before 22, only @kbd{Mouse-2} activates buttons
424@kbd{Mouse-1} always sets point. If you prefer this older behavior, 419and @kbd{Mouse-1} always sets point. If you prefer this older
425set the variable @code{mouse-1-click-follows-link} to @code{nil}. 420behavior, set the variable @code{mouse-1-click-follows-link} to
426This variable also lets you choose various other alternatives for 421@code{nil}. This variable also lets you choose various other
427following links with the mouse. Type @kbd{C-h v 422alternatives for following links with the mouse. Type @kbd{C-h v
428mouse-1-click-follows-link @key{RET}} for more details. 423mouse-1-click-follows-link @key{RET}} for more details.
429 424
430@node Menu Mouse Clicks 425@node Menu Mouse Clicks
@@ -433,7 +428,7 @@ mouse-1-click-follows-link @key{RET}} for more details.
433 Several mouse clicks with the @key{CTRL} and @key{SHIFT} modifiers 428 Several mouse clicks with the @key{CTRL} and @key{SHIFT} modifiers
434bring up menus. 429bring up menus.
435 430
436@table @kbd 431@table @key
437@item C-Mouse-1 432@item C-Mouse-1
438@kindex C-Mouse-1 433@kindex C-Mouse-1
439This menu is for selecting a buffer. 434This menu is for selecting a buffer.
@@ -461,7 +456,8 @@ present in the menu bar---not just the mode-specific ones---so that
461you can access them without having to display the menu bar. 456you can access them without having to display the menu bar.
462 457
463@item S-Mouse-1 458@item S-Mouse-1
464This menu is for specifying the frame's default font. 459This menu is for changing the default face within the window's buffer.
460@xref{Temporary Face Changes}.
465@end table 461@end table
466 462
467@node Mode Line Mouse 463@node Mode Line Mouse
@@ -557,8 +553,8 @@ frame. This runs @code{find-file-read-only-other-frame}.
557 553
558@cindex default-frame-alist 554@cindex default-frame-alist
559@cindex initial-frame-alist 555@cindex initial-frame-alist
560@cindex face customization, in @file{~/.emacs} 556@cindex face customization, in init file
561@cindex color customization, in @file{~/.emacs} 557@cindex color customization, in init file
562 You can control the appearance of new frames you create by setting the 558 You can control the appearance of new frames you create by setting the
563frame parameters in @code{default-frame-alist}. You can use the 559frame parameters in @code{default-frame-alist}. You can use the
564variable @code{initial-frame-alist} to specify parameters that affect 560variable @code{initial-frame-alist} to specify parameters that affect
@@ -566,10 +562,9 @@ only the initial frame. @xref{Initial Parameters,,, elisp, The Emacs
566Lisp Reference Manual}, for more information. 562Lisp Reference Manual}, for more information.
567 563
568@cindex font (default) 564@cindex font (default)
569 The easiest way to specify the principal font for all your Emacs 565 For instance, one way to specify the principal font for all your
570frames is with an X resource (@pxref{Font X}), but you can also do it by 566Emacs frames is to modify @code{default-frame-alist} to specify the
571modifying @code{default-frame-alist} to specify the @code{font} 567@code{font} parameter (@pxref{Font X}):
572parameter, as shown here:
573 568
574@example 569@example
575(add-to-list 'default-frame-alist '(font . "10x20")) 570(add-to-list 'default-frame-alist '(font . "10x20"))
@@ -583,9 +578,9 @@ Here's a similar example for specifying a foreground color:
583@end example 578@end example
584 579
585@noindent 580@noindent
586By putting such customizations in your @file{~/.emacs} init file, you 581By putting such customizations in your init file, you can control the
587can control the appearance of all the frames Emacs creates, including 582appearance of all the frames Emacs creates, including the initial one.
588the initial one. 583@xref{Init File}.
589 584
590@node Frame Commands 585@node Frame Commands
591@section Frame Commands 586@section Frame Commands
@@ -598,24 +593,20 @@ the initial one.
598@findex iconify-or-deiconify-frame 593@findex iconify-or-deiconify-frame
599Iconify the selected Emacs frame (@code{iconify-or-deiconify-frame}). 594Iconify the selected Emacs frame (@code{iconify-or-deiconify-frame}).
600When typed on an Emacs frame's icon, deiconify instead. 595When typed on an Emacs frame's icon, deiconify instead.
601 596@xref{Exiting}.
602The normal meaning of @kbd{C-z}, to suspend Emacs, is not useful under
603a graphical display that allows multiple applications to operate
604simultaneously in their own windows, so Emacs gives @kbd{C-z} a
605different binding in that case.
606 597
607@item C-x 5 0 598@item C-x 5 0
608@kindex C-x 5 0 599@kindex C-x 5 0
609@findex delete-frame 600@findex delete-frame
610Delete the selected frame (@code{delete-frame}). This is not allowed if 601Delete the selected frame (@code{delete-frame}). This is not allowed
611there is only one frame. 602if there is only one frame.
612 603
613@item C-x 5 o 604@item C-x 5 o
614@kindex C-x 5 o 605@kindex C-x 5 o
615@findex other-frame 606@findex other-frame
616Select another frame, raise it, and warp the mouse to it so that it 607Select another frame, raise it, and warp the mouse to it. If you
617stays selected. If you repeat this command, it cycles through all the 608repeat this command, it cycles through all the frames on your
618frames on your terminal. 609terminal.
619 610
620@item C-x 5 1 611@item C-x 5 1
621@kindex C-x 5 1 612@kindex C-x 5 1
@@ -624,21 +615,20 @@ Delete all frames except the selected one.
624@end table 615@end table
625 616
626@vindex focus-follows-mouse 617@vindex focus-follows-mouse
627 To make the command @kbd{C-x 5 o} work properly, you must tell Emacs 618 To make the command @kbd{C-x 5 o} work properly, you should tell
628how the system (or the window manager) generally handles 619Emacs how the system (or the window manager) handles focus-switching
629focus-switching between windows. There are two possibilities: either 620between windows. There are two possibilities: either simply moving
630simply moving the mouse onto a window selects it (gives it focus), or 621the mouse onto a window selects it (gives it focus), or you have to
631you have to click on it in a suitable way to do so. On X, this focus 622click on it to do so. On X, this focus policy also affects whether
632policy also affects whether the focus is given to a frame that Emacs 623the focus is given to a frame that Emacs raises. Unfortunately there
633raises. Unfortunately there is no way Emacs can find out 624is no way Emacs can find out automatically which way the system
634automatically which way the system handles this, so you have to 625handles this, so you have to explicitly say, by setting the variable
635explicitly say, by setting the variable @code{focus-follows-mouse}. 626@code{focus-follows-mouse}. If just moving the mouse onto a window
636If just moving the mouse onto a window selects it, that variable 627selects it, that variable should be @code{t}; if a click is necessary,
637should be @code{t}; if a click is necessary, the variable should be 628the variable should be @code{nil}. The default is @code{t}.
638@code{nil}. 629
639 630 The window manager that is part of MS-Windows always gives focus to
640The window manager that is part of MS-Windows always gives focus to a 631a frame that raises, so this variable has no effect in the native
641frame that raises, so this variable has no effect in the native
642MS-Windows build of Emacs. 632MS-Windows build of Emacs.
643 633
644@node Speedbar 634@node Speedbar
@@ -721,15 +711,14 @@ single keyboard, and it treats all the commands arriving from these
721screens as a single stream of input. 711screens as a single stream of input.
722 712
723 When you open frames on different X servers, Emacs makes a separate 713 When you open frames on different X servers, Emacs makes a separate
724input stream for each server. This way, two users can type 714input stream for each server. Each server also has its own selected
725simultaneously on the two displays, and Emacs will not garble their 715frame. The commands you enter with a particular X server apply to
726input. Each server also has its own selected frame. The commands you 716that server's selected frame.
727enter with a particular X server apply to that server's selected frame.
728 717
729 Despite these features, people using the same Emacs job from different 718 It is even possible to use this feature to let two or more users
730displays can still interfere with each other if they are not careful. 719type simultaneously on the two displays, within the same Emacs job.
731For example, if any one types @kbd{C-x C-c}, that exits the Emacs job 720In practice, however, the different users can easily interfere with
732for all of them! 721each others' edits if they are not careful.
733 722
734@node Special Buffer Frames 723@node Special Buffer Frames
735@section Special Buffer Frames 724@section Special Buffer Frames
@@ -804,16 +793,8 @@ whether that feature is also in use for the same buffer name.
804@cindex Auto-Raise mode 793@cindex Auto-Raise mode
805@cindex Auto-Lower mode 794@cindex Auto-Lower mode
806 795
807@kindex S-Mouse-1
808 You can specify the font and colors used for text display, and the
809colors for the frame borders, the cursor, and the mouse cursor, by
810customizing the faces @code{default}, @code{border}, @code{cursor} and
811@code{mouse}. @xref{Face Customization}. You can also set a frame's
812default font through a pop-up menu. Press @kbd{S-Mouse-1} to activate
813this menu.
814
815 These commands are available for controlling the window management 796 These commands are available for controlling the window management
816behavior of the selected frame. 797behavior of the selected frame:
817 798
818@table @kbd 799@table @kbd
819@findex auto-raise-mode 800@findex auto-raise-mode
@@ -857,43 +838,45 @@ Parameters,,, elisp, The Emacs Lisp Reference Manual}.
857@cindex mode, Scroll Bar 838@cindex mode, Scroll Bar
858 839
859 On graphical displays, Emacs normally makes a @dfn{scroll bar} at 840 On graphical displays, Emacs normally makes a @dfn{scroll bar} at
860the left of each Emacs window.@footnote{Placing it at the left is 841the left of each Emacs window, and running the height of the
861usually more useful with overlapping frames with text starting at the 842window.@footnote{Placing it at the left is usually more useful with
862left margin.} The scroll bar runs the height of the window, and shows 843overlapping frames with text starting at the left margin.}
863a moving rectangular inner box which represents the portion of the 844
864buffer currently displayed. The entire height of the scroll bar 845 When Emacs is compiled with GTK support on the X window system, or
865represents the entire length of the buffer. 846in operating systems such as Microsoft Windows or Mac OS, you can use
866 847the scroll bar as you do in other graphical applications. If you
867 You can use @kbd{Mouse-2} (normally, the middle button) in the scroll 848click @key{Mouse-1} on the scroll bar's up and down buttons, that
868bar to move or drag the inner box up and down. If you move it to the 849scrolls the window by one line at a time. Clicking @key{Mouse-1}
869top of the scroll bar, you see the top of the buffer. If you move it to 850above or below the scroll bar's inner box scrolls the window by nearly
870the bottom of the scroll bar, you see the bottom of the buffer. 851the entire height of the window, like @kbd{M-v} and @kbd{C-v}
871 852respectively (@pxref{Moving Point}). Dragging the inner box with
872 The left and right buttons in the scroll bar scroll by controlled 853@key{Mouse-1} scrolls the window continuously.
873increments. @kbd{Mouse-1} (normally, the left button) moves the line at 854
874the level where you click up to the top of the window. @kbd{Mouse-3} 855 If Emacs is compiled without GTK support on the X window system, the
875(normally, the right button) moves the line at the top of the window 856scroll bar behaves differently. The scroll bar's inner box is drawn
876down to the level where you click. By clicking repeatedly in the same 857to represent the portion of the buffer currently displayed, with the
877place, you can scroll by the same distance over and over. 858entire height of the scroll bar representing the entire length of the
859buffer. @key{Mouse-1} anywhere on the scroll bar scrolls forward like
860@kbd{C-v}, and @key{Mouse-3} scrolls backward like @kbd{M-v}.
861Clicking @key{Mouse-2} in the scroll bar lets you move or drag the
862inner box up and down.
878 863
879 You can also click @kbd{C-Mouse-2} in the scroll bar to split a 864 You can also click @kbd{C-Mouse-2} in the scroll bar to split a
880window vertically. The split occurs on the line where you click. 865window vertically. The split occurs on the line where you click.
881 866
882@findex scroll-bar-mode 867@findex scroll-bar-mode
883@vindex scroll-bar-mode 868@vindex scroll-bar-mode
884 You can enable or disable Scroll Bar mode with the command @kbd{M-x 869 You can toggle the use of the scroll bar with the command @kbd{M-x
885scroll-bar-mode}. With no argument, it toggles the use of scroll 870scroll-bar-mode}. With a prefix argument, this command turns use of
886bars. With an argument, it turns use of scroll bars on if and only if 871scroll bars on if and only if the argument is positive. This command
887the argument is positive. This command applies to all frames, 872applies to all frames, including frames yet to be created. Customize
888including frames yet to be created. Customize the variable 873the variable @code{scroll-bar-mode} to control the use of scroll bars
889@code{scroll-bar-mode} to control the use of scroll bars at startup. 874at startup. You can use it to specify that they are placed at the
890You can use it to specify that they are placed at the right of windows 875right of windows if you prefer that. You have to set this variable
891if you prefer that. You have to set this variable through the 876through the @samp{Customize} interface (@pxref{Easy Customization}),
892@samp{Customize} interface (@pxref{Easy Customization}), or it will 877or it will not work properly. You can also use the X resource
893not work properly. 878@samp{verticalScrollBars} to control the initial setting of Scroll Bar
894 879mode. @xref{Resources}.
895 You can also use the X resource @samp{verticalScrollBars} to control
896the initial setting of Scroll Bar mode. @xref{Resources}.
897 880
898@findex toggle-scroll-bar 881@findex toggle-scroll-bar
899 To enable or disable scroll bars for just the selected frame, use the 882 To enable or disable scroll bars for just the selected frame, use the