summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorErik Naggum <erik@naggum.no>1995-10-08 19:59:42 +0000
committerErik Naggum <erik@naggum.no>1995-10-08 19:59:42 +0000
commit5816fe0bab7df3b8c48308bf3c9e7ec049804f74 (patch)
tree85de2c2ff3f81ffe56725c798d10eeb91f71f051 /lisp
parentc3326a514ea3d160006afb9a4ccd439d50051e58 (diff)
downloademacs-5816fe0bab7df3b8c48308bf3c9e7ec049804f74.tar.gz
(view-exit): Delete view-overlay only if it exists.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/view.el2
1 files changed, 1 insertions, 1 deletions
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)