diff options
author | Miles Bader <miles@gnu.org> | 2005-06-06 02:39:45 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2005-06-06 02:39:45 +0000 |
commit | fdffd346262841cb194225ea0acd8059c57ec2d4 (patch) | |
tree | d8b3699131f7d1b94bc46c7d8be62af6b8b5ebfe /lisp/eshell | |
parent | a5c508fe3a3f456c987283156315d0384d38fe9e (diff) | |
parent | a9b4333620eb259e974445066a8e64cee0c21d69 (diff) | |
download | emacs-fdffd346262841cb194225ea0acd8059c57ec2d4.tar.gz |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-57
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 324-352)
- Merge from gnus--rel--5.10
- Update from CVS
- etc/emacs-buffer.gdb: Remove RCS keywords
* gnus--rel--5.10 (patch 70-79)
- Update from CVS
- Merge from emacs--cvs-trunk--0
Diffstat (limited to 'lisp/eshell')
-rw-r--r-- | lisp/eshell/em-cmpl.el | 8 | ||||
-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-cmd.el | 9 | ||||
-rw-r--r-- | lisp/eshell/esh-ext.el | 2 | ||||
-rw-r--r-- | lisp/eshell/esh-io.el | 5 | ||||
-rw-r--r-- | lisp/eshell/esh-mode.el | 2 | ||||
-rw-r--r-- | lisp/eshell/esh-util.el | 17 | ||||
-rw-r--r-- | lisp/eshell/esh-var.el | 2 |
10 files changed, 29 insertions, 38 deletions
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 695a9fb4ed8..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) @@ -370,7 +369,8 @@ to writing a completion function." (setq args (nthcdr (1+ l) args) posns (nthcdr (1+ l) posns)))) (assert (= (length args) (length posns))) - (when (and args (eq (char-syntax (char-before end)) ? )) + (when (and args (eq (char-syntax (char-before end)) ? ) + (not (eq (char-before (1- end)) ?\\))) (nconc args (list "")) (nconc posns (list (point)))) (cons (mapcar 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-cmd.el b/lisp/eshell/esh-cmd.el index d7c65066ac6..355369d35ae 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -757,7 +757,7 @@ nil)' if none)." (defmacro eshell-do-subjob (object) "Evaluate a command OBJECT as a subjob. -We indicate thet the process was run in the background by returned it +We indicate that the process was run in the background by returning it ensconced in a list." `(let ((eshell-current-subjob-p t)) ,object)) @@ -1006,11 +1006,10 @@ at the moment are: (eshell-resume-eval)))) ;; On systems that don't support async subprocesses, eshell-resume ;; can return t. Don't treat that as an error. + (if (listp delim) + (setq delim (car delim))) (if (and delim (not (eq delim t))) - (error "Unmatched delimiter: %c" - (if (listp delim) - (car delim) - delim)))))) + (error "Unmatched delimiter: %c" delim))))) (defun eshell-resume-command (proc status) "Resume the current command when a process ends." 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 6944770dbc9..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))))) @@ -353,7 +353,8 @@ it defaults to `insert'." ((or (bufferp target) (and (boundp 'eshell-buffer-shorthand) (symbol-value 'eshell-buffer-shorthand) - (symbolp target))) + (symbolp target) + (not (memq target '(t nil))))) (let ((buf (if (bufferp target) target (get-buffer-create diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 050c82cc310..9cb05116b79 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -438,7 +438,7 @@ This is used by `eshell-watch-for-password-prompt'." (if eshell-first-time-p (run-hooks 'eshell-first-time-mode-hook)) - (run-hooks 'eshell-mode-hook) + (run-mode-hooks 'eshell-mode-hook) (run-hooks 'eshell-post-command-hook)) (put 'eshell-mode 'mode-class 'special) 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) |