From 641889d6e9884fda13b4c32e27a5ecf785f2f80f Mon Sep 17 00:00:00 2001 From: Erik Naggum Date: Sun, 8 Oct 1995 19:59:42 +0000 Subject: [PATCH] (view-exit): Delete view-overlay only if it exists. --- lisp/view.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/view.el b/lisp/view.el index 6734c05a8a8..5e3069efb46 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -264,7 +264,7 @@ If you viewed an existing buffer, that buffer returns to its previous mode. If you viewed a file that was not present in Emacs, its buffer is killed." (interactive) (setq view-mode nil) - (delete-overlay view-overlay) + (and view-overlay (delete-overlay view-overlay)) (force-mode-line-update) (cond (view-mode-auto-exit (setq buffer-read-only view-old-buffer-read-only) -- 2.39.2