emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/compat 36ef438 35/99: Implement and use mounted-file-sy


From: ELPA Syncer
Subject: [elpa] externals/compat 36ef438 35/99: Implement and use mounted-file-systems
Date: Sun, 17 Oct 2021 05:57:53 -0400 (EDT)

branch: externals/compat
commit 36ef4381962d6a2d0d48e7bebd584e0ab8a3f98a
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Implement and use mounted-file-systems
---
 compat-26.1.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/compat-26.1.el b/compat-26.1.el
index 523dccd..465e136 100644
--- a/compat-26.1.el
+++ b/compat-26.1.el
@@ -279,6 +279,14 @@ same meaning as in `make-temp-file'."
       (let ((temporary-file-directory (temporary-file-directory)))
         (make-temp-file prefix dir-flag suffix)))))
 
+(compat-defvar mounted-file-systems
+    (eval-when-compile
+      (if (memq system-type '(windows-nt cygwin))
+          "^//[^/]+/"
+        (concat
+         "^" (regexp-opt '("/afs/" "/media/" "/mnt" "/net/" "/tmp_mnt/")))))
+  "File systems that ought to be mounted.")
+
 (compat-defun temporary-file-directory ()
   "The directory for writing temporary files.
 In case of a remote `default-directory', this is a directory for
@@ -292,7 +300,7 @@ the variable `temporary-file-directory' is returned."
                   default-directory 'temporary-file-directory)))
     (if handler
         (funcall handler 'temporary-file-directory)
-      (if (string-match mounted-file-systems default-directory)
+      (if (string-match compat--mounted-file-systems default-directory)
           default-directory
         temporary-file-directory))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]