diff options
author | Karoly Lorentey <[email protected]> | 2007-02-24 19:26:54 +0000 |
---|---|---|
committer | Karoly Lorentey <[email protected]> | 2007-02-24 19:26:54 +0000 |
commit | f65f7603312547e51230192daf34349b8ac569a0 (patch) | |
tree | cbc5877854d00bbdd5ecd4906d130ab8fbb44430 /lisp/files.el | |
parent | 9440b75fccbf763e3fb23a31a128d97eb4debdf5 (diff) | |
parent | 735895f1fa28f88c559e73910ea0ff0bda0f228c (diff) |
Merged from [email protected]
Patches applied:
* [email protected]/emacs--devo--0--patch-619
Update from CVS
* [email protected]/emacs--devo--0--patch-620
Update from CVS
* [email protected]/emacs--devo--0--patch-621
Merge from gnus--rel--5.10
* [email protected]/emacs--devo--0--patch-622
Update from CVS
* [email protected]/emacs--devo--0--patch-623
Remove RCS keywords
* [email protected]/emacs--devo--0--patch-624
Update from CVS
* [email protected]/emacs--devo--0--patch-625
Update from CVS
* [email protected]/emacs--devo--0--patch-626
Update from CVS
* [email protected]/emacs--devo--0--patch-627
Update from CVS
* [email protected]/emacs--devo--0--patch-628
Update from CVS
* [email protected]/emacs--devo--0--patch-629
Merge from gnus--rel--5.10
* [email protected]/emacs--devo--0--patch-630
Update from CVS
* [email protected]/emacs--devo--0--patch-631
Update from CVS
* [email protected]/emacs--devo--0--patch-632
Update from CVS
* [email protected]/emacs--devo--0--patch-633
Update from CVS
* [email protected]/emacs--devo--0--patch-634
Update from CVS
* [email protected]/emacs--devo--0--patch-635
Update from CVS
* [email protected]/emacs--devo--0--patch-636
Update from CVS
* [email protected]/emacs--devo--0--patch-637
Remove RCS keywords
* [email protected]/emacs--devo--0--patch-638
Update from CVS
* [email protected]/emacs--devo--0--patch-639
Update from CVS
* [email protected]/emacs--devo--0--patch-640
Update from CVS
* [email protected]/emacs--devo--0--patch-641
Update from CVS
* [email protected]/emacs--devo--0--patch-642
Merge from gnus--rel--5.10
* [email protected]/emacs--devo--0--patch-643
Update from CVS
* [email protected]/emacs--devo--0--patch-644
Update from CVS
* [email protected]/emacs--devo--0--patch-645
Update from CVS
* [email protected]/emacs--devo--0--patch-646
Update from CVS
* [email protected]/emacs--devo--0--patch-647
Update from CVS
* [email protected]/emacs--devo--0--patch-648
Update from CVS
* [email protected]/emacs--devo--0--patch-649
Update from CVS
* [email protected]/gnus--rel--5.10--patch-197
Merge from emacs--devo--0
* [email protected]/gnus--rel--5.10--patch-198
Update from CVS
* [email protected]/gnus--rel--5.10--patch-199
Update from CVS
* [email protected]/gnus--rel--5.10--patch-200
Merge from emacs--devo--0
* [email protected]/gnus--rel--5.10--patch-201
Update from CVS: lisp/nnweb.el (nnweb-google-parse-1): Update parser.
* [email protected]/gnus--rel--5.10--patch-202
Update from CVS
git-archimport-id: [email protected]/emacs--multi-tty--0--patch-596
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/lisp/files.el b/lisp/files.el index e32fa42795..3b089c06d9 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2830,7 +2830,7 @@ It is dangerous if either of these conditions are met: However, the mode will not be changed if \(1) a local variables list or the `-*-' line specifies a major mode, or \(2) the current major mode is a \"special\" mode, -\ not suitable for ordinary files, or +\ not suitable for ordinary files, or \(3) the new file name does not particularly specify any mode." :type 'boolean :group 'editing-basics) @@ -4750,36 +4750,37 @@ preference to the program given by this variable." "Return the amount of free space on directory DIR's file system. The result is a string that gives the number of free 1KB blocks, or nil if the system call or the program which retrieve the information -fail. +fail. It returns also nil when DIR is a remote directory. This function calls `file-system-info' if it is available, or invokes the program specified by `directory-free-space-program' if that is non-nil." - ;; Try to find the number of free blocks. Non-Posix systems don't - ;; always have df, but might have an equivalent system call. - (if (fboundp 'file-system-info) - (let ((fsinfo (file-system-info dir))) - (if fsinfo - (format "%.0f" (/ (nth 2 fsinfo) 1024)))) - (save-match-data - (with-temp-buffer - (when (and directory-free-space-program - (eq 0 (call-process directory-free-space-program - nil t nil - directory-free-space-args - dir))) - ;; Usual format is a header line followed by a line of - ;; numbers. - (goto-char (point-min)) - (forward-line 1) - (if (not (eobp)) - (progn - ;; Move to the end of the "available blocks" number. - (skip-chars-forward "^ \t") - (forward-word 3) - ;; Copy it into AVAILABLE. - (let ((end (point))) - (forward-word -1) - (buffer-substring (point) end))))))))) + (when (not (file-remote-p dir)) + ;; Try to find the number of free blocks. Non-Posix systems don't + ;; always have df, but might have an equivalent system call. + (if (fboundp 'file-system-info) + (let ((fsinfo (file-system-info dir))) + (if fsinfo + (format "%.0f" (/ (nth 2 fsinfo) 1024)))) + (save-match-data + (with-temp-buffer + (when (and directory-free-space-program + (eq 0 (call-process directory-free-space-program + nil t nil + directory-free-space-args + dir))) + ;; Usual format is a header line followed by a line of + ;; numbers. + (goto-char (point-min)) + (forward-line 1) + (if (not (eobp)) + (progn + ;; Move to the end of the "available blocks" number. + (skip-chars-forward "^ \t") + (forward-word 3) + ;; Copy it into AVAILABLE. + (let ((end (point))) + (forward-word -1) + (buffer-substring (point) end)))))))))) ;; The following expression replaces `dired-move-to-filename-regexp'. (defvar directory-listing-before-filename-regexp |