From d42bd3a512dadd853d7fb828072a531d7f1d78b6 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 1 Feb 2018 08:53:08 +0100 Subject: [PATCH] * lisp/files.el (get-free-disk-space): Wrap body with `save-match-data'. Several `*-insert-directory' functions could fail otherwise. --- lisp/files.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 91aa95d631c..75d3b7b1e72 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6473,9 +6473,10 @@ 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, this function returns nil." - (let ((avail (nth 2 (file-system-info dir)))) - (if avail - (format "%.0f" (/ avail 1024))))) + (save-match-data + (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 -- 2.39.2