What is the proper behaviour for save-excursion? The emacs-lisp intro and the docstring seem to have slightly differing explanations - namely, the docstring mentions that it saves current-buffer as well as point and mark, and the emacs-lisp intro does not. Based on just what it does, I'm not entirely sure which is correct - the following code snippet, executed in *scratch*, returns the "*scratch*" buffer but the buffer displayed is the "bar" buffer, and evaluating current-bufer afterwards returns the "bar" buffer.
(progn
(save-excursion
(switch-to-buffer "bar"))
(current-buffer))
Either the manual or the docstring should be changed to reflect what it does, but I'm not entirely sure which based on this.
Thanks,
Nathaniel Flath