[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master d42bd3a 2/2: * lisp/files.el (get-free-disk-space):
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master d42bd3a 2/2: * lisp/files.el (get-free-disk-space): Wrap body with `save-match-data'. |
Date: |
Thu, 1 Feb 2018 02:53:21 -0500 (EST) |
branch: master
commit d42bd3a512dadd853d7fb828072a531d7f1d78b6
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
* 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 91aa95d..75d3b7b 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