diff options
author | John Wiegley <johnw@newartisans.com> | 2000-10-29 05:18:48 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2000-10-29 05:18:48 +0000 |
commit | dace60cfea488a9cc8a775109c56b66907aa6abb (patch) | |
tree | 364b9c0114540a5f51a42e1e28a37b98714edaee /lisp/eshell/em-smart.el | |
parent | 657f9cb8b7f7c3a9687f3998319ce63346ef13a4 (diff) | |
download | emacs-dace60cfea488a9cc8a775109c56b66907aa6abb.tar.gz |
See ChangeLog
Diffstat (limited to 'lisp/eshell/em-smart.el')
-rw-r--r-- | lisp/eshell/em-smart.el | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el index cc02f2fedc3..9bef8b10d20 100644 --- a/lisp/eshell/em-smart.el +++ b/lisp/eshell/em-smart.el @@ -77,6 +77,11 @@ it to get a real sense of how it works." ;; scroll, etc. ;; ;; @ Like I said, it's not really comprehensible until you try it! ;) +;; +;; One disadvantage of this module is that it increases Eshell's +;; memory consumption by a factor of two or more. With small commands +;; (such as pwd), where the screen is mostly full, consumption can +;; increase by orders of magnitude. ;;; User Variables: @@ -154,6 +159,7 @@ The options are `begin', `after' or `end'." (defvar eshell-smart-displayed nil) (defvar eshell-smart-command-done nil) +(defvar eshell-currently-handling-window nil) ;;; Functions: @@ -175,19 +181,17 @@ The options are `begin', `after' or `end'." (make-local-hook 'pre-command-hook) (make-local-hook 'after-change-functions) - (add-hook 'after-change-functions - 'eshell-disable-after-change nil t) + (add-hook 'after-change-functions 'eshell-disable-after-change nil t) (make-local-hook 'eshell-input-filter-functions) - (add-hook 'eshell-input-filter-functions - 'eshell-smart-display-setup nil t) + (add-hook 'eshell-input-filter-functions 'eshell-smart-display-setup nil t) (make-local-variable 'eshell-smart-command-done) (make-local-hook 'eshell-post-command-hook) - (add-hook 'eshell-post-command-hook - (function - (lambda () - (setq eshell-smart-command-done t))) t t) + (add-hook 'eshell-post-command-hook + (function + (lambda () + (setq eshell-smart-command-done t))) t t) (unless (eq eshell-review-quick-commands t) (add-hook 'eshell-post-command-hook @@ -198,10 +202,9 @@ The options are `begin', `after' or `end'." (unless eshell-currently-handling-window (let ((inhibit-point-motion-hooks t) (eshell-currently-handling-window t)) - (save-current-buffer - (save-selected-window - (select-window wind) - (eshell-smart-redisplay)))))) + (save-selected-window + (select-window wind) + (eshell-smart-redisplay))))) (defun eshell-refresh-windows (&optional frame) "Refresh all visible Eshell buffers." @@ -210,10 +213,10 @@ The options are `begin', `after' or `end'." (function (lambda (wind) (with-current-buffer (window-buffer wind) - (when eshell-mode - (let (window-scroll-functions) - (eshell-smart-scroll-window wind (window-start)) - (setq affected t)))))) + (if eshell-mode + (let (window-scroll-functions) + (eshell-smart-scroll-window wind (window-start)) + (setq affected t)))))) 0 frame) (if affected (let (window-scroll-functions) |