[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/tramp-thread-safe 917a542: find-file-asynchronousl
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] feature/tramp-thread-safe 917a542: find-file-asynchronously can also be a regexp |
Date: |
Sat, 28 Jul 2018 04:40:46 -0400 (EDT) |
branch: feature/tramp-thread-safe
commit 917a542d72e4cfb2f6abe67b574fd705dfd73933
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
find-file-asynchronously can also be a regexp
* lisp/files.el (find-file-read-args): Check, whether
find-file-asynchronously matches filename, if the former is a regexp.
(find-file-asynchronously): Allow also regexp.
---
lisp/files.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/files.el b/lisp/files.el
index 1021551..88c4752 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1582,6 +1582,8 @@ If WILDCARDS is non-nil, return the spec (<filename> t
<async>)."
(let ((filename (read-file-name prompt nil default-directory mustmatch))
(async (and (xor find-file-asynchronously current-prefix-arg)
(featurep 'threads))))
+ (when (and async (stringp find-file-asynchronously))
+ (setq async (string-match-p find-file-asynchronously filename)))
(if wildcards `(,filename t ,async) `(,filename ,async))))
(defmacro find-file-with-threads (filename async &rest body)
@@ -2069,10 +2071,12 @@ suppresses this warning."
(defcustom find-file-asynchronously nil
"Non-nil means visit file asynchronously when called interactively.
-This behavior is toggled by a prefix argument to the interactive call."
+If it is a regular expression, it must match the file name to be
+visited. This behavior is toggled by a prefix argument to the
+interactive call."
:group 'files
:version "27.1"
- :type 'boolean)
+ :type '(choice boolean regexp))
(defcustom large-file-warning-threshold 10000000
"Maximum size of file above which a confirmation is requested.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] feature/tramp-thread-safe 917a542: find-file-asynchronously can also be a regexp,
Michael Albinus <=