[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ee29721: Preserve buffer point in windows by defaul
From: |
Mark Oteiza |
Subject: |
[Emacs-diffs] master ee29721: Preserve buffer point in windows by default (Bug#4041). |
Date: |
Fri, 27 May 2016 11:05:41 +0000 (UTC) |
branch: master
commit ee297210cffb9e8d05912686a39fa158414ba050
Author: Mark Oteiza <address@hidden>
Commit: Mark Oteiza <address@hidden>
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.
---
doc/lispref/windows.texi | 5 +++--
etc/NEWS | 3 +++
lisp/window.el | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 9a09b35..015c557 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -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
address@hidden This behavior can be tuned using the following option.
+By default, @code{switch-to-buffer} tries to preserve
address@hidden 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
diff --git a/etc/NEWS b/etc/NEWS
index d1eadd5..56f0ef8 100644
--- 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.
+
* Editing Changes in Emacs 25.2
diff --git a/lisp/window.el b/lisp/window.el
index bd5275b..f699e21 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master ee29721: Preserve buffer point in windows by default (Bug#4041).,
Mark Oteiza <=