From 3d4147bae3f03502acb3d12a5c9747129cc0c6aa Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Thu, 24 Jan 2013 22:19:02 +0100 Subject: [PATCH] * paren.el (show-paren-function): Make sure to set 'priority and 'face only if the overlay does exist. --- lisp/ChangeLog | 5 +++++ lisp/paren.el | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c4f8f37a9b..5efa7810ad2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-01-24 Aaron Ecay (tiny change) + + * paren.el (show-paren-function): Make sure to set 'priority and + 'face only if the overlay does exist. + 2013-01-24 Michael Albinus * net/tramp.el (tramp-tramp-file-p): Check, whether NAME is unibyte. 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)) -- 2.39.2