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

From: Markus Rost <[email-masked]>
Date: Tue, 6 Oct 2009 20:46:04 +0200 (CEST)

If you evaluate the form

(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