[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
The Emacs parenthesis-matching feature is designed to show automatically how parentheses (and other matching delimiters) match in the text. Whenever you type a self-inserting character that is a closing delimiter, the cursor moves momentarily to the location of the matching opening delimiter, provided that is on the screen. If it is not on the screen, Emacs displays some of the text near it in the echo area. Either way, you can tell which grouping you are closing off.
If the opening delimiter and closing delimiter are mismatched—such as in ‘[x)’—a warning message is displayed in the echo area.
Three variables control parenthesis match display:
blink-matching-paren
turns the feature on or off: nil
disables
it, but the default is t
to enable match display.
blink-matching-delay
says how many seconds to leave the cursor on the
matching opening delimiter, before bringing it back to the real location of
point; the default is 1, but on some systems it is useful to specify a
fraction of a second.
blink-matching-paren-distance
specifies how many characters back to
search to find the matching opening delimiter. If the match is not found in
that distance, scanning stops, and nothing is displayed. This is to prevent
the scan for the matching delimiter from wasting lots of time when there is
no match. The default is 25600.
Show Paren mode provides a more powerful kind of automatic matching. Whenever point is after a closing delimiter, that delimiter and its matching opening delimiter are both highlighted; otherwise, if point is before an opening delimiter, the matching closing delimiter is highlighted. (There is no need to highlight the opening delimiter in that case, because the cursor appears on top of that character.) Use the command M-x show-paren-mode to enable or disable this mode.
Show Paren mode uses the faces show-paren-match
and
show-paren-mismatch
to highlight parentheses; you can customize them
to control how highlighting looks. Voir la section Customizing Faces.
[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
Ce document a été généré par Eric Reinbold le 23 Février 2009 en utilisant texi2html 1.78.