unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: emacs-devel <emacs-devel@gnu.org>
Subject: quit-window
Date: Fri, 19 Oct 2007 11:00:08 +0200	[thread overview]
Message-ID: <47187218.8050403@gmx.at> (raw)

The doc-string of `quit-window' says

(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."

The following parts seem dubious:

- "Quit the current buffer."

   The function is called `quit-window' its doc-string says "quit the
   current buffer".  Since the current buffer is not necessarily the
   buffer displayed in the selected window this sentence is both
   misleading and wrong.

- "Bury it, and maybe delete the selected frame."

   KILL non-nil will kill the buffer, not bury it.  WINDOW non-nil will
   affect WINDOW's frame, not the selected frame.

- "\(The frame is deleted if it contains a dedicated window for the buffer.)"

   Only if there are no other windows on that frame.

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

   "current buffer" and "bury" are misleading again.

Could someone with a good sense of what's going on in this function
improve that?  Also

       (and (or (window-minibuffer-p) (window-dedicated-p window))

should probably become

       (and (or (window-minibuffer-p window) (window-dedicated-p window))

             reply	other threads:[~2007-10-19  9:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19  9:00 martin rudalics [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-22 20:43 quit-window Christoph Scholtes
2011-10-23  7:23 ` quit-window Chong Yidong
2011-10-23 15:02   ` quit-window Christoph Scholtes
2011-10-23 23:49     ` quit-window Chong Yidong
2011-10-24 16:39     ` quit-window Richard Stallman
2011-10-24 17:18       ` quit-window Eli Zaretskii
2011-10-24 17:40         ` quit-window martin rudalics
2011-10-25 12:19         ` quit-window Richard Stallman
2011-10-25  1:24       ` quit-window Christoph Scholtes
2011-10-25 13:01         ` quit-window martin rudalics
2011-10-25 18:55         ` quit-window Richard Stallman
2011-10-23  9:20 ` quit-window martin rudalics
2011-10-23 13:27   ` quit-window Juri Linkov
2011-10-23 16:04     ` quit-window Christoph Scholtes
2011-10-23 18:58     ` quit-window martin rudalics
2011-10-24  5:12       ` quit-window Juri Linkov
2011-10-25  3:59         ` quit-window Chong Yidong
2011-10-25  4:28           ` quit-window Juri Linkov
2011-10-23 16:01   ` quit-window Christoph Scholtes
2011-10-23 19:00     ` quit-window martin rudalics
2011-10-25  1:00       ` quit-window Christoph Scholtes
2011-10-25 10:04         ` quit-window martin rudalics

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=47187218.8050403@gmx.at \
    --to=rudalics@gmx.at \
    --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).