summaryrefslogtreecommitdiff
path: root/lisp/paren.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2002-09-09 23:16:49 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2002-09-09 23:16:49 +0000
commitd040850c0cb1c347369e1c29baec17a192206a71 (patch)
tree598940a64babaa561acd9940a5e931f26274d5bc /lisp/paren.el
parente994ec45d5d9d31832f427bdda77a1bc02c18cb7 (diff)
downloademacs-d040850c0cb1c347369e1c29baec17a192206a71.tar.gz
(show-paren-function): Use syntax-after.
Diffstat (limited to 'lisp/paren.el')
-rw-r--r--lisp/paren.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/paren.el b/lisp/paren.el
index 000854a01d2..bb574f7aec2 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -135,11 +135,10 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
;; and show it until input arrives.
(defun show-paren-function ()
(if show-paren-mode
- (let (pos dir mismatch face (oldpos (point)))
- (cond ((eq (char-syntax (preceding-char)) ?\))
- (setq dir -1))
- ((eq (char-syntax (following-char)) ?\()
- (setq dir 1)))
+ (let ((oldpos (point))
+ (dir (cond ((eq (car (syntax-after (1- (point)))) 5) -1)
+ ((eq (car (syntax-after (point))) 4) 1)))
+ pos mismatch face)
;;
;; Find the other end of the sexp.
(when dir