diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2017-10-03 16:15:08 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2017-10-03 16:15:08 +0200 |
commit | 92045f4546b9708dc9f69954799d211c1f56ff1e (patch) | |
tree | 3da042d305f9a7ef78c1ee9e49463f13db3900ba /lisp/files.el | |
parent | f204e6e1a418073bd1e24a83947f1f3c53581c7f (diff) | |
download | emacs-92045f4546b9708dc9f69954799d211c1f56ff1e.tar.gz emacs-92045f4546b9708dc9f69954799d211c1f56ff1e.tar.bz2 emacs-92045f4546b9708dc9f69954799d211c1f56ff1e.zip |
Add file name handler support for file-system-info
* doc/lispref/files.texi (Magic File Names): Add file-system-info.
* etc/NEWS: Mention get-free-disk-space working on remote systems.
* lisp/files.el (get-free-disk-space): Do not block on remote systems.
* src/w32fns.c (Ffile_system_info):
* src/fileio.c (Ffile_system_info): Call file name handler if exists.
(syms_of_fileio): Add Qfile_system_info.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/files.el b/lisp/files.el index 194c87ab680..666654da2c9 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6407,12 +6407,10 @@ This variable is obsolete; Emacs no longer uses it." The return value is a string describing the amount of free space (normally, the number of free 1KB blocks). -If DIR's free space cannot be obtained, or if DIR is a remote -directory, this function returns nil." - (unless (file-remote-p (expand-file-name dir)) - (let ((avail (nth 2 (file-system-info dir)))) - (if avail - (format "%.0f" (/ avail 1024)))))) +If DIR's free space cannot be obtained, this function returns nil." + (let ((avail (nth 2 (file-system-info dir)))) + (if avail + (format "%.0f" (/ avail 1024))))) ;; The following expression replaces `dired-move-to-filename-regexp'. (defvar directory-listing-before-filename-regexp |