From: Chong Yidong <cyd@gnu.org>
To: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: ding@gnus.org, emacs-devel@gnu.org
Subject: Re: /srv/bzr/emacs/trunk r106599: message.el (message-pop-to-buffer): Use pop-to-buffer-same-window for last change.
Date: Wed, 07 Dec 2011 13:18:26 +0800 [thread overview]
Message-ID: <87ty5drmcd.fsf@gnu.org> (raw)
In-Reply-To: <b4mk469tg2f.fsf@jpl.org> (Katsumi Yamaoka's message of "Wed, 07 Dec 2011 08:51:04 +0900")
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> But there's no such function in old Emacsen nor XEmacsen. Cf.
> http://news.gmane.org/group/gmane.emacs.gnus.general/thread=80641
Sorry about that.
> - (funcall (or switch-function #'pop-to-buffer-same-window) name)
> + (cond (switch-function
> + (funcall switch-function name))
> + ((fboundp 'pop-to-buffer-same-window)
> + (pop-to-buffer-same-window name))
> + (t
> + (save-window-excursion
> + (pop-to-buffer name))
> + (unless (get-buffer-window name t)
> + (set-window-buffer nil name))))
If pop-to-buffer-same-window is not available, you can just use
pop-to-buffer. In previous version of Emacs, the mail buffer is treated
specially via same-window-buffer-names, so pop-to-buffer will do the
right thing.
next prev parent reply other threads:[~2011-12-07 5:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1RX1do-00036n-01@vcs.savannah.gnu.org>
2011-12-06 23:51 ` /srv/bzr/emacs/trunk r106599: message.el (message-pop-to-buffer): Use pop-to-buffer-same-window for last change Katsumi Yamaoka
2011-12-07 5:18 ` Chong Yidong [this message]
2011-12-07 6:08 ` Katsumi Yamaoka
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ty5drmcd.fsf@gnu.org \
--to=cyd@gnu.org \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=yamaoka@jpl.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 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.