diff options
| author | John Wiegley | 2005-05-31 00:14:26 +0000 |
|---|---|---|
| committer | John Wiegley | 2005-05-31 00:14:26 +0000 |
| commit | 6b0e3e4df5deff8b5d1dcb5065c070abb8393e9d (patch) | |
| tree | c20c50525936f9970338856e57bac951c4b3696e /lisp/eshell | |
| parent | c7a4ce37e95f0ac17d80bdb7c2b1280b82b186fb (diff) | |
| download | emacs-6b0e3e4df5deff8b5d1dcb5065c070abb8393e9d.tar.gz emacs-6b0e3e4df5deff8b5d1dcb5065c070abb8393e9d.zip | |
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.el | 5 | ||||
| -rw-r--r-- | lisp/eshell/em-dirs.el | 11 | ||||
| -rw-r--r-- | lisp/eshell/em-glob.el | 9 | ||||
| -rw-r--r-- | lisp/eshell/em-unix.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-ext.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-io.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-util.el | 17 | ||||
| -rw-r--r-- | lisp/eshell/esh-var.el | 2 |
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." | |||
| 136 | :type (get 'pcomplete-file-ignore 'custom-type) | 136 | :type (get 'pcomplete-file-ignore 'custom-type) |
| 137 | :group 'eshell-cmpl) | 137 | :group 'eshell-cmpl) |
| 138 | 138 | ||
| 139 | (defcustom eshell-cmpl-dir-ignore | 139 | (defcustom eshell-cmpl-dir-ignore "\\`\\(\\.\\.?\\|CVS\\)/\\'" |
| 140 | (format "\\`\\(\\.\\.?\\|CVS\\)%c\\'" directory-sep-char) | ||
| 141 | (documentation-property 'pcomplete-dir-ignore | 140 | (documentation-property 'pcomplete-dir-ignore |
| 142 | 'variable-documentation) | 141 | 'variable-documentation) |
| 143 | :type (get 'pcomplete-dir-ignore 'custom-type) | 142 | :type (get 'pcomplete-dir-ignore 'custom-type) |
| @@ -155,7 +154,7 @@ to writing a completion function." | |||
| 155 | :type (get 'pcomplete-autolist 'custom-type) | 154 | :type (get 'pcomplete-autolist 'custom-type) |
| 156 | :group 'eshell-cmpl) | 155 | :group 'eshell-cmpl) |
| 157 | 156 | ||
| 158 | (defcustom eshell-cmpl-suffix-list (list directory-sep-char ?:) | 157 | (defcustom eshell-cmpl-suffix-list (list ?/ ?:) |
| 159 | (documentation-property 'pcomplete-suffix-list | 158 | (documentation-property 'pcomplete-suffix-list |
| 160 | 'variable-documentation) | 159 | 'variable-documentation) |
| 161 | :type (get 'pcomplete-suffix-list 'custom-type) | 160 | :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.") | |||
| 276 | (let* ((letter (match-string 1)) | 276 | (let* ((letter (match-string 1)) |
| 277 | (regexp (concat "\\`" letter)) | 277 | (regexp (concat "\\`" letter)) |
| 278 | (path (eshell-find-previous-directory regexp))) | 278 | (path (eshell-find-previous-directory regexp))) |
| 279 | (concat (or path letter) | 279 | (concat (or path letter) "/")))) |
| 280 | (char-to-string directory-sep-char))))) | ||
| 281 | 280 | ||
| 282 | (defun eshell-complete-user-reference () | 281 | (defun eshell-complete-user-reference () |
| 283 | "If there is a user reference, complete it." | 282 | "If there is a user reference, complete it." |
| @@ -300,7 +299,7 @@ Thus, this does not include the current directory.") | |||
| 300 | (let* ((path default-directory) | 299 | (let* ((path default-directory) |
| 301 | (len (length path))) | 300 | (len (length path))) |
| 302 | (if (and (> len 1) | 301 | (if (and (> len 1) |
| 303 | (eq (aref path (1- len)) directory-sep-char) | 302 | (eq (aref path (1- len)) ?/) |
| 304 | (not (and (eshell-under-windows-p) | 303 | (not (and (eshell-under-windows-p) |
| 305 | (string-match "\\`[A-Za-z]:[\\\\/]\\'" path)))) | 304 | (string-match "\\`[A-Za-z]:[\\\\/]\\'" path)))) |
| 306 | (setq path (substring path 0 (1- (length path))))) | 305 | (setq path (substring path 0 (1- (length path))))) |
| @@ -324,9 +323,7 @@ in the minibuffer: | |||
| 324 | (len (length extra-dots)) | 323 | (len (length extra-dots)) |
| 325 | replace-text) | 324 | replace-text) |
| 326 | (while (> len 0) | 325 | (while (> len 0) |
| 327 | (setq replace-text | 326 | (setq replace-text (concat replace-text "/..") |
| 328 | (concat replace-text | ||
| 329 | (char-to-string directory-sep-char) "..") | ||
| 330 | len (1- len))) | 327 | len (1- len))) |
| 331 | (setq path | 328 | (setq path |
| 332 | (replace-match replace-text t t path 1)))) | 329 | (replace-match replace-text t t path 1)))) |
| @@ -371,7 +368,7 @@ in the minibuffer: | |||
| 371 | (setq path | 368 | (setq path |
| 372 | (ring-remove eshell-last-dir-ring | 369 | (ring-remove eshell-last-dir-ring |
| 373 | (if index | 370 | (if index |
| 374 | (string-to-int index) | 371 | (string-to-number index) |
| 375 | 0))))) | 372 | 0))))) |
| 376 | ((and path (string-match "^=\\(.*\\)$" path)) | 373 | ((and path (string-match "^=\\(.*\\)$" path)) |
| 377 | (let ((oldpath (eshell-find-previous-directory | 374 | (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: | |||
| 265 | (defvar matches) | 265 | (defvar matches) |
| 266 | (defvar message-shown)) | 266 | (defvar message-shown)) |
| 267 | 267 | ||
| 268 | ;; jww (1999-11-18): this function assumes that directory-sep-char is | ||
| 269 | ;; a forward slash (/) | ||
| 270 | |||
| 271 | (defun eshell-glob-entries (path globs &optional recurse-p) | 268 | (defun eshell-glob-entries (path globs &optional recurse-p) |
| 272 | "Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil." | 269 | "Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil." |
| 273 | (let* ((entries (ignore-errors | 270 | (let* ((entries (ignore-errors |
| @@ -303,11 +300,11 @@ the form: | |||
| 303 | ;; can't use `directory-file-name' because it strips away text | 300 | ;; can't use `directory-file-name' because it strips away text |
| 304 | ;; properties in the string | 301 | ;; properties in the string |
| 305 | (let ((len (1- (length incl)))) | 302 | (let ((len (1- (length incl)))) |
| 306 | (if (eq (aref incl len) directory-sep-char) | 303 | (if (eq (aref incl len) ?/) |
| 307 | (setq incl (substring incl 0 len))) | 304 | (setq incl (substring incl 0 len))) |
| 308 | (when excl | 305 | (when excl |
| 309 | (setq len (1- (length excl))) | 306 | (setq len (1- (length excl))) |
| 310 | (if (eq (aref excl len) directory-sep-char) | 307 | (if (eq (aref excl len) ?/) |
| 311 | (setq excl (substring excl 0 len))))) | 308 | (setq excl (substring excl 0 len))))) |
| 312 | (setq incl (eshell-glob-regexp incl) | 309 | (setq incl (eshell-glob-regexp incl) |
| 313 | excl (and excl (eshell-glob-regexp excl))) | 310 | excl (and excl (eshell-glob-regexp excl))) |
| @@ -329,7 +326,7 @@ the form: | |||
| 329 | (while entries | 326 | (while entries |
| 330 | (setq name (car entries) | 327 | (setq name (car entries) |
| 331 | len (length name) | 328 | len (length name) |
| 332 | isdir (eq (aref name (1- len)) directory-sep-char)) | 329 | isdir (eq (aref name (1- len)) ?/)) |
| 333 | (if (let ((fname (directory-file-name name))) | 330 | (if (let ((fname (directory-file-name name))) |
| 334 | (and (not (and excl (string-match excl fname))) | 331 | (and (not (and excl (string-match excl fname))) |
| 335 | (string-match incl fname))) | 332 | (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.") | |||
| 877 | (unless by-bytes | 877 | (unless by-bytes |
| 878 | (setq block-size (or block-size 1024))) | 878 | (setq block-size (or block-size 1024))) |
| 879 | (if (and max-depth (stringp max-depth)) | 879 | (if (and max-depth (stringp max-depth)) |
| 880 | (setq max-depth (string-to-int max-depth))) | 880 | (setq max-depth (string-to-number max-depth))) |
| 881 | ;; filesystem support means nothing under Windows | 881 | ;; filesystem support means nothing under Windows |
| 882 | (if (eshell-under-windows-p) | 882 | (if (eshell-under-windows-p) |
| 883 | (setq only-one-filesystem nil)) | 883 | (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." | |||
| 103 | "Invoke a .BAT or .CMD file on DOS/Windows systems." | 103 | "Invoke a .BAT or .CMD file on DOS/Windows systems." |
| 104 | ;; since CMD.EXE can't handle forward slashes in the initial | 104 | ;; since CMD.EXE can't handle forward slashes in the initial |
| 105 | ;; argument... | 105 | ;; argument... |
| 106 | (setcar args (subst-char-in-string directory-sep-char ?\\ (car args))) | 106 | (setcar args (subst-char-in-string ?/ ?\\ (car args))) |
| 107 | (throw 'eshell-replace-command | 107 | (throw 'eshell-replace-command |
| 108 | (eshell-parse-command eshell-windows-shell-file (cons "/c" args)))) | 108 | (eshell-parse-command eshell-windows-shell-file (cons "/c" args)))) |
| 109 | 109 | ||
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." | |||
| 192 | (eshell-finish-arg | 192 | (eshell-finish-arg |
| 193 | (prog1 | 193 | (prog1 |
| 194 | (list 'eshell-set-output-handle | 194 | (list 'eshell-set-output-handle |
| 195 | (or (and sh (string-to-int sh)) 1) | 195 | (or (and sh (string-to-number sh)) 1) |
| 196 | (list 'quote | 196 | (list 'quote |
| 197 | (aref [overwrite append insert] | 197 | (aref [overwrite append insert] |
| 198 | (1- (length oper))))) | 198 | (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." | |||
| 253 | parts) | 253 | parts) |
| 254 | (if (and (eshell-under-windows-p) | 254 | (if (and (eshell-under-windows-p) |
| 255 | (> len 2) | 255 | (> len 2) |
| 256 | (eq (aref path 0) directory-sep-char) | 256 | (eq (aref path 0) ?/) |
| 257 | (eq (aref path 1) directory-sep-char)) | 257 | (eq (aref path 1) ?/)) |
| 258 | (setq i 2)) | 258 | (setq i 2)) |
| 259 | (while (< i len) | 259 | (while (< i len) |
| 260 | (if (and (eq (aref path i) directory-sep-char) | 260 | (if (and (eq (aref path i) ?/) |
| 261 | (not (get-text-property i 'escaped path))) | 261 | (not (get-text-property i 'escaped path))) |
| 262 | (setq parts (cons (if (= li i) | 262 | (setq parts (cons (if (= li i) "/" |
| 263 | (char-to-string directory-sep-char) | ||
| 264 | (substring path li (1+ i))) parts) | 263 | (substring path li (1+ i))) parts) |
| 265 | li (1+ i))) | 264 | li (1+ i))) |
| 266 | (setq i (1+ i))) | 265 | (setq i (1+ i))) |
| @@ -268,9 +267,7 @@ If N or M is nil, it means the end of the list." | |||
| 268 | (setq parts (cons (substring path li i) parts))) | 267 | (setq parts (cons (substring path li i) parts))) |
| 269 | (if (and (eshell-under-windows-p) | 268 | (if (and (eshell-under-windows-p) |
| 270 | (string-match "\\`[A-Za-z]:\\'" (car (last parts)))) | 269 | (string-match "\\`[A-Za-z]:\\'" (car (last parts)))) |
| 271 | (setcar (last parts) | 270 | (setcar (last parts) (concat (car (last parts)) "/"))) |
| 272 | (concat (car (last parts)) | ||
| 273 | (char-to-string directory-sep-char)))) | ||
| 274 | (nreverse parts))) | 271 | (nreverse parts))) |
| 275 | 272 | ||
| 276 | (defun eshell-to-flat-string (value) | 273 | (defun eshell-to-flat-string (value) |
| @@ -450,8 +447,8 @@ list." | |||
| 450 | (point) (progn (end-of-line) | 447 | (point) (progn (end-of-line) |
| 451 | (point))) ":"))) | 448 | (point))) ":"))) |
| 452 | (if (and (and fields (nth 0 fields) (nth 2 fields)) | 449 | (if (and (and fields (nth 0 fields) (nth 2 fields)) |
| 453 | (not (assq (string-to-int (nth 2 fields)) names))) | 450 | (not (assq (string-to-number (nth 2 fields)) names))) |
| 454 | (setq names (cons (cons (string-to-int (nth 2 fields)) | 451 | (setq names (cons (cons (string-to-number (nth 2 fields)) |
| 455 | (nth 0 fields)) | 452 | (nth 0 fields)) |
| 456 | names)))) | 453 | names)))) |
| 457 | (forward-line)))) | 454 | (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 | |||
| 631 | (if (and value | 631 | (if (and value |
| 632 | (stringp value) | 632 | (stringp value) |
| 633 | (file-directory-p value)) | 633 | (file-directory-p value)) |
| 634 | (concat varname (char-to-string directory-sep-char)) | 634 | (concat varname "/") |
| 635 | varname)))) | 635 | varname)))) |
| 636 | (eshell-envvar-names (eshell-environment-variables))) | 636 | (eshell-envvar-names (eshell-environment-variables))) |
| 637 | (all-completions argname obarray 'boundp) | 637 | (all-completions argname obarray 'boundp) |