]> git.eshelyaron.com Git - emacs.git/commitdiff
(view-exit): Delete view-overlay only if it exists.
authorErik Naggum <erik@naggum.no>
Sun, 8 Oct 1995 19:59:42 +0000 (19:59 +0000)
committerErik Naggum <erik@naggum.no>
Sun, 8 Oct 1995 19:59:42 +0000 (19:59 +0000)
lisp/view.el

index 6734c05a8a8d89d2c759f09edd00e304a63c8100..5e3069efb4665c525e7a441ace505ac824ff046b 100644 (file)
@@ -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)