[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /srv/bzr/emacs/trunk r106599: message.el (message-pop-to-buffer): Us

From: Chong Yidong
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Katsumi Yamaoka <address@hidden> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]