changeset 20241:25b1541c8219

(finder-exit): Simplify.
author Karl Heuer <kwzh@gnu.org>
date Mon, 10 Nov 1997 23:28:59 +0000
parents 963e9cda8f04
children 5458685d9a67
files lisp/finder.el
diffstat 1 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/finder.el	Mon Nov 10 14:49:40 1997 +0000
+++ b/lisp/finder.el	Mon Nov 10 23:28:59 1997 +0000
@@ -297,16 +297,13 @@
 (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)