[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: Thu, 07 Jul 2011 15:52:46 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>> Was it really necessary to mark switch-to-buffer "for interactive use
>>> only"? It's a pretty basic command that was used in ~ 800 places in the
>>> Emacs 23.3 sources.
>> Most of those calls were bugs waiting to catch you in Emacs<23 ("you"
>> being typically a user like myself who uses dedicated windows and/or
>> minibuffer-only frames).

> How would you change this?

> (defun unbury-buffer ()
>   "Switch to the last buffer in the buffer list."
>   (interactive)
>   (switch-to-buffer (last-buffer)))

Either using with-no-warnings or using set-window-buffer.


reply via email to

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