diff lisp/smerge-mode.el @ 54410:85cd76b8b78c

(smerge-popup-context-menu): Put `unwind-protect' arround `overlay-put' and `popup-menu'.
author Masatake YAMATO <jet@gyve.org>
date Tue, 16 Mar 2004 16:27:10 +0000
parents 8bf3846fc7dd
children 192fc783e115 5f17f5c40152
line wrap: on
line diff
--- a/lisp/smerge-mode.el	Tue Mar 16 15:20:17 2004 +0000
+++ b/lisp/smerge-mode.el	Tue Mar 16 16:27:10 2004 +0000
@@ -321,13 +321,15 @@
 	     (popup-menu smerge-mode-menu)
 	   ;; Install overlay.
 	   (setq o (make-overlay (match-beginning i) (match-end i)))  
-	   (overlay-put o 'face 'highlight)
-	   (sit-for 0)
-	   (popup-menu (if (smerge-check 2) 
-			   smerge-mode-menu
-			   smerge-context-menu))
-	   ;; Delete overlay.
-	   (delete-overlay o))))
+	   (unwind-protect
+	       (progn
+		 (overlay-put o 'face 'highlight)
+		 (sit-for 0)
+		 (popup-menu (if (smerge-check 2) 
+				 smerge-mode-menu
+			       smerge-context-menu)))
+	     ;; Delete overlay.
+	     (delete-overlay o)))))
     ;; There's no conflict at point, the text-props are just obsolete.
     (save-excursion
       (let ((beg (re-search-backward smerge-end-re nil t))