# HG changeset patch # User Richard M. Stallman # Date 1062173236 0 # Node ID 535dab9cd1c1da3e4f8a75e23cfe481b3de7bff0 # Parent d910762f4540b8bdfebd436d615313d537b2da0b (blink-matching-open): Work correctly on chars that are designated as parens through the syntax-table text property. diff -r d910762f4540 -r 535dab9cd1c1 lisp/simple.el --- a/lisp/simple.el Fri Aug 29 16:06:11 2003 +0000 +++ b/lisp/simple.el Fri Aug 29 16:07:16 2003 +0000 @@ -3500,7 +3500,8 @@ (point))))) (let* ((oldpos (point)) (blinkpos) - (mismatch)) + (mismatch) + matching-paren) (save-excursion (save-restriction (if blink-matching-paren-distance @@ -3514,12 +3515,20 @@ (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.