Function: evil--match-paren-in-normal-state
evil--match-paren-in-normal-state is a byte-compiled function defined
in evil-integration.el.
Signature
(evil--match-paren-in-normal-state ORIG-FUN &rest ARGS)
Documentation
Match parentheses in Normal state.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-integration.el
(defun evil--match-paren-in-normal-state (orig-fun &rest args)
"Match parentheses in Normal state."
(if (eq (not (memq 'not evil-highlight-closing-paren-at-point-states))
(not (memq evil-state evil-highlight-closing-paren-at-point-states)))
(apply orig-fun args)
(let* ((orig-spdf show-paren-data-function)
(show-paren-data-function
(lambda ()
(let ((pos (point)) narrow)
(setq
pos (cl-dotimes (i (1+ (* 2 evil-show-paren-range)))
(setq pos (+ pos (if (cl-evenp i) i (- i))))
(pcase (syntax-class (syntax-after pos))
(4 (setq narrow pos) (cl-return pos))
(5 (cl-return (1+ pos))))))
(when pos
(save-excursion
(goto-char pos)
(save-restriction
(when narrow (narrow-to-region narrow (point-max)))
(funcall orig-spdf))))))))
(apply orig-fun args))))