* emacs-lisp/tabulated-list.el (tabulated-list-print): Only call
authorMario Lang <mlang@delysid.org>
Fri, 6 Jun 2014 00:39:22 +0000 (02:39 +0200)
committerMario Lang <mlang@delysid.org>
Fri, 6 Jun 2014 00:39:22 +0000 (02:39 +0200)
`recenter' if `current-buffer' is equal to `window-buffer'.

lisp/ChangeLog
lisp/emacs-lisp/tabulated-list.el

index e0d2ff0..c445861 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-06  Mario Lang  <mlang@delysid.org>
+
+       * emacs-lisp/tabulated-list.el (tabulated-list-print): Only call
+       `recenter' if `current-buffer' is equal to `window-buffer'.
+
 2014-06-05  Leo Liu  <sdl.web@gmail.com>
 
        * emacs-lisp/cl-macs.el (cl-macrolet): Avoid excessive progn's.
index d0d71dd..3ee261a 100644 (file)
@@ -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)