[Top][All Lists]

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

bug#6454: 24.0.50; kill-buffer switches current-buffer

From: Stefan Monnier
Subject: bug#6454: 24.0.50; kill-buffer switches current-buffer
Date: Fri, 18 Jun 2010 11:33:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> I know that kill-buffer should not change current-buffer.
> What about C-x k  ;-)

C-x k is no exception: the kill-buffer function there should not (and
usually will not) change current-buffer (other than in the obvious case
where we kill the current-buffer, obviously).

> So we would have to check whether we want to kill the current buffer and
> not change it if we don't.

That's right.

> Unfortunately, there's no proof that the buffer current when calling
> `kill-buffer' is the buffer considered current by the outermost
> calling application.  It might be just current because some
> intermittent part (the actual caller of `kill-buffer') wanted to have
> a look at the buffer's local variables.  So `kill-buffer' can't be
> sure about the "real identity of the current buffer" either.

I don't see a problem here.  Can you give a more detailed scenario?


reply via email to

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