summaryrefslogtreecommitdiff
path: root/lisp/finder.el
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2019-07-12 00:43:12 +0200
committerEli Zaretskii <eliz@gnu.org>2019-07-20 12:23:07 +0300
commit070dd439096c0f72d8f73823649e3c650f31c890 (patch)
tree592e15fc77a298e204c7feb559d9354ce3ef159f /lisp/finder.el
parentb6bef9f19311e4ea2287ac172f400d3146ba3cbb (diff)
downloademacs-070dd439096c0f72d8f73823649e3c650f31c890.tar.gz
Make finder-exit use quit-window (Bug#33610)
* lisp/finder.el (finder-exit): Quit window instead of deleting. This restores previous contents of the window, if any, that was usurped by "C-h p" to show the list of packages.
Diffstat (limited to 'lisp/finder.el')
-rw-r--r--lisp/finder.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/finder.el b/lisp/finder.el
index ad9441210c5..89706cf7dbd 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -465,11 +465,12 @@ finder directory, \\[finder-exit] = quit, \\[finder-summary] = help")))
(defun finder-exit ()
"Exit Finder mode.
-Delete the window and kill all Finder-related buffers."
+Quit the window and kill all Finder-related buffers."
(interactive)
- (ignore-errors (delete-window))
(let ((buf "*Finder*"))
- (and (get-buffer buf) (kill-buffer buf))))
+ (if (equal (current-buffer) buf)
+ (quit-window t)
+ (and (get-buffer buf) (kill-buffer buf)))))
(defun finder-unload-function ()
"Unload the Finder library."