From 92045f4546b9708dc9f69954799d211c1f56ff1e Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 3 Oct 2017 16:15:08 +0200 Subject: 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. --- lisp/files.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lisp/files.el') 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 -- cgit v1.2.3