summaryrefslogtreecommitdiff
path: root/lisp/paren.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2004-12-03 00:06:21 +0000
committerRichard M. Stallman <rms@gnu.org>2004-12-03 00:06:21 +0000
commit2f27dfeb0dc7fdbfaf974fa42f5277e47d283e14 (patch)
tree63e918aa8b8212f7b0cf54196716c1df58ef9611 /lisp/paren.el
parent8eca85ef5344269c11bef4a4b9fd5e5027eb1daa (diff)
downloademacs-2f27dfeb0dc7fdbfaf974fa42f5277e47d283e14.tar.gz
(show-paren-function): Check for matching chars specified by text props.
Diffstat (limited to 'lisp/paren.el')
-rw-r--r--lisp/paren.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/paren.el b/lisp/paren.el
index e654cc2cc10..bc5c2f1f007 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -171,9 +171,11 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
(let ((beg (min pos oldpos)) (end (max pos oldpos)))
(when (/= (char-syntax (char-after beg)) ?\$)
(setq mismatch
- (not (eq (char-before end)
+ (not (eq (or (cdr (get-text-property (1- end) 'syntax-table))
+ (char-before end))
;; This can give nil.
- (matching-paren (char-after beg)))))))))))
+ (or (cdr (get-text-property beg 'syntax-table))
+ (matching-paren (char-after beg))))))))))))
;;
;; Highlight the other end of the sexp, or unhighlight if none.
(if (not pos)