changeset 58738:ffd48e9f6a57

(show-paren-function): Check for matching chars specified by text props.
author Richard M. Stallman <rms@gnu.org>
date Fri, 03 Dec 2004 00:06:21 +0000
parents a67575cbdd93
children 2761697b0e2f
files lisp/paren.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/paren.el	Fri Dec 03 00:04:45 2004 +0000
+++ b/lisp/paren.el	Fri Dec 03 00:06:21 2004 +0000
@@ -171,9 +171,11 @@
 		(let ((beg (min pos oldpos)) (end (max pos oldpos)))
 		  (when (/= (char-syntax (char-after beg)) ?\$)
 		    (setq mismatch
-			  (not (eq (char-before end)
+			  (not (eq (or (cdr (get-text-property (1- end) 'syntax-table))
+				       (char-before end))
 				   ;; This can give nil.
-				   (matching-paren (char-after beg)))))))))))
+				   (or (cdr (get-text-property beg 'syntax-table))
+				       (matching-paren (char-after beg))))))))))))
 	;;
 	;; Highlight the other end of the sexp, or unhighlight if none.
 	(if (not pos)