summaryrefslogtreecommitdiff
path: root/lisp/paren.el
diff options
context:
space:
mode:
authorBastien Guerry <bzg@gnu.org>2013-01-24 22:19:02 +0100
committerBastien Guerry <bzg@gnu.org>2013-01-24 22:19:02 +0100
commit3d4147bae3f03502acb3d12a5c9747129cc0c6aa (patch)
tree6a9cd4953c6ba80ed63f354c5ac033e5bef600e7 /lisp/paren.el
parente1ffa412b4ebd244c834854098031756743236e0 (diff)
downloademacs-3d4147bae3f03502acb3d12a5c9747129cc0c6aa.tar.gz
* paren.el (show-paren-function): Make sure to set 'priority and
'face only if the overlay does exist.
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 bf2238d4907..a9d3be60622 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -259,11 +259,10 @@ matching parenthesis is highlighted in `show-paren-style' after
(- (point) dir)))))
(if show-paren-overlay
(move-overlay show-paren-overlay from to (current-buffer))
- (setq show-paren-overlay (make-overlay from to nil t)))))
- ;;
- ;; Always set the overlay face, since it varies.
- (overlay-put show-paren-overlay 'priority show-paren-priority)
- (overlay-put show-paren-overlay 'face face)))
+ (setq show-paren-overlay (make-overlay from to nil t))))
+ ;; Always set the overlay face, since it varies.
+ (overlay-put show-paren-overlay 'priority show-paren-priority)
+ (overlay-put show-paren-overlay 'face face))))
;; show-paren-mode is nil in this buffer.
(and show-paren-overlay
(delete-overlay show-paren-overlay))