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

2005-06-27 Thread Richard M. Stallman
(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" cur

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

2005-06-27 Thread Miles Bader
On 6/27/05, Juri Linkov <[EMAIL PROTECTED]> wrote: > (with-current-buffer "c" > (pop-to-buffer "b")) > (message "%s" (buffer-name (current-buffer > > 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 (was: fit-window-to-buffer)

2005-06-26 Thread Juri Linkov
There is a similar problem related to switching buffers using `with-current-buffer' and co. I can't say if it's a bug or not. For example, `next-error' after finishing has the current buffer reported by (current-buffer) not the same as the buffer where the point eventually lands. This problem in

Re: fit-window-to-buffer

2005-06-24 Thread Juanma Barranquero
On 6/24/05, Richard M. Stallman <[EMAIL PROTECTED]> wrote: > Maybe the best solution is to explicitly save the current buffer > like this. Does this fix the problem? Yes, it does. -- /L/e/k/t/u ___ Emacs-devel mailing list Emacs

fit-window-to-buffer

2005-06-23 Thread Richard M. Stallman
The issue is that `fit-window-to-buffer', when called from `occur-hook', changes the current buffer. Puzzling. Not a problem now, That is very strange. I looked at the code for fit-window-to-buffer and see nothing that should be able to change the current buffer. It must be a b