diff options
| author | Richard M. Stallman | 2001-12-18 19:35:20 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-12-18 19:35:20 +0000 |
| commit | 7277be1e3d6982a3d7ff2163ccde4a9051a8243c (patch) | |
| tree | 7ef5a36af618f47f8cd06f0cee624ac757345b01 | |
| parent | f4d0467268d1e14c50137bc58ad44d6d26de19c9 (diff) | |
| download | emacs-7277be1e3d6982a3d7ff2163ccde4a9051a8243c.tar.gz emacs-7277be1e3d6982a3d7ff2163ccde4a9051a8243c.zip | |
(dired-free-space-program): Variable deleted.
(dired-free-space-args): Variable deleted.
(dired-insert-directory): Don't try to determine free space.
| -rw-r--r-- | lisp/dired.el | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index d4cbe4f936e..e1b4552411e 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -157,21 +157,6 @@ The target is used in the prompt for file copy, rename etc." | |||
| 157 | :type 'boolean | 157 | :type 'boolean |
| 158 | :group 'dired) | 158 | :group 'dired) |
| 159 | 159 | ||
| 160 | (defcustom dired-free-space-program "df" | ||
| 161 | "*Program to get the amount of free space on a file system. | ||
| 162 | We assume the output has the format of `df'. | ||
| 163 | The value of this variable must be just a command name or file name; | ||
| 164 | if you want to specify options, use `dired-free-space-args'. | ||
| 165 | |||
| 166 | A value of nil disables this feature." | ||
| 167 | :type '(choice (string :tag "Program") (const :tag "None" nil)) | ||
| 168 | :group 'dired) | ||
| 169 | |||
| 170 | (defcustom dired-free-space-args "-Pk" | ||
| 171 | "*Options to use when running `dired-free-space-program'." | ||
| 172 | :type 'string | ||
| 173 | :group 'dired) | ||
| 174 | |||
| 175 | ;;; Hook variables | 160 | ;;; Hook variables |
| 176 | 161 | ||
| 177 | (defvar dired-load-hook nil | 162 | (defvar dired-load-hook nil |
| @@ -685,40 +670,7 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh." | |||
| 685 | (cdr dir-or-list)) | 670 | (cdr dir-or-list)) |
| 686 | ;; Expand the file name here because it may have been abbreviated | 671 | ;; Expand the file name here because it may have been abbreviated |
| 687 | ;; in dired-noselect. | 672 | ;; in dired-noselect. |
| 688 | (insert-directory (expand-file-name dir-or-list) switches wildcard full-p) | 673 | (insert-directory (expand-file-name dir-or-list) switches wildcard full-p)) |
| 689 | (when (and full-p dired-free-space-program) | ||
| 690 | (save-excursion | ||
| 691 | (goto-char (point-min)) | ||
| 692 | (when (re-search-forward "total [0-9]+$" nil t) | ||
| 693 | (insert " free ") | ||
| 694 | ;; Non-Posix systems don't always have dired-free-space-program, | ||
| 695 | ;; but might have an equivalent system call. | ||
| 696 | (if (fboundp 'file-system-info) | ||
| 697 | (let ((beg (point)) | ||
| 698 | (fsinfo (file-system-info dir-or-list))) | ||
| 699 | (if fsinfo | ||
| 700 | (insert | ||
| 701 | (format "%.0f" (/ (nth 2 fsinfo) 1024))) | ||
| 702 | ;; file-system-info failed; delete " free ". | ||
| 703 | (delete-region (- beg 7) beg))) | ||
| 704 | (let ((beg (point))) | ||
| 705 | (condition-case nil | ||
| 706 | (if (zerop (call-process dired-free-space-program nil t nil | ||
| 707 | dired-free-space-args | ||
| 708 | (expand-file-name dir-or-list))) | ||
| 709 | (progn | ||
| 710 | (goto-char beg) | ||
| 711 | (forward-line 1) | ||
| 712 | (skip-chars-forward "^ \t") | ||
| 713 | (forward-word 2) | ||
| 714 | (skip-chars-forward " \t") | ||
| 715 | (delete-region beg (point)) | ||
| 716 | (forward-word 1) | ||
| 717 | (delete-region (point) | ||
| 718 | (progn (forward-line 1) (point)))) | ||
| 719 | ;; The dired-free-space-program failed; delete its output | ||
| 720 | (delete-region (- beg 7) (point))) | ||
| 721 | (error (delete-region (- beg 7) (point)))))))))) | ||
| 722 | ;; Quote certain characters, unless ls quoted them for us. | 674 | ;; Quote certain characters, unless ls quoted them for us. |
| 723 | (if (not (string-match "b" dired-actual-switches)) | 675 | (if (not (string-match "b" dired-actual-switches)) |
| 724 | (save-excursion | 676 | (save-excursion |