]> code.delx.au - gnu-emacs/commitdiff
Preserve buffer point in windows by default (Bug#4041).
authorMark Oteiza <mvoteiza@udel.edu>
Fri, 27 May 2016 01:47:18 +0000 (21:47 -0400)
committerMark Oteiza <mvoteiza@udel.edu>
Fri, 27 May 2016 11:04:58 +0000 (07:04 -0400)
* doc/lispref/windows.texi: Mention new default.
* etc/NEWS: Mention new default.
* lisp/window.el (switch-to-buffer-preserve-window-point): Default to t.

doc/lispref/windows.texi
etc/NEWS
lisp/window.el

index 9a09b35371d9b10994419309a2e64742bf9e5aba..015c557ef6d594ff162f62f1d670b4f968540553 100644 (file)
@@ -2171,8 +2171,9 @@ This option does not affect non-interactive calls of
 @code{switch-to-buffer}.
 @end defopt
 
-By default, @code{switch-to-buffer} shows the buffer at its position of
-@code{point}.  This behavior can be tuned using the following option.
+By default, @code{switch-to-buffer} tries to preserve
+@code{window-point}.  This behavior can be tuned using the following
+option.
 
 @defopt switch-to-buffer-preserve-window-point
 If this variable is @code{nil}, @code{switch-to-buffer} displays the
index d1eadd56a21fa1dc0b406ccd80fdd3e5617c97ee..56f0ef8de24a05f6afcb0682120acd76ace2dee1 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -176,6 +176,9 @@ where you can cancel them with the 'c' command.
 ** The new function 'read-multiple-choice' prompts for multiple-choice
 questions, with a handy way to display help texts.
 
++++
+** 'switch-to-buffer-preserve-window-point' now defaults to t.
+
 \f
 * Editing Changes in Emacs 25.2
 
index bd5275bffc9ad4ba47d1afbcfacb1c4501e5429b..f699e21fd312de282ade19ed4253661254197538 100644 (file)
@@ -7147,7 +7147,7 @@ buffer with the name BUFFER-OR-NAME and return that buffer."
            buffer))
     (other-buffer)))
 
-(defcustom switch-to-buffer-preserve-window-point nil
+(defcustom switch-to-buffer-preserve-window-point t
   "If non-nil, `switch-to-buffer' tries to preserve `window-point'.
 If this is nil, `switch-to-buffer' displays the buffer at that
 buffer's `point'.  If this is `already-displayed', it tries to