# HG changeset patch # User John Wiegley # Date 988093906 0 # Node ID 565e55bc8630fd1bf253041ad9055d9060b2b95d # Parent c93600f74ebd2c798aa4036138ab5f6487d7f1d2 (eshell/diff): Fixed problems that were occurring with Emacs 21's diff.el/compile.el interaction layer. diff -r c93600f74ebd -r 565e55bc8630 lisp/eshell/em-unix.el --- a/lisp/eshell/em-unix.el Tue Apr 24 03:16:21 2001 +0000 +++ b/lisp/eshell/em-unix.el Tue Apr 24 06:31:46 2001 +0000 @@ -947,14 +947,20 @@ (throw 'eshell-replace-command (eshell-parse-command "*diff" orig-args)))) (when (fboundp 'diff-mode) - (diff-mode) - (set (make-local-variable 'eshell-diff-window-config) config) - (local-set-key [?q] 'eshell-diff-quit) - (if (fboundp 'turn-on-font-lock-if-enabled) - (turn-on-font-lock-if-enabled)))) - (other-window 1) - (goto-char (point-min)) - nil)))) + (make-local-variable 'compilation-finish-functions) + (add-hook + 'compilation-finish-functions + `(lambda (buff msg) + (with-current-buffer buff + (diff-mode) + (set (make-local-variable 'eshell-diff-window-config) + ,config) + (local-set-key [?q] 'eshell-diff-quit) + (if (fboundp 'turn-on-font-lock-if-enabled) + (turn-on-font-lock-if-enabled)) + (goto-char (point-min)))))) + (pop-to-buffer (current-buffer)))))) + nil) (defun eshell/locate (&rest args) "Alias \"locate\" to call Emacs `locate' function."