unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Emacs-Devel'" <emacs-devel@gnu.org>
Subject: finder.el patch
Date: Wed, 12 Mar 2008 10:14:51 -0800	[thread overview]
Message-ID: <001501c8846c$f75757d0$c2b22382@us.oracle.com> (raw)

[-- 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

             reply	other threads:[~2008-03-12 18:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 18:14 Drew Adams [this message]
2008-03-14 21:40 ` finder.el patch 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001501c8846c$f75757d0$c2b22382@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).