diff options
| author | Stefan Monnier | 2002-09-09 23:16:49 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2002-09-09 23:16:49 +0000 |
| commit | 9fe9d55a2cbb9de7b4a0a995392dd527f2e74dfb (patch) | |
| tree | 70ec8677e7df639462157493f755cbad47f5e454 | |
| parent | c17e2545b98cab1b19125c0b3ef43829d82cc299 (diff) | |
| download | emacs-9fe9d55a2cbb9de7b4a0a995392dd527f2e74dfb.tar.gz emacs-9fe9d55a2cbb9de7b4a0a995392dd527f2e74dfb.zip | |
(show-paren-function): Use syntax-after.
| -rw-r--r-- | lisp/paren.el | 9 |
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." | |||
| 135 | ;; and show it until input arrives. | 135 | ;; and show it until input arrives. |
| 136 | (defun show-paren-function () | 136 | (defun show-paren-function () |
| 137 | (if show-paren-mode | 137 | (if show-paren-mode |
| 138 | (let (pos dir mismatch face (oldpos (point))) | 138 | (let ((oldpos (point)) |
| 139 | (cond ((eq (char-syntax (preceding-char)) ?\)) | 139 | (dir (cond ((eq (car (syntax-after (1- (point)))) 5) -1) |
| 140 | (setq dir -1)) | 140 | ((eq (car (syntax-after (point))) 4) 1))) |
| 141 | ((eq (char-syntax (following-char)) ?\() | 141 | pos mismatch face) |
| 142 | (setq dir 1))) | ||
| 143 | ;; | 142 | ;; |
| 144 | ;; Find the other end of the sexp. | 143 | ;; Find the other end of the sexp. |
| 145 | (when dir | 144 | (when dir |