This is a really nice feature, but it only displays when inserting a paren, not when changing to a cursor position. Is there an interactive command that I can call to display this? Can I configure it to show up on cursor move?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
That message is printed when the beginning of the sexp is not visible in the window; otherwise, the opening paren is temporarily highlighted.
This behavior is implemented in
simple.el and is not associated with any minor mode. It is implemented using a hook that runs when a character is inserted.
The actual blinking/message comes from command
blink-matching-open, which you can call yourself. For example you could start an idle-timer that will call this command whenever you pause for a short time on a closing paren. This is the way that the built-in
(defvar match-paren--idle-timer nil) (defvar match-paren--delay 0.5) (setq match-paren--idle-timer (run-with-idle-timer match-paren--delay t #'blink-matching-open))
You can use
M-x blink-matching-open RET to display the message if you're right after a paren. To do it more "on the fly" you might like to try
M-x show-paren-mode, tho it doesn't actually give you this message.
Otherwise, you could use something like
(add-hook 'post-command-hook (lambda () (if (and (not (bobp)) (eq ?\) (char-syntax (char-before)))) (blink-matching-open))))