]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-smart.el
Merge from origin/emacs-24
[gnu-emacs] / lisp / eshell / em-smart.el
index 8d60444a889aa850c4046540de4654e7d321c357..70c53a809b59baa17eb62c5421f76f2b920ba879 100644 (file)
@@ -1,6 +1,6 @@
 ;;; em-smart.el --- smart display of output  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1999-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2014 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -188,7 +188,8 @@ The options are `begin', `after' or `end'."
     (add-hook 'eshell-post-command-hook
              (function
               (lambda ()
-                (setq eshell-smart-command-done t))) t t)
+                (setq eshell-smart-command-done t)))
+              t t)
 
     (unless (eq eshell-review-quick-commands t)
       (add-hook 'eshell-post-command-hook
@@ -200,8 +201,7 @@ The options are `begin', `after' or `end'."
   (unless eshell-currently-handling-window
     (let ((inhibit-point-motion-hooks t)
          (eshell-currently-handling-window t))
-      (save-selected-window
-       (select-window wind)
+      (with-selected-window wind
        (eshell-smart-redisplay)))))
 
 (defun eshell-refresh-windows (&optional frame)
@@ -212,12 +212,12 @@ The options are `begin', `after' or `end'."
       (lambda (wind)
        (with-current-buffer (window-buffer wind)
          (if eshell-mode
-             (let (window-scroll-functions)
+             (let (window-scroll-functions) ;;FIXME: Why?
                (eshell-smart-scroll-window wind (window-start))
                (setq affected t))))))
      0 frame)
     (if affected
-       (let (window-scroll-functions)
+       (let (window-scroll-functions) ;;FIXME: Why?
          (eshell-redisplay)))))
 
 (defun eshell-smart-display-setup ()