Function: show-paren--categorize-paren
show-paren--categorize-paren is a byte-compiled function defined in
paren.el.gz.
Signature
(show-paren--categorize-paren POS)
Documentation
Determine whether the character after POS has paren syntax, and if so, return a cons (DIR . OUTSIDE), where DIR is 1 for an open paren, -1 for a close paren, and OUTSIDE is the buffer position of the outside of the paren. If the character isn't a paren, or it is an escaped paren, return nil.
Source Code
;; Defined in /usr/src/emacs/lisp/paren.el.gz
(defun show-paren--categorize-paren (pos)
"Determine whether the character after POS has paren syntax,
and if so, return a cons (DIR . OUTSIDE), where DIR is 1 for an
open paren, -1 for a close paren, and OUTSIDE is the buffer
position of the outside of the paren. If the character isn't a
paren, or it is an escaped paren, return nil."
(cond
((and (eq (syntax-class (syntax-after pos)) 4)
(show-paren--unescaped-p pos))
(cons 1 pos))
((and (eq (syntax-class (syntax-after pos)) 5)
(show-paren--unescaped-p pos))
(cons -1 (1+ pos)))))