emacs-devel
[Top][All Lists]
Advanced

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

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


From: Chong Yidong
Subject: Re: switch-to-buffer: for interactive use only
Date: Mon, 11 Jul 2011 10:56:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> ! Return the buffer switched to."
>>     (interactive
>>      (list (read-buffer-to-switch "Switch to buffer: ")))
>>     (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)))
>> !     (when force-same-window
>> !       (cond
>> !        ((window-minibuffer-p)
>> !    (error "Cannot switch buffers in minibuffer window"))
>> !        ((eq (window-dedicated-p) t)
>> !    (error "Cannot switch buffers in a dedicated window"))))
>> !     (pop-to-buffer buffer-or-name
>> !               '(same-window (reuse-window-dedicated . weak))
>> !               norecord nil)))
>
> AFAIU, this can still use another window when force-same-window is
> non-nil.

Not unless there is another special case apart from minibuffer and
strongly dedicated windows.



reply via email to

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