]> code.delx.au - gnu-emacs/blobdiff - doc/emacs/display.texi
Merge from origin/emacs-25
[gnu-emacs] / doc / emacs / display.texi
index 601a40bd176d505e88d7e021126b787d3903cb6a..3f5aac1c2ff1e26e492b5d3b720160dea08aec9e 100644 (file)
@@ -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-2015 Free Software
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2016 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
@@ -468,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
@@ -612,6 +613,9 @@ 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.
+@item fixed-pitch-serif
+This face is like @code{fixed-pitch}, except the font has serifs and
+looks more like traditional typewriting.
 @cindex variable-pitch face
 @item variable-pitch
 This face forces use of a variable-width font.
@@ -637,7 +641,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}).
@@ -654,7 +658,10 @@ 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}).
+@item nobreak-hyphen
+The face for displaying no-break hyphen characters (@pxref{Text
 Display}).
 @end table
 
@@ -667,7 +674,7 @@ frame:
 @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
@@ -854,7 +861,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
@@ -867,19 +873,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
@@ -937,7 +930,10 @@ mode for all buffers, use @kbd{M-x global-hi-lock-mode} or place
 
   Hi Lock mode works like Font Lock mode (@pxref{Font Lock}), except
 that you specify explicitly the regular expressions to highlight.  You
-control them with these commands:
+control them with the commands described below.  (The key bindings
+below that begin with @kbd{C-x w} are deprecated in favor of the
+global @kbd{M-s h} bindings, and will be removed in some future Emacs
+version.)
 
 @table @kbd
 @item M-s h r @var{regexp} @key{RET} @var{face} @key{RET}
@@ -1073,16 +1069,16 @@ 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 (@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
+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.
 
@@ -1097,6 +1093,23 @@ To disable this, change the variable
 @code{overflow-newline-into-fringe} to @code{nil}; this causes Emacs
 to continue or truncate lines that are exactly as wide as the window.
 
+  If you customize @code{fringe-mode} to remove the fringes on one or
+both sides of the window display, the features that display on the
+fringe are not available.  Indicators of line continuation and
+truncation are an exception: when fringes are not available, Emacs
+uses the leftmost and rightmost character cells to indicate
+continuation and truncation with special ASCII characters, see
+@ref{Continuation Lines}, and @ref{Line Truncation}.  This reduces the
+width available for displaying text on each line, because the
+character cells used for truncation and continuation indicators are
+reserved for that purpose.  Since buffer text can include
+bidirectional text, and thus both left-to-right and right-to-left
+paragraphs (@pxref{Bidirectional Editing}), removing only one of the
+fringes still reserves two character cells, one on each side of the
+window, for truncation and continuation indicators, because these
+indicators are displayed on opposite sides of the window in
+right-to-left paragraphs.
+
 @node Displaying Boundaries
 @section Displaying Boundaries
 
@@ -1145,8 +1158,8 @@ setting the buffer-local variable @code{show-trailing-whitespace} to
 @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.
@@ -1177,12 +1190,15 @@ indicate-empty-lines t)}.
 @cindex mode, Whitespace
 @findex whitespace-mode
 @vindex whitespace-style
+@findex whitespace-toggle-options
   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
-by the list variable @code{whitespace-style}.  Here is a partial list
+by the list variable @code{whitespace-style}.  Individual elements in
+that list can be toggled on or off in the current buffer by typing
+@w{@kbd{M-x whitespace-toggle-options}}.  Here is a partial list
 of possible elements (see the variable's documentation for the full
 list):
 
@@ -1213,6 +1229,13 @@ Highlight newlines.
 @item empty
 Highlight empty lines.
 
+@item big-indent
+@vindex whitespace-big-indent-regexp
+Highlight too-deep indentation.  By default any sequence of at least 4
+consecutive TAB characters or 32 consecutive SPC characters is
+highlighted.  To change that, customize the regular expression
+@code{whitespace-big-indent-regexp}.
+
 @item space-mark
 Draw space and non-breaking characters with a special glyph.
 
@@ -1223,6 +1246,12 @@ Draw tab characters with a special glyph.
 Draw newline characters with a special glyph.
 @end table
 
+@findex global-whitespace-toggle-options
+@findex global-whitespace-mode
+Global Whitespace mode is a global minor mode that lets you visualize
+whitespace in all buffers.  To toggle individual features, use
+@kbd{M-x global-whitespace-toggle-options}.
+
 @node Selective Display
 @section Selective Display
 @cindex selective display
@@ -1358,7 +1387,7 @@ 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 battery status (on mode line)
 @findex display-battery-mode
@@ -1458,7 +1487,7 @@ characters.  To deal with this problem, Emacs displays such characters
 specially: it displays @code{U+00A0} (no-break space) with the
 @code{nobreak-space} face, and it displays @code{U+00AD} (soft
 hyphen), @code{U+2010} (hyphen), and @code{U+2011} (non-breaking
-hyphen) with the @code{escape-glyph} face.  To disable this, change
+hyphen) with the @code{nobreak-hyphen} face.  To disable this, change
 the variable @code{nobreak-char-display} to @code{nil}.  If you give
 this variable a non-@code{nil} and non-@code{t} value, Emacs instead
 displays such characters as a highlighted backslash followed by a
@@ -1470,15 +1499,27 @@ elisp, The Emacs Lisp Reference Manual}.
 
 @cindex glyphless characters
 @cindex characters with no font glyphs
+@cindex glyphless-char face
   On graphical displays, some characters may have no glyphs in any of
 the fonts available to Emacs.  These @dfn{glyphless characters} are
 normally displayed as boxes containing the hexadecimal character code.
 Similarly, on text terminals, characters that cannot be displayed
 using the terminal encoding (@pxref{Terminal Coding}) are normally
 displayed as question signs.  You can control the display method by
-customizing the variable @code{glyphless-char-display-control}.
-@xref{Glyphless Chars,, Glyphless Character Display, elisp, The Emacs
-Lisp Reference Manual}, for details.
+customizing the variable @code{glyphless-char-display-control}.  You
+can also customize the @code{glyphless-char} face to make these
+characters more prominent on display.  @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
@@ -1487,8 +1528,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.
@@ -1528,7 +1569,7 @@ altogether, change the variable @code{blink-cursor-mode} to @code{nil}
 
 @noindent
 to your init file.  Alternatively, you can change how the cursor
-looks when it ``blinks off'' by customizing the list variable
+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
@@ -1537,7 +1578,7 @@ 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
@@ -1583,7 +1624,6 @@ screen lines.  Setting the variable @code{truncate-lines} in any way
 makes it local to the current buffer; until that time, the default
 value, which is normally @code{nil}, is in effect.
 
-@vindex truncate-partial-width-windows
   If a split window becomes too narrow, Emacs may automatically enable
 line truncation.  @xref{Split Window}, for the variable
 @code{truncate-partial-width-windows} which controls this.
@@ -1662,14 +1702,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}.