From 95ed7b42490b97a04c86511e673a1f32951839ba Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 19 Apr 2005 18:16:15 +0000 Subject: [PATCH] (show-paren-function): Use it to recognize parens that are also used in 2-char comment markers. --- lisp/ChangeLog | 16 ++++++++++++---- lisp/paren.el | 8 ++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e6ab2574917..9ab4055dedd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2005-04-19 Stefan Monnier + + * subr.el (syntax-class): New function. + + * simple.el (blink-matching-open): Use it. + + * paren.el (show-paren-function): Use it to recognize parens that are + also used in 2-char comment markers. + 2005-04-19 Lute Kamstra * loadhist.el (unload-feature): Update for new format of @@ -11,10 +20,9 @@ (mac-centraleurroman, mac-cyrillic): Do not use UCS in table data for translation. (mac-symbol-encoder, mac-dingbats-encoder): New translation table. - (mac-font-encoder-list): Add entries for mac-symbol and - mac-dingbats. - (ccl-encode-mac-symbol-font, ccl-encode-mac-dingbats-font): New - CCL programs. + (mac-font-encoder-list): Add entries for mac-symbol and mac-dingbats. + (ccl-encode-mac-symbol-font, ccl-encode-mac-dingbats-font): + New CCL programs. 2005-04-19 Kim F. Storm diff --git a/lisp/paren.el b/lisp/paren.el index 63300ce6238..fe2beae4edd 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -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 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time." (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 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time." ;; 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. -- 2.39.2