summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-cache.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/tramp-cache.el')
-rw-r--r--lisp/net/tramp-cache.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 289df2f9aad..6a3e60f7037 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -226,7 +226,8 @@ Return VALUE."
(setq key (tramp-file-name-unify key file))
(dolist (property (hash-table-keys (tramp-get-hash-table key)))
(when (string-match-p
- "^\\(directory-\\|file-name-all-completions\\|file-entries\\)"
+ (rx
+ bos (| "directory-" "file-name-all-completions" "file-entries"))
property)
(tramp-flush-file-property key file property))))))
@@ -277,7 +278,7 @@ Remove also properties of all files in subdirectories."
This is suppressed for temporary buffers."
(save-match-data
(unless (or (null (buffer-name))
- (string-match-p "^\\( \\|\\*\\)" (buffer-name)))
+ (string-match-p (rx bos (| " " "*")) (buffer-name)))
(let ((bfn (if (stringp (buffer-file-name))
(buffer-file-name)
default-directory))