[Top][All Lists]

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

Re: switch-to-buffer: for interactive use only

From: Stefan Monnier
Subject: Re: switch-to-buffer: for interactive use only
Date: Sun, 10 Jul 2011 23:41:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> Note that (set-window-buffer (selected-window) buffer) isn't quite good
>> enough, since set-window-buffer will be happy to change the buffer of
>> a mini-window, whereas callers of switch-to-buffer that want to operate
>> on the selected window should signal an error in that case.
>> I think adding a `selected-window-only' argument to switch-to-buffer is
>> a better solution so callers don't need to worry about such details of
>> set-window-buffer.

> What precisely would the semantics of this argument be?

That if the buffer can't be shown in the selected window, then it should
signal an error rather than try to use some other window.


reply via email to

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