Function: show-paren-mode
show-paren-mode is an interactive and byte-compiled function defined
in paren.el.gz.
Signature
(show-paren-mode &optional ARG)
Documentation
Toggle visualization of matching parens (Show Paren mode).
This is a minor mode. If called interactively, toggle the Show-Paren
mode mode. If the prefix argument is positive, enable the mode, and
if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the
mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate (default-value \=show-paren-mode)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
When enabled, any matching parenthesis is highlighted in show-paren-style
after show-paren-delay seconds of Emacs idle time.
This is a global minor mode. To toggle the mode in a single buffer,
use show-paren-local-mode.
Probably introduced at or before Emacs version 20.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/paren.el.gz
;;;###autoload
(define-minor-mode show-paren-mode
"Toggle visualization of matching parens (Show Paren mode).
When enabled, any matching parenthesis is highlighted in `show-paren-style'
after `show-paren-delay' seconds of Emacs idle time.
This is a global minor mode. To toggle the mode in a single buffer,
use `show-paren-local-mode'."
:global t :group 'paren-showing
:initialize 'custom-initialize-delay
:init-value t
;; Enable or disable the mechanism.
;; First get rid of the old idle timer.
(when show-paren--idle-timer
(cancel-timer show-paren--idle-timer)
(setq show-paren--idle-timer nil))
(setq show-paren--idle-timer (run-with-idle-timer
show-paren-delay t
#'show-paren-function))
(unless show-paren-mode
(show-paren--delete-overlays)))