diff options
| author | Joakim Verona | 2011-02-05 11:23:09 +0100 |
|---|---|---|
| committer | Joakim Verona | 2011-02-05 11:23:09 +0100 |
| commit | 4bd51ad5c3445b644dfb017d5b57b10a90aa325f (patch) | |
| tree | 894801e7308ce4ecc34933f959e28f4b9cff9533 /lisp/eshell | |
| parent | 13cfe8df462ab8da9f0028e16cc84dcaceaca3d1 (diff) | |
| parent | 9bcaafce5351d270ac514e23cb69ff1a5fd35229 (diff) | |
| download | emacs-4bd51ad5c3445b644dfb017d5b57b10a90aa325f.tar.gz emacs-4bd51ad5c3445b644dfb017d5b57b10a90aa325f.zip | |
merge from upstream. currently seems to have bitroted and i get segfaults
Diffstat (limited to 'lisp/eshell')
29 files changed, 173 insertions, 255 deletions
diff --git a/lisp/eshell/.gitignore b/lisp/eshell/.gitignore index 8f16f9600f5..2abf84ba3ee 100644 --- a/lisp/eshell/.gitignore +++ b/lisp/eshell/.gitignore | |||
| @@ -1,3 +1,2 @@ | |||
| 1 | esh-groups.el | 1 | esh-groups.el |
| 2 | 2 | ||
| 3 | # arch-tag: 270e983f-fee5-4b6d-a00b-c1bafdee8690 | ||
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el index 6b24c269b30..aa138cb4dcb 100644 --- a/lisp/eshell/em-alias.el +++ b/lisp/eshell/em-alias.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-alias.el --- creation and management of command aliases | 1 | ;;; em-alias.el --- creation and management of command aliases |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -279,5 +278,4 @@ These are all the command aliases which begin with NAME." | |||
| 279 | ;; generated-autoload-file: "esh-groups.el" | 278 | ;; generated-autoload-file: "esh-groups.el" |
| 280 | ;; End: | 279 | ;; End: |
| 281 | 280 | ||
| 282 | ;; arch-tag: 8b018fc1-4e07-4ccc-aa73-c0a1ba361f82 | ||
| 283 | ;;; em-alias.el ends here | 281 | ;;; em-alias.el ends here |
diff --git a/lisp/eshell/em-banner.el b/lisp/eshell/em-banner.el index 9087cae369c..b2ebde98cee 100644 --- a/lisp/eshell/em-banner.el +++ b/lisp/eshell/em-banner.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-banner.el --- sample module that displays a login banner | 1 | ;;; em-banner.el --- sample module that displays a login banner |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -96,5 +95,4 @@ This can be any sexp, and should end with at least two newlines." | |||
| 96 | ;; generated-autoload-file: "esh-groups.el" | 95 | ;; generated-autoload-file: "esh-groups.el" |
| 97 | ;; End: | 96 | ;; End: |
| 98 | 97 | ||
| 99 | ;; arch-tag: e738b4ef-8671-42ae-a757-291779b92491 | ||
| 100 | ;;; em-banner.el ends here | 98 | ;;; em-banner.el ends here |
diff --git a/lisp/eshell/em-basic.el b/lisp/eshell/em-basic.el index ce72f752d42..df1987e13ee 100644 --- a/lisp/eshell/em-basic.el +++ b/lisp/eshell/em-basic.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-basic.el --- basic shell builtin commands | 1 | ;;; em-basic.el --- basic shell builtin commands |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -184,5 +183,4 @@ or `eshell-printn' for display." | |||
| 184 | ;; generated-autoload-file: "esh-groups.el" | 183 | ;; generated-autoload-file: "esh-groups.el" |
| 185 | ;; End: | 184 | ;; End: |
| 186 | 185 | ||
| 187 | ;; arch-tag: 385a31b1-cb95-46f0-9829-9d352ee77db8 | ||
| 188 | ;;; em-basic.el ends here | 186 | ;;; em-basic.el ends here |
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 554e010a1b3..f3f104c1ede 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-cmpl.el --- completion using the TAB key | 1 | ;;; em-cmpl.el --- completion using the TAB key |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -455,5 +454,4 @@ to writing a completion function." | |||
| 455 | ;; generated-autoload-file: "esh-groups.el" | 454 | ;; generated-autoload-file: "esh-groups.el" |
| 456 | ;; End: | 455 | ;; End: |
| 457 | 456 | ||
| 458 | ;; arch-tag: 0e914699-673a-45f8-8cbf-82e1dbc571bc | ||
| 459 | ;;; em-cmpl.el ends here | 457 | ;;; em-cmpl.el ends here |
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index f4b2575def2..64555ab15ef 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-dirs.el --- directory navigation commands | 1 | ;;; em-dirs.el --- directory navigation commands |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -573,5 +572,4 @@ in the minibuffer: | |||
| 573 | ;; generated-autoload-file: "esh-groups.el" | 572 | ;; generated-autoload-file: "esh-groups.el" |
| 574 | ;; End: | 573 | ;; End: |
| 575 | 574 | ||
| 576 | ;; arch-tag: 1e9c5a95-f1bd-45f8-ad36-55aac706e787 | ||
| 577 | ;;; em-dirs.el ends here | 575 | ;;; em-dirs.el ends here |
diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index 2f29f3d0aee..2a565c5c827 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-glob.el --- extended file name globbing | 1 | ;;; em-glob.el --- extended file name globbing |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -246,7 +245,7 @@ the form: | |||
| 246 | 245 | ||
| 247 | (INCLUDE-REGEXP EXCLUDE-REGEXP (PRED-FUNC-LIST) (MOD-FUNC-LIST))" | 246 | (INCLUDE-REGEXP EXCLUDE-REGEXP (PRED-FUNC-LIST) (MOD-FUNC-LIST))" |
| 248 | (let ((paths (eshell-split-path glob)) | 247 | (let ((paths (eshell-split-path glob)) |
| 249 | matches message-shown ange-cache) | 248 | eshell-glob-matches message-shown ange-cache) |
| 250 | (unwind-protect | 249 | (unwind-protect |
| 251 | (if (and (cdr paths) | 250 | (if (and (cdr paths) |
| 252 | (file-name-absolute-p (car paths))) | 251 | (file-name-absolute-p (car paths))) |
| @@ -255,15 +254,15 @@ the form: | |||
| 255 | (eshell-glob-entries (file-name-as-directory ".") paths)) | 254 | (eshell-glob-entries (file-name-as-directory ".") paths)) |
| 256 | (if message-shown | 255 | (if message-shown |
| 257 | (message nil))) | 256 | (message nil))) |
| 258 | (or (and matches (sort matches #'string<)) | 257 | (or (and eshell-glob-matches (sort eshell-glob-matches #'string<)) |
| 259 | (if eshell-error-if-no-glob | 258 | (if eshell-error-if-no-glob |
| 260 | (error "No matches found: %s" glob) | 259 | (error "No matches found: %s" glob) |
| 261 | glob)))) | 260 | glob)))) |
| 262 | 261 | ||
| 263 | (defvar matches) | 262 | (defvar eshell-glob-matches) |
| 264 | (defvar message-shown) | 263 | (defvar message-shown) |
| 265 | 264 | ||
| 266 | ;; FIXME does this really need to abuse matches, message-shown? | 265 | ;; FIXME does this really need to abuse eshell-glob-matches, message-shown? |
| 267 | (defun eshell-glob-entries (path globs &optional recurse-p) | 266 | (defun eshell-glob-entries (path globs &optional recurse-p) |
| 268 | "Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil." | 267 | "Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil." |
| 269 | (let* ((entries (ignore-errors | 268 | (let* ((entries (ignore-errors |
| @@ -319,7 +318,7 @@ the form: | |||
| 319 | "\\`\\."))) | 318 | "\\`\\."))) |
| 320 | (when (and recurse-p eshell-glob-show-progress) | 319 | (when (and recurse-p eshell-glob-show-progress) |
| 321 | (message "Building file list...%d so far: %s" | 320 | (message "Building file list...%d so far: %s" |
| 322 | (length matches) path) | 321 | (length eshell-glob-matches) path) |
| 323 | (setq message-shown t)) | 322 | (setq message-shown t)) |
| 324 | (if (equal path "./") (setq path "")) | 323 | (if (equal path "./") (setq path "")) |
| 325 | (while entries | 324 | (while entries |
| @@ -332,7 +331,8 @@ the form: | |||
| 332 | (if (cdr globs) | 331 | (if (cdr globs) |
| 333 | (if isdir | 332 | (if isdir |
| 334 | (setq dirs (cons (concat path name) dirs))) | 333 | (setq dirs (cons (concat path name) dirs))) |
| 335 | (setq matches (cons (concat path name) matches)))) | 334 | (setq eshell-glob-matches |
| 335 | (cons (concat path name) eshell-glob-matches)))) | ||
| 336 | (if (and recurse-p isdir | 336 | (if (and recurse-p isdir |
| 337 | (or (> len 3) | 337 | (or (> len 3) |
| 338 | (not (or (and (= len 2) (equal name "./")) | 338 | (not (or (and (= len 2) (equal name "./")) |
| @@ -358,5 +358,4 @@ the form: | |||
| 358 | ;; generated-autoload-file: "esh-groups.el" | 358 | ;; generated-autoload-file: "esh-groups.el" |
| 359 | ;; End: | 359 | ;; End: |
| 360 | 360 | ||
| 361 | ;; arch-tag: d0548f54-fb7c-4978-a88e-f7c26f7f68ca | ||
| 362 | ;;; em-glob.el ends here | 361 | ;;; em-glob.el ends here |
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 1f644261337..5ec529f4b8f 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-hist.el --- history list management | 1 | ;;; em-hist.el --- history list management |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -837,6 +836,8 @@ With prefix argument N, search for Nth previous match. | |||
| 837 | If N is negative, find the next or Nth next match." | 836 | If N is negative, find the next or Nth next match." |
| 838 | (interactive (eshell-regexp-arg "Previous input matching (regexp): ")) | 837 | (interactive (eshell-regexp-arg "Previous input matching (regexp): ")) |
| 839 | (setq arg (eshell-search-arg arg)) | 838 | (setq arg (eshell-search-arg arg)) |
| 839 | (if (> eshell-last-output-end (point)) | ||
| 840 | (error "Point not located after prompt")) | ||
| 840 | (let ((pos (eshell-previous-matching-input-string-position regexp arg))) | 841 | (let ((pos (eshell-previous-matching-input-string-position regexp arg))) |
| 841 | ;; Has a match been found? | 842 | ;; Has a match been found? |
| 842 | (if (null pos) | 843 | (if (null pos) |
| @@ -844,7 +845,7 @@ If N is negative, find the next or Nth next match." | |||
| 844 | (setq eshell-history-index pos) | 845 | (setq eshell-history-index pos) |
| 845 | (unless (minibuffer-window-active-p (selected-window)) | 846 | (unless (minibuffer-window-active-p (selected-window)) |
| 846 | (message "History item: %d" (- (ring-length eshell-history-ring) pos))) | 847 | (message "History item: %d" (- (ring-length eshell-history-ring) pos))) |
| 847 | ;; Can't use kill-region as it sets this-command | 848 | ;; Can't use kill-region as it sets this-command |
| 848 | (delete-region eshell-last-output-end (point)) | 849 | (delete-region eshell-last-output-end (point)) |
| 849 | (insert-and-inherit (eshell-get-history pos))))) | 850 | (insert-and-inherit (eshell-get-history pos))))) |
| 850 | 851 | ||
| @@ -996,5 +997,4 @@ If N is negative, search backwards for the -Nth previous match." | |||
| 996 | ;; generated-autoload-file: "esh-groups.el" | 997 | ;; generated-autoload-file: "esh-groups.el" |
| 997 | ;; End: | 998 | ;; End: |
| 998 | 999 | ||
| 999 | ;; arch-tag: 1a847333-f864-4b96-9acd-b549d620b6c6 | ||
| 1000 | ;;; em-hist.el ends here | 1000 | ;;; em-hist.el ends here |
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index db2a21cd319..7714629f2fa 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-ls.el --- implementation of ls in Lisp | 1 | ;;; em-ls.el --- implementation of ls in Lisp |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -612,11 +611,11 @@ In Eshell's implementation of ls, ENTRIES is always reversed." | |||
| 612 | (let ((result | 611 | (let ((result |
| 613 | (cond | 612 | (cond |
| 614 | ((eq sort-method 'by-atime) | 613 | ((eq sort-method 'by-atime) |
| 615 | (eshell-ls-compare-entries l r 4 'eshell-time-less-p)) | 614 | (eshell-ls-compare-entries l r 4 'time-less-p)) |
| 616 | ((eq sort-method 'by-mtime) | 615 | ((eq sort-method 'by-mtime) |
| 617 | (eshell-ls-compare-entries l r 5 'eshell-time-less-p)) | 616 | (eshell-ls-compare-entries l r 5 'time-less-p)) |
| 618 | ((eq sort-method 'by-ctime) | 617 | ((eq sort-method 'by-ctime) |
| 619 | (eshell-ls-compare-entries l r 6 'eshell-time-less-p)) | 618 | (eshell-ls-compare-entries l r 6 'time-less-p)) |
| 620 | ((eq sort-method 'by-size) | 619 | ((eq sort-method 'by-size) |
| 621 | (eshell-ls-compare-entries l r 7 '<)) | 620 | (eshell-ls-compare-entries l r 7 '<)) |
| 622 | ((eq sort-method 'by-extension) | 621 | ((eq sort-method 'by-extension) |
| @@ -941,5 +940,4 @@ to use, and each member of which is the width of that column | |||
| 941 | ;; generated-autoload-file: "esh-groups.el" | 940 | ;; generated-autoload-file: "esh-groups.el" |
| 942 | ;; End: | 941 | ;; End: |
| 943 | 942 | ||
| 944 | ;; arch-tag: 9295181c-0cb2-499c-999b-89f5359842cb | ||
| 945 | ;;; em-ls.el ends here | 943 | ;;; em-ls.el ends here |
diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index 15a3deea30c..33085c067fd 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-pred.el --- argument predicates and modifiers (ala zsh) | 1 | ;;; em-pred.el --- argument predicates and modifiers (ala zsh) |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -427,7 +426,7 @@ returning the resultant string." | |||
| 427 | (forward-char)) | 426 | (forward-char)) |
| 428 | (if (looking-at "[0-9]+") | 427 | (if (looking-at "[0-9]+") |
| 429 | (progn | 428 | (progn |
| 430 | (setq when (- (eshell-time-to-seconds (current-time)) | 429 | (setq when (- (float-time) |
| 431 | (* (string-to-number (match-string 0)) | 430 | (* (string-to-number (match-string 0)) |
| 432 | quantum))) | 431 | quantum))) |
| 433 | (goto-char (match-end 0))) | 432 | (goto-char (match-end 0))) |
| @@ -444,7 +443,7 @@ returning the resultant string." | |||
| 444 | (attrs (file-attributes file))) | 443 | (attrs (file-attributes file))) |
| 445 | (unless attrs | 444 | (unless attrs |
| 446 | (error "Cannot stat file `%s'" file)) | 445 | (error "Cannot stat file `%s'" file)) |
| 447 | (setq when (eshell-time-to-seconds (nth attr-index attrs)))) | 446 | (setq when (float-time (nth attr-index attrs)))) |
| 448 | (goto-char (1+ end))) | 447 | (goto-char (1+ end))) |
| 449 | `(lambda (file) | 448 | `(lambda (file) |
| 450 | (let ((attrs (file-attributes file))) | 449 | (let ((attrs (file-attributes file))) |
| @@ -453,7 +452,7 @@ returning the resultant string." | |||
| 453 | '< | 452 | '< |
| 454 | (if (eq qual ?+) | 453 | (if (eq qual ?+) |
| 455 | '> | 454 | '> |
| 456 | '=)) ,when (eshell-time-to-seconds | 455 | '=)) ,when (float-time |
| 457 | (nth ,attr-index attrs)))))))) | 456 | (nth ,attr-index attrs)))))))) |
| 458 | 457 | ||
| 459 | (defun eshell-pred-file-type (type) | 458 | (defun eshell-pred-file-type (type) |
| @@ -605,5 +604,4 @@ that 'ls -l' will show in the first column of its display. " | |||
| 605 | ;; generated-autoload-file: "esh-groups.el" | 604 | ;; generated-autoload-file: "esh-groups.el" |
| 606 | ;; End: | 605 | ;; End: |
| 607 | 606 | ||
| 608 | ;; arch-tag: 8b5ce022-17f3-4c40-93c7-5faafaa63f31 | ||
| 609 | ;;; em-pred.el ends here | 607 | ;;; em-pred.el ends here |
diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el index 29e1ace26b1..448d2cdf303 100644 --- a/lisp/eshell/em-prompt.el +++ b/lisp/eshell/em-prompt.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-prompt.el --- command prompts | 1 | ;;; em-prompt.el --- command prompts |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -177,5 +176,4 @@ If this takes us past the end of the current line, don't skip at all." | |||
| 177 | ;; generated-autoload-file: "esh-groups.el" | 176 | ;; generated-autoload-file: "esh-groups.el" |
| 178 | ;; End: | 177 | ;; End: |
| 179 | 178 | ||
| 180 | ;; arch-tag: 01c1574b-ce70-4e89-bc38-e6619f61e208 | ||
| 181 | ;;; em-prompt.el ends here | 179 | ;;; em-prompt.el ends here |
diff --git a/lisp/eshell/em-rebind.el b/lisp/eshell/em-rebind.el index 9b208d64803..6def23e1b71 100644 --- a/lisp/eshell/em-rebind.el +++ b/lisp/eshell/em-rebind.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-rebind.el --- rebind keys when point is at current input | 1 | ;;; em-rebind.el --- rebind keys when point is at current input |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -91,7 +90,6 @@ This is default behavior of shells like bash." | |||
| 91 | '(beginning-of-line-text | 90 | '(beginning-of-line-text |
| 92 | beginning-of-line | 91 | beginning-of-line |
| 93 | move-to-column | 92 | move-to-column |
| 94 | move-to-column-force | ||
| 95 | move-to-left-margin | 93 | move-to-left-margin |
| 96 | move-to-tab-stop | 94 | move-to-tab-stop |
| 97 | forward-char | 95 | forward-char |
| @@ -247,5 +245,4 @@ input." | |||
| 247 | ;; generated-autoload-file: "esh-groups.el" | 245 | ;; generated-autoload-file: "esh-groups.el" |
| 248 | ;; End: | 246 | ;; End: |
| 249 | 247 | ||
| 250 | ;; arch-tag: 76d84f12-cc56-4d67-9b7d-c6b44ad20530 | ||
| 251 | ;;; em-rebind.el ends here | 248 | ;;; em-rebind.el ends here |
diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el index 183faa1dd77..ed4ad1c0712 100644 --- a/lisp/eshell/em-script.el +++ b/lisp/eshell/em-script.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-script.el --- Eshell script files | 1 | ;;; em-script.el --- Eshell script files |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -90,23 +89,25 @@ Comments begin with '#'." | |||
| 90 | (interactive "f") | 89 | (interactive "f") |
| 91 | (let ((orig (point)) | 90 | (let ((orig (point)) |
| 92 | (here (point-max)) | 91 | (here (point-max)) |
| 93 | (inhibit-point-motion-hooks t) | 92 | (inhibit-point-motion-hooks t)) |
| 94 | after-change-functions) | ||
| 95 | (goto-char (point-max)) | 93 | (goto-char (point-max)) |
| 96 | (insert-file-contents file) | 94 | (with-silent-modifications |
| 97 | (goto-char (point-max)) | 95 | ;; FIXME: Why not use a temporary buffer and avoid this |
| 98 | (throw 'eshell-replace-command | 96 | ;; "insert&delete" business? --Stef |
| 99 | (prog1 | 97 | (insert-file-contents file) |
| 100 | (list 'let | 98 | (goto-char (point-max)) |
| 101 | (list (list 'eshell-command-name (list 'quote file)) | 99 | (throw 'eshell-replace-command |
| 102 | (list 'eshell-command-arguments | 100 | (prog1 |
| 103 | (list 'quote args))) | 101 | (list 'let |
| 104 | (let ((cmd (eshell-parse-command (cons here (point))))) | 102 | (list (list 'eshell-command-name (list 'quote file)) |
| 105 | (if subcommand-p | 103 | (list 'eshell-command-arguments |
| 106 | (setq cmd (list 'eshell-as-subcommand cmd))) | 104 | (list 'quote args))) |
| 107 | cmd)) | 105 | (let ((cmd (eshell-parse-command (cons here (point))))) |
| 108 | (delete-region here (point)) | 106 | (if subcommand-p |
| 109 | (goto-char orig))))) | 107 | (setq cmd (list 'eshell-as-subcommand cmd))) |
| 108 | cmd)) | ||
| 109 | (delete-region here (point)) | ||
| 110 | (goto-char orig)))))) | ||
| 110 | 111 | ||
| 111 | (defun eshell/source (&rest args) | 112 | (defun eshell/source (&rest args) |
| 112 | "Source a file in a subshell environment." | 113 | "Source a file in a subshell environment." |
| @@ -140,5 +141,4 @@ environment, binding ARGS to $1, $2, etc.") | |||
| 140 | ;; generated-autoload-file: "esh-groups.el" | 141 | ;; generated-autoload-file: "esh-groups.el" |
| 141 | ;; End: | 142 | ;; End: |
| 142 | 143 | ||
| 143 | ;; arch-tag: a346439d-5ba8-4faf-ac2b-3aacfeaa4647 | ||
| 144 | ;;; em-script.el ends here | 144 | ;;; em-script.el ends here |
diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el index afe3cf826b1..2c54930e439 100644 --- a/lisp/eshell/em-smart.el +++ b/lisp/eshell/em-smart.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-smart.el --- smart display of output | 1 | ;;; em-smart.el --- smart display of output |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -327,5 +326,4 @@ and the end of the buffer are still visible." | |||
| 327 | ;; generated-autoload-file: "esh-groups.el" | 326 | ;; generated-autoload-file: "esh-groups.el" |
| 328 | ;; End: | 327 | ;; End: |
| 329 | 328 | ||
| 330 | ;; arch-tag: 8c0112c7-379c-4d54-9a1c-204d68786a4b | ||
| 331 | ;;; em-smart.el ends here | 329 | ;;; em-smart.el ends here |
diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el index bd27d9f262e..be394ba5b22 100644 --- a/lisp/eshell/em-term.el +++ b/lisp/eshell/em-term.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-term.el --- running visual commands | 1 | ;;; em-term.el --- running visual commands |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -267,5 +266,4 @@ allowed." | |||
| 267 | ;; generated-autoload-file: "esh-groups.el" | 266 | ;; generated-autoload-file: "esh-groups.el" |
| 268 | ;; End: | 267 | ;; End: |
| 269 | 268 | ||
| 270 | ;; arch-tag: ab7c8fe4-3101-4257-925b-1354c6b2fe9d | ||
| 271 | ;;; em-term.el ends here | 269 | ;;; em-term.el ends here |
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 7d0ff22ceb6..dc5650d240e 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-unix.el --- UNIX command aliases | 1 | ;;; em-unix.el --- UNIX command aliases |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -154,10 +153,10 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine." | |||
| 154 | (defalias 'eshell/basename 'file-name-nondirectory) | 153 | (defalias 'eshell/basename 'file-name-nondirectory) |
| 155 | (defalias 'eshell/dirname 'file-name-directory) | 154 | (defalias 'eshell/dirname 'file-name-directory) |
| 156 | 155 | ||
| 157 | (defvar interactive) | 156 | (defvar em-interactive) |
| 158 | (defvar preview) | 157 | (defvar em-preview) |
| 159 | (defvar recursive) | 158 | (defvar em-recursive) |
| 160 | (defvar verbose) | 159 | (defvar em-verbose) |
| 161 | 160 | ||
| 162 | (defun eshell/man (&rest args) | 161 | (defun eshell/man (&rest args) |
| 163 | "Invoke man, flattening the arguments appropriately." | 162 | "Invoke man, flattening the arguments appropriately." |
| @@ -203,32 +202,26 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine." | |||
| 203 | (eshell-error "rm: cannot remove `.' or `..'\n")) | 202 | (eshell-error "rm: cannot remove `.' or `..'\n")) |
| 204 | (if (and (file-directory-p (car files)) | 203 | (if (and (file-directory-p (car files)) |
| 205 | (not (file-symlink-p (car files)))) | 204 | (not (file-symlink-p (car files)))) |
| 206 | (let ((dir (file-name-as-directory (car files)))) | 205 | (progn |
| 207 | (eshell-remove-entries dir | 206 | (if em-verbose |
| 208 | (mapcar | ||
| 209 | (function | ||
| 210 | (lambda (file) | ||
| 211 | (concat dir file))) | ||
| 212 | (directory-files dir))) | ||
| 213 | (if verbose | ||
| 214 | (eshell-printn (format "rm: removing directory `%s'" | 207 | (eshell-printn (format "rm: removing directory `%s'" |
| 215 | (car files)))) | 208 | (car files)))) |
| 216 | (unless | 209 | (unless |
| 217 | (or preview | 210 | (or em-preview |
| 218 | (and interactive | 211 | (and em-interactive |
| 219 | (not (y-or-n-p | 212 | (not (y-or-n-p |
| 220 | (format "rm: remove directory `%s'? " | 213 | (format "rm: remove directory `%s'? " |
| 221 | (car files)))))) | 214 | (car files)))))) |
| 222 | (eshell-funcalln 'delete-directory (car files)))) | 215 | (eshell-funcalln 'delete-directory (car files) t t))) |
| 223 | (if verbose | 216 | (if em-verbose |
| 224 | (eshell-printn (format "rm: removing file `%s'" | 217 | (eshell-printn (format "rm: removing file `%s'" |
| 225 | (car files)))) | 218 | (car files)))) |
| 226 | (unless (or preview | 219 | (unless (or em-preview |
| 227 | (and interactive | 220 | (and em-interactive |
| 228 | (not (y-or-n-p | 221 | (not (y-or-n-p |
| 229 | (format "rm: remove `%s'? " | 222 | (format "rm: remove `%s'? " |
| 230 | (car files)))))) | 223 | (car files)))))) |
| 231 | (eshell-funcalln 'delete-file (car files))))) | 224 | (eshell-funcalln 'delete-file (car files) t)))) |
| 232 | (setq files (cdr files)))) | 225 | (setq files (cdr files)))) |
| 233 | 226 | ||
| 234 | (defun eshell/rm (&rest args) | 227 | (defun eshell/rm (&rest args) |
| @@ -241,21 +234,21 @@ argument." | |||
| 241 | "rm" args | 234 | "rm" args |
| 242 | '((?h "help" nil nil "show this usage screen") | 235 | '((?h "help" nil nil "show this usage screen") |
| 243 | (?f "force" nil force-removal "force removal") | 236 | (?f "force" nil force-removal "force removal") |
| 244 | (?i "interactive" nil interactive "prompt before any removal") | 237 | (?i "interactive" nil em-interactive "prompt before any removal") |
| 245 | (?n "preview" nil preview "don't change anything on disk") | 238 | (?n "preview" nil em-preview "don't change anything on disk") |
| 246 | (?r "recursive" nil recursive | 239 | (?r "recursive" nil em-recursive |
| 247 | "remove the contents of directories recursively") | 240 | "remove the contents of directories recursively") |
| 248 | (?R nil nil recursive "(same)") | 241 | (?R nil nil em-recursive "(same)") |
| 249 | (?v "verbose" nil verbose "explain what is being done") | 242 | (?v "verbose" nil em-verbose "explain what is being done") |
| 250 | :preserve-args | 243 | :preserve-args |
| 251 | :external "rm" | 244 | :external "rm" |
| 252 | :show-usage | 245 | :show-usage |
| 253 | :usage "[OPTION]... FILE... | 246 | :usage "[OPTION]... FILE... |
| 254 | Remove (unlink) the FILE(s).") | 247 | Remove (unlink) the FILE(s).") |
| 255 | (unless interactive | 248 | (unless em-interactive |
| 256 | (setq interactive eshell-rm-interactive-query)) | 249 | (setq em-interactive eshell-rm-interactive-query)) |
| 257 | (if (and force-removal interactive) | 250 | (if (and force-removal em-interactive) |
| 258 | (setq interactive nil)) | 251 | (setq em-interactive nil)) |
| 259 | (while args | 252 | (while args |
| 260 | (let ((entry (if (stringp (car args)) | 253 | (let ((entry (if (stringp (car args)) |
| 261 | (directory-file-name (car args)) | 254 | (directory-file-name (car args)) |
| @@ -264,37 +257,37 @@ Remove (unlink) the FILE(s).") | |||
| 264 | (car args))))) | 257 | (car args))))) |
| 265 | (cond | 258 | (cond |
| 266 | ((bufferp entry) | 259 | ((bufferp entry) |
| 267 | (if verbose | 260 | (if em-verbose |
| 268 | (eshell-printn (format "rm: removing buffer `%s'" entry))) | 261 | (eshell-printn (format "rm: removing buffer `%s'" entry))) |
| 269 | (unless (or preview | 262 | (unless (or em-preview |
| 270 | (and interactive | 263 | (and em-interactive |
| 271 | (not (y-or-n-p (format "rm: delete buffer `%s'? " | 264 | (not (y-or-n-p (format "rm: delete buffer `%s'? " |
| 272 | entry))))) | 265 | entry))))) |
| 273 | (eshell-funcalln 'kill-buffer entry))) | 266 | (eshell-funcalln 'kill-buffer entry))) |
| 274 | ((eshell-processp entry) | 267 | ((eshell-processp entry) |
| 275 | (if verbose | 268 | (if em-verbose |
| 276 | (eshell-printn (format "rm: killing process `%s'" entry))) | 269 | (eshell-printn (format "rm: killing process `%s'" entry))) |
| 277 | (unless (or preview | 270 | (unless (or em-preview |
| 278 | (and interactive | 271 | (and em-interactive |
| 279 | (not (y-or-n-p (format "rm: kill process `%s'? " | 272 | (not (y-or-n-p (format "rm: kill process `%s'? " |
| 280 | entry))))) | 273 | entry))))) |
| 281 | (eshell-funcalln 'kill-process entry))) | 274 | (eshell-funcalln 'kill-process entry))) |
| 282 | ((symbolp entry) | 275 | ((symbolp entry) |
| 283 | (if verbose | 276 | (if em-verbose |
| 284 | (eshell-printn (format "rm: uninterning symbol `%s'" entry))) | 277 | (eshell-printn (format "rm: uninterning symbol `%s'" entry))) |
| 285 | (unless | 278 | (unless |
| 286 | (or preview | 279 | (or em-preview |
| 287 | (and interactive | 280 | (and em-interactive |
| 288 | (not (y-or-n-p (format "rm: unintern symbol `%s'? " | 281 | (not (y-or-n-p (format "rm: unintern symbol `%s'? " |
| 289 | entry))))) | 282 | entry))))) |
| 290 | (eshell-funcalln 'unintern entry))) | 283 | (eshell-funcalln 'unintern entry))) |
| 291 | ((stringp entry) | 284 | ((stringp entry) |
| 292 | (if (and (file-directory-p entry) | 285 | (if (and (file-directory-p entry) |
| 293 | (not (file-symlink-p entry))) | 286 | (not (file-symlink-p entry))) |
| 294 | (if (or recursive | 287 | (if (or em-recursive |
| 295 | eshell-rm-removes-directories) | 288 | eshell-rm-removes-directories) |
| 296 | (if (or preview | 289 | (if (or em-preview |
| 297 | (not interactive) | 290 | (not em-interactive) |
| 298 | (y-or-n-p | 291 | (y-or-n-p |
| 299 | (format "rm: descend into directory `%s'? " | 292 | (format "rm: descend into directory `%s'? " |
| 300 | entry))) | 293 | entry))) |
| @@ -339,8 +332,6 @@ Remove the DIRECTORY(ies), if they are empty.") | |||
| 339 | (put 'eshell/rmdir 'eshell-no-numeric-conversions t) | 332 | (put 'eshell/rmdir 'eshell-no-numeric-conversions t) |
| 340 | 333 | ||
| 341 | (defvar no-dereference) | 334 | (defvar no-dereference) |
| 342 | (defvar preview) | ||
| 343 | (defvar verbose) | ||
| 344 | 335 | ||
| 345 | (defvar eshell-warn-dot-directories t) | 336 | (defvar eshell-warn-dot-directories t) |
| 346 | 337 | ||
| @@ -348,9 +339,9 @@ Remove the DIRECTORY(ies), if they are empty.") | |||
| 348 | "Shuffle around some filesystem entries, using FUNC to do the work." | 339 | "Shuffle around some filesystem entries, using FUNC to do the work." |
| 349 | (let ((attr-target (eshell-file-attributes target)) | 340 | (let ((attr-target (eshell-file-attributes target)) |
| 350 | (is-dir (or (file-directory-p target) | 341 | (is-dir (or (file-directory-p target) |
| 351 | (and preview (not eshell-warn-dot-directories)))) | 342 | (and em-preview (not eshell-warn-dot-directories)))) |
| 352 | attr) | 343 | attr) |
| 353 | (if (and (not preview) (not is-dir) | 344 | (if (and (not em-preview) (not is-dir) |
| 354 | (> (length files) 1)) | 345 | (> (length files) 1)) |
| 355 | (error "%s: when %s multiple files, last argument must be a directory" | 346 | (error "%s: when %s multiple files, last argument must be a directory" |
| 356 | command action)) | 347 | command action)) |
| @@ -387,7 +378,7 @@ Remove the DIRECTORY(ies), if they are empty.") | |||
| 387 | (not (memq func '(make-symbolic-link | 378 | (not (memq func '(make-symbolic-link |
| 388 | add-name-to-file)))) | 379 | add-name-to-file)))) |
| 389 | (if (and (eq func 'copy-file) | 380 | (if (and (eq func 'copy-file) |
| 390 | (not recursive)) | 381 | (not em-recursive)) |
| 391 | (eshell-error (format "%s: %s: omitting directory\n" | 382 | (eshell-error (format "%s: %s: omitting directory\n" |
| 392 | command (car files))) | 383 | command (car files))) |
| 393 | (let (eshell-warn-dot-directories) | 384 | (let (eshell-warn-dot-directories) |
| @@ -405,11 +396,11 @@ Remove the DIRECTORY(ies), if they are empty.") | |||
| 405 | (expand-file-name target))))))) | 396 | (expand-file-name target))))))) |
| 406 | (apply 'eshell-funcalln func source target args) | 397 | (apply 'eshell-funcalln func source target args) |
| 407 | (unless (file-directory-p target) | 398 | (unless (file-directory-p target) |
| 408 | (if verbose | 399 | (if em-verbose |
| 409 | (eshell-printn | 400 | (eshell-printn |
| 410 | (format "%s: making directory %s" | 401 | (format "%s: making directory %s" |
| 411 | command target))) | 402 | command target))) |
| 412 | (unless preview | 403 | (unless em-preview |
| 413 | (eshell-funcalln 'make-directory target))) | 404 | (eshell-funcalln 'make-directory target))) |
| 414 | (apply 'eshell-shuffle-files | 405 | (apply 'eshell-shuffle-files |
| 415 | command action | 406 | command action |
| @@ -420,16 +411,16 @@ Remove the DIRECTORY(ies), if they are empty.") | |||
| 420 | (directory-files source)) | 411 | (directory-files source)) |
| 421 | target func t args) | 412 | target func t args) |
| 422 | (when (eq func 'rename-file) | 413 | (when (eq func 'rename-file) |
| 423 | (if verbose | 414 | (if em-verbose |
| 424 | (eshell-printn | 415 | (eshell-printn |
| 425 | (format "%s: deleting directory %s" | 416 | (format "%s: deleting directory %s" |
| 426 | command source))) | 417 | command source))) |
| 427 | (unless preview | 418 | (unless em-preview |
| 428 | (eshell-funcalln 'delete-directory source)))))) | 419 | (eshell-funcalln 'delete-directory source)))))) |
| 429 | (if verbose | 420 | (if em-verbose |
| 430 | (eshell-printn (format "%s: %s -> %s" command | 421 | (eshell-printn (format "%s: %s -> %s" command |
| 431 | source target))) | 422 | source target))) |
| 432 | (unless preview | 423 | (unless em-preview |
| 433 | (if (and no-dereference | 424 | (if (and no-dereference |
| 434 | (setq link (file-symlink-p source))) | 425 | (setq link (file-symlink-p source))) |
| 435 | (progn | 426 | (progn |
| @@ -454,7 +445,7 @@ Remove the DIRECTORY(ies), if they are empty.") | |||
| 454 | (if (file-exists-p archive) | 445 | (if (file-exists-p archive) |
| 455 | (setq tar-args (concat "u" tar-args)) | 446 | (setq tar-args (concat "u" tar-args)) |
| 456 | (setq tar-args (concat "c" tar-args))) | 447 | (setq tar-args (concat "c" tar-args))) |
| 457 | (if verbose | 448 | (if em-verbose |
| 458 | (setq tar-args (concat "v" tar-args))) | 449 | (setq tar-args (concat "v" tar-args))) |
| 459 | (if (equal command "mv") | 450 | (if (equal command "mv") |
| 460 | (setq tar-args (concat "--remove-files -" tar-args))) | 451 | (setq tar-args (concat "--remove-files -" tar-args))) |
| @@ -487,7 +478,7 @@ Remove the DIRECTORY(ies), if they are empty.") | |||
| 487 | (eshell-shuffle-files | 478 | (eshell-shuffle-files |
| 488 | ,command ,action args target ,func nil | 479 | ,command ,action args target ,func nil |
| 489 | ,@(append | 480 | ,@(append |
| 490 | `((if (and (or interactive | 481 | `((if (and (or em-interactive |
| 491 | ,query-var) | 482 | ,query-var) |
| 492 | (not force)) | 483 | (not force)) |
| 493 | 1 (or force ,force-var))) | 484 | 1 (or force ,force-var))) |
| @@ -501,11 +492,11 @@ Remove the DIRECTORY(ies), if they are empty.") | |||
| 501 | "mv" args | 492 | "mv" args |
| 502 | '((?f "force" nil force | 493 | '((?f "force" nil force |
| 503 | "remove existing destinations, never prompt") | 494 | "remove existing destinations, never prompt") |
| 504 | (?i "interactive" nil interactive | 495 | (?i "interactive" nil em-interactive |
| 505 | "request confirmation if target already exists") | 496 | "request confirmation if target already exists") |
| 506 | (?n "preview" nil preview | 497 | (?n "preview" nil em-preview |
| 507 | "don't change anything on disk") | 498 | "don't change anything on disk") |
| 508 | (?v "verbose" nil verbose | 499 | (?v "verbose" nil em-verbose |
| 509 | "explain what is being done") | 500 | "explain what is being done") |
| 510 | (nil "help" nil nil "show this usage screen") | 501 | (nil "help" nil nil "show this usage screen") |
| 511 | :preserve-args | 502 | :preserve-args |
| @@ -532,15 +523,15 @@ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY. | |||
| 532 | "preserve links") | 523 | "preserve links") |
| 533 | (?f "force" nil force | 524 | (?f "force" nil force |
| 534 | "remove existing destinations, never prompt") | 525 | "remove existing destinations, never prompt") |
| 535 | (?i "interactive" nil interactive | 526 | (?i "interactive" nil em-interactive |
| 536 | "request confirmation if target already exists") | 527 | "request confirmation if target already exists") |
| 537 | (?n "preview" nil preview | 528 | (?n "preview" nil em-preview |
| 538 | "don't change anything on disk") | 529 | "don't change anything on disk") |
| 539 | (?p "preserve" nil preserve | 530 | (?p "preserve" nil preserve |
| 540 | "preserve file attributes if possible") | 531 | "preserve file attributes if possible") |
| 541 | (?R "recursive" nil recursive | 532 | (?R "recursive" nil em-recursive |
| 542 | "copy directories recursively") | 533 | "copy directories recursively") |
| 543 | (?v "verbose" nil verbose | 534 | (?v "verbose" nil em-verbose |
| 544 | "explain what is being done") | 535 | "explain what is being done") |
| 545 | (nil "help" nil nil "show this usage screen") | 536 | (nil "help" nil nil "show this usage screen") |
| 546 | :preserve-args | 537 | :preserve-args |
| @@ -550,7 +541,7 @@ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY. | |||
| 550 | or: cp [OPTION]... SOURCE... DIRECTORY | 541 | or: cp [OPTION]... SOURCE... DIRECTORY |
| 551 | Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.") | 542 | Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.") |
| 552 | (if archive | 543 | (if archive |
| 553 | (setq preserve t no-dereference t recursive t)) | 544 | (setq preserve t no-dereference t em-recursive t)) |
| 554 | (eshell-mvcpln-template "cp" "copying" 'copy-file | 545 | (eshell-mvcpln-template "cp" "copying" 'copy-file |
| 555 | eshell-cp-interactive-query | 546 | eshell-cp-interactive-query |
| 556 | eshell-cp-overwrite-files preserve))) | 547 | eshell-cp-overwrite-files preserve))) |
| @@ -564,12 +555,12 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.") | |||
| 564 | '((?h "help" nil nil "show this usage screen") | 555 | '((?h "help" nil nil "show this usage screen") |
| 565 | (?s "symbolic" nil symbolic | 556 | (?s "symbolic" nil symbolic |
| 566 | "make symbolic links instead of hard links") | 557 | "make symbolic links instead of hard links") |
| 567 | (?i "interactive" nil interactive | 558 | (?i "interactive" nil em-interactive |
| 568 | "request confirmation if target already exists") | 559 | "request confirmation if target already exists") |
| 569 | (?f "force" nil force "remove existing destinations, never prompt") | 560 | (?f "force" nil force "remove existing destinations, never prompt") |
| 570 | (?n "preview" nil preview | 561 | (?n "preview" nil em-preview |
| 571 | "don't change anything on disk") | 562 | "don't change anything on disk") |
| 572 | (?v "verbose" nil verbose "explain what is being done") | 563 | (?v "verbose" nil em-verbose "explain what is being done") |
| 573 | :preserve-args | 564 | :preserve-args |
| 574 | :external "ln" | 565 | :external "ln" |
| 575 | :show-usage | 566 | :show-usage |
| @@ -920,9 +911,7 @@ Summarize disk usage of each FILE, recursively for directories.") | |||
| 920 | (defvar eshell-time-start nil) | 911 | (defvar eshell-time-start nil) |
| 921 | 912 | ||
| 922 | (defun eshell-show-elapsed-time () | 913 | (defun eshell-show-elapsed-time () |
| 923 | (let ((elapsed (format "%.3f secs\n" | 914 | (let ((elapsed (format "%.3f secs\n" (- (float-time) eshell-time-start)))) |
| 924 | (- (eshell-time-to-seconds (current-time)) | ||
| 925 | eshell-time-start)))) | ||
| 926 | (set-text-properties 0 (length elapsed) '(face bold) elapsed) | 915 | (set-text-properties 0 (length elapsed) '(face bold) elapsed) |
| 927 | (eshell-interactive-print elapsed)) | 916 | (eshell-interactive-print elapsed)) |
| 928 | (remove-hook 'eshell-post-command-hook 'eshell-show-elapsed-time t)) | 917 | (remove-hook 'eshell-post-command-hook 'eshell-show-elapsed-time t)) |
| @@ -948,7 +937,7 @@ Summarize disk usage of each FILE, recursively for directories.") | |||
| 948 | :show-usage | 937 | :show-usage |
| 949 | :usage "COMMAND... | 938 | :usage "COMMAND... |
| 950 | Show wall-clock time elapsed during execution of COMMAND.") | 939 | Show wall-clock time elapsed during execution of COMMAND.") |
| 951 | (setq eshell-time-start (eshell-time-to-seconds (current-time))) | 940 | (setq eshell-time-start (float-time)) |
| 952 | (add-hook 'eshell-post-command-hook 'eshell-show-elapsed-time nil t) | 941 | (add-hook 'eshell-post-command-hook 'eshell-show-elapsed-time nil t) |
| 953 | ;; after setting | 942 | ;; after setting |
| 954 | (throw 'eshell-replace-command | 943 | (throw 'eshell-replace-command |
| @@ -1127,5 +1116,4 @@ Execute a COMMAND as the superuser or another USER.") | |||
| 1127 | ;; generated-autoload-file: "esh-groups.el" | 1116 | ;; generated-autoload-file: "esh-groups.el" |
| 1128 | ;; End: | 1117 | ;; End: |
| 1129 | 1118 | ||
| 1130 | ;; arch-tag: 2462edd2-a76a-4cf2-897d-92e9a82ac1c9 | ||
| 1131 | ;;; em-unix.el ends here | 1119 | ;;; em-unix.el ends here |
diff --git a/lisp/eshell/em-xtra.el b/lisp/eshell/em-xtra.el index 6f49bf4e0f6..50bda108e95 100644 --- a/lisp/eshell/em-xtra.el +++ b/lisp/eshell/em-xtra.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; em-xtra.el --- extra alias functions | 1 | ;;; em-xtra.el --- extra alias functions |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -123,5 +122,4 @@ naturally accessible within Emacs." | |||
| 123 | ;; generated-autoload-file: "esh-groups.el" | 122 | ;; generated-autoload-file: "esh-groups.el" |
| 124 | ;; End: | 123 | ;; End: |
| 125 | 124 | ||
| 126 | ;; arch-tag: f944cfda-a118-470c-a0d6-b41a3a5c99c7 | ||
| 127 | ;;; em-xtra.el ends here | 125 | ;;; em-xtra.el ends here |
diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index 6395fe22d87..f42440ae4ec 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; esh-arg.el --- argument processing | 1 | ;;; esh-arg.el --- argument processing |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -123,7 +122,7 @@ treated as a literal character." | |||
| 123 | :type 'hook | 122 | :type 'hook |
| 124 | :group 'eshell-arg) | 123 | :group 'eshell-arg) |
| 125 | 124 | ||
| 126 | (defcustom eshell-delimiter-argument-list '(?\; ?& ?\| ?\> ? ?\t ?\n) | 125 | (defcustom eshell-delimiter-argument-list '(?\; ?& ?\| ?\> ?\s ?\t ?\n) |
| 127 | "List of characters to recognize as argument separators." | 126 | "List of characters to recognize as argument separators." |
| 128 | :type '(repeat character) | 127 | :type '(repeat character) |
| 129 | :group 'eshell-arg) | 128 | :group 'eshell-arg) |
| @@ -214,25 +213,24 @@ Point is left at the end of the arguments." | |||
| 214 | (narrow-to-region beg end) | 213 | (narrow-to-region beg end) |
| 215 | (let ((inhibit-point-motion-hooks t) | 214 | (let ((inhibit-point-motion-hooks t) |
| 216 | (args (list t)) | 215 | (args (list t)) |
| 217 | after-change-functions | ||
| 218 | delim) | 216 | delim) |
| 219 | (remove-text-properties (point-min) (point-max) | 217 | (with-silent-modifications |
| 220 | '(arg-begin nil arg-end nil)) | 218 | (remove-text-properties (point-min) (point-max) |
| 221 | (if (setq | 219 | '(arg-begin nil arg-end nil)) |
| 222 | delim | 220 | (if (setq |
| 223 | (catch 'eshell-incomplete | 221 | delim |
| 224 | (while (not (eobp)) | 222 | (catch 'eshell-incomplete |
| 225 | (let* ((here (point)) | 223 | (while (not (eobp)) |
| 226 | (arg (eshell-parse-argument))) | 224 | (let* ((here (point)) |
| 227 | (if (= (point) here) | 225 | (arg (eshell-parse-argument))) |
| 228 | (error "Failed to parse argument '%s'" | 226 | (if (= (point) here) |
| 229 | (buffer-substring here (point-max)))) | 227 | (error "Failed to parse argument '%s'" |
| 230 | (and arg (nconc args (list arg))))))) | 228 | (buffer-substring here (point-max)))) |
| 231 | (if (listp delim) | 229 | (and arg (nconc args (list arg))))))) |
| 232 | (throw 'eshell-incomplete delim) | 230 | (throw 'eshell-incomplete (if (listp delim) |
| 233 | (throw 'eshell-incomplete | 231 | delim |
| 234 | (list delim (point) (cdr args))))) | 232 | (list delim (point) (cdr args))))) |
| 235 | (cdr args))))) | 233 | (cdr args)))))) |
| 236 | 234 | ||
| 237 | (defun eshell-parse-argument () | 235 | (defun eshell-parse-argument () |
| 238 | "Get the next argument. Leave point after it." | 236 | "Get the next argument. Leave point after it." |
| @@ -392,5 +390,4 @@ special character that is not itself a backslash." | |||
| 392 | (char-to-string (char-after))))) | 390 | (char-to-string (char-after))))) |
| 393 | (goto-char end))))))) | 391 | (goto-char end))))))) |
| 394 | 392 | ||
| 395 | ;; arch-tag: 7f593a2b-8fc1-4def-8f84-8f51ed0198d6 | ||
| 396 | ;;; esh-arg.el ends here | 393 | ;;; esh-arg.el ends here |
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 0dc1cb26fa9..0567beb9a53 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; esh-cmd.el --- command invocation | 1 | ;;; esh-cmd.el --- command invocation |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -355,12 +354,14 @@ hooks should be run before and after the command." | |||
| 355 | (if (consp command) | 354 | (if (consp command) |
| 356 | (eshell-parse-arguments (car command) (cdr command)) | 355 | (eshell-parse-arguments (car command) (cdr command)) |
| 357 | (let ((here (point)) | 356 | (let ((here (point)) |
| 358 | (inhibit-point-motion-hooks t) | 357 | (inhibit-point-motion-hooks t)) |
| 359 | after-change-functions) | 358 | (with-silent-modifications |
| 360 | (insert command) | 359 | ;; FIXME: Why not use a temporary buffer and avoid this |
| 361 | (prog1 | 360 | ;; "insert&delete" business? --Stef |
| 362 | (eshell-parse-arguments here (point)) | 361 | (insert command) |
| 363 | (delete-region here (point))))) | 362 | (prog1 |
| 363 | (eshell-parse-arguments here (point)) | ||
| 364 | (delete-region here (point)))))) | ||
| 364 | args)) | 365 | args)) |
| 365 | (commands | 366 | (commands |
| 366 | (mapcar | 367 | (mapcar |
| @@ -1432,5 +1433,4 @@ messages, and errors." | |||
| 1432 | 1433 | ||
| 1433 | (provide 'esh-cmd) | 1434 | (provide 'esh-cmd) |
| 1434 | 1435 | ||
| 1435 | ;; arch-tag: 8e4f3867-a0c5-441f-96ba-ddd142d94366 | ||
| 1436 | ;;; esh-cmd.el ends here | 1436 | ;;; esh-cmd.el ends here |
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index 8a3f86a3997..f0b9a5eb083 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; esh-ext.el --- commands external to Eshell | 1 | ;;; esh-ext.el --- commands external to Eshell |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -306,5 +305,4 @@ line of the form #!<interp>." | |||
| 306 | (cdr interp))))) | 305 | (cdr interp))))) |
| 307 | (or interp (list fullname))))))) | 306 | (or interp (list fullname))))))) |
| 308 | 307 | ||
| 309 | ;; arch-tag: 178d4064-7e60-4745-b81f-bab5d8d7c40f | ||
| 310 | ;;; esh-ext.el ends here | 308 | ;;; esh-ext.el ends here |
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index 53b6fd2163e..ef8966f1d7d 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; esh-io.el --- I/O management | 1 | ;;; esh-io.el --- I/O management |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -516,5 +515,4 @@ Returns what was actually sent, or nil if nothing was sent." | |||
| 516 | (eshell-output-object-to-target object (car target)) | 515 | (eshell-output-object-to-target object (car target)) |
| 517 | (setq target (cdr target)))))) | 516 | (setq target (cdr target)))))) |
| 518 | 517 | ||
| 519 | ;; arch-tag: 9ca2080f-d5e0-4b26-aa0b-d59194a905a2 | ||
| 520 | ;;; esh-io.el ends here | 518 | ;;; esh-io.el ends here |
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 4477f138478..3735ee35fd5 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; esh-mode.el --- user interface | 1 | ;;; esh-mode.el --- user interface |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -1083,5 +1082,4 @@ This function could be in the list `eshell-output-filter-functions'." | |||
| 1083 | (custom-add-option 'eshell-output-filter-functions | 1082 | (custom-add-option 'eshell-output-filter-functions |
| 1084 | 'eshell-handle-ansi-color) | 1083 | 'eshell-handle-ansi-color) |
| 1085 | 1084 | ||
| 1086 | ;; arch-tag: ec65bc2b-da14-4547-81d3-a32af3a4dc57 | ||
| 1087 | ;;; esh-mode.el ends here | 1085 | ;;; esh-mode.el ends here |
diff --git a/lisp/eshell/esh-module.el b/lisp/eshell/esh-module.el index cf66f626485..5a62c71355c 100644 --- a/lisp/eshell/esh-module.el +++ b/lisp/eshell/esh-module.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; esh-module.el --- Eshell modules | 1 | ;;; esh-module.el --- Eshell modules |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | ;; Keywords: processes | 6 | ;; Keywords: processes |
| @@ -100,5 +99,4 @@ customization group. Example: `eshell-cmpl' for that module." | |||
| 100 | (unload-feature module) | 99 | (unload-feature module) |
| 101 | (message "Unloading %s...done" (symbol-name module)))))) | 100 | (message "Unloading %s...done" (symbol-name module)))))) |
| 102 | 101 | ||
| 103 | ;; arch-tag: 97a3fa16-9d08-40e6-bc2c-36bd70986507 | ||
| 104 | ;;; esh-module.el ends here | 102 | ;;; esh-module.el ends here |
diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index 91ba13be896..d7162406879 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; esh-opt.el --- command options processing | 1 | ;;; esh-opt.el --- command options processing |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -64,10 +63,9 @@ interned variable `args' (created using a `let' form)." | |||
| 64 | macro-args | 63 | macro-args |
| 65 | (list 'eshell-stringify-list | 64 | (list 'eshell-stringify-list |
| 66 | (list 'eshell-flatten-list macro-args))))) | 65 | (list 'eshell-flatten-list macro-args))))) |
| 67 | (let ,(append (mapcar (function | 66 | (let ,(append (mapcar (lambda (opt) |
| 68 | (lambda (opt) | 67 | (or (and (listp opt) (nth 3 opt)) |
| 69 | (or (and (listp opt) (nth 3 opt)) | 68 | 'eshell-option-stub)) |
| 70 | 'eshell-option-stub))) | ||
| 71 | (cadr options)) | 69 | (cadr options)) |
| 72 | '(usage-msg last-value ext-command args)) | 70 | '(usage-msg last-value ext-command args)) |
| 73 | (eshell-do-opt ,name ,options (quote ,body-forms))))) | 71 | (eshell-do-opt ,name ,options (quote ,body-forms))))) |
| @@ -78,6 +76,7 @@ interned variable `args' (created using a `let' form)." | |||
| 78 | (defvar last-value) | 76 | (defvar last-value) |
| 79 | (defvar usage-msg) | 77 | (defvar usage-msg) |
| 80 | (defvar ext-command) | 78 | (defvar ext-command) |
| 79 | ;; Documented part of the interface; see eshell-eval-using-options. | ||
| 81 | (defvar args) | 80 | (defvar args) |
| 82 | 81 | ||
| 83 | (defun eshell-do-opt (name options body-forms) | 82 | (defun eshell-do-opt (name options body-forms) |
| @@ -224,5 +223,4 @@ This assumes that symbols have been intern'd by `eshell-with-options'." | |||
| 224 | (setq index (1+ index))))))))) | 223 | (setq index (1+ index))))))))) |
| 225 | args) | 224 | args) |
| 226 | 225 | ||
| 227 | ;; arch-tag: 45c6c2d0-8091-46a1-a205-2f4bafd8230c | ||
| 228 | ;;; esh-opt.el ends here | 226 | ;;; esh-opt.el ends here |
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index ccc36ed9949..f697a400556 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; esh-proc.el --- process management | 1 | ;;; esh-proc.el --- process management |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -527,5 +526,4 @@ See the variable `eshell-kill-processes-on-exit'." | |||
| 527 | (eshell-send-input nil nil t) | 526 | (eshell-send-input nil nil t) |
| 528 | (eshell-process-interact 'process-send-eof)) | 527 | (eshell-process-interact 'process-send-eof)) |
| 529 | 528 | ||
| 530 | ;; arch-tag: ac477a3e-ee4d-4b44-8ec6-212010e607bb | ||
| 531 | ;;; esh-proc.el ends here | 529 | ;;; esh-proc.el ends here |
diff --git a/lisp/eshell/esh-test.el b/lisp/eshell/esh-test.el index 971d0cd63e6..f5c55dd8ae7 100644 --- a/lisp/eshell/esh-test.el +++ b/lisp/eshell/esh-test.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; esh-test.el --- Eshell test suite | 1 | ;;; esh-test.el --- Eshell test suite |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -150,7 +149,7 @@ | |||
| 150 | (defun eshell-test (&optional arg) | 149 | (defun eshell-test (&optional arg) |
| 151 | "Test Eshell to verify that it works as expected." | 150 | "Test Eshell to verify that it works as expected." |
| 152 | (interactive "P") | 151 | (interactive "P") |
| 153 | (let* ((begin (eshell-time-to-seconds (current-time))) | 152 | (let* ((begin (float-time)) |
| 154 | (test-buffer (get-buffer-create "*eshell test*"))) | 153 | (test-buffer (get-buffer-create "*eshell test*"))) |
| 155 | (set-buffer (let ((inhibit-redisplay t)) | 154 | (set-buffer (let ((inhibit-redisplay t)) |
| 156 | (save-window-excursion (eshell t)))) | 155 | (save-window-excursion (eshell t)))) |
| @@ -176,8 +175,7 @@ | |||
| 176 | (with-current-buffer test-buffer | 175 | (with-current-buffer test-buffer |
| 177 | (insert (format "\n\n--- %s --- (completed in %d seconds)\n" | 176 | (insert (format "\n\n--- %s --- (completed in %d seconds)\n" |
| 178 | (current-time-string) | 177 | (current-time-string) |
| 179 | (- (eshell-time-to-seconds (current-time)) | 178 | (- (float-time) begin))) |
| 180 | begin))) | ||
| 181 | (message "Eshell test suite completed: %s failure%s" | 179 | (message "Eshell test suite completed: %s failure%s" |
| 182 | (if (> eshell-test-failures 0) | 180 | (if (> eshell-test-failures 0) |
| 183 | (number-to-string eshell-test-failures) | 181 | (number-to-string eshell-test-failures) |
| @@ -223,14 +221,13 @@ | |||
| 223 | (if (eq eshell-show-usage-metrics t) | 221 | (if (eq eshell-show-usage-metrics t) |
| 224 | (- eshell-metric-after-command | 222 | (- eshell-metric-after-command |
| 225 | eshell-metric-before-command 7) | 223 | eshell-metric-before-command 7) |
| 226 | (- (eshell-time-to-seconds | 224 | (- (float-time |
| 227 | eshell-metric-after-command) | 225 | eshell-metric-after-command) |
| 228 | (eshell-time-to-seconds | 226 | (float-time |
| 229 | eshell-metric-before-command)))) | 227 | eshell-metric-before-command)))) |
| 230 | "\n")))) | 228 | "\n")))) |
| 231 | nil t)) | 229 | nil t)) |
| 232 | 230 | ||
| 233 | (provide 'esh-test) | 231 | (provide 'esh-test) |
| 234 | 232 | ||
| 235 | ;; arch-tag: 6e32275a-8285-4a4e-b7cf-819aa7c86b8e | ||
| 236 | ;;; esh-test.el ends here | 233 | ;;; esh-test.el ends here |
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 377fd6b08e4..2de147acb00 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; esh-util.el --- general utilities | 1 | ;;; esh-util.el --- general utilities |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -341,20 +340,6 @@ Prepend remote identification of `default-directory', if any." | |||
| 341 | "Flatten and stringify all of the ARGS into a single string." | 340 | "Flatten and stringify all of the ARGS into a single string." |
| 342 | (mapconcat 'eshell-stringify (eshell-flatten-list args) " ")) | 341 | (mapconcat 'eshell-stringify (eshell-flatten-list args) " ")) |
| 343 | 342 | ||
| 344 | ;; the next two are from GNUS, and really should be made part of Emacs | ||
| 345 | ;; some day | ||
| 346 | (defsubst eshell-time-less-p (t1 t2) | ||
| 347 | "Say whether time T1 is less than time T2." | ||
| 348 | (or (< (car t1) (car t2)) | ||
| 349 | (and (= (car t1) (car t2)) | ||
| 350 | (< (nth 1 t1) (nth 1 t2))))) | ||
| 351 | |||
| 352 | (defsubst eshell-time-to-seconds (time) | ||
| 353 | "Convert TIME to a floating point number." | ||
| 354 | (+ (* (car time) 65536.0) | ||
| 355 | (cadr time) | ||
| 356 | (/ (or (car (cdr (cdr time))) 0) 1000000.0))) | ||
| 357 | |||
| 358 | (defsubst eshell-directory-files (regexp &optional directory) | 343 | (defsubst eshell-directory-files (regexp &optional directory) |
| 359 | "Return a list of files in the given DIRECTORY matching REGEXP." | 344 | "Return a list of files in the given DIRECTORY matching REGEXP." |
| 360 | (directory-files (or directory default-directory) | 345 | (directory-files (or directory default-directory) |
| @@ -468,7 +453,7 @@ list." | |||
| 468 | "Read the contents of /etc/passwd for user names." | 453 | "Read the contents of /etc/passwd for user names." |
| 469 | (if (or (not (symbol-value result-var)) | 454 | (if (or (not (symbol-value result-var)) |
| 470 | (not (symbol-value timestamp-var)) | 455 | (not (symbol-value timestamp-var)) |
| 471 | (eshell-time-less-p | 456 | (time-less-p |
| 472 | (symbol-value timestamp-var) | 457 | (symbol-value timestamp-var) |
| 473 | (nth 5 (file-attributes file)))) | 458 | (nth 5 (file-attributes file)))) |
| 474 | (progn | 459 | (progn |
| @@ -522,7 +507,7 @@ list." | |||
| 522 | "Read the contents of /etc/passwd for user names." | 507 | "Read the contents of /etc/passwd for user names." |
| 523 | (if (or (not (symbol-value result-var)) | 508 | (if (or (not (symbol-value result-var)) |
| 524 | (not (symbol-value timestamp-var)) | 509 | (not (symbol-value timestamp-var)) |
| 525 | (eshell-time-less-p | 510 | (time-less-p |
| 526 | (symbol-value timestamp-var) | 511 | (symbol-value timestamp-var) |
| 527 | (nth 5 (file-attributes file)))) | 512 | (nth 5 (file-attributes file)))) |
| 528 | (progn | 513 | (progn |
| @@ -536,25 +521,18 @@ list." | |||
| 536 | (eshell-read-hosts eshell-hosts-file 'eshell-host-names | 521 | (eshell-read-hosts eshell-hosts-file 'eshell-host-names |
| 537 | 'eshell-host-timestamp))) | 522 | 'eshell-host-timestamp))) |
| 538 | 523 | ||
| 539 | (unless (fboundp 'line-end-position) | 524 | (and (featurep 'xemacs) |
| 540 | (defsubst line-end-position (&optional N) | 525 | (not (fboundp 'subst-char-in-string)) |
| 541 | (save-excursion (end-of-line N) (point)))) | 526 | (defun subst-char-in-string (fromchar tochar string &optional inplace) |
| 542 | 527 | "Replace FROMCHAR with TOCHAR in STRING each time it occurs. | |
| 543 | (unless (fboundp 'line-beginning-position) | ||
| 544 | (defsubst line-beginning-position (&optional N) | ||
| 545 | (save-excursion (beginning-of-line N) (point)))) | ||
| 546 | |||
| 547 | (unless (fboundp 'subst-char-in-string) | ||
| 548 | (defun subst-char-in-string (fromchar tochar string &optional inplace) | ||
| 549 | "Replace FROMCHAR with TOCHAR in STRING each time it occurs. | ||
| 550 | Unless optional argument INPLACE is non-nil, return a new string." | 528 | Unless optional argument INPLACE is non-nil, return a new string." |
| 551 | (let ((i (length string)) | 529 | (let ((i (length string)) |
| 552 | (newstr (if inplace string (copy-sequence string)))) | 530 | (newstr (if inplace string (copy-sequence string)))) |
| 553 | (while (> i 0) | 531 | (while (> i 0) |
| 554 | (setq i (1- i)) | 532 | (setq i (1- i)) |
| 555 | (if (eq (aref newstr i) fromchar) | 533 | (if (eq (aref newstr i) fromchar) |
| 556 | (aset newstr i tochar))) | 534 | (aset newstr i tochar))) |
| 557 | newstr))) | 535 | newstr))) |
| 558 | 536 | ||
| 559 | (defsubst eshell-copy-environment () | 537 | (defsubst eshell-copy-environment () |
| 560 | "Return an unrelated copy of `process-environment'." | 538 | "Return an unrelated copy of `process-environment'." |
| @@ -594,8 +572,9 @@ Unless optional argument INPLACE is non-nil, return a new string." | |||
| 594 | (substring string 0 sublen) | 572 | (substring string 0 sublen) |
| 595 | string))) | 573 | string))) |
| 596 | 574 | ||
| 597 | (unless (fboundp 'directory-files-and-attributes) | 575 | (and (featurep 'xemacs) |
| 598 | (defun directory-files-and-attributes (directory &optional full match nosort id-format) | 576 | (not (fboundp 'directory-files-and-attributes)) |
| 577 | (defun directory-files-and-attributes (directory &optional full match nosort id-format) | ||
| 599 | "Return a list of names of files and their attributes in DIRECTORY. | 578 | "Return a list of names of files and their attributes in DIRECTORY. |
| 600 | There are three optional arguments: | 579 | There are three optional arguments: |
| 601 | If FULL is non-nil, return absolute file names. Otherwise return names | 580 | If FULL is non-nil, return absolute file names. Otherwise return names |
| @@ -607,7 +586,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. | |||
| 607 | (mapcar | 586 | (mapcar |
| 608 | (function | 587 | (function |
| 609 | (lambda (file) | 588 | (lambda (file) |
| 610 | (cons file (eshell-file-attributes (expand-file-name file directory))))) | 589 | (cons file (eshell-file-attributes (expand-file-name file directory))))) |
| 611 | (directory-files directory full match nosort))))) | 590 | (directory-files directory full match nosort))))) |
| 612 | 591 | ||
| 613 | (defvar ange-cache) | 592 | (defvar ange-cache) |
| @@ -802,5 +781,4 @@ gid format. Valid values are 'string and 'integer, defaulting to | |||
| 802 | 781 | ||
| 803 | (provide 'esh-util) | 782 | (provide 'esh-util) |
| 804 | 783 | ||
| 805 | ;; arch-tag: 70159778-5c7a-480a-bae4-3ad332fca19d | ||
| 806 | ;;; esh-util.el ends here | 784 | ;;; esh-util.el ends here |
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index f76d1de3c8d..4c42b305ec2 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; esh-var.el --- handling of variables | 1 | ;;; esh-var.el --- handling of variables |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | 6 | ||
| @@ -653,5 +652,4 @@ For example, to retrieve the second element of a user's record in | |||
| 653 | (setq pcomplete-stub (substring arg pos)) | 652 | (setq pcomplete-stub (substring arg pos)) |
| 654 | (throw 'pcomplete-completions (pcomplete-entries))))) | 653 | (throw 'pcomplete-completions (pcomplete-entries))))) |
| 655 | 654 | ||
| 656 | ;; arch-tag: 393654fe-bdad-4f27-9a10-b1472ded14cf | ||
| 657 | ;;; esh-var.el ends here | 655 | ;;; esh-var.el ends here |
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el index 89ec3ab9c60..7690a102a9b 100644 --- a/lisp/eshell/eshell.el +++ b/lisp/eshell/eshell.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; eshell.el --- the Emacs command shell | 1 | ;;; eshell.el --- the Emacs command shell |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, | 3 | ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. |
| 4 | ;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 7 | ;; Version: 2.4.2 | 6 | ;; Version: 2.4.2 |
| @@ -285,7 +284,8 @@ shells such as bash, zsh, rc, 4dos." | |||
| 285 | "`eshell-buffer-name' is a member of `same-window-buffer-names'" | 284 | "`eshell-buffer-name' is a member of `same-window-buffer-names'" |
| 286 | (member eshell-buffer-name same-window-buffer-names)) | 285 | (member eshell-buffer-name same-window-buffer-names)) |
| 287 | 286 | ||
| 288 | (defcustom eshell-directory-name (convert-standard-filename "~/.eshell/") | 287 | (defcustom eshell-directory-name |
| 288 | (locate-user-emacs-file "eshell/" ".eshell/") | ||
| 289 | "The directory where Eshell control files should be kept." | 289 | "The directory where Eshell control files should be kept." |
| 290 | :type 'directory | 290 | :type 'directory |
| 291 | :group 'eshell) | 291 | :group 'eshell) |
| @@ -490,5 +490,4 @@ Emacs." | |||
| 490 | 490 | ||
| 491 | (provide 'eshell) | 491 | (provide 'eshell) |
| 492 | 492 | ||
| 493 | ;; arch-tag: 9d4d5214-0e4e-4e02-b349-39add640d63f | ||
| 494 | ;;; eshell.el ends here | 493 | ;;; eshell.el ends here |