Function: reb-mark-non-matching-parenthesis
reb-mark-non-matching-parenthesis is a byte-compiled function defined
in re-builder.el.gz.
Signature
(reb-mark-non-matching-parenthesis BOUND)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/re-builder.el.gz
(defun reb-mark-non-matching-parenthesis (bound)
;; We have a small string, check the whole of it, but wait until
;; everything else is fontified.
(when (>= bound (point-max))
(let ((n-reb 0)
left-pars
faces-here)
(goto-char (point-min))
(while (and (setq n-reb (reb-while 100 n-reb "mark-par"))
(not (eobp)))
(skip-chars-forward "^()")
(unless (eobp)
(setq faces-here (get-text-property (point) 'face))
;; It is already fontified, use that info:
(when (or (eq 'reb-regexp-grouping-construct faces-here)
(and (listp faces-here)
(memq 'reb-regexp-grouping-construct faces-here)))
(cond ((eq (char-after) ?\()
(setq left-pars (cons (point) left-pars)))
((eq (char-after) ?\))
(if left-pars
(setq left-pars (cdr left-pars))
(put-text-property (point) (1+ (point))
'face 'font-lock-warning-face)))
(t (message "markpar: char-after=%s"
(char-to-string (char-after))))))
(forward-char)))
(dolist (lp left-pars)
(put-text-property lp (1+ lp)
'face 'font-lock-warning-face)))))