summaryrefslogtreecommitdiff
path: root/lisp/finder.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1997-11-10 23:28:59 +0000
committerKarl Heuer <kwzh@gnu.org>1997-11-10 23:28:59 +0000
commitb26f4fbd7d3b17b5036ef7e81430f375e0c219ca (patch)
treeb97dd044ca32658115232f0a2a3987059f3bb369 /lisp/finder.el
parent039274cfc010c8d1466d78855aa1cba2b321c01e (diff)
downloademacs-b26f4fbd7d3b17b5036ef7e81430f375e0c219ca.tar.gz
(finder-exit): Simplify.
Diffstat (limited to 'lisp/finder.el')
-rw-r--r--lisp/finder.el15
1 files changed, 6 insertions, 9 deletions
diff --git a/lisp/finder.el b/lisp/finder.el
index 19929e080fb..6bb763f8e55 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -297,16 +297,13 @@ arguments compiles from `load-path'."
(defun finder-exit ()
"Exit Finder mode and kill the buffer"
(interactive)
- (condition-case nil ; might be sole window
- (delete-window)
- (error nil))
+ (or (one-window-p t)
+ (delete-window))
;; Can happen in either buffer -- kill each of the two that exists
- (condition-case nil
- (kill-buffer "*Finder*")
- (error nil))
- (condition-case nil
- (kill-buffer "*Finder Category*")
- (error nil)))
+ (and (get-buffer "*Finder*")
+ (kill-buffer "*Finder*"))
+ (and (get-buffer "*Finder Category*")
+ (kill-buffer "*Finder Category*")))
(provide 'finder)