1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-05 11:45:45 +00:00

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

are designated as parens through the syntax-table text property.
This commit is contained in:
Richard M. Stallman 2003-08-29 16:07:16 +00:00
parent 749eb4018a
commit 01ce617af9

View File

@ -3500,7 +3500,8 @@ when it is off screen)."
(point)))))
(let* ((oldpos (point))
(blinkpos)
(mismatch))
(mismatch)
matching-paren)
(save-excursion
(save-restriction
(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)))
(save-excursion
(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)))
mismatch
(or (null matching-paren)
(/= (char-after (1- oldpos))
(matching-paren (char-after blinkpos))))))
matching-paren))))
(if mismatch (setq blinkpos nil))
(if blinkpos
;; Don't log messages about paren matching.