changeset 58805:769c3bb23105

(show-paren-function): Fix last change (2004-12-02).
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 06 Dec 2004 19:04:58 +0000
parents 9b0a547610a4
children 49bb3b6b135c
files lisp/paren.el
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/paren.el	Mon Dec 06 19:04:04 2004 +0000
+++ b/lisp/paren.el	Mon Dec 06 19:04:58 2004 +0000
@@ -169,13 +169,14 @@
 	      ;; kind of paren to match the one we started at.
 	      (when (integerp pos)
 		(let ((beg (min pos oldpos)) (end (max pos oldpos)))
-		  (when (/= (char-syntax (char-after beg)) ?\$)
+		  (unless (eq (car (syntax-after beg)) 8) ;Not syntax `$'.
 		    (setq mismatch
-			  (not (eq (or (cdr (get-text-property (1- end) 'syntax-table))
-				       (char-before end))
-				   ;; This can give nil.
-				   (or (cdr (get-text-property beg 'syntax-table))
-				       (matching-paren (char-after beg))))))))))))
+			  (not (or (eq (char-before end)
+				       ;; This can give nil.
+				       (cdr (syntax-after beg)))
+				   (eq (char-after beg)
+				       ;; This can give nil.
+				       (cdr (syntax-after (1- end)))))))))))))
 	;;
 	;; Highlight the other end of the sexp, or unhighlight if none.
 	(if (not pos)