summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-unix.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-27 09:12:07 +0000
committerMiles Bader <miles@gnu.org>2007-10-27 09:12:07 +0000
commit18cd1f1a08833b0baad21c1d7b13a6845d95cf57 (patch)
tree03f33df7513d15bd5de0348aec35ef82bd061508 /lisp/eshell/em-unix.el
parent74863e7a78b1c8da1094a8250660a009c3b23015 (diff)
parentfdc9061358d3654e14bfc1419632e1d6c6c5c13e (diff)
downloademacs-18cd1f1a08833b0baad21c1d7b13a6845d95cf57.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 902-908) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 131-137) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 261-262) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-278
Diffstat (limited to 'lisp/eshell/em-unix.el')
-rw-r--r--lisp/eshell/em-unix.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index aaad664918f..33514d515af 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -175,7 +175,7 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine."
'info arg1' => OTHERWISE goes to top info window and then menu item arg1
'info arg1 arg2' => does action for arg1 (either visit-file or menu-item) and then menu item arg2
etc."
- (require 'info)
+ (eval-and-compile (require 'info))
(let ((file (cond
((not (stringp (car args)))
nil)
@@ -974,6 +974,12 @@ Show wall-clock time elapsed during execution of COMMAND.")
(if eshell-diff-window-config
(set-window-configuration eshell-diff-window-config)))
+(defun nil-blank-string (string)
+ "Return STRING, or nil if STRING contains only non-blank characters."
+ (cond
+ ((string-match "[^[:blank:]]" string) string)
+ (nil)))
+
(defun eshell/diff (&rest args)
"Alias \"diff\" to call Emacs `diff' function."
(let ((orig-args (eshell-stringify-list (eshell-flatten-list args))))
@@ -995,7 +1001,8 @@ Show wall-clock time elapsed during execution of COMMAND.")
(setcdr (last args 3) nil))
(with-current-buffer
(condition-case err
- (diff old new (eshell-flatten-and-stringify args))
+ (diff old new
+ (nil-blank-string (eshell-flatten-and-stringify args)))
(error
(throw 'eshell-replace-command
(eshell-parse-command "*diff" orig-args))))