bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#4655: 23.1.50; buffer-swap-text oddity


From: Juanma Barranquero
Subject: bug#4655: 23.1.50; buffer-swap-text oddity
Date: Wed, 7 Oct 2009 06:01:22 +0200

> (let ((bufA (get-buffer-create "A"))
>      (bufB (get-buffer-create "B")))
>  (set-buffer bufA)
>  (message "buffer-msg-1 %s" (current-buffer))
>  (save-excursion
>    (buffer-swap-text bufB))
>  (message "buffer-msg-2 %s" (current-buffer)))
>
> the *Messages* buffer contains
>
> buffer-msg-1 A
> buffer-msg-2 B
>
> With the save-excursion I would have expected the messages
>
> buffer-msg-1 A
> buffer-msg-2 A

Why "with the save-excursion"? I would expect A/A both with and
without it (and I'm quite surprised to find that it is not so).

Why do you expect buffer-swap-text to switch the current buffer? And,
why it is doing it?

    Juanma





reply via email to

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