aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2012-01-05 18:36:41 -0500
committerGlenn Morris <[email protected]>2012-01-05 18:36:41 -0500
commitafbb793039d5777d3cac6af9e00f27139ddf8dd7 (patch)
tree0d3238a1bb41fc51478e18ed80c29007c441a9e8
parentd660637a805e793fc431c68b47af90994465a547 (diff)
eshell fix for change in return value of `diff' command (bug#10420)
* lisp/eshell/em-unix.el (diff-no-select): Autoload it. (eshell/diff): Use diff-no-select.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/eshell/em-unix.el7
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d2ee593c38..e4d4062668 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-05 Glenn Morris <[email protected]>
+
+ * eshell/em-unix.el (diff-no-select): Autoload it.
+ (eshell/diff): Use diff-no-select. (Bug#10420)
+
2012-01-05 Chong Yidong <[email protected]>
* shell.el (shell-dynamic-complete-functions): Revert last change.
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 21deccb809..f24180b5c7 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -965,6 +965,8 @@ Show wall-clock time elapsed during execution of COMMAND.")
((string-match "[^[:blank:]]" string) string)
(nil)))
+(autoload 'diff-no-select "diff")
+
(defun eshell/diff (&rest args)
"Alias \"diff\" to call Emacs `diff' function."
(let ((orig-args (eshell-stringify-list (eshell-flatten-list args))))
@@ -986,8 +988,9 @@ Show wall-clock time elapsed during execution of COMMAND.")
(setcdr (last args 3) nil))
(with-current-buffer
(condition-case err
- (diff old new
- (nil-blank-string (eshell-flatten-and-stringify args)))
+ (diff-no-select
+ old new
+ (nil-blank-string (eshell-flatten-and-stringify args)))
(error
(throw 'eshell-replace-command
(eshell-parse-command "*diff" orig-args))))