aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorMiles Bader2007-10-27 09:12:07 +0000
committerMiles Bader2007-10-27 09:12:07 +0000
commit18cd1f1a08833b0baad21c1d7b13a6845d95cf57 (patch)
tree03f33df7513d15bd5de0348aec35ef82bd061508 /lisp/eshell
parent74863e7a78b1c8da1094a8250660a009c3b23015 (diff)
parentfdc9061358d3654e14bfc1419632e1d6c6c5c13e (diff)
downloademacs-18cd1f1a08833b0baad21c1d7b13a6845d95cf57.tar.gz
emacs-18cd1f1a08833b0baad21c1d7b13a6845d95cf57.zip
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')
-rw-r--r--lisp/eshell/em-unix.el11
-rw-r--r--lisp/eshell/esh-mode.el2
2 files changed, 10 insertions, 3 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."
175 'info arg1' => OTHERWISE goes to top info window and then menu item arg1 175 'info arg1' => OTHERWISE goes to top info window and then menu item arg1
176 'info arg1 arg2' => does action for arg1 (either visit-file or menu-item) and then menu item arg2 176 'info arg1 arg2' => does action for arg1 (either visit-file or menu-item) and then menu item arg2
177 etc." 177 etc."
178 (require 'info) 178 (eval-and-compile (require 'info))
179 (let ((file (cond 179 (let ((file (cond
180 ((not (stringp (car args))) 180 ((not (stringp (car args)))
181 nil) 181 nil)
@@ -974,6 +974,12 @@ Show wall-clock time elapsed during execution of COMMAND.")
974 (if eshell-diff-window-config 974 (if eshell-diff-window-config
975 (set-window-configuration eshell-diff-window-config))) 975 (set-window-configuration eshell-diff-window-config)))
976 976
977(defun nil-blank-string (string)
978 "Return STRING, or nil if STRING contains only non-blank characters."
979 (cond
980 ((string-match "[^[:blank:]]" string) string)
981 (nil)))
982
977(defun eshell/diff (&rest args) 983(defun eshell/diff (&rest args)
978 "Alias \"diff\" to call Emacs `diff' function." 984 "Alias \"diff\" to call Emacs `diff' function."
979 (let ((orig-args (eshell-stringify-list (eshell-flatten-list args)))) 985 (let ((orig-args (eshell-stringify-list (eshell-flatten-list args))))
@@ -995,7 +1001,8 @@ Show wall-clock time elapsed during execution of COMMAND.")
995 (setcdr (last args 3) nil)) 1001 (setcdr (last args 3) nil))
996 (with-current-buffer 1002 (with-current-buffer
997 (condition-case err 1003 (condition-case err
998 (diff old new (eshell-flatten-and-stringify args)) 1004 (diff old new
1005 (nil-blank-string (eshell-flatten-and-stringify args)))
999 (error 1006 (error
1000 (throw 'eshell-replace-command 1007 (throw 'eshell-replace-command
1001 (eshell-parse-command "*diff" orig-args)))) 1008 (eshell-parse-command "*diff" orig-args))))
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 2da81996dfd..0a8c8be697f 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -1081,7 +1081,7 @@ This function could be in the list `eshell-output-filter-functions'."
1081 1081
1082(defun eshell-handle-ansi-color () 1082(defun eshell-handle-ansi-color ()
1083 "Handle ANSI color codes." 1083 "Handle ANSI color codes."
1084 (require 'ansi-color) 1084 (eval-and-compile (require 'ansi-color))
1085 (ansi-color-apply-on-region eshell-last-output-start 1085 (ansi-color-apply-on-region eshell-last-output-start
1086 eshell-last-output-end)) 1086 eshell-last-output-end))
1087 1087