[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 17ad6f8 1/2: Fix problems caused by calling 'rece
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-24 17ad6f8 1/2: Fix problems caused by calling 'recenter' in auto-revert (Bug#20122) |
Date: |
Sat, 21 Mar 2015 10:04:50 +0000 |
branch: emacs-24
commit 17ad6f839e1c435ea944a0cda0b682687f194c7a
Author: Mario Lang <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix problems caused by calling 'recenter' in auto-revert (Bug#20122)
lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Only call
`recenter' if `current-buffer' is equal to `window-buffer'.
(cherry picked from commit 4a8160204325c4b955647fe9e0a944c1f8c705dd)
---
lisp/ChangeLog | 5 +++++
lisp/emacs-lisp/tabulated-list.el | 3 ++-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5c72fbd..301c52d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-06 Mario Lang <address@hidden>
+
+ * emacs-lisp/tabulated-list.el (tabulated-list-print): Only call
+ `recenter' if `current-buffer' is equal to `window-buffer'.
+
2015-03-20 Dmitry Gutov <address@hidden>
* progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Detect
diff --git a/lisp/emacs-lisp/tabulated-list.el
b/lisp/emacs-lisp/tabulated-list.el
index 933567d..15a0914 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -323,7 +323,8 @@ to the entry with the same ID element as the current line."
(if saved-pt
(progn (goto-char saved-pt)
(move-to-column saved-col)
- (recenter))
+ (when (eq (window-buffer) (current-buffer))
+ (recenter)))
(goto-char (point-min)))))
(defun tabulated-list-print-entry (id cols)