summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-05-31 00:14:26 +0000
committerJohn Wiegley <johnw@newartisans.com>2005-05-31 00:14:26 +0000
commit6b0e3e4df5deff8b5d1dcb5065c070abb8393e9d (patch)
treec20c50525936f9970338856e57bac951c4b3696e /lisp/eshell
parentc7a4ce37e95f0ac17d80bdb7c2b1280b82b186fb (diff)
downloademacs-6b0e3e4df5deff8b5d1dcb5065c070abb8393e9d.tar.gz
Changed all uses of `directory-sep-char' to ?/, and all uses of
`string-to-int' to `string-to-number'.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-cmpl.el5
-rw-r--r--lisp/eshell/em-dirs.el11
-rw-r--r--lisp/eshell/em-glob.el9
-rw-r--r--lisp/eshell/em-unix.el2
-rw-r--r--lisp/eshell/esh-ext.el2
-rw-r--r--lisp/eshell/esh-io.el2
-rw-r--r--lisp/eshell/esh-util.el17
-rw-r--r--lisp/eshell/esh-var.el2
8 files changed, 20 insertions, 30 deletions
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index 5f529b07991..2b4dbc76ddc 100644
--- a/lisp/eshell/em-cmpl.el
+++ b/lisp/eshell/em-cmpl.el
@@ -136,8 +136,7 @@ to writing a completion function."
:type (get 'pcomplete-file-ignore 'custom-type)
:group 'eshell-cmpl)
-(defcustom eshell-cmpl-dir-ignore
- (format "\\`\\(\\.\\.?\\|CVS\\)%c\\'" directory-sep-char)
+(defcustom eshell-cmpl-dir-ignore "\\`\\(\\.\\.?\\|CVS\\)/\\'"
(documentation-property 'pcomplete-dir-ignore
'variable-documentation)
:type (get 'pcomplete-dir-ignore 'custom-type)
@@ -155,7 +154,7 @@ to writing a completion function."
:type (get 'pcomplete-autolist 'custom-type)
:group 'eshell-cmpl)
-(defcustom eshell-cmpl-suffix-list (list directory-sep-char ?:)
+(defcustom eshell-cmpl-suffix-list (list ?/ ?:)
(documentation-property 'pcomplete-suffix-list
'variable-documentation)
:type (get 'pcomplete-suffix-list 'custom-type)
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el
index 7b74069454b..6477a546eb8 100644
--- a/lisp/eshell/em-dirs.el
+++ b/lisp/eshell/em-dirs.el
@@ -276,8 +276,7 @@ Thus, this does not include the current directory.")
(let* ((letter (match-string 1))
(regexp (concat "\\`" letter))
(path (eshell-find-previous-directory regexp)))
- (concat (or path letter)
- (char-to-string directory-sep-char)))))
+ (concat (or path letter) "/"))))
(defun eshell-complete-user-reference ()
"If there is a user reference, complete it."
@@ -300,7 +299,7 @@ Thus, this does not include the current directory.")
(let* ((path default-directory)
(len (length path)))
(if (and (> len 1)
- (eq (aref path (1- len)) directory-sep-char)
+ (eq (aref path (1- len)) ?/)
(not (and (eshell-under-windows-p)
(string-match "\\`[A-Za-z]:[\\\\/]\\'" path))))
(setq path (substring path 0 (1- (length path)))))
@@ -324,9 +323,7 @@ in the minibuffer:
(len (length extra-dots))
replace-text)
(while (> len 0)
- (setq replace-text
- (concat replace-text
- (char-to-string directory-sep-char) "..")
+ (setq replace-text (concat replace-text "/..")
len (1- len)))
(setq path
(replace-match replace-text t t path 1))))
@@ -371,7 +368,7 @@ in the minibuffer:
(setq path
(ring-remove eshell-last-dir-ring
(if index
- (string-to-int index)
+ (string-to-number index)
0)))))
((and path (string-match "^=\\(.*\\)$" path))
(let ((oldpath (eshell-find-previous-directory
diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el
index c84962e66b0..74614d78d9c 100644
--- a/lisp/eshell/em-glob.el
+++ b/lisp/eshell/em-glob.el
@@ -265,9 +265,6 @@ the form:
(defvar matches)
(defvar message-shown))
-;; jww (1999-11-18): this function assumes that directory-sep-char is
-;; a forward slash (/)
-
(defun eshell-glob-entries (path globs &optional recurse-p)
"Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil."
(let* ((entries (ignore-errors
@@ -303,11 +300,11 @@ the form:
;; can't use `directory-file-name' because it strips away text
;; properties in the string
(let ((len (1- (length incl))))
- (if (eq (aref incl len) directory-sep-char)
+ (if (eq (aref incl len) ?/)
(setq incl (substring incl 0 len)))
(when excl
(setq len (1- (length excl)))
- (if (eq (aref excl len) directory-sep-char)
+ (if (eq (aref excl len) ?/)
(setq excl (substring excl 0 len)))))
(setq incl (eshell-glob-regexp incl)
excl (and excl (eshell-glob-regexp excl)))
@@ -329,7 +326,7 @@ the form:
(while entries
(setq name (car entries)
len (length name)
- isdir (eq (aref name (1- len)) directory-sep-char))
+ isdir (eq (aref name (1- len)) ?/))
(if (let ((fname (directory-file-name name)))
(and (not (and excl (string-match excl fname)))
(string-match incl fname)))
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index d932916d8c9..62296dde73c 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -877,7 +877,7 @@ Summarize disk usage of each FILE, recursively for directories.")
(unless by-bytes
(setq block-size (or block-size 1024)))
(if (and max-depth (stringp max-depth))
- (setq max-depth (string-to-int max-depth)))
+ (setq max-depth (string-to-number max-depth)))
;; filesystem support means nothing under Windows
(if (eshell-under-windows-p)
(setq only-one-filesystem nil))
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el
index c16b6113516..11fecee4de0 100644
--- a/lisp/eshell/esh-ext.el
+++ b/lisp/eshell/esh-ext.el
@@ -103,7 +103,7 @@ wholly ignored."
"Invoke a .BAT or .CMD file on DOS/Windows systems."
;; since CMD.EXE can't handle forward slashes in the initial
;; argument...
- (setcar args (subst-char-in-string directory-sep-char ?\\ (car args)))
+ (setcar args (subst-char-in-string ?/ ?\\ (car args)))
(throw 'eshell-replace-command
(eshell-parse-command eshell-windows-shell-file (cons "/c" args))))
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el
index 1161013cf58..8f171760ea0 100644
--- a/lisp/eshell/esh-io.el
+++ b/lisp/eshell/esh-io.el
@@ -192,7 +192,7 @@ not be added to this variable."
(eshell-finish-arg
(prog1
(list 'eshell-set-output-handle
- (or (and sh (string-to-int sh)) 1)
+ (or (and sh (string-to-number sh)) 1)
(list 'quote
(aref [overwrite append insert]
(1- (length oper)))))
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index a2fd0915cf4..91317300ca5 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -253,14 +253,13 @@ If N or M is nil, it means the end of the list."
parts)
(if (and (eshell-under-windows-p)
(> len 2)
- (eq (aref path 0) directory-sep-char)
- (eq (aref path 1) directory-sep-char))
+ (eq (aref path 0) ?/)
+ (eq (aref path 1) ?/))
(setq i 2))
(while (< i len)
- (if (and (eq (aref path i) directory-sep-char)
+ (if (and (eq (aref path i) ?/)
(not (get-text-property i 'escaped path)))
- (setq parts (cons (if (= li i)
- (char-to-string directory-sep-char)
+ (setq parts (cons (if (= li i) "/"
(substring path li (1+ i))) parts)
li (1+ i)))
(setq i (1+ i)))
@@ -268,9 +267,7 @@ If N or M is nil, it means the end of the list."
(setq parts (cons (substring path li i) parts)))
(if (and (eshell-under-windows-p)
(string-match "\\`[A-Za-z]:\\'" (car (last parts))))
- (setcar (last parts)
- (concat (car (last parts))
- (char-to-string directory-sep-char))))
+ (setcar (last parts) (concat (car (last parts)) "/")))
(nreverse parts)))
(defun eshell-to-flat-string (value)
@@ -450,8 +447,8 @@ list."
(point) (progn (end-of-line)
(point))) ":")))
(if (and (and fields (nth 0 fields) (nth 2 fields))
- (not (assq (string-to-int (nth 2 fields)) names)))
- (setq names (cons (cons (string-to-int (nth 2 fields))
+ (not (assq (string-to-number (nth 2 fields)) names)))
+ (setq names (cons (cons (string-to-number (nth 2 fields))
(nth 0 fields))
names))))
(forward-line))))
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 9ff9c1898a2..a0294273985 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -631,7 +631,7 @@ For example, to retrieve the second element of a user's record in
(if (and value
(stringp value)
(file-directory-p value))
- (concat varname (char-to-string directory-sep-char))
+ (concat varname "/")
varname))))
(eshell-envvar-names (eshell-environment-variables)))
(all-completions argname obarray 'boundp)