summaryrefslogtreecommitdiff
path: root/lisp/window.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-11-18 22:16:03 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2012-11-18 22:16:03 -0500
commitd1c0cddf73e3edf4b1a7bbaa9e24caa817bd10e1 (patch)
treee08f71956dc4a84c41b13cc7710f0db427678718 /lisp/window.el
parent535efd4a430b6595a30efaa2919e565ad21209b9 (diff)
downloademacs-d1c0cddf73e3edf4b1a7bbaa9e24caa817bd10e1.tar.gz
* lisp/window.el (switch-to-buffer): Re-add the warning that was lost in the
code rewrite.
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/window.el b/lisp/window.el
index d378ea5ff14..52909fa9e5f 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5870,7 +5870,12 @@ the selected window or never appeared in it before, or if
:version "24.3")
(defun switch-to-buffer (buffer-or-name &optional norecord force-same-window)
- "Switch to buffer BUFFER-OR-NAME in the selected window.
+ "Display buffer BUFFER-OR-NAME in the selected window.
+
+WARNING: This is NOT the way to work on another buffer temporarily
+within a Lisp program! Use `set-buffer' instead. That avoids
+messing with the window-buffer correspondences.
+
If the selected window cannot display the specified
buffer (e.g. if it is a minibuffer window or strongly dedicated
to another buffer), call `pop-to-buffer' to select the buffer in