emacs-devel
[Top][All Lists]
Advanced

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

Re: with-current-buffer (was: fit-window-to-buffer)


From: Richard M. Stallman
Subject: Re: with-current-buffer (was: fit-window-to-buffer)
Date: Mon, 27 Jun 2005 12:46:18 -0400

    (defun test ()
      (interactive)
      (set-buffer "a")
      (with-current-buffer "c"
        (pop-to-buffer "b"))
      (message "%s" (buffer-name (current-buffer))))

    (test)

    At the end, it print "a" as the current buffer name, but actually
    this command makes the buffer "b" current.  Shouldn't it print "b"?

with-current-buffer is supposed to restore the previous current buffer.
That is buffer a.

This command does not make buffer b current.  However, the main loop
does that, because b is the selected window's buffer.

The results are correct; I see no bug here.




reply via email to

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