When show-paren-mode is enabled a matching parenthesis is highlighted based on the location of point (i.e., when your cursor is on a parenthesis).
You can tweak the behaviour of this minor mode by adjusting show-paren-style and the show-paren-delay. There are three styles to choose from:
- parenthesis – shows the matching paren
- expression – shows the entire expression enclosed by the paren, and
- mixed – shows the matching paren if it is visible, and the expression otherwise.
To obtain this behaviour, add the following to your .emacs file:
(show-paren-mode t) |
2 responses so far ↓
Again, thanks for pointing out a simple but incredibly useful feature. I have been using paren matching for a very long time but had never investigated the options available. Being able to highlight the expression and not just the parentheses themselves is a very useful feature.
This should be activated by default!
Leave a Comment