Subject: bug#1259 closed by martin rudalics <[email-masked]> (Re: bug#1259: quit-window: does it quit the wrong buffer?)

From: [email-masked] (Emacs bug Tracking System)

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#1259: quit-window: does it quit the wrong buffer?

It has been closed by martin rudalics <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact martin rudalics <[email-masked]> by
replying to this email.

-- 
1259: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1259
Emacs Bug Tracking System
Contact [email-masked] with problems
>From [email-masked] Thu Oct 30 08:43:37 2008
Date: Thu, 30 Oct 2008 16:42:17 +0100
From: martin rudalics <[email-masked]>
To: [email-masked]
CC: David Reitter <[email-masked]>
Subject: Re: bug#1259: quit-window: does it quit the wrong buffer?

Fixed as

2008-10-30  Martin Rudalics  <[email-masked]>

	* window.el (quit-window): Simplify code.  Say in doc-string
	that it operates on the selected window's buffer.  (Bug#1259)

Thanks, martin

>From [email-masked] Sun Oct 26 18:20:06 2008
From: David Reitter <[email-masked]>
To: [email-masked]
Subject: quit-window: does it quit the wrong buffer?
Date: Sun, 26 Oct 2008 21:19:48 -0400

I'm wondering if there is a discrepancy between the doc string of quit- 
window and its implementation:  The function is supposed to quit the  
current buffer, but what it seems to do is to quit the buffer in the  
selected window.

(defun quit-window (&optional kill window)
   "Quit the current buffer.  Bury it, and maybe delete the selected  
frame.
\(The frame is deleted if it contains a dedicated window for the  
buffer.)
With a prefix argument, kill the buffer instead.

Noninteractively, if KILL is non-nil, then kill the current buffer,
otherwise bury it.

If WINDOW is non-nil, it specifies a window; we delete that window,
and the buffer that is killed or buried is the one in that window."
   (interactive "P")
   (let ((buffer (window-buffer window))
	(frame (window-frame (or window (selected-window))))