From: Michael Albinus Date: Thu, 1 Feb 2018 07:53:08 +0000 (+0100) Subject: * lisp/files.el (get-free-disk-space): Wrap body with `save-match-data'. X-Git-Tag: emacs-27.0.90~5760 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d42bd3a512dadd853d7fb828072a531d7f1d78b6;p=emacs.git * lisp/files.el (get-free-disk-space): Wrap body with `save-match-data'. Several `*-insert-directory' functions could fail otherwise. --- 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