Commit 01ce617a authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(blink-matching-open): Work correctly on chars that

are designated as parens through the syntax-table text property.
parent 749eb401
......@@ -3500,7 +3500,8 @@ when it is off screen)."
(let* ((oldpos (point))
(if blink-matching-paren-distance
......@@ -3514,12 +3515,20 @@ when it is off screen)."
(setq blinkpos (scan-sexps oldpos -1)))
(error nil)))
(and blinkpos
(/= (char-syntax (char-after blinkpos))
(setq mismatch
(or (null (matching-paren (char-after blinkpos)))
(goto-char blinkpos)
(not (looking-at "\\s$")))
(setq matching-paren
(or (and parse-sexp-lookup-properties
(let ((prop (get-text-property blinkpos 'syntax-table)))
(and (consp prop)
(eq (car prop) 4)
(cdr prop))))
(matching-paren (char-after blinkpos)))
(or (null matching-paren)
(/= (char-after (1- oldpos))
(matching-paren (char-after blinkpos))))))
(if mismatch (setq blinkpos nil))
(if blinkpos
;; Don't log messages about paren matching.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment