-@cindex just-in-time (JIT) font-lock
-@cindex background syntax highlighting
- Fontifying large buffers can take a long time. To avoid large
-delays when a file is visited, Emacs fontifies only the visible
-portion of a buffer. As you scroll through the buffer, each portion
-that becomes visible is fontified as soon as it is displayed. The
-parts of the buffer that are not displayed are fontified
-``stealthily'', in the background, i.e.@: when Emacs is idle. You can
-control this background fontification, called @dfn{Just-In-Time}, or
-@dfn{JIT} Font Lock, by customizing various options in the
-customization group @samp{jit-lock}. @xref{Specific Customization}.
-
-@node Highlight Changes
-@section Highlight Changes Mode
-
-@findex highlight-changes-mode
- Use @kbd{M-x highlight-changes-mode} to enable a minor mode
-that uses faces (colors, typically) to indicate which parts of
-the buffer were changed most recently.
-
-@node Highlight Interactively
-@section Interactive Highlighting by Matching
-@cindex highlighting by matching
-@cindex interactive highlighting
-
- It is sometimes useful to highlight the strings that match a certain
-regular expression. For example, you might wish to see all the
-references to a certain variable in a program source file, or highlight
-certain parts in a voluminous output of some program, or make certain
-cliches stand out in an article.
-
-@findex hi-lock-mode
- Use the @kbd{M-x hi-lock-mode} command to turn on a minor mode that
-allows you to specify regular expressions of the text to be
-highlighted. Hi-lock mode works like Font Lock (@pxref{Font Lock}),
-except that it lets you specify explicitly what parts of text to
-highlight. You control Hi-lock mode with these commands:
-
-@table @kbd
-@item C-x w h @var{regexp} @key{RET} @var{face} @key{RET}
-@kindex C-x w h
-@findex highlight-regexp
-Highlight text that matches
-@var{regexp} using face @var{face} (@code{highlight-regexp}).
-By using this command more than once, you can highlight various
-parts of the text in different ways.
-
-@item C-x w r @var{regexp} @key{RET}
-@kindex C-x w r
-@findex unhighlight-regexp
-Unhighlight @var{regexp} (@code{unhighlight-regexp}). You must enter
-one of the regular expressions currently specified for highlighting.
-(You can use completion, or choose from a menu, to enter one of them
-conveniently.)
-
-@item C-x w l @var{regexp} @key{RET} @var{face} @key{RET}
-@kindex C-x w l
-@findex highlight-lines-matching-regexp
-@cindex lines, highlighting
-@cindex highlighting lines of text
-Highlight entire lines containing a match for @var{regexp}, using face
-@var{face} (@code{highlight-lines-matching-regexp}).
-
-@item C-x w b
-@kindex C-x w b
-@findex hi-lock-write-interactive-patterns
-Insert all the current highlighting regexp/face pairs into the buffer
-at point, with comment delimiters to prevent them from changing your
-program. This key binding runs the
-@code{hi-lock-write-interactive-patterns} command.
-
-These patterns will be read the next time you visit the file while
-Hi-lock mode is enabled, or whenever you use the @kbd{M-x
-hi-lock-find-patterns} command.
-
-@item C-x w i
-@kindex C-x w i
-@findex hi-lock-find-patterns
-@vindex hi-lock-exclude-modes
-Re-read regexp/face pairs in the current buffer
-(@code{hi-lock-write-interactive-patterns}). The list of pairs is
-found no matter where in the buffer it may be.
-
-This command does nothing if the major mode is a member of the list
-@code{hi-lock-exclude-modes}.
-@end table
-
-@node Scrolling
-@section Scrolling
-
- If a buffer contains text that is too large to fit entirely within a
-window that is displaying the buffer, Emacs shows a contiguous portion of
-the text. The portion shown always contains point.
-
-@cindex scrolling
- @dfn{Scrolling} means moving text up or down in the window so that
-different parts of the text are visible. Scrolling forward means that text
-moves up, and new text appears at the bottom. Scrolling backward moves
-text down and new text appears at the top.
-
- Scrolling happens automatically if you move point past the bottom or top
-of the window. You can also explicitly request scrolling with the commands
-in this section.
-
-@table @kbd
-@item C-l
-Clear screen and redisplay, scrolling the selected window to center
-point vertically within it (@code{recenter}).
-@item C-v
-Scroll forward (a windowful or a specified number of lines) (@code{scroll-up}).
-@item @key{NEXT}
-@itemx @key{PAGEDOWN}
-Likewise, scroll forward.
-@item M-v
-Scroll backward (@code{scroll-down}).
-@item @key{PRIOR}
-@itemx @key{PAGEUP}
-Likewise, scroll backward.
-@item @var{arg} C-l
-Scroll so point is on line @var{arg} (@code{recenter}).
-@item C-M-l
-Scroll heuristically to bring useful information onto the screen
-(@code{reposition-window}).
-@end table
-
-@kindex C-l
-@findex recenter
- The most basic scrolling command is @kbd{C-l} (@code{recenter}) with
-no argument. It clears the entire screen and redisplays all windows.
-In addition, it scrolls the selected window so that point is halfway
-down from the top of the window.
-
-@kindex C-v
-@kindex M-v
-@kindex NEXT
-@kindex PRIOR
-@kindex PAGEDOWN
-@kindex PAGEUP
-@findex scroll-up
-@findex scroll-down
-@vindex next-screen-context-lines
- To read the buffer a windowful at a time, use @kbd{C-v}
-(@code{scroll-up}) with no argument. This scrolls forward by nearly
-the whole window height. The effect is to take the two lines at the
-bottom of the window and put them at the top, followed by nearly a
-whole windowful of lines that were not previously visible. If point
-was in the text that scrolled off the top, it ends up at the new top
-of the window.
-
- @kbd{M-v} (@code{scroll-down}) with no argument scrolls backward in
-a similar way, also with overlap. The number of lines of overlap
-across a @kbd{C-v} or @kbd{M-v} is controlled by the variable
-@code{next-screen-context-lines}; by default, it is 2. The function
-keys @key{NEXT} and @key{PRIOR}, or @key{PAGEDOWN} and @key{PAGEUP},
-are equivalent to @kbd{C-v} and @kbd{M-v}.
-
- The commands @kbd{C-v} and @kbd{M-v} with a numeric argument scroll
-the text in the selected window up or down a few lines. @kbd{C-v}
-with an argument moves the text and point up, together, that many
-lines; it brings the same number of new lines into view at the bottom
-of the window. @kbd{M-v} with numeric argument scrolls the text
-downward, bringing that many new lines into view at the top of the
-window. @kbd{C-v} with a negative argument is like @kbd{M-v} and vice
-versa.
-
- The names of scroll commands are based on the direction that the
-text moves in the window. Thus, the command to scroll forward is
-called @code{scroll-up} because it moves the text upward on the
-screen. The keys @key{PAGEDOWN} and @key{PAGEUP} derive their names
-and customary meanings from a different convention that developed
-elsewhere; hence the strange result that @key{PAGEDOWN} runs
-@code{scroll-up}.
-
-@vindex scroll-preserve-screen-position
- Some users like the full-screen scroll commands to keep point at the
-same screen line. To enable this behavior, set the variable
-@code{scroll-preserve-screen-position} to a non-@code{nil} value. In
-this mode, when scrolling shifts point off the screen, or into the
-scrolling margins, Emacs moves point to keep the same vertical
-position within the window. This mode is convenient for browsing
-through a file by scrolling by screenfuls; if you come back to the
-screen where you started, point goes back to the line where it
-started. However, this mode is inconvenient when you move to the next
-screen in order to move point to the text there.
-
- Another way to do scrolling is with @kbd{C-l} with a numeric argument.
-@kbd{C-l} does not clear the screen when given an argument; it only scrolls
-the selected window. With a positive argument @var{n}, it repositions text
-to put point @var{n} lines down from the top. An argument of zero puts
-point on the very top line. Point does not move with respect to the text;
-rather, the text and point move rigidly on the screen. @kbd{C-l} with a
-negative argument puts point that many lines from the bottom of the window.
-For example, @kbd{C-u - 1 C-l} puts point on the bottom line, and @kbd{C-u
-- 5 C-l} puts it five lines from the bottom. @kbd{C-u C-l} scrolls to put
-point at the center (vertically) of the selected window.
-
-@kindex C-M-l
-@findex reposition-window
- The @kbd{C-M-l} command (@code{reposition-window}) scrolls the current
-window heuristically in a way designed to get useful information onto
-the screen. For example, in a Lisp file, this command tries to get the
-entire current defun onto the screen if possible.
-
-@vindex scroll-conservatively
- Scrolling happens automatically when point moves out of the visible
-portion of the text. Normally, automatic scrolling centers point
-vertically within the window. However, if you set
-@code{scroll-conservatively} to a small number @var{n}, then if you
-move point just a little off the screen---less than @var{n}
-lines---then Emacs scrolls the text just far enough to bring point
-back on screen. By default, @code{scroll-conservatively} is 0.
-
-@cindex aggressive scrolling
-@vindex scroll-up-aggressively
-@vindex scroll-down-aggressively
- When the window does scroll by a longer distance, you can control
-how aggressively it scrolls, by setting the variables
-@code{scroll-up-aggressively} and @code{scroll-down-aggressively}.
-The value of @code{scroll-up-aggressively} should be either
-@code{nil}, or a fraction @var{f} between 0 and 1. A fraction
-specifies where on the screen to put point when scrolling upward.
-More precisely, when a window scrolls up because point is above the
-window start, the new start position is chosen to put point @var{f}
-part of the window height from the top. The larger @var{f}, the more
-aggressive the scrolling.
-
- @code{nil}, which is the default, scrolls to put point at the center.
-So it is equivalent to .5.
-
- Likewise, @code{scroll-down-aggressively} is used for scrolling
-down. The value, @var{f}, specifies how far point should be placed
-from the bottom of the window; thus, as with
-@code{scroll-up-aggressively}, a larger value is more aggressive.
-
-@vindex scroll-margin
- The variable @code{scroll-margin} restricts how close point can come
-to the top or bottom of a window. Its value is a number of screen
-lines; if point comes within that many lines of the top or bottom of the
-window, Emacs recenters the window. By default, @code{scroll-margin} is
-0.
-
-@node Horizontal Scrolling
-@section Horizontal Scrolling
-@cindex horizontal scrolling