Preserve buffer point in windows by default (Bug#4041).

* doc/lispref/windows.texi: Mention new default.
* etc/NEWS: Mention new default.
* lisp/window.el (switch-to-buffer-preserve-window-point): Default to t.
This commit is contained in:
Mark Oteiza 2016-05-26 21:47:18 -04:00
parent f865e2f1e8
commit ee297210cf
3 changed files with 7 additions and 3 deletions

View 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

View file

@ -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.
* Editing Changes in Emacs 25.2

View 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