all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* finder.el patch
@ 2008-03-12 18:14 Drew Adams
  2008-03-14 21:40 ` Drew Adams
  0 siblings, 1 reply; 8+ messages in thread
From: Drew Adams @ 2008-03-12 18:14 UTC (permalink / raw)
  To: 'Emacs-Devel'

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

This patch fixes two bugs in finder-exit:

- It treats buffer *Finder-package* also.
  This buffer is used by `finder-commentary'.

- Instead trying to avoid `delete-window' for
  `one-window-p', it wraps it in `condition-case'.

[-- Attachment #2: finder-2008-03-12a.patch --]
[-- Type: application/octet-stream, Size: 1078 bytes --]

diff -u -w finder-CVS-2008-03-12.el finder-patched-2008-03-12.el
--- finder-CVS-2008-03-12.el	2008-03-12 10:07:40.000000000 -0800
+++ finder-patched-2008-03-12.el	2008-03-12 10:08:58.000000000 -0800
@@ -359,16 +359,13 @@
 finder directory, \\[finder-exit] = quit, \\[finder-summary] = help")))
 
 (defun finder-exit ()
-  "Exit Finder mode and kill the buffer."
+  "Exit Finder mode.
+Delete the window and kill the buffer."
   (interactive)
-  (or (one-window-p t)
-      (delete-window))
-  ;; Can happen in either buffer -- kill each of the two that exists
-  (and (get-buffer "*Finder*")
-       (kill-buffer "*Finder*"))
-  (and (get-buffer "*Finder Category*")
-       (kill-buffer "*Finder Category*")))
-
+  (condition-case nil (delete-window window) (error nil))
+  (when (get-buffer "*Finder*") (kill-buffer "*Finder*"))
+  (when (get-buffer "*Finder-package*") (kill-buffer "*Finder-package*"))
+  (when (get-buffer "*Finder Category*") (kill-buffer "*Finder Category*")))
 \f
 (provide 'finder)
 

Diff finished.  Wed Mar 12 10:09:28 2008

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-03-23  6:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-12 18:14 finder.el patch Drew Adams
2008-03-14 21:40 ` Drew Adams
2008-03-21 18:34   ` Stefan Monnier
2008-03-21 21:00     ` Drew Adams
2008-03-23  1:09       ` Stefan Monnier
2008-03-23  2:04         ` Drew Adams
2008-03-23  2:45           ` Stefan Monnier
2008-03-23  6:09             ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.