diff options
| author | Miles Bader | 2005-06-06 02:39:45 +0000 |
|---|---|---|
| committer | Miles Bader | 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 emacs-fdffd346262841cb194225ea0acd8059c57ec2d4.zip | |
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." | |||
| 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) |
| @@ -370,7 +369,8 @@ to writing a completion function." | |||
| 370 | (setq args (nthcdr (1+ l) args) | 369 | (setq args (nthcdr (1+ l) args) |
| 371 | posns (nthcdr (1+ l) posns)))) | 370 | posns (nthcdr (1+ l) posns)))) |
| 372 | (assert (= (length args) (length posns))) | 371 | (assert (= (length args) (length posns))) |
| 373 | (when (and args (eq (char-syntax (char-before end)) ? )) | 372 | (when (and args (eq (char-syntax (char-before end)) ? ) |
| 373 | (not (eq (char-before (1- end)) ?\\))) | ||
| 374 | (nconc args (list "")) | 374 | (nconc args (list "")) |
| 375 | (nconc posns (list (point)))) | 375 | (nconc posns (list (point)))) |
| 376 | (cons (mapcar | 376 | (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.") | |||
| 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-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)." | |||
| 757 | 757 | ||
| 758 | (defmacro eshell-do-subjob (object) | 758 | (defmacro eshell-do-subjob (object) |
| 759 | "Evaluate a command OBJECT as a subjob. | 759 | "Evaluate a command OBJECT as a subjob. |
| 760 | We indicate thet the process was run in the background by returned it | 760 | We indicate that the process was run in the background by returning it |
| 761 | ensconced in a list." | 761 | ensconced in a list." |
| 762 | `(let ((eshell-current-subjob-p t)) | 762 | `(let ((eshell-current-subjob-p t)) |
| 763 | ,object)) | 763 | ,object)) |
| @@ -1006,11 +1006,10 @@ at the moment are: | |||
| 1006 | (eshell-resume-eval)))) | 1006 | (eshell-resume-eval)))) |
| 1007 | ;; On systems that don't support async subprocesses, eshell-resume | 1007 | ;; On systems that don't support async subprocesses, eshell-resume |
| 1008 | ;; can return t. Don't treat that as an error. | 1008 | ;; can return t. Don't treat that as an error. |
| 1009 | (if (listp delim) | ||
| 1010 | (setq delim (car delim))) | ||
| 1009 | (if (and delim (not (eq delim t))) | 1011 | (if (and delim (not (eq delim t))) |
| 1010 | (error "Unmatched delimiter: %c" | 1012 | (error "Unmatched delimiter: %c" delim))))) |
| 1011 | (if (listp delim) | ||
| 1012 | (car delim) | ||
| 1013 | delim)))))) | ||
| 1014 | 1013 | ||
| 1015 | (defun eshell-resume-command (proc status) | 1014 | (defun eshell-resume-command (proc status) |
| 1016 | "Resume the current command when a process ends." | 1015 | "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." | |||
| 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 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." | |||
| 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))))) |
| @@ -353,7 +353,8 @@ it defaults to `insert'." | |||
| 353 | ((or (bufferp target) | 353 | ((or (bufferp target) |
| 354 | (and (boundp 'eshell-buffer-shorthand) | 354 | (and (boundp 'eshell-buffer-shorthand) |
| 355 | (symbol-value 'eshell-buffer-shorthand) | 355 | (symbol-value 'eshell-buffer-shorthand) |
| 356 | (symbolp target))) | 356 | (symbolp target) |
| 357 | (not (memq target '(t nil))))) | ||
| 357 | (let ((buf (if (bufferp target) | 358 | (let ((buf (if (bufferp target) |
| 358 | target | 359 | target |
| 359 | (get-buffer-create | 360 | (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'." | |||
| 438 | 438 | ||
| 439 | (if eshell-first-time-p | 439 | (if eshell-first-time-p |
| 440 | (run-hooks 'eshell-first-time-mode-hook)) | 440 | (run-hooks 'eshell-first-time-mode-hook)) |
| 441 | (run-hooks 'eshell-mode-hook) | 441 | (run-mode-hooks 'eshell-mode-hook) |
| 442 | (run-hooks 'eshell-post-command-hook)) | 442 | (run-hooks 'eshell-post-command-hook)) |
| 443 | 443 | ||
| 444 | (put 'eshell-mode 'mode-class 'special) | 444 | (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." | |||
| 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) |