I wrote:
[...]
thing. It's probably the case that eshell should treat a Cygwin
build
as Unix sometimes and Windows others.
I don't have a Cygwin system. Could someone test or review this patch?
2002-03-23 John Paul Wallington <jpw(a)shootybangbang.com>
* esh-util.el (eshell-under-windows-or-cygwin-p): New function.
* em-cmpl.el (eshell-cmpl-ignore-case): Use it instead of
`eshell-under-windows-p'.
* em-dirs.el (eshell/cd): Ditto.
* em-glob.el (eshell-glob-case-insensitive): Ditto.
* em-hist.el (eshell-previous-matching-input-string-position): Ditto.
* esh-ext.el (eshell-binary-suffixes): Ditto.
Index: esh-util.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/eshell/esh-util.el,v
retrieving revision 1.1
diff -u -r1.1 esh-util.el
--- esh-util.el 2001/01/10 02:53:00 1.1
+++ esh-util.el 2002/04/02 03:45:03
@@ -135,6 +135,10 @@
"Return non-nil if we are running under MS-DOS/Windows."
(memq system-type '(ms-dos windows-nt)))
+(defsubst eshell-under-windows-or-cygwin-p ()
+ "Return non-nil if we are running under MS-DOS/Windows or Cygwin."
+ (memq system-type '(ms-dos windows-nt cygwin32)))
+
(defmacro eshell-condition-case (tag form &rest handlers)
"Like `condition-case', but only if `eshell-pass-through-errors' is
nil."
(if eshell-handle-errors
Index: em-cmpl.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/eshell/em-cmpl.el,v
retrieving revision 1.1
diff -u -r1.1 em-cmpl.el
--- em-cmpl.el 2001/01/10 02:52:44 1.1
+++ em-cmpl.el 2002/04/02 03:47:30
@@ -141,7 +141,7 @@
:type (get 'pcomplete-dir-ignore 'custom-type)
:group 'eshell-cmpl)
-(defcustom eshell-cmpl-ignore-case (eshell-under-windows-p)
+(defcustom eshell-cmpl-ignore-case (eshell-under-windows-or-cygwin-p)
(documentation-property 'pcomplete-ignore-case
'variable-documentation)
:type (get 'pcomplete-ignore-case 'custom-type)
Index: em-dirs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/eshell/em-dirs.el,v
retrieving revision 1.1
diff -u -r1.1 em-dirs.el
--- em-dirs.el 2001/01/10 02:52:44 1.1
+++ em-dirs.el 2002/04/02 03:47:59
@@ -356,7 +356,7 @@
(setq args (eshell-flatten-list args))
(let ((path (car args))
(subpath (car (cdr args)))
- (case-fold-search (eshell-under-windows-p))
+ (case-fold-search (eshell-under-windows-or-cygwin-p))
handled)
(if (numberp path)
(setq path (number-to-string path)))
Index: em-glob.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/eshell/em-glob.el,v
retrieving revision 1.1
diff -u -r1.1 em-glob.el
--- em-glob.el 2001/01/10 02:52:45 1.1
+++ em-glob.el 2002/04/02 03:49:13
@@ -76,7 +76,7 @@
:type 'boolean
:group 'eshell-glob)
-(defcustom eshell-glob-case-insensitive (eshell-under-windows-p)
+(defcustom eshell-glob-case-insensitive (eshell-under-windows-or-cygwin-p)
"*If non-nil, glob pattern matching will ignore case."
:type 'boolean
:group 'eshell-glob)
Index: em-hist.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/eshell/em-hist.el,v
retrieving revision 1.1
diff -u -r1.1 em-hist.el
--- em-hist.el 2001/01/10 02:52:45 1.1
+++ em-hist.el 2002/04/02 03:49:39
@@ -785,7 +785,7 @@
(motion (if (> arg 0) 1 -1))
(n (mod (- (or start (eshell-search-start arg)) motion) len))
(tried-each-ring-item nil)
- (case-fold-search (eshell-under-windows-p))
+ (case-fold-search (eshell-under-windows-or-cygwin-p))
(prev nil))
;; Do the whole search as many times as the argument says.
(while (and (/= arg 0) (not tried-each-ring-item))
Index: esh-ext.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/eshell/esh-ext.el,v
retrieving revision 1.2
diff -u -r1.2 esh-ext.el
--- esh-ext.el 2002/03/24 20:13:49 1.2
+++ esh-ext.el 2002/04/02 03:50:01
@@ -49,7 +49,7 @@
:group 'eshell-ext)
(defcustom eshell-binary-suffixes
- (if (eshell-under-windows-p)
+ (if (eshell-under-windows-or-cygwin-p)
'(".exe" ".com" ".bat" ".cmd"
"")
'(""))
"*A list of suffixes used when searching for executable files."
--
John Paul Wallington