changeset 61672:d7252d4ac684

(show-paren-function): Use it to recognize parens that are also used in 2-char comment markers.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 19 Apr 2005 18:15:38 +0000
parents c0bf74e7fc30
children c0782a8eb3b4
files lisp/paren.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/paren.el	Tue Apr 19 18:13:25 2005 +0000
+++ b/lisp/paren.el	Tue Apr 19 18:15:38 2005 +0000
@@ -1,6 +1,6 @@
 ;;; paren.el --- highlight matching paren
 
-;; Copyright (C) 1993, 1996, 2001, 2004  Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1996, 2001, 2004, 2005  Free Software Foundation, Inc.
 
 ;; Author: rms@gnu.org
 ;; Maintainer: FSF
@@ -139,8 +139,8 @@
 (defun show-paren-function ()
   (if show-paren-mode
       (let ((oldpos (point))
-	    (dir (cond ((eq (car (syntax-after (1- (point)))) 5) -1)
-		       ((eq (car (syntax-after (point))) 4) 1)))
+	    (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1)
+                       ((eq (syntax-class (syntax-after (point)))      4) 1)))
 	    pos mismatch face)
 	;;
 	;; Find the other end of the sexp.
@@ -169,7 +169,7 @@
 	      ;; kind of paren to match the one we started at.
 	      (when (integerp pos)
 		(let ((beg (min pos oldpos)) (end (max pos oldpos)))
-		  (unless (eq (car (syntax-after beg)) 8) ;Not syntax `$'.
+		  (unless (eq (syntax-class (syntax-after beg)) 8)
 		    (setq mismatch
 			  (not (or (eq (char-before end)
 				       ;; This can give nil.