summaryrefslogtreecommitdiff
path: root/lisp/paren.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-08-11 02:42:22 +0000
committerRichard M. Stallman <rms@gnu.org>1994-08-11 02:42:22 +0000
commit080d320dce20fc45431958339526c4a8d9b7e5cb (patch)
tree78c45907f6315ce68293f78384696ec41908376e /lisp/paren.el
parent9d591df883d4dd3c7204c96866b45708d4f84107 (diff)
downloademacs-080d320dce20fc45431958339526c4a8d9b7e5cb.tar.gz
(show-paren-command-hook): Cope if matching-paren gives nil.
Diffstat (limited to 'lisp/paren.el')
-rw-r--r--lisp/paren.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/paren.el b/lisp/paren.el
index c1237f9733e..758ac66c124 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -71,8 +71,9 @@
(let ((beg (min pos oldpos)) (end (max pos oldpos)))
(and (/= (char-syntax (char-after beg)) ?\$)
(setq mismatch
- (/= (char-after (1- end))
- (matching-paren (char-after beg)))))))
+ (not (eq (char-after (1- end))
+ ;; This can give nil.
+ (matching-paren (char-after beg))))))))
;; If they don't properly match, use a different face,
;; or print a message.
(if mismatch