aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorJohn Wiegley <[email protected]>2001-04-24 06:31:46 +0000
committerJohn Wiegley <[email protected]>2001-04-24 06:31:46 +0000
commitef59cfc6638a8ac3fccbee88482d142e95c32f81 (patch)
tree3740b1c9e86580c6b741b583e1ffa7dda795df82 /lisp/eshell
parent157975e356a04f86bcad1f3503271d10149e7399 (diff)
(eshell/diff): Fixed problems that were occurring with Emacs 21's
diff.el/compile.el interaction layer.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-unix.el22
1 files changed, 14 insertions, 8 deletions
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 726fd0eeaf..1dfec1e702 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -947,14 +947,20 @@ Show wall-clock time elapsed during execution of COMMAND.")
(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."