diff options
| author | Miles Bader | 2007-11-11 00:56:44 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-11-11 00:56:44 +0000 |
| commit | f23d76bdefbd4c06e14d69e99e50d35ce91c8226 (patch) | |
| tree | ded28d1da6df2d0135514bac83074f4ca1c9099a /lisp/eshell/esh-mode.el | |
| parent | e2d092da5980a7d05a5428074f8eb4925fa801e8 (diff) | |
| parent | a457417ee5ba797ab1c91d35ee957bb7a7f8d4b6 (diff) | |
| download | emacs-f23d76bdefbd4c06e14d69e99e50d35ce91c8226.tar.gz emacs-f23d76bdefbd4c06e14d69e99e50d35ce91c8226.zip | |
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-283
Diffstat (limited to 'lisp/eshell/esh-mode.el')
| -rw-r--r-- | lisp/eshell/esh-mode.el | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 0a8c8be697f..8b7338f8833 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el | |||
| @@ -778,38 +778,36 @@ This is done after all necessary filtering has been done." | |||
| 778 | (setq string (funcall (car functions) string)) | 778 | (setq string (funcall (car functions) string)) |
| 779 | (setq functions (cdr functions)))) | 779 | (setq functions (cdr functions)))) |
| 780 | (if (and string oprocbuf (buffer-name oprocbuf)) | 780 | (if (and string oprocbuf (buffer-name oprocbuf)) |
| 781 | (let ((obuf (current-buffer)) | 781 | (let (opoint obeg oend) |
| 782 | opoint obeg oend) | 782 | (with-current-buffer oprocbuf |
| 783 | (set-buffer oprocbuf) | 783 | (setq opoint (point)) |
| 784 | (setq opoint (point)) | 784 | (setq obeg (point-min)) |
| 785 | (setq obeg (point-min)) | 785 | (setq oend (point-max)) |
| 786 | (setq oend (point-max)) | 786 | (let ((buffer-read-only nil) |
| 787 | (let ((buffer-read-only nil) | 787 | (nchars (length string)) |
| 788 | (nchars (length string)) | 788 | (ostart nil)) |
| 789 | (ostart nil)) | 789 | (widen) |
| 790 | (widen) | 790 | (goto-char eshell-last-output-end) |
| 791 | (goto-char eshell-last-output-end) | 791 | (setq ostart (point)) |
| 792 | (setq ostart (point)) | 792 | (if (<= (point) opoint) |
| 793 | (if (<= (point) opoint) | 793 | (setq opoint (+ opoint nchars))) |
| 794 | (setq opoint (+ opoint nchars))) | 794 | (if (< (point) obeg) |
| 795 | (if (< (point) obeg) | 795 | (setq obeg (+ obeg nchars))) |
| 796 | (setq obeg (+ obeg nchars))) | 796 | (if (<= (point) oend) |
| 797 | (if (<= (point) oend) | 797 | (setq oend (+ oend nchars))) |
| 798 | (setq oend (+ oend nchars))) | 798 | (insert-before-markers string) |
| 799 | (insert-before-markers string) | 799 | (if (= (window-start (selected-window)) (point)) |
| 800 | (if (= (window-start (selected-window)) (point)) | 800 | (set-window-start (selected-window) |
| 801 | (set-window-start (selected-window) | 801 | (- (point) nchars))) |
| 802 | (- (point) nchars))) | 802 | (if (= (point) eshell-last-input-end) |
| 803 | (if (= (point) eshell-last-input-end) | 803 | (set-marker eshell-last-input-end |
| 804 | (set-marker eshell-last-input-end | 804 | (- eshell-last-input-end nchars))) |
| 805 | (- eshell-last-input-end nchars))) | 805 | (set-marker eshell-last-output-start ostart) |
| 806 | (set-marker eshell-last-output-start ostart) | 806 | (set-marker eshell-last-output-end (point)) |
| 807 | (set-marker eshell-last-output-end (point)) | 807 | (force-mode-line-update)) |
| 808 | (force-mode-line-update)) | 808 | (narrow-to-region obeg oend) |
| 809 | (narrow-to-region obeg oend) | 809 | (goto-char opoint) |
| 810 | (goto-char opoint) | 810 | (eshell-run-output-filters)))))) |
| 811 | (eshell-run-output-filters) | ||
| 812 | (set-buffer obuf))))) | ||
| 813 | 811 | ||
| 814 | (defun eshell-run-output-filters () | 812 | (defun eshell-run-output-filters () |
| 815 | "Run the `eshell-output-filter-functions' on the current output." | 813 | "Run the `eshell-output-filter-functions' on the current output." |