Commit 641889d6 authored by Erik Naggum's avatar Erik Naggum
Browse files

(view-exit): Delete view-overlay only if it exists.

parent 14f67fa6
......@@ -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."
(setq view-mode nil)
(delete-overlay view-overlay)
(and view-overlay (delete-overlay view-overlay))
(cond (view-mode-auto-exit
(setq buffer-read-only view-old-buffer-read-only)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment