From: Glenn Morris Date: Thu, 5 Jan 2012 23:36:41 +0000 (-0500) Subject: eshell fix for change in return value of `diff' command (bug#10420) X-Git-Tag: emacs-pretest-24.0.93~97^2~55^2~29 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=afbb793039d5777d3cac6af9e00f27139ddf8dd7;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d2ee593c389..e4d4062668d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-01-05 Glenn Morris + + * eshell/em-unix.el (diff-no-select): Autoload it. + (eshell/diff): Use diff-no-select. (Bug#10420) + 2012-01-05 Chong Yidong * shell.el (shell-dynamic-complete-functions): Revert last change. diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 21deccb8093..f24180b5c7f 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))))