summaryrefslogtreecommitdiff
path: root/doc/emacs/display.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/emacs/display.texi')
-rw-r--r--doc/emacs/display.texi199
1 files changed, 128 insertions, 71 deletions
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index aa9977a52e5..a722ec4841b 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1,5 +1,6 @@
+@c -*- coding: utf-8 -*-
@c This is part of the Emacs manual.
-@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2013 Free Software
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2015 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@@ -47,18 +48,18 @@ the text is displayed.
displays only a portion of it. @dfn{Scrolling} commands change which
portion of the buffer is displayed.
- Scrolling ``forward'' or ``up'' advances the portion of the buffer
+ Scrolling forward or up advances the portion of the buffer
displayed in the window; equivalently, it moves the buffer text
-upwards relative to the window. Scrolling ``backward'' or ``down''
+upwards relative to the window. Scrolling backward or down
displays an earlier portion of the buffer, and moves the text
downwards relative to the window.
- In Emacs, scrolling ``up'' or ``down'' refers to the direction that
+ In Emacs, scrolling up or down refers to the direction that
the text moves in the window, @emph{not} the direction that the window
moves relative to the text. This terminology was adopted by Emacs
before the modern meaning of ``scrolling up'' and ``scrolling down''
became widespread. Hence, the strange result that @key{PageDown}
-scrolls ``up'' in the Emacs sense.
+scrolls up in the Emacs sense.
The portion of a buffer displayed in a window always contains point.
If you move point past the bottom or top of the window, scrolling
@@ -127,6 +128,19 @@ the mouse wheel (@pxref{Mouse Commands}); in general, it affects any
command that has a non-@code{nil} @code{scroll-command} property.
@xref{Property Lists,,, elisp, The Emacs Lisp Reference Manual}.
+@vindex fast-but-imprecise-scrolling
+ Sometimes, particularly when you hold down keys such as @kbd{C-v}
+and @kbd{M-v}, activating keyboard auto-repeat, Emacs fails to keep up
+with the rapid rate of scrolling requested; the display doesn't update
+and Emacs can become unresponsive to input for quite a long time. You
+can counter this sluggishness by setting the variable
+@code{fast-but-imprecise-scrolling} to a non-@code{nil} value. This
+instructs the scrolling commands not to fontify (@pxref{Font Lock})
+any unfontified text they scroll over, instead to assume it has the
+default face. This can cause Emacs to scroll to somewhat wrong buffer
+positions when the faces in use are not all the same size, even with
+single (i.e., without auto-repeat) scrolling operations.
+
@vindex scroll-up
@vindex scroll-down
@findex scroll-up-line
@@ -428,8 +442,8 @@ it. @xref{Disabling}.
screenfuls. It provides commands for scrolling through the buffer
conveniently but not for changing it. Apart from the usual Emacs
cursor motion commands, you can type @key{SPC} to scroll forward one
-windowful, @key{DEL} to scroll backward, and @kbd{s} to start an
-incremental search.
+windowful, @kbd{S-@key{SPC}} or @key{DEL} to scroll backward, and @kbd{s} to
+start an incremental search.
@kindex q @r{(View mode)}
@kindex e @r{(View mode)}
@@ -455,7 +469,7 @@ and visits it with View mode enabled.
@cindex synchronizing windows
@dfn{Follow mode} is a minor mode that makes two windows, both
-showing the same buffer, scroll as a single tall ``virtual window''.
+showing the same buffer, scroll as a single tall virtual window.
To use Follow mode, go to a frame with just one window, split it into
two side-by-side windows using @kbd{C-x 3}, and then type @kbd{M-x
follow-mode}. From then on, you can edit the buffer in either of the
@@ -578,6 +592,7 @@ Parameters}.
@node Standard Faces
@section Standard Faces
+@cindex standard faces
Here are the standard faces for specifying text appearance. You can
apply them to specific text when you want the effects they produce.
@@ -598,8 +613,10 @@ This face underlines text.
This face forces use of a fixed-width font. It's reasonable to
customize this face to use a different fixed-width font, if you like,
but you should not make it a variable-width font.
+@cindex variable-pitch face
@item variable-pitch
This face forces use of a variable-width font.
+@cindex shadow face
@item shadow
This face is used for making the text less noticeable than the surrounding
ordinary text. Usually this can be achieved by using shades of gray in
@@ -621,7 +638,7 @@ This face is used to highlight the current Isearch match
This face is used to highlight the current Query Replace match
(@pxref{Replace}).
@item lazy-highlight
-This face is used to highlight ``lazy matches'' for Isearch and Query
+This face is used to highlight lazy matches for Isearch and Query
Replace (matches other than the current one).
@item region
This face is used for displaying an active region (@pxref{Mark}).
@@ -638,7 +655,7 @@ Whitespace}).
The face for displaying control characters and escape sequences
(@pxref{Text Display}).
@item nobreak-space
-The face for displaying ``no-break'' space characters (@pxref{Text
+The face for displaying no-break space characters (@pxref{Text
Display}).
@end table
@@ -647,25 +664,34 @@ frame:
@table @code
@item mode-line
+@cindex mode-line face
+@cindex faces for mode lines
This face is used for the mode line of the currently selected window,
and for menu bars when toolkit menus are not used. By default, it's
-drawn with shadows for a ``raised'' effect on graphical displays, and
+drawn with shadows for a raised effect on graphical displays, and
drawn as the inverse of the default face on non-windowed terminals.
@item mode-line-inactive
+@cindex mode-line-inactive face
Like @code{mode-line}, but used for mode lines of the windows other
than the selected one (if @code{mode-line-in-non-selected-windows} is
non-@code{nil}). This face inherits from @code{mode-line}, so changes
in that face affect mode lines in all windows.
@item mode-line-highlight
-Like @code{highlight}, but used for portions of text on mode lines.
+@cindex mode-line-highlight face
+Like @code{highlight}, but used for mouse-sensitive portions of text
+on mode lines. Such portions of text typically pop up tooltips
+(@pxref{Tooltips}) when the mouse pointer hovers above them.
@item mode-line-buffer-id
+@cindex mode-line-buffer-id face
This face is used for buffer identification parts in the mode line.
@item header-line
+@cindex header-line face
Similar to @code{mode-line} for a window's header line, which appears
at the top of a window just as the mode line appears at the bottom.
Most windows do not have a header line---only some special modes, such
Info mode, create one.
@item vertical-border
+@cindex vertical-border face
This face is used for the vertical divider between windows on text
terminals.
@item minibuffer-prompt
@@ -674,8 +700,9 @@ terminals.
This face is used for the prompt strings displayed in the minibuffer.
By default, Emacs automatically adds this face to the value of
@code{minibuffer-prompt-properties}, which is a list of text
-properties used to display the prompt text. (This variable takes
-effect when you enter the minibuffer.)
+properties (@pxref{Text Properties,,, elisp, the Emacs Lisp Reference
+Manual}) used to display the prompt text. (This variable takes effect
+when you enter the minibuffer.)
@item fringe
@cindex @code{fringe} face
The face for the fringes to the left and right of windows on graphic
@@ -710,6 +737,17 @@ This face determines the color of tool bar icons. @xref{Tool Bars}.
@cindex customization of @code{menu} face
This face determines the colors and font of Emacs's menus. @xref{Menu
Bars}.
+@item tty-menu-enabled-face
+@cindex faces for text-mode menus
+@cindex TTY menu faces
+This face is used to display enabled menu items on text-mode
+terminals.
+@item tty-menu-disabled-face
+This face is used to display disabled menu items on text-mode
+terminals.
+@item tty-menu-selected-face
+This face is used to display on text-mode terminals the menu item that
+would be selected if you click a mouse or press @key{RET}.
@end table
@node Text Scale
@@ -732,9 +770,9 @@ determine which action to take.
@kbd{C-x}. For instance, @kbd{C-x C-= C-= C-=} increases the face
height by three steps. Each step scales the text height by a factor
of 1.2; to change this factor, customize the variable
-@code{text-scale-mode-step}. As an exception, a numeric argument of 0
+@code{text-scale-mode-step}. A numeric argument of 0
to the @code{text-scale-adjust} command restores the default height,
-similar to typing @kbd{C-x C-0}.
+the same as typing @kbd{C-x C-0}.
@cindex increase buffer face height
@findex text-scale-increase
@@ -817,7 +855,6 @@ and the default level otherwise, use the value
'((c-mode . 1) (c++-mode . 1)))
@end example
-@vindex font-lock-beginning-of-syntax-function
@cindex incorrect fontification
@cindex parenthesis in column zero and fontification
@cindex brace in column zero and fontification
@@ -830,19 +867,6 @@ any string or comment. Therefore, you should avoid placing an
open-parenthesis or open-brace in the leftmost column, if it is inside
a string or comment. @xref{Left Margin Paren}, for details.
-@cindex slow display during scrolling
- The variable @code{font-lock-beginning-of-syntax-function}, which is
-always buffer-local, specifies how Font Lock mode can find a position
-guaranteed to be outside any comment or string. In modes which use
-the leftmost column parenthesis convention, the default value of the
-variable is @code{beginning-of-defun}---that tells Font Lock mode to
-use the convention. If you set this variable to @code{nil}, Font Lock
-no longer relies on the convention. This avoids incorrect results,
-but the price is that, in some cases, fontification for a changed text
-must rescan buffer text from the beginning of the buffer. This can
-considerably slow down redisplay while scrolling, particularly if you
-are close to the end of a large buffer.
-
@findex font-lock-add-keywords
Font Lock highlighting patterns already exist for most modes, but
you may want to fontify additional patterns. You can use the function
@@ -917,6 +941,12 @@ highlighting, Hi Lock provides several of its own and these are
pre-loaded into a list of default values. While being prompted
for a face use @kbd{M-n} and @kbd{M-p} to cycle through them.
+@vindex hi-lock-auto-select-face
+Setting the option @code{hi-lock-auto-select-face} to a non-@code{nil}
+value causes this command (and other Hi Lock commands that read faces)
+to automatically choose the next face from the default list without
+prompting.
+
You can use this command multiple times, specifying various regular
expressions to highlight in different ways.
@@ -965,8 +995,8 @@ initial lower-case letters will become case insensitive.
@findex highlight-symbol-at-point
@cindex symbol, highlighting
@cindex highlighting symbol at point
-Highlight the symbol found near point without prompting, using the next
-available face automatically (@code{highlight-symbol-at-point}).
+Highlight the symbol found near point, using the next available face
+(@code{highlight-symbol-at-point}).
@item M-s h w
@itemx C-x w b
@@ -1030,17 +1060,18 @@ variable @code{fringe-mode}.
The most common use of the fringes is to indicate a continuation
line (@pxref{Continuation Lines}). When one line of text is split
into multiple screen lines, the left fringe shows a curving arrow for
-each screen line except the first, indicating that ``this is not the
-real beginning''. The right fringe shows a curving arrow for each
-screen line except the last, indicating that ``this is not the real
-end''. If the line's direction is right-to-left (@pxref{Bidirectional
+each screen line except the first, indicating that this is not the
+real beginning. The right fringe shows a curving arrow for each
+screen line except the last, indicating that this is not the real
+end. If the line's direction is right-to-left (@pxref{Bidirectional
Editing}), the meanings of the curving arrows in the fringes are
swapped.
- The fringes indicate line truncation with short horizontal arrows
-meaning ``there's more text on this line which is scrolled
-horizontally out of view''. Clicking the mouse on one of the arrows
-scrolls the display horizontally in the direction of the arrow.
+ The fringes indicate line truncation (@pxref{Line Truncation}) with
+short horizontal arrows meaning there's more text on this line which
+is scrolled horizontally out of view. Clicking the mouse on one of
+the arrows scrolls the display horizontally in the direction of the
+arrow.
The fringes can also indicate other things, such as buffer
boundaries (@pxref{Displaying Boundaries}), and where a program you
@@ -1068,13 +1099,14 @@ how the buffer boundaries and window scrolling is indicated in the
fringes. If the value is @code{left} or @code{right}, both angle and
arrow bitmaps are displayed in the left or right fringe, respectively.
- If value is an alist, each element @code{(@var{indicator} .
-@var{position})} specifies the position of one of the indicators.
-The @var{indicator} must be one of @code{top}, @code{bottom},
-@code{up}, @code{down}, or @code{t} which specifies the default
-position for the indicators not present in the alist.
-The @var{position} is one of @code{left}, @code{right}, or @code{nil}
-which specifies not to show this indicator.
+ If value is an alist (@pxref{Association Lists,,, elisp, the Emacs
+Lisp Reference Manual}), each element @code{(@var{indicator} .
+@var{position})} specifies the position of one of the indicators. The
+@var{indicator} must be one of @code{top}, @code{bottom}, @code{up},
+@code{down}, or @code{t} which specifies the default position for the
+indicators not present in the alist. The @var{position} is one of
+@code{left}, @code{right}, or @code{nil} which specifies not to show
+this indicator.
For example, @code{((top . left) (t . right))} places the top angle
bitmap in left fringe, the bottom angle bitmap in right fringe, and
@@ -1093,14 +1125,15 @@ empty lines at the end of a buffer, without realizing it. In most
cases, this @dfn{trailing whitespace} has no effect, but sometimes it
can be a nuisance.
+@cindex trailing-whitespace face
You can make trailing whitespace at the end of a line visible by
setting the buffer-local variable @code{show-trailing-whitespace} to
@code{t}. Then Emacs displays trailing whitespace, using the face
@code{trailing-whitespace}.
This feature does not apply when point is at the end of the line
-containing the whitespace. Strictly speaking, that is ``trailing
-whitespace'' nonetheless, but displaying it specially in that case
+containing the whitespace. Strictly speaking, that is trailing
+whitespace nonetheless, but displaying it specially in that case
looks ugly while you are typing in new text. In this special case,
the location of point is enough to show you that the spaces are
present.
@@ -1132,7 +1165,7 @@ indicate-empty-lines t)}.
@findex whitespace-mode
@vindex whitespace-style
Whitespace mode is a buffer-local minor mode that lets you
-``visualize'' many kinds of whitespace in the buffer, by either
+visualize many kinds of whitespace in the buffer, by either
drawing the whitespace characters with a special face or displaying
them as special glyphs. To toggle this mode, type @kbd{M-x
whitespace-mode}. The kinds of whitespace visualized are determined
@@ -1158,7 +1191,7 @@ Highlight space and non-breaking space characters.
@item lines
@vindex whitespace-line-column
-Highlight lines longer than 80 lines. To change the column limit,
+Highlight lines longer than 80 columns. To change the column limit,
customize the variable @code{whitespace-line-column}.
@item newline
@@ -1228,11 +1261,11 @@ Size Indication mode. The size will be displayed immediately
following the buffer percentage like this:
@example
-@var{POS} of @var{SIZE}
+@var{pos} of @var{size}
@end example
@noindent
-Here @var{SIZE} is the human readable representation of the number of
+Here @var{size} is the human readable representation of the number of
characters in the buffer, which means that @samp{k} for 10^3, @samp{M}
for 10^6, @samp{G} for 10^9, etc., are used to abbreviate.
@@ -1312,9 +1345,9 @@ the mail indicator prominent. Use @code{display-time-mail-file} to
specify the mail file to check, or set
@code{display-time-mail-directory} to specify the directory to check
for incoming mail (any nonempty regular file in the directory is
-considered as ``newly arrived mail'').
+considered to be newly arrived mail).
-@cindex mail (on mode line)
+@cindex battery status (on mode line)
@findex display-battery-mode
@vindex display-battery-mode
@vindex battery-mode-line-format
@@ -1401,6 +1434,8 @@ as octal escape sequences instead of caret escape sequences.
@cindex non-breaking space
@cindex non-breaking hyphen
@cindex soft hyphen
+@cindex escape-glyph face
+@cindex nobreak-space face
Some non-@acronym{ASCII} characters have the same appearance as an
@acronym{ASCII} space or hyphen (minus) character. Such characters
can cause problems if they are entered into a buffer without your
@@ -1432,6 +1467,15 @@ customizing the variable @code{glyphless-char-display-control}.
@xref{Glyphless Chars,, Glyphless Character Display, elisp, The Emacs
Lisp Reference Manual}, for details.
+@cindex curly quotes
+@cindex curved quotes
+@cindex escape-glyph face
+ If the curved quotes @samp{‘}, @samp{’}, @samp{“}, and @samp{”} are
+known to look just like @acronym{ASCII} characters, they are shown
+with the @code{escape-glyph} face. Curved quotes that cannot be
+displayed are shown as their @acronym{ASCII} approximations @samp{`},
+@samp{'}, and @samp{"} with the @code{escape-glyph} face.
+
@node Cursor Display
@section Displaying the Cursor
@cindex text cursor
@@ -1439,8 +1483,8 @@ Lisp Reference Manual}, for details.
@vindex visible-cursor
On a text terminal, the cursor's appearance is controlled by the
terminal, largely out of the control of Emacs. Some terminals offer
-two different cursors: a ``visible'' static cursor, and a ``very
-visible'' blinking cursor. By default, Emacs uses the very visible
+two different cursors: a visible static cursor, and a very
+visible blinking cursor. By default, Emacs uses the very visible
cursor, and switches to it when you start or resume Emacs. If the
variable @code{visible-cursor} is @code{nil} when Emacs starts or
resumes, it uses the normal cursor.
@@ -1462,21 +1506,34 @@ pixels tall), or @code{nil} (no cursor at all).
@findex blink-cursor-mode
@cindex cursor, blinking
@cindex blinking cursor
+@vindex blink-cursor-mode
+@vindex blink-cursor-blinks
@vindex blink-cursor-alist
- To disable cursor blinking, change the variable
-@code{blink-cursor-mode} to @code{nil} (@pxref{Easy Customization}),
-or add the line @code{(blink-cursor-mode 0)} to your init file.
-Alternatively, you can change how the cursor looks when it ``blinks
-off'' by customizing the list variable @code{blink-cursor-alist}.
-Each element in the list should have the form @code{(@var{on-type}
-. @var{off-type})}; this means that if the cursor is displayed as
-@var{on-type} when it blinks on (where @var{on-type} is one of the
-cursor types described above), then it is displayed as @var{off-type}
-when it blinks off.
+ By default, the cursor stops blinking after 10 blinks, if Emacs does
+not get any input during that time; any input event restarts the
+count. You can customize the variable @code{blink-cursor-blinks} to
+control that: its value says how many times to blink without input
+before stopping. Setting that variable to a zero or negative value
+will make the cursor blink forever. To disable cursor blinking
+altogether, change the variable @code{blink-cursor-mode} to @code{nil}
+(@pxref{Easy Customization}), or add the line
+
+@lisp
+ (blink-cursor-mode 0)
+@end lisp
+
+@noindent
+to your init file. Alternatively, you can change how the cursor
+looks when it blinks off by customizing the list variable
+@code{blink-cursor-alist}. Each element in the list should have the
+form @code{(@var{on-type} . @var{off-type})}; this means that if the
+cursor is displayed as @var{on-type} when it blinks on (where
+@var{on-type} is one of the cursor types described above), then it is
+displayed as @var{off-type} when it blinks off.
@vindex x-stretch-cursor
@cindex wide block cursor
- Some characters, such as tab characters, are ``extra wide''. When
+ Some characters, such as tab characters, are extra wide. When
the cursor is positioned over such a character, it is normally drawn
with the default character width. You can make the cursor stretch to
cover wide characters, by changing the variable
@@ -1601,14 +1658,14 @@ there is something to echo. @xref{Echo Area}.
On graphical displays, Emacs displays the mouse pointer as an
hourglass if Emacs is busy. To disable this feature, set the variable
@code{display-hourglass} to @code{nil}. The variable
-@code{hourglass-delay} determines the number of seconds of ``busy
-time'' before the hourglass is shown; the default is 1.
+@code{hourglass-delay} determines the number of seconds of busy
+time before the hourglass is shown; the default is 1.
@vindex make-pointer-invisible
If the mouse pointer lies inside an Emacs frame, Emacs makes it
invisible each time you type a character to insert text, to prevent it
from obscuring the text. (To be precise, the hiding occurs when you
-type a ``self-inserting'' character. @xref{Inserting Text}.) Moving
+type a self-inserting character. @xref{Inserting Text}.) Moving
the mouse pointer makes it visible again. To disable this feature,
set the variable @code{make-pointer-invisible} to @code{nil}.