001: @c This is part of the Emacs manual.
002: @c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2019 Free Software
003: @c Foundation, Inc.
004: @c See file emacs.texi for copying conditions.
005: @node Windows
006: @chapter Multiple Windows
007: @cindex windows in Emacs
008: @cindex multiple windows in Emacs
009: 
010:   Emacs can split a frame into two or many windows.  Multiple windows
011: can display parts of different buffers, or different parts of one
012: buffer.  Multiple frames always imply multiple windows, because each
013: frame has its own set of windows.  Each window belongs to one and only
014: one frame.
015: 
016: @menu
017: * Basic Window::        Introduction to Emacs windows.
018: * Split Window::        New windows are made by splitting existing windows.
019: * Other Window::        Moving to another window or doing something to it.
020: * Pop Up Window::       Finding a file or buffer in another window.
021: * Change Window::       Deleting windows and changing their sizes.
022: * Displaying Buffers::  How Emacs picks a window for displaying a buffer.
023: * Window Convenience::  Convenience functions for window handling.
024: @end menu
025: 
026: @node Basic Window
027: @section Concepts of Emacs Windows
028: 
029:   Each Emacs window displays one Emacs buffer at any time.  A single
030: buffer may appear in more than one window; if it does, any changes in
031: its text are displayed in all the windows where it appears.  But these
032: windows can show different parts of the buffer, because each window
033: has its own value of point.
034: 
035: @cindex selected window
036:   At any time, one Emacs window is the @dfn{selected window}; the
037: buffer this window is displaying is the current buffer.  On graphical
038: displays, the point is indicated by a solid blinking cursor in the
039: selected window, and by a hollow box in non-selected windows.  On text
040: terminals, the cursor is drawn only in the selected window.
041: @xref{Cursor Display}.
042: 
043:   Commands to move point affect the value of point for the selected
044: Emacs window only.  They do not change the value of point in other
045: Emacs windows, even those showing the same buffer.  The same is true
046: for buffer-switching commands such as @kbd{C-x b}; they do not affect
047: other windows at all.  However, there are other commands such as
048: @kbd{C-x 4 b} that select a different window and switch buffers in it.
049: Also, all commands that display information in a window, including
050: (for example) @kbd{C-h f} (@code{describe-function}) and @kbd{C-x C-b}
051: (@code{list-buffers}), usually work by displaying buffers in a
052: nonselected window without affecting the selected window.
053: 
054:   When multiple windows show the same buffer, they can have different
055: regions, because they can have different values of point.  However,
056: they all have the same value for the mark, because each buffer has
057: only one mark position.
058: 
059:   Each window has its own mode line, which displays the buffer name,
060: modification status and major and minor modes of the buffer that is
061: displayed in the window.  The selected window's mode line appears in a
062: different color.  @xref{Mode Line}, for details.
063: 
064: @node Split Window
065: @section Splitting Windows
066: 
067: @table @kbd
068: @item C-x 2
069: Split the selected window into two windows, one above the other
070: (@code{split-window-below}).
071: @item C-x 3
072: Split the selected window into two windows, positioned side by side
073: (@code{split-window-right}).
074: @item C-mouse-2
075: In the mode line of a window, split that window.
076: @end table
077: 
078: @kindex C-x 2
079: @findex split-window-below
080:   @kbd{C-x 2} (@code{split-window-below}) splits the selected window
081: into two windows, one above the other.  After splitting, the selected
082: window is the upper one, and the newly split-off window is below.
083: Both windows have the same value of point as before, and display the
084: same portion of the buffer (or as close to it as possible).  If
085: necessary, the windows are scrolled to keep point on-screen.  By
086: default, the two windows each get half the height of the original
087: window.  A positive numeric argument specifies how many lines to give
088: to the top window; a negative numeric argument specifies how many
089: lines to give to the bottom window.
090: 
091: @vindex split-window-keep-point
092:   If you change the variable @code{split-window-keep-point} to
093: @code{nil}, @kbd{C-x 2} instead adjusts the portion of the buffer
094: displayed by the two windows, as well as the value of point in each
095: window, in order to keep the text on the screen as close as possible
096: to what it was before; furthermore, if point was in the lower half of
097: the original window, the bottom window is selected instead of the
098: upper one.
099: 
100: @kindex C-x 3
101: @findex split-window-right
102:   @kbd{C-x 3} (@code{split-window-right}) splits the selected window
103: into two side-by-side windows.  The left window is the selected one;
104: the right window displays the same portion of the same buffer, and has
105: the same value of point.  A positive numeric argument specifies how
106: many columns to give the left window; a negative numeric argument
107: specifies how many columns to give the right window.
108: 
109: @vindex truncate-partial-width-windows
110:   When you split a window with @kbd{C-x 3}, each resulting window
111: occupies less than the full width of the frame.  If it becomes too
112: narrow, the buffer may be difficult to read if continuation lines are
113: in use (@pxref{Continuation Lines}).  Therefore, Emacs automatically
114: switches to line truncation if the window width becomes narrower than
115: 50 columns.  This truncation occurs regardless of the value of the
116: variable @code{truncate-lines} (@pxref{Line Truncation}); it is
117: instead controlled by the variable
118: @code{truncate-partial-width-windows}.  If the value of this variable
119: is a positive integer (the default is 50), that specifies the minimum
120: total width for a partial-width window before automatic line
121: truncation occurs; if the value is @code{nil}, automatic line
122: truncation is disabled; and for any other non-@code{nil} value, Emacs
123: truncates lines in every partial-width window regardless of its width.
124: The total width of a window is in column units as reported by
125: @code{window-total-width} (@pxref{Window Sizes,,, elisp, The Emacs
126: Lisp Reference Manual}), it includes the fringes, the continuation and
127: truncation glyphs, the margins, and the scroll bar.
128: 
129:   On text terminals, side-by-side windows are separated by a vertical
130: divider which is drawn using the @code{vertical-border} face.
131: 
132: @kindex C-mouse-2 @r{(mode line)}
133: @kindex C-mouse-2 @r{(scroll bar)}
134:   If you click @kbd{C-mouse-2} in the mode line of a window, that
135: splits the window, putting a vertical divider where you click.
136: Depending on how Emacs is compiled, you can also split a window by
137: clicking @kbd{C-mouse-2} in the scroll bar, which puts a horizontal
138: divider where you click (this feature does not work when Emacs uses
139: GTK+ scroll bars).
140: 
141: @vindex window-resize-pixelwise
142:   By default, when you split a window, Emacs gives each of the
143: resulting windows dimensions that are an integral multiple of the
144: default font size of the frame.  That might subdivide the screen
145: estate unevenly between the resulting windows.  If you set the
146: variable @code{window-resize-pixelwise} to a non-@code{nil} value,
147: Emacs will give each window the same number of pixels (give or take
148: one pixel if the initial dimension was an odd number of pixels).  Note
149: that when a frame's pixel size is not a multiple of the frame's
150: character size, at least one window may get resized pixelwise even if
151: this option is @code{nil}.
152: 
153: @node Other Window
154: @section Using Other Windows
155: 
156: @table @kbd
157: @item C-x o
158: Select another window (@code{other-window}).
159: @item C-M-v
160: Scroll the next window upward (@code{scroll-other-window}).
161: @item C-M-S-v
162: Scroll the next window downward (@code{scroll-other-window-down}).
163: @item mouse-1
164: @kbd{mouse-1}, in the text area of a window, selects the window and
165: moves point to the position clicked.  Clicking in the mode line
166: selects the window without moving point in it.
167: @end table
168: 
169: @kindex C-x o
170: @findex other-window
171: With the keyboard, you can switch windows by typing @kbd{C-x o}
172: (@code{other-window}).  That is an @kbd{o}, for ``other'', not a zero.
173: When there are more than two windows, this command moves through all the
174: windows in a cyclic order, generally top to bottom and left to right.
175: After the rightmost and bottommost window, it goes back to the one at
176: the upper left corner.  A numeric argument means to move several steps
177: in the cyclic order of windows.  A negative argument moves around the
178: cycle in the opposite order.  When the minibuffer is active, the
179: minibuffer window is the last window in the cycle; you can switch from
180: the minibuffer window to one of the other windows, and later switch
181: back and finish supplying the minibuffer argument that is requested.
182: @xref{Minibuffer Edit}.
183: 
184: @kindex C-M-v
185: @findex scroll-other-window
186: @kindex C-M-S-v
187: @findex scroll-other-window-down
188:   The usual scrolling commands (@pxref{Display}) apply to the selected
189: window only, but there are also commands to scroll the next window.
190: @kbd{C-M-v} (@code{scroll-other-window}) scrolls the window that
191: @kbd{C-x o} would select.  In other respects, the command behaves like
192: @kbd{C-v}; both move the buffer text upward relative to the window, and
193: take positive and negative arguments.  (In the minibuffer, @kbd{C-M-v}
194: scrolls the help window associated with the minibuffer, if any, rather
195: than the next window in the standard cyclic order; @pxref{Minibuffer
196: Edit}.)  @kbd{C-M-S-v} (@code{scroll-other-window-down}) scrolls the
197: next window downward in a similar way.
198: 
199: @vindex mouse-autoselect-window
200:   If you set @code{mouse-autoselect-window} to a non-@code{nil} value,
201: moving the mouse over a different window selects that window.  This
202: feature is off by default.
203: 
204: @node Pop Up Window
205: @section Displaying in Another Window
206: 
207: @cindex selecting buffers in other windows
208: @kindex C-x 4
209:   @kbd{C-x 4} is a prefix key for a variety of commands that switch to
210: a buffer in a different window---either another existing window, or a
211: new window created by splitting the selected window.  @xref{Window
212: Choice}, for how Emacs picks or creates the window to use.
213: 
214: @table @kbd
215: @item C-x 4 b @var{bufname} @key{RET}
216: Select buffer @var{bufname} in another window
217: (@code{switch-to-buffer-other-window}).  @xref{Select Buffer}.
218: 
219: @findex display-buffer @r{(command)}
220: @item C-x 4 C-o @var{bufname} @key{RET}
221: @kindex C-x 4 C-o
222: Display buffer @var{bufname} in some window, without trying to select
223: it (@code{display-buffer}).  @xref{Displaying Buffers}, for details
224: about how the window is chosen.
225: 
226: @item C-x 4 f @var{filename} @key{RET}
227: Visit file @var{filename} and select its buffer in another window
228: (@code{find-file-other-window}).  @xref{Visiting}.
229: 
230: @item C-x 4 d @var{directory} @key{RET}
231: Select a Dired buffer for directory @var{directory} in another window
232: (@code{dired-other-window}).  @xref{Dired}.
233: 
234: @c Don't index @kbd{C-x 4 m} and @code{compose-mail-other-window}
235: @c here, they are indexed in sending.texi, in the "Sending Mail" node.
236: @item C-x 4 m
237: Start composing a mail message, similar to @kbd{C-x m} (@pxref{Sending
238: Mail}), but in another window (@code{compose-mail-other-window}).
239: 
240: @findex find-tag-other-window
241: @item C-x 4 .
242: Find the definition of an identifier, similar to @kbd{M-.}
243: (@pxref{Xref}), but in another window
244: (@code{xref-find-definitions-other-window}).
245: @item C-x 4 r @var{filename} @key{RET}
246: Visit file @var{filename} read-only, and select its buffer in another
247: window (@code{find-file-read-only-other-window}).  @xref{Visiting}.
248: @end table
249: 
250: @node Change Window
251: @section Deleting and Resizing Windows
252: 
253: @cindex delete window
254: @cindex deleting windows
255: @table @kbd
256: @item C-x 0
257: Delete the selected window (@code{delete-window}).
258: @item C-x 1
259: Delete all windows in the selected frame except the selected window
260: (@code{delete-other-windows}).
261: @item C-x 4 0
262: Delete the selected window and kill the buffer that was showing in it
263: (@code{kill-buffer-and-window}).  The last character in this key
264: sequence is a zero.
265: @item M-x delete-windows-on @key{RET} @var{buffer} @key{RET}
266: Delete windows showing the specified @var{buffer}.
267: @item C-x ^
268: Make selected window taller (@code{enlarge-window}).
269: @item C-x @}
270: Make selected window wider (@code{enlarge-window-horizontally}).
271: @item C-x @{
272: Make selected window narrower (@code{shrink-window-horizontally}).
273: @item C-x -
274: Shrink this window if its buffer doesn't need so many lines
275: (@code{shrink-window-if-larger-than-buffer}).
276: @item C-x +
277: Make all windows the same height (@code{balance-windows}).
278: @end table
279: 
280: @kindex C-x 0
281: @findex delete-window
282:   To delete the selected window, type @kbd{C-x 0}
283: (@code{delete-window}).  (That is a zero.)  Once a window is deleted,
284: the space that it occupied is given to an adjacent window (but not the
285: minibuffer window, even if that is active at the time).  Deleting the
286: window has no effect on the buffer it used to display; the buffer
287: continues to exist, and you can still switch to it with @kbd{C-x b}.
288: 
289: @findex kill-buffer-and-window
290: @kindex C-x 4 0
291:   @kbd{C-x 4 0} (@code{kill-buffer-and-window}) is a stronger command
292: than @kbd{C-x 0}; it kills the current buffer and then deletes the
293: selected window.
294: 
295: @kindex C-x 1
296: @findex delete-other-windows
297:   @kbd{C-x 1} (@code{delete-other-windows}) deletes all the windows,
298: @emph{except} the selected one; the selected window expands to use the
299: whole frame.  (This command cannot be used while the minibuffer window
300: is active; attempting to do so signals an error.)
301: 
302:   @kbd{M-x delete-windows-on} deletes windows that show a specific
303: buffer.  It prompts for the buffer, defaulting to the current buffer.
304: With prefix argument of zero, @kbd{C-u 0}, this command deletes
305: windows only on the current display's frames.
306: 
307: @cindex resize window
308: @cindex resizing windows
309: @kindex C-x ^
310: @findex enlarge-window
311: @kindex C-x @}
312: @vindex window-min-height
313:   The command @kbd{C-x ^} (@code{enlarge-window}) makes the selected
314: window one line taller, taking space from a vertically adjacent window
315: without changing the height of the frame.  With a positive numeric
316: argument, this command increases the window height by that many lines;
317: with a negative argument, it reduces the height by that many lines.
318: If there are no vertically adjacent windows (i.e., the window is at the
319: full frame height), that signals an error.  The command also signals
320: an error if you attempt to reduce the height of any window below a
321: certain minimum number of lines, specified by the variable
322: @code{window-min-height} (the default is 4).
323: 
324: @findex enlarge-window-horizontally
325: @findex shrink-window-horizontally
326: @vindex window-min-width
327:   Similarly, @kbd{C-x @}} (@code{enlarge-window-horizontally}) makes
328: the selected window wider, and @kbd{C-x @{}
329: (@code{shrink-window-horizontally}) makes it narrower.  These commands
330: signal an error if you attempt to reduce the width of any window below
331: a certain minimum number of columns, specified by the variable
332: @code{window-min-width} (the default is 10).
333: 
334:   Mouse clicks on the mode line (@pxref{Mode Line Mouse}) or on window
335: dividers (@pxref{Window Dividers}) provide another way to change window
336: heights and to split or delete windows.
337: 
338: @kindex C-x -
339: @findex shrink-window-if-larger-than-buffer
340:   @kbd{C-x -} (@code{shrink-window-if-larger-than-buffer}) reduces the
341: height of the selected window, if it is taller than necessary to show
342: the whole text of the buffer it is displaying.  It gives the extra
343: lines to other windows in the frame.
344: 
345: @kindex C-x +
346: @findex balance-windows
347:   You can also use @kbd{C-x +} (@code{balance-windows}) to even out the
348: heights of all the windows in the selected frame.
349: 
350: @node Displaying Buffers
351: @section Displaying a Buffer in a Window
352: 
353:   It is a common Emacs operation to display or pop up some buffer
354: in response to a user command.  There are several different ways in
355: which commands do this.
356: 
357:   Many commands, like @kbd{C-x C-f} (@code{find-file}), by default
358: display the buffer by ``taking over'' the selected window, expecting
359: that the user's attention will be diverted to that buffer.
360: 
361:   Some commands try to display intelligently, trying not to take
362: over the selected window, e.g., by splitting off a new window and
363: displaying the desired buffer there.  Such commands, which include the
364: various help commands (@pxref{Help}), work by calling
365: @code{display-buffer} internally.  @xref{Window Choice}, for details.
366: 
367:   Other commands do the same as @code{display-buffer}, and
368: additionally select the displaying window so that you can begin
369: editing its buffer.  The command @kbd{M-g M-n} (@code{next-error}) is
370: one example (@pxref{Compilation Mode}).  Such commands work by calling
371: the function @code{pop-to-buffer} internally.  @xref{Switching
372: Buffers,,Switching to a Buffer in a Window, elisp, The Emacs Lisp
373: Reference Manual}.
374: 
375:   Commands with names ending in @code{-other-window} behave like
376: @code{display-buffer}, except that they never display in the selected
377: window.  Several of these commands are bound in the @kbd{C-x 4} prefix
378: key (@pxref{Pop Up Window}).
379: 
380:   Commands with names ending in @code{-other-frame} behave like
381: @code{display-buffer}, except that they (i) never display in the
382: selected window and (ii) prefer to either create a new frame or use a
383: window on some other frame to display the desired buffer.  Several of
384: these commands are bound in the @kbd{C-x 5} prefix key.
385: 
386: @menu
387: * Window Choice::   How @code{display-buffer} works.
388: * Temporary Displays::   Displaying non-editable buffers.
389: @end menu
390: 
391: @node Window Choice
392: @subsection How @code{display-buffer} works
393: @findex display-buffer@r{, detailed description}
394: 
395: The @code{display-buffer} command (as well as commands that call it
396: internally) chooses a window to display by following the steps given
397: below.  @xref{Choosing Window,,Choosing a Window for Displaying a
398: Buffer, elisp, The Emacs Lisp Reference Manual}, for details about how
399: to alter this sequence of steps.
400: 
401: @itemize
402: @item
403: If the buffer should be displayed in the selected window regardless of
404: other considerations, reuse the selected window.  By default, this
405: step is skipped, but you can tell Emacs not to skip it by adding a
406: regular expression matching the buffer's name together with a
407: reference to the @code{display-buffer-same-window} action function
408: (@pxref{Buffer Display Action Functions,,Action Functions for Buffer
409: Display, elisp, The Emacs Lisp Reference Manual}) to the option
410: @code{display-buffer-alist} (@pxref{Choosing Window,,Choosing a Window
411: for Displaying a Buffer, elisp, The Emacs Lisp Reference Manual}).
412: For example, to display the buffer @file{*scratch*} preferably in the
413: selected window write:
414: 
415: @example
416: @group
417: (customize-set-variable
418:  'display-buffer-alist
419:  '("\\*scratch\\*" (display-buffer-same-window)))
420: @end group
421: @end example
422: 
423: By default, @code{display-buffer-alist} is @code{nil}.
424: 
425: @item
426: Otherwise, if the buffer is already displayed in an existing window,
427: reuse that window.  Normally, only windows on the selected frame are
428: considered, but windows on other frames are also reusable if you use
429: the corresponding @code{reusable-frames} action alist entry
430: (@pxref{Buffer Display Action Alists,,Action Alists for Buffer
431: Display, elisp, The Emacs Lisp Reference Manual}).  See the
432: next step for an example of how to do that.
433: 
434: @item
435: Otherwise, optionally create a new frame and display the buffer there.
436: By default, this step is skipped.  To enable it, change the value of
437: the option @code{display-buffer-base-action} (@pxref{Choosing
438: Window,,Choosing a Window for Displaying a Buffer, elisp, The Emacs
439: Lisp Reference Manual}) as follows:
440: 
441: @example
442: @group
443: (customize-set-variable
444:  'display-buffer-base-action
445:  '((display-buffer-reuse-window display-buffer-pop-up-frame)
446:    (reusable-frames . 0)))
447: @end group
448: @end example
449: 
450: This customization will also try to make the preceding step search for
451: a reusable window on all visible or iconified frames.
452: 
453: @item
454: Otherwise, try to create a new window by splitting a window on the
455: selected frame, and display the buffer in that new window.
456: 
457: @vindex split-height-threshold
458: @vindex split-width-threshold
459: The split can be either vertical or horizontal, depending on the
460: variables @code{split-height-threshold} and
461: @code{split-width-threshold}.  These variables should have integer
462: values.  If @code{split-height-threshold} is smaller than the chosen
463: window's height, the split puts the new window below.  Otherwise, if
464: @code{split-width-threshold} is smaller than the window's width, the
465: split puts the new window on the right.  If neither condition holds,
466: Emacs tries to split so that the new window is below---but only if the
467: window was not split before (to avoid excessive splitting).
468: 
469: @item
470: Otherwise, display the buffer in a window previously showing it.
471: Normally, only windows on the selected frame are considered, but with
472: a suitable @code{reusable-frames} action alist entry (see above) the
473: window may be also on another frame.
474: 
475: @item
476: Otherwise, display the buffer in an existing window on the selected
477: frame.
478: 
479: @item
480: If all the above methods fail for whatever reason, create a new frame
481: and display the buffer there.
482: @end itemize
483: 
484: 
485: @node Temporary Displays
486: @subsection Displaying non-editable buffers.
487: @cindex temporary windows
488: 
489: Some buffers are shown in windows for perusal rather than for editing.
490: Help commands (@pxref{Help}) typically use a buffer called @file{*Help*}
491: for that purpose, minibuffer completion (@pxref{Completion}) uses a
492: buffer called @file{*Completions*}, etc.  Such buffers are usually
493: displayed only for a short period of time.
494: 
495:   Normally, Emacs chooses the window for such temporary displays via
496: @code{display-buffer}, as described in the previous subsection.  The
497: @file{*Completions*} buffer, on the other hand, is normally displayed
498: in a window at the bottom of the selected frame, regardless of the
499: number of windows already shown on that frame.
500: 
501:   If you prefer Emacs to display a temporary buffer in a different
502: fashion, customize the variable @code{display-buffer-alist}
503: (@pxref{Choosing Window,,Choosing a Window for Displaying a Buffer,
504: elisp, The Emacs Lisp Reference Manual}) appropriately.  For example,
505: to display @file{*Completions*} always below the selected window, use
506: the following form in your initialization file (@pxref{Init File}):
507: 
508: @example
509: @group
510: (customize-set-variable
511:  'display-buffer-alist
512:  '(("\\*Completions\\*" display-buffer-below-selected)))
513: @end group
514: @end example
515: 
516: @findex temp-buffer-resize-mode
517:   The @file{*Completions*} buffer is also special in the sense that
518: Emacs usually tries to make its window just as large as necessary to
519: display all of its contents.  To resize windows showing other
520: temporary displays, like, for example, the @file{*Help*} buffer, turn
521: on the minor mode (@pxref{Minor Modes}) @code{temp-buffer-resize-mode}
522: (@pxref{Temporary Displays,,Temporary Displays, elisp, The Emacs Lisp
523: Reference Manual}).
524: 
525: @vindex temp-buffer-max-height
526: @vindex temp-buffer-max-width
527:   The maximum size of windows resized by @code{temp-buffer-resize-mode}
528: can be controlled by customizing the options
529: @code{temp-buffer-max-height} and @code{temp-buffer-max-width}
530: (@pxref{Temporary Displays,,Temporary Displays, elisp, The Emacs Lisp
531: Reference Manual}), and cannot exceed the size of the containing frame.
532: 
533: 
534: @node Window Convenience
535: @section Convenience Features for Window Handling
536: 
537: @findex winner-mode
538: @cindex Winner mode
539: @cindex mode, Winner
540: @cindex undoing window configuration changes
541: @cindex window configuration changes, undoing
542:   Winner mode is a global minor mode that records the changes in the
543: window configuration (i.e., how the frames are partitioned into
544: windows), so that you can undo them.  You can toggle Winner mode
545: with @kbd{M-x winner-mode}, or by customizing the variable
546: @code{winner-mode}.  When the mode is enabled, @kbd{C-c left}
547: (@code{winner-undo}) undoes the last window configuration change.  If
548: you change your mind while undoing, you can redo the changes you had
549: undone using @kbd{C-c right} (@code{M-x winner-redo}).
550: 
551:   Follow mode (@kbd{M-x follow-mode}) synchronizes several windows on
552: the same buffer so that they always display adjacent sections of that
553: buffer.  @xref{Follow Mode}.
554: 
555: @cindex Windmove package
556: @cindex directional window selection
557: @findex windmove-right
558: @findex windmove-default-keybindings
559:   The Windmove package defines commands for moving directionally
560: between neighboring windows in a frame.  @kbd{M-x windmove-right}
561: selects the window immediately to the right of the currently selected
562: one, and similarly for the left, up, and down
563: counterparts.  @w{@kbd{M-x windmove-default-keybindings}} binds these
564: commands to @kbd{S-right} etc.; doing so disables shift selection for
565: those keys (@pxref{Shift Selection}).
566: 
567:   The command @kbd{M-x compare-windows} lets you compare the text
568: shown in different windows.  @xref{Comparing Files}.
569: 
570: @vindex scroll-all-mode
571: @cindex scrolling windows together
572: @cindex Scroll-all mode
573: @cindex mode, Scroll-all
574:   Scroll All mode (@kbd{M-x scroll-all-mode}) is a global minor mode
575: that causes scrolling commands and point motion commands to apply to
576: every single window.
577: