[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/tramp-thread-safe d7314b3 3/7: find-file-asynchron
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] feature/tramp-thread-safe d7314b3 3/7: find-file-asynchronously can also be a regexp |
Date: |
Sat, 4 Aug 2018 06:50:10 -0400 (EDT) |
branch: feature/tramp-thread-safe
commit d7314b35ff6a60d1c92ed137921d7e20a6a55c89
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.
- [Emacs-diffs] feature/tramp-thread-safe updated (c6db534 -> d1f39eb), Michael Albinus, 2018/08/04
- [Emacs-diffs] feature/tramp-thread-safe 11ff7fa 5/7: Add list-threads command and thread-list-mode, Michael Albinus, 2018/08/04
- [Emacs-diffs] feature/tramp-thread-safe d7314b3 3/7: find-file-asynchronously can also be a regexp,
Michael Albinus <=
- [Emacs-diffs] feature/tramp-thread-safe d1f39eb 7/7: Merge branch 'feature/tramp-thread-safe', Michael Albinus, 2018/08/04
- [Emacs-diffs] feature/tramp-thread-safe d7f3187 6/7: Improve vc-mutex use, Michael Albinus, 2018/08/04
- [Emacs-diffs] feature/tramp-thread-safe 4615b91 4/7: Document visiting files asynchronously, Michael Albinus, 2018/08/04
- [Emacs-diffs] feature/tramp-thread-safe 4d340cd 2/7: Add find-file-asynchronously, Michael Albinus, 2018/08/04
- [Emacs-diffs] feature/tramp-thread-safe bba62df 1/7: Introducing thread-safe Tramp, Michael Albinus, 2018/08/04