[Top][All Lists]

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


From: Emilio Lopes
Subject: with-current-buffer
Date: Sun, 11 Sep 2005 17:00:53 +0200
User-agent: Emacs Gnus

Start Emacs (latest CVS on GNU/Linux) with

   ./src/emacs --no-init-file --no-site-file

Display a buffer, let's say "FOO", with some content.  Move point to
its beginning.

Insert the following code in the "*scratch*" buffer:

   (with-current-buffer "FOO"
     (goto-char (point-max))
     (insert "bar"))

Now execute the code above in these two different situations:

   1- The buffer "FOO" is visible along with the "*scratch*" buffer.

   2- The buffer "FOO" is not visible.

In both cases the insertion is done at the right spot, but in case 1
point in buffer "FOO" is restored after the code is executed.

Is that intended behavior?

I expected the point to be moved permanently in both cases.

reply via email to

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