From: Karl Heuer Date: Mon, 10 Nov 1997 23:28:59 +0000 (+0000) Subject: (finder-exit): Simplify. X-Git-Tag: emacs-20.3~2832 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b26f4fbd7d3b17b5036ef7e81430f375e0c219ca;p=emacs.git (finder-exit): Simplify. --- 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)