Add seq-set-equal-p to test for set equality
[emacs.git] / doc / emacs / display.texi
blob15c700892bcaab62caa849e63658f8fc009c8bee
1 @c -*- coding: utf-8 -*-
2 @c This is part of the Emacs manual.
3 @c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2017 Free Software
4 @c Foundation, Inc.
6 @c See file emacs.texi for copying conditions.
7 @node Display
8 @chapter Controlling the Display
10   Since only part of a large buffer fits in the window, Emacs has to
11 show only a part of it.  This chapter describes commands and variables
12 that let you specify which part of the text you want to see, and how
13 the text is displayed.
15 @menu
16 * Scrolling::              Commands to move text up and down in a window.
17 * Recentering::            A scroll command that centers the current line.
18 * Auto Scrolling::         Redisplay scrolls text automatically when needed.
19 * Horizontal Scrolling::   Moving text left and right in a window.
20 * Narrowing::              Restricting display and editing to a portion
21                              of the buffer.
22 * View Mode::              Viewing read-only buffers.
23 * Follow Mode::            Follow mode lets two windows scroll as one.
24 * Faces::                  How to change the display style using faces.
25 * Colors::                 Specifying colors for faces.
26 * Standard Faces::         The main predefined faces.
27 * Text Scale::             Increasing or decreasing text size in a buffer.
28 * Font Lock::              Minor mode for syntactic highlighting using faces.
29 * Highlight Interactively:: Tell Emacs what text to highlight.
30 * Fringes::                Enabling or disabling window fringes.
31 * Displaying Boundaries::  Displaying top and bottom of the buffer.
32 * Useless Whitespace::     Showing possibly spurious trailing whitespace.
33 * Selective Display::      Hiding lines with lots of indentation.
34 * Optional Mode Line::     Optional mode line display features.
35 * Text Display::           How text characters are normally displayed.
36 * Cursor Display::         Features for displaying the cursor.
37 * Line Truncation::        Truncating lines to fit the screen width instead
38                              of continuing them to multiple screen lines.
39 * Visual Line Mode::       Word wrap and screen line-based editing.
40 * Display Custom::         Information on variables for customizing display.
41 @end menu
43 @node Scrolling
44 @section Scrolling
45 @cindex scrolling
47   If a window is too small to display all the text in its buffer, it
48 displays only a portion of it.  @dfn{Scrolling} commands change which
49 portion of the buffer is displayed.
51   Scrolling forward or up advances the portion of the buffer
52 displayed in the window; equivalently, it moves the buffer text
53 upwards relative to the window.  Scrolling backward or down
54 displays an earlier portion of the buffer, and moves the text
55 downwards relative to the window.
57   In Emacs, scrolling up or down refers to the direction that
58 the text moves in the window, @emph{not} the direction that the window
59 moves relative to the text.  This terminology was adopted by Emacs
60 before the modern meaning of ``scrolling up'' and ``scrolling down''
61 became widespread.  Hence, the strange result that @key{PageDown}
62 scrolls up in the Emacs sense.
64   The portion of a buffer displayed in a window always contains point.
65 If you move point past the bottom or top of the window, scrolling
66 occurs automatically to bring it back onscreen (@pxref{Auto
67 Scrolling}).  You can also scroll explicitly with these commands:
69 @table @kbd
70 @item C-v
71 @itemx @key{next}
72 @itemx @key{PageDown}
73 Scroll forward by nearly a full window (@code{scroll-up-command}).
74 @item M-v
75 @itemx @key{prior}
76 @itemx @key{PageUp}
77 Scroll backward (@code{scroll-down-command}).
78 @end table
80 @kindex C-v
81 @kindex M-v
82 @kindex next
83 @kindex prior
84 @kindex PageDown
85 @kindex PageUp
86 @findex scroll-up-command
87 @findex scroll-down-command
88   @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the
89 whole window height.  The effect is to take the two lines at the
90 bottom of the window and put them at the top, followed by lines that
91 were not previously visible.  If point was in the text that scrolled
92 off the top, it ends up on the window's new topmost line.  The
93 @key{next} (or @key{PageDown}) key is equivalent to @kbd{C-v}.
95   @kbd{M-v} (@code{scroll-down-command}) scrolls backward in a similar
96 way.  The @key{prior} (or @key{PageUp}) key is equivalent to
97 @kbd{M-v}.
99 @vindex next-screen-context-lines
100   The number of lines of overlap left by these scroll commands is
101 controlled by the variable @code{next-screen-context-lines}, whose
102 default value is 2.  You can supply the commands with a numeric prefix
103 argument, @var{n}, to scroll by @var{n} lines; Emacs attempts to leave
104 point unchanged, so that the text and point move up or down together.
105 @kbd{C-v} with a negative argument is like @kbd{M-v} and vice versa.
107 @vindex scroll-error-top-bottom
108   By default, these commands signal an error (by beeping or flashing
109 the screen) if no more scrolling is possible, because the window has
110 reached the beginning or end of the buffer.  If you change the
111 variable @code{scroll-error-top-bottom} to @code{t}, the command moves
112 point to the farthest possible position.  If point is already there,
113 the command signals an error.
115 @vindex scroll-preserve-screen-position
116 @cindex @code{scroll-command} property
117   Some users like scroll commands to keep point at the same screen
118 position, so that scrolling back to the same screen conveniently
119 returns point to its original position.  You can enable this behavior
120 via the variable @code{scroll-preserve-screen-position}.  If the value
121 is @code{t}, Emacs adjusts point to keep the cursor at the same screen
122 position whenever a scroll command moves it off-window, rather than
123 moving it to the topmost or bottommost line.  With any other
124 non-@code{nil} value, Emacs adjusts point this way even if the scroll
125 command leaves point in the window.  This variable affects all the
126 scroll commands documented in this section, as well as scrolling with
127 the mouse wheel (@pxref{Mouse Commands}); in general, it affects any
128 command that has a non-@code{nil} @code{scroll-command} property.
129 @xref{Property Lists,,, elisp, The Emacs Lisp Reference Manual}.
131 @vindex fast-but-imprecise-scrolling
132   Sometimes, particularly when you hold down keys such as @kbd{C-v}
133 and @kbd{M-v}, activating keyboard auto-repeat, Emacs fails to keep up
134 with the rapid rate of scrolling requested; the display doesn't update
135 and Emacs can become unresponsive to input for quite a long time.  You
136 can counter this sluggishness by setting the variable
137 @code{fast-but-imprecise-scrolling} to a non-@code{nil} value.  This
138 instructs the scrolling commands not to fontify (@pxref{Font Lock})
139 any unfontified text they scroll over, instead to assume it has the
140 default face.  This can cause Emacs to scroll to somewhat wrong buffer
141 positions when the faces in use are not all the same size, even with
142 single (i.e., without auto-repeat) scrolling operations.
144 @vindex scroll-up
145 @vindex scroll-down
146 @findex scroll-up-line
147 @findex scroll-down-line
148   The commands @kbd{M-x scroll-up} and @kbd{M-x scroll-down} behave
149 similarly to @code{scroll-up-command} and @code{scroll-down-command},
150 except they do not obey @code{scroll-error-top-bottom}.  Prior to
151 Emacs 24, these were the default commands for scrolling up and down.
152 The commands @kbd{M-x scroll-up-line} and @kbd{M-x scroll-down-line}
153 scroll the current window by one line at a time.  If you intend to use
154 any of these commands, you might want to give them key bindings
155 (@pxref{Init Rebinding}).
157 @node Recentering
158 @section Recentering
160 @table @kbd
161 @item C-l
162 Scroll the selected window so the current line is the center-most text
163 line; on subsequent consecutive invocations, make the current line the
164 top line, the bottom line, and so on in cyclic order.  Possibly
165 redisplay the screen too (@code{recenter-top-bottom}).
167 @item M-x recenter
168 Scroll the selected window so the current line is the center-most text
169 line.  Possibly redisplay the screen too.
171 @item C-M-l
172 Scroll heuristically to bring useful information onto the screen
173 (@code{reposition-window}).
174 @end table
176 @kindex C-l
177 @findex recenter-top-bottom
178   The @kbd{C-l} (@code{recenter-top-bottom}) command @dfn{recenters}
179 the selected window, scrolling it so that the current screen line is
180 exactly in the center of the window, or as close to the center as
181 possible.
183   Typing @kbd{C-l} twice in a row (@kbd{C-l C-l}) scrolls the window
184 so that point is on the topmost screen line.  Typing a third @kbd{C-l}
185 scrolls the window so that point is on the bottom-most screen line.
186 Each successive @kbd{C-l} cycles through these three positions.
188 @vindex recenter-positions
189   You can change the cycling order by customizing the list variable
190 @code{recenter-positions}.  Each list element should be the symbol
191 @code{top}, @code{middle}, or @code{bottom}, or a number; an integer
192 means to move the line to the specified screen line, while a
193 floating-point number between 0.0 and 1.0 specifies a percentage of
194 the screen space from the top of the window.  The default,
195 @code{(middle top bottom)}, is the cycling order described above.
196 Furthermore, if you change the variable @code{scroll-margin} to a
197 non-zero value @var{n}, @kbd{C-l} always leaves at least @var{n}
198 screen lines between point and the top or bottom of the window
199 (@pxref{Auto Scrolling}).
201   You can also give @kbd{C-l} a prefix argument.  A plain prefix
202 argument, @kbd{C-u C-l}, simply recenters point.  A positive argument
203 @var{n} puts point @var{n} lines down from the top of the window.  An
204 argument of zero puts point on the topmost line.  A negative argument
205 @var{-n} puts point @var{n} lines from the bottom of the window.  When
206 given an argument, @kbd{C-l} does not clear the screen or cycle
207 through different screen positions.
209 @vindex recenter-redisplay
210   If the variable @code{recenter-redisplay} has a non-@code{nil}
211 value, each invocation of @kbd{C-l} also clears and redisplays the
212 screen; the special value @code{tty} (the default) says to do this on
213 text-terminal frames only.  Redisplaying is useful in case the screen
214 becomes garbled for any reason (@pxref{Screen Garbled}).
216 @findex recenter
217   The more primitive command @kbd{M-x recenter} behaves like
218 @code{recenter-top-bottom}, but does not cycle among screen positions.
220 @kindex C-M-l
221 @findex reposition-window
222   @kbd{C-M-l} (@code{reposition-window}) scrolls the current window
223 heuristically in a way designed to get useful information onto the
224 screen.  For example, in a Lisp file, this command tries to get the
225 entire current defun onto the screen if possible.
227 @node Auto Scrolling
228 @section Automatic Scrolling
230 @cindex automatic scrolling
231   Emacs performs @dfn{automatic scrolling} when point moves out of the
232 visible portion of the text.  Normally, automatic scrolling centers
233 point vertically in the window, but there are several ways to alter
234 this behavior.
236 @vindex scroll-conservatively
237   If you set @code{scroll-conservatively} to a small number @var{n},
238 then moving point just a little off the screen (no more than @var{n}
239 lines) causes Emacs to scroll just enough to bring point back on
240 screen; if doing so fails to make point visible, Emacs scrolls just
241 far enough to center point in the window.  If you set
242 @code{scroll-conservatively} to a large number (larger than 100),
243 automatic scrolling never centers point, no matter how far point
244 moves; Emacs always scrolls text just enough to bring point into view,
245 either at the top or bottom of the window depending on the scroll
246 direction.  By default, @code{scroll-conservatively} is@tie{}0, which
247 means to always center point in the window.
249 @vindex scroll-step
250   Another way to control automatic scrolling is to customize the
251 variable @code{scroll-step}.  Its value determines the number of lines
252 by which to automatically scroll, when point moves off the screen.  If
253 scrolling by that number of lines fails to bring point back into view,
254 point is centered instead.  The default value is zero, which (by
255 default) causes point to always be centered after scrolling.
257 @cindex aggressive scrolling
258 @vindex scroll-up-aggressively
259 @vindex scroll-down-aggressively
260   A third way to control automatic scrolling is to customize the
261 variables @code{scroll-up-aggressively} and
262 @code{scroll-down-aggressively}, which directly specify the vertical
263 position of point after scrolling.  The value of
264 @code{scroll-up-aggressively} should be either @code{nil} (the
265 default), or a floating point number @var{f} between 0 and 1.  The
266 latter means that when point goes below the bottom window edge (i.e.,
267 scrolling forward), Emacs scrolls the window so that point is @var{f}
268 parts of the window height from the bottom window edge.  Thus, larger
269 @var{f} means more aggressive scrolling: more new text is brought into
270 view.  The default value, @code{nil}, is equivalent to 0.5.
272   Likewise, @code{scroll-down-aggressively} is used when point goes
273 above the bottom window edge (i.e., scrolling backward).  The value
274 specifies how far point should be from the top margin of the window
275 after scrolling.  Thus, as with @code{scroll-up-aggressively}, a
276 larger value is more aggressive.
278   Note that the variables @code{scroll-conservatively},
279 @code{scroll-step}, and @code{scroll-up-aggressively} /
280 @code{scroll-down-aggressively} control automatic scrolling in
281 contradictory ways.  Therefore, you should pick no more than one of
282 these methods to customize automatic scrolling.  In case you customize
283 multiple variables, the order of priority is:
284 @code{scroll-conservatively}, then @code{scroll-step}, and finally
285 @code{scroll-up-aggressively} / @code{scroll-down-aggressively}.
287 @vindex scroll-margin
288 @vindex maximum-scroll-margin
289   The variable @code{scroll-margin} restricts how close point can come
290 to the top or bottom of a window (even if aggressive scrolling
291 specifies a fraction @var{f} that is larger than the window portion
292 between the top and the bottom margins).  Its value is a number of
293 screen lines; if point comes within that many lines of the top or
294 bottom of the window, Emacs performs automatic scrolling.  By default,
295 @code{scroll-margin} is 0.  The effective margin size is limited to a
296 quarter of the window height by default, but this limit can be
297 increased up to half (or decreased down to zero) by customizing
298 @code{maximum-scroll-margin}.
300 @node Horizontal Scrolling
301 @section Horizontal Scrolling
302 @cindex horizontal scrolling
304 @vindex auto-hscroll-mode
305   @dfn{Horizontal scrolling} means shifting all the lines sideways
306 within a window, so that some of the text near the left margin is not
307 displayed.  When the text in a window is scrolled horizontally, text
308 lines are truncated rather than continued (@pxref{Line Truncation}).
309 If a window shows truncated lines, Emacs performs automatic horizontal
310 scrolling whenever point moves off the left or right edge of the
311 screen.  To disable automatic horizontal scrolling, set the variable
312 @code{auto-hscroll-mode} to @code{nil}.  Note that when the automatic
313 horizontal scrolling is turned off, if point moves off the edge of the
314 screen, the cursor disappears to indicate that.  (On text terminals,
315 the cursor is left at the edge instead.)
317 @vindex hscroll-margin
318   The variable @code{hscroll-margin} controls how close point can get
319 to the window's left and right edges before automatic scrolling
320 occurs.  It is measured in columns.  For example, if the value is 5,
321 then moving point within 5 columns of an edge causes horizontal
322 scrolling away from that edge.
324 @vindex hscroll-step
325   The variable @code{hscroll-step} determines how many columns to
326 scroll the window when point gets too close to the edge.  Zero, the
327 default value, means to center point horizontally within the window.
328 A positive integer value specifies the number of columns to scroll by.
329 A floating-point number specifies the fraction of the window's width
330 to scroll by.
332   You can also perform explicit horizontal scrolling with the
333 following commands:
335 @table @kbd
336 @item C-x <
337 Scroll text in current window to the left (@code{scroll-left}).
338 @item C-x >
339 Scroll to the right (@code{scroll-right}).
340 @end table
342 @kindex C-x <
343 @kindex C-x >
344 @findex scroll-left
345 @findex scroll-right
346   @kbd{C-x <} (@code{scroll-left}) scrolls text in the selected window
347 to the left by the full width of the window, less two columns.  (In
348 other words, the text in the window moves left relative to the
349 window.)  With a numeric argument @var{n}, it scrolls by @var{n}
350 columns.
352   If the text is scrolled to the left, and point moves off the left
353 edge of the window, the cursor will freeze at the left edge of the
354 window, until point moves back to the displayed portion of the text.
355 This is independent of the current setting of
356 @code{auto-hscroll-mode}, which, for text scrolled to the left, only
357 affects the behavior at the right edge of the window.
359   @kbd{C-x >} (@code{scroll-right}) scrolls similarly to the right.
360 The window cannot be scrolled any farther to the right once it is
361 displayed normally, with each line starting at the window's left
362 margin; attempting to do so has no effect.  This means that you don't
363 have to calculate the argument precisely for @w{@kbd{C-x >}}; any
364 sufficiently large argument will restore the normal display.
366   If you use those commands to scroll a window horizontally, that sets
367 a lower bound for automatic horizontal scrolling.  Automatic scrolling
368 will continue to scroll the window, but never farther to the right
369 than the amount you previously set by @code{scroll-left}.
371 @node Narrowing
372 @section Narrowing
373 @cindex widening
374 @cindex restriction
375 @cindex narrowing
376 @cindex accessible portion
378   @dfn{Narrowing} means focusing in on some portion of the buffer,
379 making the rest temporarily inaccessible.  The portion which you can
380 still get to is called the @dfn{accessible portion}.  Canceling the
381 narrowing, which makes the entire buffer once again accessible, is
382 called @dfn{widening}.  The bounds of narrowing in effect in a buffer
383 are called the buffer's @dfn{restriction}.
385   Narrowing can make it easier to concentrate on a single subroutine or
386 paragraph by eliminating clutter.  It can also be used to limit the
387 range of operation of a replace command or repeating keyboard macro.
389 @table @kbd
390 @item C-x n n
391 Narrow down to between point and mark (@code{narrow-to-region}).
392 @item C-x n w
393 Widen to make the entire buffer accessible again (@code{widen}).
394 @item C-x n p
395 Narrow down to the current page (@code{narrow-to-page}).
396 @item C-x n d
397 Narrow down to the current defun (@code{narrow-to-defun}).
398 @end table
400   When you have narrowed down to a part of the buffer, that part appears
401 to be all there is.  You can't see the rest, you can't move into it
402 (motion commands won't go outside the accessible part), you can't change
403 it in any way.  However, it is not gone, and if you save the file all
404 the inaccessible text will be saved.  The word @samp{Narrow} appears in
405 the mode line whenever narrowing is in effect.
407 @kindex C-x n n
408 @findex narrow-to-region
409   The primary narrowing command is @kbd{C-x n n} (@code{narrow-to-region}).
410 It sets the current buffer's restrictions so that the text in the current
411 region remains accessible, but all text before the region or after the
412 region is inaccessible.  Point and mark do not change.
414 @kindex C-x n p
415 @findex narrow-to-page
416 @kindex C-x n d
417 @findex narrow-to-defun
418   Alternatively, use @kbd{C-x n p} (@code{narrow-to-page}) to narrow
419 down to the current page.  @xref{Pages}, for the definition of a page.
420 @kbd{C-x n d} (@code{narrow-to-defun}) narrows down to the defun
421 containing point (@pxref{Defuns}).
423 @kindex C-x n w
424 @findex widen
425   The way to cancel narrowing is to widen with @kbd{C-x n w}
426 (@code{widen}).  This makes all text in the buffer accessible again.
428   You can get information on what part of the buffer you are narrowed down
429 to using the @kbd{C-x =} command.  @xref{Position Info}.
431   Because narrowing can easily confuse users who do not understand it,
432 @code{narrow-to-region} is normally a disabled command.  Attempting to use
433 this command asks for confirmation and gives you the option of enabling it;
434 if you enable the command, confirmation will no longer be required for
435 it.  @xref{Disabling}.
437 @node View Mode
438 @section View Mode
439 @cindex View mode
440 @cindex mode, View
442 @kindex s @r{(View mode)}
443 @kindex SPC @r{(View mode)}
444 @kindex DEL @r{(View mode)}
445   View mode is a minor mode that lets you scan a buffer by sequential
446 screenfuls.  It provides commands for scrolling through the buffer
447 conveniently but not for changing it.  Apart from the usual Emacs
448 cursor motion commands, you can type @key{SPC} to scroll forward one
449 windowful, @kbd{S-@key{SPC}} or @key{DEL} to scroll backward, and @kbd{s} to
450 start an incremental search.
452 @kindex q @r{(View mode)}
453 @kindex e @r{(View mode)}
454 @findex View-quit
455 @findex View-exit
456   Typing @kbd{q} (@code{View-quit}) disables View mode, and switches
457 back to the buffer and position before View mode was enabled.  Typing
458 @kbd{e} (@code{View-exit}) disables View mode, keeping the current
459 buffer and position.
461 @findex view-buffer
462 @findex view-file
463   @kbd{M-x view-buffer} prompts for an existing Emacs buffer, switches
464 to it, and enables View mode.  @kbd{M-x view-file} prompts for a file
465 and visits it with View mode enabled.
467 @node Follow Mode
468 @section Follow Mode
469 @cindex Follow mode
470 @cindex mode, Follow
471 @findex follow-mode
472 @cindex windows, synchronizing
473 @cindex synchronizing windows
475   @dfn{Follow mode} is a minor mode that makes two windows, both
476 showing the same buffer, scroll as a single tall virtual window.
477 To use Follow mode, go to a frame with just one window, split it into
478 two side-by-side windows using @kbd{C-x 3}, and then type @kbd{M-x
479 follow-mode}.  From then on, you can edit the buffer in either of the
480 two windows, or scroll either one; the other window follows it.
482   In Follow mode, if you move point outside the portion visible in one
483 window and into the portion visible in the other window, that selects
484 the other window---again, treating the two as if they were parts of
485 one large window.
487   To turn off Follow mode, type @kbd{M-x follow-mode} a second time.
489 @node Faces
490 @section Text Faces
491 @cindex faces
493   Emacs can display text in several different styles, called
494 @dfn{faces}.  Each face can specify various @dfn{face attributes},
495 such as the font, height, weight, slant, foreground and background
496 color, and underlining or overlining.  Most major modes assign faces
497 to the text automatically, via Font Lock mode.  @xref{Font Lock}, for
498 more information about how these faces are assigned.
500 @findex list-faces-display
501   To see what faces are currently defined, and what they look like,
502 type @kbd{M-x list-faces-display}.  With a prefix argument, this
503 prompts for a regular expression, and displays only faces with names
504 matching that regular expression (@pxref{Regexps}).
506 @vindex frame-background-mode
507   It's possible for a given face to look different in different
508 frames.  For instance, some text terminals do not support all face
509 attributes, particularly font, height, and width, and some support a
510 limited range of colors.  In addition, most Emacs faces are defined so
511 that their attributes are different on light and dark frame
512 backgrounds, for reasons of legibility.  By default, Emacs
513 automatically chooses which set of face attributes to display on each
514 frame, based on the frame's current background color.  However, you
515 can override this by giving the variable @code{frame-background-mode}
516 a non-@code{nil} value.  A value of @code{dark} makes Emacs treat all
517 frames as if they have a dark background, whereas a value of
518 @code{light} makes it treat all frames as if they have a light
519 background.
521 @cindex background color
522 @cindex default face
523   You can customize a face to alter its attributes, and save those
524 customizations for future Emacs sessions.  @xref{Face Customization},
525 for details.
527   The @code{default} face is the default for displaying text, and all
528 of its attributes are specified.  Its background color is also used as
529 the frame's background color.  @xref{Colors}.
531 @cindex cursor face
532   Another special face is the @code{cursor} face.  On graphical
533 displays, the background color of this face is used to draw the text
534 cursor.  None of the other attributes of this face have any effect;
535 the foreground color for text under the cursor is taken from the
536 background color of the underlying text.  On text terminals, the
537 appearance of the text cursor is determined by the terminal, not by
538 the @code{cursor} face.
540   You can also use X resources to specify attributes of any particular
541 face.  @xref{Resources}.
543   Emacs can display variable-width fonts, but some Emacs commands,
544 particularly indentation commands, do not account for variable
545 character display widths.  Therefore, we recommend not using
546 variable-width fonts for most faces, particularly those assigned by
547 Font Lock mode.
549 @node Colors
550 @section Colors for Faces
551 @cindex color name
552 @cindex RGB triplet
554   Faces can have various foreground and background colors.  When you
555 specify a color for a face---for instance, when customizing the face
556 (@pxref{Face Customization})---you can use either a @dfn{color name}
557 or an @dfn{RGB triplet}.
559 @findex list-colors-display
560 @vindex list-colors-sort
561   A color name is a pre-defined name, such as @samp{dark orange} or
562 @samp{medium sea green}.  To view a list of color names, type @kbd{M-x
563 list-colors-display}.  To control the order in which colors are shown,
564 customize @code{list-colors-sort}.  If you run this command on a
565 graphical display, it shows the full range of color names known to
566 Emacs (these are the standard X11 color names, defined in X's
567 @file{rgb.txt} file).  If you run the command on a text terminal, it
568 shows only a small subset of colors that can be safely displayed on
569 such terminals.  However, Emacs understands X11 color names even on
570 text terminals; if a face is given a color specified by an X11 color
571 name, it is displayed using the closest-matching terminal color.
573   An RGB triplet is a string of the form @samp{#RRGGBB}.  Each of the
574 R, G, and B components is a hexadecimal number specifying the
575 component's relative intensity, one to four digits long (usually two
576 digits are used).  The components must have the same number of digits.
577 For hexadecimal values A to F, either upper or lower case are
578 acceptable.
580   The @kbd{M-x list-colors-display} command also shows the equivalent
581 RGB triplet for each named color.  For instance, @samp{medium sea
582 green} is equivalent to @samp{#3CB371}.
584 @cindex face colors, setting
585 @findex set-face-foreground
586 @findex set-face-background
587   You can change the foreground and background colors of a face with
588 @kbd{M-x set-face-foreground} and @kbd{M-x set-face-background}.
589 These commands prompt in the minibuffer for a face name and a color,
590 with completion, and then set that face to use the specified color.
591 They affect the face colors on all frames, but their effects do not
592 persist for future Emacs sessions, unlike using the customization
593 buffer or X resources.  You can also use frame parameters to set
594 foreground and background colors for a specific frame; @xref{Frame
595 Parameters}.
597 @node Standard Faces
598 @section Standard Faces
599 @cindex standard faces
601   Here are the standard faces for specifying text appearance.  You can
602 apply them to specific text when you want the effects they produce.
604 @table @code
605 @item default
606 This face is used for ordinary text that doesn't specify any face.
607 Its background color is used as the frame's background color.
608 @item bold
609 This face uses a bold variant of the default font.
610 @item italic
611 This face uses an italic variant of the default font.
612 @item bold-italic
613 This face uses a bold italic variant of the default font.
614 @item underline
615 This face underlines text.
616 @item fixed-pitch
617 This face forces use of a fixed-width font.  It's reasonable to
618 customize this face to use a different fixed-width font, if you like,
619 but you should not make it a variable-width font.
620 @item fixed-pitch-serif
621 This face is like @code{fixed-pitch}, except the font has serifs and
622 looks more like traditional typewriting.
623 @cindex variable-pitch face
624 @item variable-pitch
625 This face forces use of a variable-width font.
626 @cindex shadow face
627 @item shadow
628 This face is used for making the text less noticeable than the surrounding
629 ordinary text.  Usually this can be achieved by using shades of gray in
630 contrast with either black or white default foreground color.
631 @end table
633   Here's an incomplete list of faces used to highlight parts of the
634 text temporarily for specific purposes.  (Many other modes define
635 their own faces for this purpose.)
637 @table @code
638 @item highlight
639 This face is used for text highlighting in various contexts, such as
640 when the mouse cursor is moved over a hyperlink.
641 @item isearch
642 This face is used to highlight the current Isearch match
643 (@pxref{Incremental Search}).
644 @item query-replace
645 This face is used to highlight the current Query Replace match
646 (@pxref{Replace}).
647 @item lazy-highlight
648 This face is used to highlight lazy matches for Isearch and Query
649 Replace (matches other than the current one).
650 @item region
651 This face is used for displaying an active region (@pxref{Mark}).
652 When Emacs is built with GTK support, its colors are taken from the
653 current GTK theme.
654 @item secondary-selection
655 This face is used for displaying a secondary X selection (@pxref{Secondary
656 Selection}).
657 @item trailing-whitespace
658 The face for highlighting excess spaces and tabs at the end of a line
659 when @code{show-trailing-whitespace} is non-@code{nil} (@pxref{Useless
660 Whitespace}).
661 @item escape-glyph
662 The face for displaying control characters and escape sequences
663 (@pxref{Text Display}).
664 @item homoglyph
665 The face for displaying lookalike characters, i.e., characters that
666 look like but are not the characters being represented
667 (@pxref{Text Display}).
668 @item nobreak-space
669 The face for displaying no-break space characters (@pxref{Text
670 Display}).
671 @item nobreak-hyphen
672 The face for displaying no-break hyphen characters (@pxref{Text
673 Display}).
674 @end table
676   The following faces control the appearance of parts of the Emacs
677 frame:
679 @table @code
680 @item mode-line
681 @cindex mode-line face
682 @cindex faces for mode lines
683 This face is used for the mode line of the currently selected window,
684 and for menu bars when toolkit menus are not used.  By default, it's
685 drawn with shadows for a raised effect on graphical displays, and
686 drawn as the inverse of the default face on non-windowed terminals.
687 @item mode-line-inactive
688 @cindex mode-line-inactive face
689 Like @code{mode-line}, but used for mode lines of the windows other
690 than the selected one (if @code{mode-line-in-non-selected-windows} is
691 non-@code{nil}).  This face inherits from @code{mode-line}, so changes
692 in that face affect mode lines in all windows.
693 @item mode-line-highlight
694 @cindex mode-line-highlight face
695 Like @code{highlight}, but used for mouse-sensitive portions of text
696 on mode lines.  Such portions of text typically pop up tooltips
697 (@pxref{Tooltips}) when the mouse pointer hovers above them.
698 @item mode-line-buffer-id
699 @cindex mode-line-buffer-id face
700 This face is used for buffer identification parts in the mode line.
701 @item header-line
702 @cindex header-line face
703 Similar to @code{mode-line} for a window's header line, which appears
704 at the top of a window just as the mode line appears at the bottom.
705 Most windows do not have a header line---only some special modes, such
706 Info mode, create one.
707 @item vertical-border
708 @cindex vertical-border face
709 This face is used for the vertical divider between windows on text
710 terminals.
711 @item minibuffer-prompt
712 @cindex @code{minibuffer-prompt} face
713 @vindex minibuffer-prompt-properties
714 This face is used for the prompt strings displayed in the minibuffer.
715 By default, Emacs automatically adds this face to the value of
716 @code{minibuffer-prompt-properties}, which is a list of text
717 properties (@pxref{Text Properties,,, elisp, the Emacs Lisp Reference
718 Manual}) used to display the prompt text.  (This variable takes effect
719 when you enter the minibuffer.)
720 @item fringe
721 @cindex @code{fringe} face
722 The face for the fringes to the left and right of windows on graphic
723 displays.  (The fringes are the narrow portions of the Emacs frame
724 between the text area and the window's right and left borders.)
725 @xref{Fringes}.
726 @item cursor
727 The @code{:background} attribute of this face specifies the color of
728 the text cursor.  @xref{Cursor Display}.
729 @item tooltip
730 This face is used for tooltip text.  By default, if Emacs is built
731 with GTK support, tooltips are drawn via GTK and this face has no
732 effect.  @xref{Tooltips}.
733 @item mouse
734 This face determines the color of the mouse pointer.
735 @end table
737   The following faces likewise control the appearance of parts of the
738 Emacs frame, but only on text terminals, or when Emacs is built on X
739 with no toolkit support.  (For all other cases, the appearance of the
740 respective frame elements is determined by system-wide settings.)
742 @table @code
743 @item scroll-bar
744 This face determines the visual appearance of the scroll bar.
745 @xref{Scroll Bars}.
746 @item tool-bar
747 This face determines the color of tool bar icons.  @xref{Tool Bars}.
748 @item menu
749 @cindex menu bar appearance
750 @cindex @code{menu} face, no effect if customized
751 @cindex customization of @code{menu} face
752 This face determines the colors and font of Emacs's menus.  @xref{Menu
753 Bars}.
754 @item tty-menu-enabled-face
755 @cindex faces for text-mode menus
756 @cindex TTY menu faces
757 This face is used to display enabled menu items on text-mode
758 terminals.
759 @item tty-menu-disabled-face
760 This face is used to display disabled menu items on text-mode
761 terminals.
762 @item tty-menu-selected-face
763 This face is used to display on text-mode terminals the menu item that
764 would be selected if you click a mouse or press @key{RET}.
765 @end table
767 @node Text Scale
768 @section Text Scale
770 @cindex adjust buffer face height
771 @findex text-scale-adjust
772 @kindex C-x C-+
773 @kindex C-x C--
774 @kindex C-x C-=
775 @kindex C-x C-0
776   To increase the height of the default face in the current buffer,
777 type @kbd{C-x C-+} or @kbd{C-x C-=}.  To decrease it, type @kbd{C-x
778 C--}.  To restore the default (global) face height, type @kbd{C-x
779 C-0}.  These keys are all bound to the same command,
780 @code{text-scale-adjust}, which looks at the last key typed to
781 determine which action to take.
783   The final key of these commands may be repeated without the leading
784 @kbd{C-x}.  For instance, @kbd{C-x C-= C-= C-=} increases the face
785 height by three steps.  Each step scales the text height by a factor
786 of 1.2; to change this factor, customize the variable
787 @code{text-scale-mode-step}.  A numeric argument of 0
788 to the @code{text-scale-adjust} command restores the default height,
789 the same as typing @kbd{C-x C-0}.
791 @cindex increase buffer face height
792 @findex text-scale-increase
793 @cindex decrease buffer face height
794 @findex text-scale-decrease
795   The commands @code{text-scale-increase} and
796 @code{text-scale-decrease} increase or decrease the height of the
797 default face, just like @kbd{C-x C-+} and @kbd{C-x C--} respectively.
798 You may find it convenient to bind to these commands, rather than
799 @code{text-scale-adjust}.
801 @cindex set buffer face height
802 @findex text-scale-set
803   The command @code{text-scale-set} scales the height of the default
804 face in the current buffer to an absolute level specified by its
805 prefix argument.
807 @findex text-scale-mode
808   The above commands automatically enable the minor mode
809 @code{text-scale-mode} if the current font scaling is other than 1,
810 and disable it otherwise.
812 @node Font Lock
813 @section Font Lock mode
814 @cindex Font Lock mode
815 @cindex mode, Font Lock
816 @cindex syntax highlighting and coloring
818   Font Lock mode is a minor mode, always local to a particular buffer,
819 which assigns faces to (or @dfn{fontifies}) the text in the buffer.
820 Each buffer's major mode tells Font Lock mode which text to fontify;
821 for instance, programming language modes fontify syntactically
822 relevant constructs like comments, strings, and function names.
824 @findex font-lock-mode
825   Font Lock mode is enabled by default.  To toggle it in the current
826 buffer, type @kbd{M-x font-lock-mode}.  A positive numeric argument
827 unconditionally enables Font Lock mode, and a negative or zero
828 argument disables it.
830 @findex global-font-lock-mode
831 @vindex global-font-lock-mode
832   Type @kbd{M-x global-font-lock-mode} to toggle Font Lock mode in all
833 buffers.  To impose this setting for future Emacs sessions, customize
834 the variable @code{global-font-lock-mode} (@pxref{Easy
835 Customization}), or add the following line to your init file:
837 @example
838 (global-font-lock-mode 0)
839 @end example
841 @noindent
842 If you have disabled Global Font Lock mode, you can still enable Font
843 Lock for specific major modes by adding the function
844 @code{font-lock-mode} to the mode hooks (@pxref{Hooks}).  For example,
845 to enable Font Lock mode for editing C files, you can do this:
847 @example
848 (add-hook 'c-mode-hook 'font-lock-mode)
849 @end example
851   Font Lock mode uses several specifically named faces to do its job,
852 including @code{font-lock-string-face}, @code{font-lock-comment-face},
853 and others.  The easiest way to find them all is to use @kbd{M-x
854 customize-group @key{RET} font-lock-faces @key{RET}}.  You can then
855 use that customization buffer to customize the appearance of these
856 faces.  @xref{Face Customization}.
858 @vindex font-lock-maximum-decoration
859   You can customize the variable @code{font-lock-maximum-decoration}
860 to alter the amount of fontification applied by Font Lock mode, for
861 major modes that support this feature.  The value should be a number
862 (with 1 representing a minimal amount of fontification; some modes
863 support levels as high as 3); or @code{t}, meaning ``as high as
864 possible'' (the default).  To be effective for a given file buffer,
865 the customization of @code{font-lock-maximum-decoration} should be
866 done @emph{before} the file is visited; if you already have the file
867 visited in a buffer when you customize this variable, kill the buffer
868 and visit the file again after the customization.
870 You can also specify different numbers for particular major modes; for
871 example, to use level 1 for C/C++ modes, and the default level
872 otherwise, use the value
874 @example
875 '((c-mode . 1) (c++-mode . 1)))
876 @end example
878 @cindex incorrect fontification
879 @cindex parenthesis in column zero and fontification
880 @cindex brace in column zero and fontification
881   Comment and string fontification (or ``syntactic'' fontification)
882 relies on analysis of the syntactic structure of the buffer text.  For
883 the sake of speed, some modes, including Lisp mode, rely on a special
884 convention: an open-parenthesis or open-brace in the leftmost column
885 always defines the beginning of a defun, and is thus always outside
886 any string or comment.  Therefore, you should avoid placing an
887 open-parenthesis or open-brace in the leftmost column, if it is inside
888 a string or comment.  @xref{Left Margin Paren}, for details.
890 @findex font-lock-add-keywords
891   Font Lock highlighting patterns already exist for most modes, but
892 you may want to fontify additional patterns.  You can use the function
893 @code{font-lock-add-keywords}, to add your own highlighting patterns
894 for a particular mode.  For example, to highlight @samp{FIXME:} words
895 in C comments, use this:
897 @example
898 (add-hook 'c-mode-hook
899           (lambda ()
900            (font-lock-add-keywords nil
901             '(("\\<\\(FIXME\\):" 1
902                font-lock-warning-face t)))))
903 @end example
905 @findex font-lock-remove-keywords
906 @noindent
907 To remove keywords from the font-lock highlighting patterns, use the
908 function @code{font-lock-remove-keywords}.  @xref{Search-based
909 Fontification,,, elisp, The Emacs Lisp Reference Manual}.
911 @cindex just-in-time (JIT) font-lock
912 @cindex background syntax highlighting
913   Fontifying large buffers can take a long time.  To avoid large
914 delays when a file is visited, Emacs initially fontifies only the
915 visible portion of a buffer.  As you scroll through the buffer, each
916 portion that becomes visible is fontified as soon as it is displayed;
917 this type of Font Lock is called @dfn{Just-In-Time} (or @dfn{JIT})
918 Lock.  You can control how JIT Lock behaves, including telling it to
919 perform fontification while idle, by customizing variables in the
920 customization group @samp{jit-lock}.  @xref{Specific Customization}.
922 @node Highlight Interactively
923 @section Interactive Highlighting
924 @cindex highlighting by matching
925 @cindex interactive highlighting
926 @cindex Highlight Changes mode
928 @findex highlight-changes-mode
929 Highlight Changes mode is a minor mode that @dfn{highlights} the parts
930 of the buffer that were changed most recently, by giving that text a
931 different face.  To enable or disable Highlight Changes mode, use
932 @kbd{M-x highlight-changes-mode}.
934 @cindex Hi Lock mode
935 @findex hi-lock-mode
936   Hi Lock mode is a minor mode that highlights text that matches
937 regular expressions you specify.  For example, you can use it to
938 highlight all the references to a certain variable in a program source
939 file, highlight certain parts in a voluminous output of some program,
940 or highlight certain names in an article.  To enable or disable Hi
941 Lock mode, use the command @kbd{M-x hi-lock-mode}.  To enable Hi Lock
942 mode for all buffers, use @kbd{M-x global-hi-lock-mode} or place
943 @code{(global-hi-lock-mode 1)} in your @file{.emacs} file.
945   Hi Lock mode works like Font Lock mode (@pxref{Font Lock}), except
946 that you specify explicitly the regular expressions to highlight.  You
947 control them with the commands described below.  (The key bindings
948 below that begin with @kbd{C-x w} are deprecated in favor of the
949 global @kbd{M-s h} bindings, and will be removed in some future Emacs
950 version.)
952 @table @kbd
953 @item M-s h r @var{regexp} @key{RET} @var{face} @key{RET}
954 @itemx C-x w h @var{regexp} @key{RET} @var{face} @key{RET}
955 @kindex M-s h r
956 @kindex C-x w h
957 @findex highlight-regexp
958 Highlight text that matches @var{regexp} using face @var{face}
959 (@code{highlight-regexp}).  The highlighting will remain as long as
960 the buffer is loaded.  For example, to highlight all occurrences of
961 the word ``whim'' using the default face (a yellow background)
962 @kbd{M-s h r whim @key{RET} @key{RET}}.  Any face can be used for
963 highlighting, Hi Lock provides several of its own and these are
964 pre-loaded into a list of default values.  While being prompted
965 for a face use @kbd{M-n} and @kbd{M-p} to cycle through them.
967 @vindex hi-lock-auto-select-face
968 Setting the option @code{hi-lock-auto-select-face} to a non-@code{nil}
969 value causes this command (and other Hi Lock commands that read faces)
970 to automatically choose the next face from the default list without
971 prompting.
973 You can use this command multiple times, specifying various regular
974 expressions to highlight in different ways.
976 @item M-s h u @var{regexp} @key{RET}
977 @itemx C-x w r @var{regexp} @key{RET}
978 @kindex M-s h u
979 @kindex C-x w r
980 @findex unhighlight-regexp
981 Unhighlight @var{regexp} (@code{unhighlight-regexp}).
983 If you invoke this from the menu, you select the expression to
984 unhighlight from a list.  If you invoke this from the keyboard, you
985 use the minibuffer.  It will show the most recently added regular
986 expression; use @kbd{M-n} to show the next older expression and
987 @kbd{M-p} to select the next newer expression.  (You can also type the
988 expression by hand, with completion.)  When the expression you want to
989 unhighlight appears in the minibuffer, press @kbd{@key{RET}} to exit
990 the minibuffer and unhighlight it.
992 @item M-s h l @var{regexp} @key{RET} @var{face} @key{RET}
993 @itemx C-x w l @var{regexp} @key{RET} @var{face} @key{RET}
994 @kindex M-s h l
995 @kindex C-x w l
996 @findex highlight-lines-matching-regexp
997 @cindex lines, highlighting
998 @cindex highlighting lines of text
999 Highlight entire lines containing a match for @var{regexp}, using face
1000 @var{face} (@code{highlight-lines-matching-regexp}).
1002 @item M-s h p @var{phrase} @key{RET} @var{face} @key{RET}
1003 @itemx C-x w p @var{phrase} @key{RET} @var{face} @key{RET}
1004 @kindex M-s h p
1005 @kindex C-x w p
1006 @findex highlight-phrase
1007 @cindex phrase, highlighting
1008 @cindex highlighting phrase
1009 Highlight matches of @var{phrase}, using face @var{face}
1010 (@code{highlight-phrase}).  @var{phrase} can be any regexp,
1011 but spaces will be replaced by matches to whitespace and
1012 initial lower-case letters will become case insensitive.
1014 @item M-s h .
1015 @itemx C-x w .
1016 @kindex M-s h .
1017 @kindex C-x w .
1018 @findex highlight-symbol-at-point
1019 @cindex symbol, highlighting
1020 @cindex highlighting symbol at point
1021 Highlight the symbol found near point, using the next available face
1022 (@code{highlight-symbol-at-point}).
1024 @item M-s h w
1025 @itemx C-x w b
1026 @kindex M-s h w
1027 @kindex C-x w b
1028 @findex hi-lock-write-interactive-patterns
1029 Insert all the current highlighting regexp/face pairs into the buffer
1030 at point, with comment delimiters to prevent them from changing your
1031 program.  (This key binding runs the
1032 @code{hi-lock-write-interactive-patterns} command.)
1034 These patterns are extracted from the comments, if appropriate, if you
1035 invoke @kbd{M-x hi-lock-find-patterns}, or if you visit the file while
1036 Hi Lock mode is enabled (since that runs @code{hi-lock-find-patterns}).
1038 @item M-s h f
1039 @itemx C-x w i
1040 @kindex M-s h f
1041 @kindex C-x w i
1042 @findex hi-lock-find-patterns
1043 Extract regexp/face pairs from comments in the current buffer
1044 (@code{hi-lock-find-patterns}).  Thus, you can enter patterns
1045 interactively with @code{highlight-regexp}, store them into the file
1046 with @code{hi-lock-write-interactive-patterns}, edit them (perhaps
1047 including different faces for different parenthesized parts of the
1048 match), and finally use this command (@code{hi-lock-find-patterns}) to
1049 have Hi Lock highlight the edited patterns.
1051 @vindex hi-lock-file-patterns-policy
1052 The variable @code{hi-lock-file-patterns-policy} controls whether Hi
1053 Lock mode should automatically extract and highlight patterns found in a
1054 file when it is visited.  Its value can be @code{nil} (never highlight),
1055 @code{ask} (query the user), or a function.  If it is a function,
1056 @code{hi-lock-find-patterns} calls it with the patterns as argument; if
1057 the function returns non-@code{nil}, the patterns are used.  The default
1058 is @code{ask}.  Note that patterns are always highlighted if you call
1059 @code{hi-lock-find-patterns} directly, regardless of the value of this
1060 variable.
1062 @vindex hi-lock-exclude-modes
1063 Also, @code{hi-lock-find-patterns} does nothing if the current major
1064 mode's symbol is a member of the list @code{hi-lock-exclude-modes}.
1065 @end table
1067 @node Fringes
1068 @section Window Fringes
1069 @cindex fringes
1071 @findex set-fringe-style
1072 @findex fringe-mode
1073 @vindex fringe-mode @r{(variable)}
1074   On graphical displays, each Emacs window normally has narrow
1075 @dfn{fringes} on the left and right edges.  The fringes are used to
1076 display symbols that provide information about the text in the window.
1077 You can type @kbd{M-x fringe-mode} to disable the fringes, or modify
1078 their width.  This command affects fringes in all frames; to modify
1079 fringes on the selected frame only, use @kbd{M-x set-fringe-style}.
1080 You can make your changes to the fringes permanent by customizing the
1081 variable @code{fringe-mode}.
1083   The most common use of the fringes is to indicate a continuation
1084 line (@pxref{Continuation Lines}).  When one line of text is split
1085 into multiple screen lines, the left fringe shows a curving arrow for
1086 each screen line except the first, indicating that this is not the
1087 real beginning.  The right fringe shows a curving arrow for each
1088 screen line except the last, indicating that this is not the real
1089 end.  If the line's direction is right-to-left (@pxref{Bidirectional
1090 Editing}), the meanings of the curving arrows in the fringes are
1091 swapped.
1093   The fringes indicate line truncation (@pxref{Line Truncation}) with
1094 short horizontal arrows meaning there's more text on this line which
1095 is scrolled horizontally out of view.  Clicking the mouse on one of
1096 the arrows scrolls the display horizontally in the direction of the
1097 arrow.
1099   The fringes can also indicate other things, such as buffer
1100 boundaries (@pxref{Displaying Boundaries}), and where a program you
1101 are debugging is executing (@pxref{Debuggers}).
1103 @vindex overflow-newline-into-fringe
1104   The fringe is also used for drawing the cursor, if the current line
1105 is exactly as wide as the window and point is at the end of the line.
1106 To disable this, change the variable
1107 @code{overflow-newline-into-fringe} to @code{nil}; this causes Emacs
1108 to continue or truncate lines that are exactly as wide as the window.
1110   If you customize @code{fringe-mode} to remove the fringes on one or
1111 both sides of the window display, the features that display on the
1112 fringe are not available.  Indicators of line continuation and
1113 truncation are an exception: when fringes are not available, Emacs
1114 uses the leftmost and rightmost character cells to indicate
1115 continuation and truncation with special ASCII characters, see
1116 @ref{Continuation Lines}, and @ref{Line Truncation}.  This reduces the
1117 width available for displaying text on each line, because the
1118 character cells used for truncation and continuation indicators are
1119 reserved for that purpose.  Since buffer text can include
1120 bidirectional text, and thus both left-to-right and right-to-left
1121 paragraphs (@pxref{Bidirectional Editing}), removing only one of the
1122 fringes still reserves two character cells, one on each side of the
1123 window, for truncation and continuation indicators, because these
1124 indicators are displayed on opposite sides of the window in
1125 right-to-left paragraphs.
1127 @node Displaying Boundaries
1128 @section Displaying Boundaries
1130 @vindex indicate-buffer-boundaries
1131   On graphical displays, Emacs can indicate the buffer boundaries in
1132 the fringes.  If you enable this feature, the first line and the last
1133 line are marked with angle images in the fringes.  This can be
1134 combined with up and down arrow images which say whether it is
1135 possible to scroll the window.
1137   The buffer-local variable @code{indicate-buffer-boundaries} controls
1138 how the buffer boundaries and window scrolling is indicated in the
1139 fringes.  If the value is @code{left} or @code{right}, both angle and
1140 arrow bitmaps are displayed in the left or right fringe, respectively.
1142   If value is an alist (@pxref{Association Lists,,, elisp, the Emacs
1143 Lisp Reference Manual}), each element @code{(@var{indicator} .
1144 @var{position})} specifies the position of one of the indicators.  The
1145 @var{indicator} must be one of @code{top}, @code{bottom}, @code{up},
1146 @code{down}, or @code{t} which specifies the default position for the
1147 indicators not present in the alist.  The @var{position} is one of
1148 @code{left}, @code{right}, or @code{nil} which specifies not to show
1149 this indicator.
1151   For example, @code{((top . left) (t . right))} places the top angle
1152 bitmap in left fringe, the bottom angle bitmap in right fringe, and
1153 both arrow bitmaps in right fringe.  To show just the angle bitmaps in
1154 the left fringe, but no arrow bitmaps, use @code{((top .  left)
1155 (bottom . left))}.
1157 @node Useless Whitespace
1158 @section Useless Whitespace
1160 @cindex trailing whitespace
1161 @cindex whitespace, trailing
1162 @vindex show-trailing-whitespace
1163   It is easy to leave unnecessary spaces at the end of a line, or
1164 empty lines at the end of a buffer, without realizing it.  In most
1165 cases, this @dfn{trailing whitespace} has no effect, but sometimes it
1166 can be a nuisance.
1168 @cindex trailing-whitespace face
1169   You can make trailing whitespace at the end of a line visible by
1170 setting the buffer-local variable @code{show-trailing-whitespace} to
1171 @code{t}.  Then Emacs displays trailing whitespace, using the face
1172 @code{trailing-whitespace}.
1174   This feature does not apply when point is at the end of the line
1175 containing the whitespace.  Strictly speaking, that is trailing
1176 whitespace nonetheless, but displaying it specially in that case
1177 looks ugly while you are typing in new text.  In this special case,
1178 the location of point is enough to show you that the spaces are
1179 present.
1181 @findex delete-trailing-whitespace
1182 @vindex delete-trailing-lines
1183   Type @kbd{M-x delete-trailing-whitespace} to delete all trailing
1184 whitespace.  This command deletes all extra spaces at the end of each
1185 line in the buffer, and all empty lines at the end of the buffer; to
1186 ignore the latter, change the variable @code{delete-trailing-lines} to
1187 @code{nil}.  If the region is active, the command instead deletes
1188 extra spaces at the end of each line in the region.
1190 @vindex indicate-empty-lines
1191 @cindex unused lines
1192 @cindex fringes, and unused line indication
1193   On graphical displays, Emacs can indicate unused lines at the end of
1194 the window with a small image in the left fringe (@pxref{Fringes}).
1195 The image appears for screen lines that do not correspond to any
1196 buffer text, so blank lines at the end of the buffer stand out because
1197 they lack this image.  To enable this feature, set the buffer-local
1198 variable @code{indicate-empty-lines} to a non-@code{nil} value.  You
1199 can enable or disable this feature for all new buffers by setting the
1200 default value of this variable, e.g., @code{(setq-default
1201 indicate-empty-lines t)}.
1203 @cindex Whitespace mode
1204 @cindex mode, Whitespace
1205 @findex whitespace-mode
1206 @vindex whitespace-style
1207 @findex whitespace-toggle-options
1208   Whitespace mode is a buffer-local minor mode that lets you
1209 visualize many kinds of whitespace in the buffer, by either
1210 drawing the whitespace characters with a special face or displaying
1211 them as special glyphs.  To toggle this mode, type @kbd{M-x
1212 whitespace-mode}.  The kinds of whitespace visualized are determined
1213 by the list variable @code{whitespace-style}.  Individual elements in
1214 that list can be toggled on or off in the current buffer by typing
1215 @w{@kbd{M-x whitespace-toggle-options}}.  Here is a partial list
1216 of possible elements (see the variable's documentation for the full
1217 list):
1219 @table @code
1220 @item face
1221 Enable all visualizations which use special faces.  This element has a
1222 special meaning: if it is absent from the list, none of the other
1223 visualizations take effect except @code{space-mark}, @code{tab-mark},
1224 and @code{newline-mark}.
1226 @item trailing
1227 Highlight trailing whitespace.
1229 @item tabs
1230 Highlight tab characters.
1232 @item spaces
1233 Highlight space and non-breaking space characters.
1235 @item lines
1236 @vindex whitespace-line-column
1237 Highlight lines longer than 80 columns.  To change the column limit,
1238 customize the variable @code{whitespace-line-column}.
1240 @item newline
1241 Highlight newlines.
1243 @item empty
1244 Highlight empty lines.
1246 @item big-indent
1247 @vindex whitespace-big-indent-regexp
1248 Highlight too-deep indentation.  By default any sequence of at least 4
1249 consecutive TAB characters or 32 consecutive SPC characters is
1250 highlighted.  To change that, customize the regular expression
1251 @code{whitespace-big-indent-regexp}.
1253 @item space-mark
1254 Draw space and non-breaking characters with a special glyph.
1256 @item tab-mark
1257 Draw tab characters with a special glyph.
1259 @item newline-mark
1260 Draw newline characters with a special glyph.
1261 @end table
1263 @findex global-whitespace-toggle-options
1264 @findex global-whitespace-mode
1265 Global Whitespace mode is a global minor mode that lets you visualize
1266 whitespace in all buffers.  To toggle individual features, use
1267 @kbd{M-x global-whitespace-toggle-options}.
1269 @node Selective Display
1270 @section Selective Display
1271 @cindex selective display
1272 @findex set-selective-display
1273 @kindex C-x $
1275   Emacs has the ability to hide lines indented more than a given
1276 number of columns.  You can use this to get an overview of a part of a
1277 program.
1279   To hide lines in the current buffer, type @kbd{C-x $}
1280 (@code{set-selective-display}) with a numeric argument @var{n}.  Then
1281 lines with at least @var{n} columns of indentation disappear from the
1282 screen.  The only indication of their presence is that three dots
1283 (@samp{@dots{}}) appear at the end of each visible line that is
1284 followed by one or more hidden ones.
1286   The commands @kbd{C-n} and @kbd{C-p} move across the hidden lines as
1287 if they were not there.
1289   The hidden lines are still present in the buffer, and most editing
1290 commands see them as usual, so you may find point in the middle of the
1291 hidden text.  When this happens, the cursor appears at the end of the
1292 previous line, after the three dots.  If point is at the end of the
1293 visible line, before the newline that ends it, the cursor appears before
1294 the three dots.
1296   To make all lines visible again, type @kbd{C-x $} with no argument.
1298 @vindex selective-display-ellipses
1299   If you set the variable @code{selective-display-ellipses} to
1300 @code{nil}, the three dots do not appear at the end of a line that
1301 precedes hidden lines.  Then there is no visible indication of the
1302 hidden lines.  This variable becomes local automatically when set.
1304   See also @ref{Outline Mode} for another way to hide part of
1305 the text in a buffer.
1307 @node Optional Mode Line
1308 @section Optional Mode Line Features
1310 @cindex buffer size display
1311 @cindex display of buffer size
1312 @findex size-indication-mode
1313   The buffer percentage @var{pos} indicates the percentage of the
1314 buffer above the top of the window.  You can additionally display the
1315 size of the buffer by typing @kbd{M-x size-indication-mode} to turn on
1316 Size Indication mode.  The size will be displayed immediately
1317 following the buffer percentage like this:
1319 @example
1320 @var{pos} of @var{size}
1321 @end example
1323 @noindent
1324 Here @var{size} is the human readable representation of the number of
1325 characters in the buffer, which means that @samp{k} for 10^3, @samp{M}
1326 for 10^6, @samp{G} for 10^9, etc., are used to abbreviate.
1328 @cindex line number display
1329 @cindex display of line number
1330 @findex line-number-mode
1331   The current line number of point appears in the mode line when Line
1332 Number mode is enabled.  Use the command @kbd{M-x line-number-mode} to
1333 turn this mode on and off; normally it is on.  The line number appears
1334 after the buffer percentage @var{pos}, with the letter @samp{L} to
1335 indicate what it is.
1337 @cindex Column Number mode
1338 @cindex mode, Column Number
1339 @findex column-number-mode
1340   Similarly, you can display the current column number by turning on
1341 Column number mode with @kbd{M-x column-number-mode}.  The column
1342 number is indicated by the letter @samp{C}.  However, when both of
1343 these modes are enabled, the line and column numbers are displayed in
1344 parentheses, the line number first, rather than with @samp{L} and
1345 @samp{C}.  For example: @samp{(561,2)}.  @xref{Minor Modes}, for more
1346 information about minor modes and about how to use these commands.
1348 @cindex narrowing, and line number display
1349   If you have narrowed the buffer (@pxref{Narrowing}), the displayed
1350 line number is relative to the accessible portion of the buffer.
1351 Thus, it isn't suitable as an argument to @code{goto-line}.  (Use
1352 @code{what-line} command to see the line number relative to the whole
1353 file.)
1355 @vindex line-number-display-limit
1356   If the buffer is very large (larger than the value of
1357 @code{line-number-display-limit}), Emacs won't compute the line
1358 number, because that would be too slow; therefore, the line number
1359 won't appear on the mode-line.  To remove this limit, set
1360 @code{line-number-display-limit} to @code{nil}.
1362 @vindex line-number-display-limit-width
1363   Line-number computation can also be slow if the lines in the buffer
1364 are too long.  For this reason, Emacs doesn't display line numbers if
1365 the average width, in characters, of lines near point is larger than
1366 the value of @code{line-number-display-limit-width}.  The default
1367 value is 200 characters.
1369 @findex display-time
1370 @cindex time (on mode line)
1371   Emacs can optionally display the time and system load in all mode
1372 lines.  To enable this feature, type @kbd{M-x display-time} or customize
1373 the option @code{display-time-mode}.  The information added to the mode
1374 line looks like this:
1376 @example
1377 @var{hh}:@var{mm}pm @var{l.ll}
1378 @end example
1380 @noindent
1381 @vindex display-time-24hr-format
1382 Here @var{hh} and @var{mm} are the hour and minute, followed always by
1383 @samp{am} or @samp{pm}.  @var{l.ll} is the average number, collected
1384 for the last few minutes, of processes in the whole system that were
1385 either running or ready to run (i.e., were waiting for an available
1386 processor).  (Some fields may be missing if your operating system
1387 cannot support them.)  If you prefer time display in 24-hour format,
1388 set the variable @code{display-time-24hr-format} to @code{t}.
1390 @cindex mail (on mode line)
1391 @vindex display-time-use-mail-icon
1392 @vindex display-time-mail-face
1393 @vindex display-time-mail-file
1394 @vindex display-time-mail-directory
1395   The word @samp{Mail} appears after the load level if there is mail
1396 for you that you have not read yet.  On graphical displays, you can
1397 use an icon instead of @samp{Mail} by customizing
1398 @code{display-time-use-mail-icon}; this may save some space on the
1399 mode line.  You can customize @code{display-time-mail-face} to make
1400 the mail indicator prominent.  Use @code{display-time-mail-file} to
1401 specify the mail file to check, or set
1402 @code{display-time-mail-directory} to specify the directory to check
1403 for incoming mail (any nonempty regular file in the directory is
1404 considered to be newly arrived mail).
1406 @cindex battery status (on mode line)
1407 @findex display-battery-mode
1408 @vindex display-battery-mode
1409 @vindex battery-mode-line-format
1410   When running Emacs on a laptop computer, you can display the battery
1411 charge on the mode-line, by using the command
1412 @code{display-battery-mode} or customizing the variable
1413 @code{display-battery-mode}.  The variable
1414 @code{battery-mode-line-format} determines the way the battery charge
1415 is displayed; the exact mode-line message depends on the operating
1416 system, and it usually shows the current battery charge as a
1417 percentage of the total charge.
1419 @cindex mode line, 3D appearance
1420 @cindex attributes of mode line, changing
1421 @cindex non-integral number of lines in a window
1422   On graphical displays, the mode line is drawn as a 3D box.  If you
1423 don't like this effect, you can disable it by customizing the
1424 @code{mode-line} face and setting its @code{box} attribute to
1425 @code{nil}.  @xref{Face Customization}.
1427 @cindex non-selected windows, mode line appearance
1428   By default, the mode line of nonselected windows is displayed in a
1429 different face, called @code{mode-line-inactive}.  Only the selected
1430 window is displayed in the @code{mode-line} face.  This helps show
1431 which window is selected.  When the minibuffer is selected, since
1432 it has no mode line, the window from which you activated the minibuffer
1433 has its mode line displayed using @code{mode-line}; as a result,
1434 ordinary entry to the minibuffer does not change any mode lines.
1436 @vindex mode-line-in-non-selected-windows
1437   You can disable use of @code{mode-line-inactive} by setting variable
1438 @code{mode-line-in-non-selected-windows} to @code{nil}; then all mode
1439 lines are displayed in the @code{mode-line} face.
1441 @vindex eol-mnemonic-unix
1442 @vindex eol-mnemonic-dos
1443 @vindex eol-mnemonic-mac
1444 @vindex eol-mnemonic-undecided
1445   You can customize the mode line display for each of the end-of-line
1446 formats by setting each of the variables @code{eol-mnemonic-unix},
1447 @code{eol-mnemonic-dos}, @code{eol-mnemonic-mac}, and
1448 @code{eol-mnemonic-undecided} to the strings you prefer.
1450 @node Text Display
1451 @section How Text Is Displayed
1452 @cindex characters (in text)
1453 @cindex printing character
1455   Most characters are @dfn{printing characters}: when they appear in a
1456 buffer, they are displayed literally on the screen.  Printing
1457 characters include @acronym{ASCII} numbers, letters, and punctuation
1458 characters, as well as many non-@acronym{ASCII} characters.
1460 @vindex tab-width
1461 @cindex control characters on display
1462   The @acronym{ASCII} character set contains non-printing @dfn{control
1463 characters}.  Two of these are displayed specially: the newline
1464 character (Unicode code point @code{U+000A}) is displayed by starting
1465 a new line, while the tab character (@code{U+0009}) is displayed as a
1466 space that extends to the next tab stop column (normally every 8
1467 columns).  The number of spaces per tab is controlled by the
1468 buffer-local variable @code{tab-width}, which must have an integer
1469 value between 1 and 1000, inclusive.  Note that how the tab character
1470 in the buffer is displayed has nothing to do with the definition of
1471 @key{TAB} as a command.
1473   Other @acronym{ASCII} control characters, whose codes are below
1474 @code{U+0020} (octal 40, decimal 32), are displayed as a caret
1475 (@samp{^}) followed by the non-control version of the character, with
1476 the @code{escape-glyph} face.  For instance, the @samp{control-A}
1477 character, @code{U+0001}, is displayed as @samp{^A}.
1479 @cindex octal escapes
1480 @vindex ctl-arrow
1481   The raw bytes with codes @code{U+0080} (octal 200) through
1482 @code{U+009F} (octal 237) are displayed as @dfn{octal escape
1483 sequences}, with the @code{escape-glyph} face.  For instance,
1484 character code @code{U+0098} (octal 230) is displayed as @samp{\230}.
1485 If you change the buffer-local variable @code{ctl-arrow} to
1486 @code{nil}, the @acronym{ASCII} control characters are also displayed
1487 as octal escape sequences instead of caret escape sequences.
1489 @vindex nobreak-char-display
1490 @cindex non-breaking space
1491 @cindex non-breaking hyphen
1492 @cindex soft hyphen
1493 @cindex escape-glyph face
1494 @cindex nobreak-space face
1495   Some non-@acronym{ASCII} characters have the same appearance as an
1496 @acronym{ASCII} space or hyphen (minus) character.  Such characters
1497 can cause problems if they are entered into a buffer without your
1498 realization, e.g., by yanking; for instance, source code compilers
1499 typically do not treat non-@acronym{ASCII} spaces as whitespace
1500 characters.  To deal with this problem, Emacs displays such characters
1501 specially: it displays @code{U+00A0} (no-break space) with the
1502 @code{nobreak-space} face, and it displays @code{U+00AD} (soft
1503 hyphen), @code{U+2010} (hyphen), and @code{U+2011} (non-breaking
1504 hyphen) with the @code{nobreak-hyphen} face.  To disable this, change
1505 the variable @code{nobreak-char-display} to @code{nil}.  If you give
1506 this variable a non-@code{nil} and non-@code{t} value, Emacs instead
1507 displays such characters as a highlighted backslash followed by a
1508 space or hyphen.
1510   You can customize the way any particular character code is displayed
1511 by means of a display table.  @xref{Display Tables,, Display Tables,
1512 elisp, The Emacs Lisp Reference Manual}.
1514 @cindex glyphless characters
1515 @cindex characters with no font glyphs
1516 @cindex glyphless-char face
1517   On graphical displays, some characters may have no glyphs in any of
1518 the fonts available to Emacs.  These @dfn{glyphless characters} are
1519 normally displayed as boxes containing the hexadecimal character code.
1520 Similarly, on text terminals, characters that cannot be displayed
1521 using the terminal encoding (@pxref{Terminal Coding}) are normally
1522 displayed as question signs.  You can control the display method by
1523 customizing the variable @code{glyphless-char-display-control}.  You
1524 can also customize the @code{glyphless-char} face to make these
1525 characters more prominent on display.  @xref{Glyphless Chars,,
1526 Glyphless Character Display, elisp, The Emacs Lisp Reference Manual},
1527 for details.
1529 @cindex curly quotes
1530 @cindex curved quotes
1531 @cindex homoglyph face
1532   If the curved quotes @samp{‘}, @samp{’}, @samp{“}, and @samp{”} are
1533 known to look just like @acronym{ASCII} characters, they are shown
1534 with the @code{homoglyph} face.  Curved quotes that cannot be
1535 displayed are shown as their @acronym{ASCII} approximations @samp{`},
1536 @samp{'}, and @samp{"} with the @code{homoglyph} face.
1538 @node Cursor Display
1539 @section Displaying the Cursor
1540 @cindex text cursor
1542 @vindex visible-cursor
1543   On a text terminal, the cursor's appearance is controlled by the
1544 terminal, largely out of the control of Emacs.  Some terminals offer
1545 two different cursors: a visible static cursor, and a very
1546 visible blinking cursor.  By default, Emacs uses the very visible
1547 cursor, and switches to it when you start or resume Emacs.  If the
1548 variable @code{visible-cursor} is @code{nil} when Emacs starts or
1549 resumes, it uses the normal cursor.
1551 @cindex cursor face
1552 @vindex cursor-type
1553   On a graphical display, many more properties of the text cursor can
1554 be altered.  To customize its color, change the @code{:background}
1555 attribute of the face named @code{cursor} (@pxref{Face
1556 Customization}).  (The other attributes of this face have no effect;
1557 the text shown under the cursor is drawn using the frame's background
1558 color.)  To change its shape, customize the buffer-local variable
1559 @code{cursor-type}; possible values are @code{box} (the default),
1560 @code{hollow} (a hollow box), @code{bar} (a vertical bar), @code{(bar
1561 . @var{n})} (a vertical bar @var{n} pixels wide), @code{hbar} (a
1562 horizontal bar), @code{(hbar . @var{n})} (a horizontal bar @var{n}
1563 pixels tall), or @code{nil} (no cursor at all).
1565 @findex blink-cursor-mode
1566 @cindex cursor, blinking
1567 @cindex blinking cursor
1568 @vindex blink-cursor-mode
1569 @vindex blink-cursor-blinks
1570 @vindex blink-cursor-alist
1571   By default, the cursor stops blinking after 10 blinks, if Emacs does
1572 not get any input during that time; any input event restarts the
1573 count.  You can customize the variable @code{blink-cursor-blinks} to
1574 control that: its value says how many times to blink without input
1575 before stopping.  Setting that variable to a zero or negative value
1576 will make the cursor blink forever.  To disable cursor blinking
1577 altogether, change the variable @code{blink-cursor-mode} to @code{nil}
1578 (@pxref{Easy Customization}), or add the line
1580 @lisp
1581   (blink-cursor-mode 0)
1582 @end lisp
1584 @noindent
1585 to your init file.  Alternatively, you can change how the cursor
1586 looks when it blinks off by customizing the list variable
1587 @code{blink-cursor-alist}.  Each element in the list should have the
1588 form @code{(@var{on-type} . @var{off-type})}; this means that if the
1589 cursor is displayed as @var{on-type} when it blinks on (where
1590 @var{on-type} is one of the cursor types described above), then it is
1591 displayed as @var{off-type} when it blinks off.
1593 @vindex x-stretch-cursor
1594 @cindex wide block cursor
1595   Some characters, such as tab characters, are extra wide.  When
1596 the cursor is positioned over such a character, it is normally drawn
1597 with the default character width.  You can make the cursor stretch to
1598 cover wide characters, by changing the variable
1599 @code{x-stretch-cursor} to a non-@code{nil} value.
1601 @cindex cursor in non-selected windows
1602 @vindex cursor-in-non-selected-windows
1603   The cursor normally appears in non-selected windows as a
1604 non-blinking hollow box.  (For a bar cursor, it instead appears as a
1605 thinner bar.)  To turn off cursors in non-selected windows, change the
1606 variable @code{cursor-in-non-selected-windows} to @code{nil}.
1608 @findex hl-line-mode
1609 @findex global-hl-line-mode
1610 @cindex highlight current line
1611   To make the cursor even more visible, you can use HL Line mode, a
1612 minor mode that highlights the line containing point.  Use @kbd{M-x
1613 hl-line-mode} to enable or disable it in the current buffer.  @kbd{M-x
1614 global-hl-line-mode} enables or disables the same mode globally.
1616 @node Line Truncation
1617 @section Line Truncation
1619 @cindex truncation
1620 @cindex line truncation, and fringes
1621   As an alternative to continuation (@pxref{Continuation Lines}),
1622 Emacs can display long lines by @dfn{truncation}.  This means that all
1623 the characters that do not fit in the width of the screen or window do
1624 not appear at all.  On graphical displays, a small straight arrow in
1625 the fringe indicates truncation at either end of the line.  On text
1626 terminals, this is indicated with @samp{$} signs in the leftmost
1627 and/or rightmost columns.
1629 @vindex truncate-lines
1630 @findex toggle-truncate-lines
1631   Horizontal scrolling automatically causes line truncation
1632 (@pxref{Horizontal Scrolling}).  You can explicitly enable line
1633 truncation for a particular buffer with the command @kbd{M-x
1634 toggle-truncate-lines}.  This works by locally changing the variable
1635 @code{truncate-lines}.  If that variable is non-@code{nil}, long lines
1636 are truncated; if it is @code{nil}, they are continued onto multiple
1637 screen lines.  Setting the variable @code{truncate-lines} in any way
1638 makes it local to the current buffer; until that time, the default
1639 value, which is normally @code{nil}, is in effect.
1641   If a split window becomes too narrow, Emacs may automatically enable
1642 line truncation.  @xref{Split Window}, for the variable
1643 @code{truncate-partial-width-windows} which controls this.
1645 @node Visual Line Mode
1646 @section Visual Line Mode
1648 @cindex word wrap
1649   Another alternative to ordinary line continuation is to use
1650 @dfn{word wrap}.  Here, each long logical line is divided into two or
1651 more screen lines, like in ordinary line continuation.  However, Emacs
1652 attempts to wrap the line at word boundaries near the right window
1653 edge.  This makes the text easier to read, as wrapping does not occur
1654 in the middle of words.
1656 @cindex mode, Visual Line
1657 @cindex Visual Line mode
1658 @findex visual-line-mode
1659 @findex global-visual-line-mode
1660   Word wrap is enabled by Visual Line mode, an optional minor mode.
1661 To turn on Visual Line mode in the current buffer, type @kbd{M-x
1662 visual-line-mode}; repeating this command turns it off.  You can also
1663 turn on Visual Line mode using the menu bar: in the Options menu,
1664 select the @samp{Line Wrapping in this Buffer} submenu, followed by
1665 the @samp{Word Wrap (Visual Line Mode)} menu item.  While Visual Line
1666 mode is enabled, the mode-line shows the string @samp{wrap} in the
1667 mode display.  The command @kbd{M-x global-visual-line-mode} toggles
1668 Visual Line mode in all buffers.
1670 @findex beginning-of-visual-line
1671 @findex end-of-visual-line
1672 @findex next-logical-line
1673 @findex previous-logical-line
1674   In Visual Line mode, some editing commands work on screen lines
1675 instead of logical lines: @kbd{C-a} (@code{beginning-of-visual-line})
1676 moves to the beginning of the screen line, @kbd{C-e}
1677 (@code{end-of-visual-line}) moves to the end of the screen line, and
1678 @kbd{C-k} (@code{kill-visual-line}) kills text to the end of the
1679 screen line.
1681   To move by logical lines, use the commands @kbd{M-x
1682 next-logical-line} and @kbd{M-x previous-logical-line}.  These move
1683 point to the next logical line and the previous logical line
1684 respectively, regardless of whether Visual Line mode is enabled.  If
1685 you use these commands frequently, it may be convenient to assign key
1686 bindings to them.  @xref{Init Rebinding}.
1688   By default, word-wrapped lines do not display fringe indicators.
1689 Visual Line mode is often used to edit files that contain many long
1690 logical lines, so having a fringe indicator for each wrapped line
1691 would be visually distracting.  You can change this by customizing the
1692 variable @code{visual-line-fringe-indicators}.
1694 @node Display Custom
1695 @section Customization of Display
1697   This section describes variables that control miscellaneous aspects
1698 of the appearance of the Emacs screen.  Beginning users can skip it.
1700 @vindex visible-bell
1701   If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts
1702 to make the whole screen blink when it would normally make an audible bell
1703 sound.  This variable has no effect if your terminal does not have a way
1704 to make the screen blink.
1706 @vindex echo-keystrokes
1707   The variable @code{echo-keystrokes} controls the echoing of multi-character
1708 keys; its value is the number of seconds of pause required to cause echoing
1709 to start, or zero, meaning don't echo at all.  The value takes effect when
1710 there is something to echo.  @xref{Echo Area}.
1712 @cindex mouse pointer
1713 @cindex hourglass pointer display
1714 @vindex display-hourglass
1715 @vindex hourglass-delay
1716   On graphical displays, Emacs displays the mouse pointer as an
1717 hourglass if Emacs is busy.  To disable this feature, set the variable
1718 @code{display-hourglass} to @code{nil}.  The variable
1719 @code{hourglass-delay} determines the number of seconds of busy
1720 time before the hourglass is shown; the default is 1.
1722 @vindex make-pointer-invisible
1723   If the mouse pointer lies inside an Emacs frame, Emacs makes it
1724 invisible each time you type a character to insert text, to prevent it
1725 from obscuring the text.  (To be precise, the hiding occurs when you
1726 type a self-inserting character.  @xref{Inserting Text}.)  Moving
1727 the mouse pointer makes it visible again.  To disable this feature,
1728 set the variable @code{make-pointer-invisible} to @code{nil}.
1730 @vindex underline-minimum-offset
1731 @vindex x-underline-at-descent-line
1732   On graphical displays, the variable @code{underline-minimum-offset}
1733 determines the minimum distance between the baseline and underline, in
1734 pixels, for underlined text.  By default, the value is 1; increasing
1735 it may improve the legibility of underlined text for certain fonts.
1736 (However, Emacs will never draw the underline below the current line
1737 area.)  The variable @code{x-underline-at-descent-line} determines how
1738 to draw underlined text.  The default is @code{nil}, which means to
1739 draw it at the baseline level of the font; if you change it to
1740 @code{nil}, Emacs draws the underline at the same height as the font's
1741 descent line.
1743 @vindex overline-margin
1744   The variable @code{overline-margin} specifies the vertical position
1745 of an overline above the text, including the height of the overline
1746 itself, in pixels; the default is 2.
1748 @findex tty-suppress-bold-inverse-default-colors
1749   On some text terminals, bold face and inverse video together result
1750 in text that is hard to read.  Call the function
1751 @code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil}
1752 argument to suppress the effect of bold-face in this case.