[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 0b558b4: * lisp/net/tramp.el (tramp-tramp-file-p)
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] emacs-26 0b558b4: * lisp/net/tramp.el (tramp-tramp-file-p): Use `string-match-p'. |
Date: |
Wed, 4 Oct 2017 05:48:48 -0400 (EDT) |
branch: emacs-26
commit 0b558b4acb8326c6f26fcde47ca85777716ae831
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
* lisp/net/tramp.el (tramp-tramp-file-p): Use `string-match-p'.
Reported by Clément Pit-Claudel <address@hidden>.
---
lisp/net/tramp.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index ac882ab..c8b6e68 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1269,14 +1269,14 @@ entry does not exist, return nil."
;;;###tramp-autoload
(defun tramp-tramp-file-p (name)
"Return t if NAME is a string with Tramp file name syntax."
- (save-match-data
- (and (stringp name)
- ;; No "/:" and "/c:". This is not covered by `tramp-file-name-regexp'.
- (not (string-match
- (if (memq system-type '(cygwin windows-nt))
- "^/[[:alpha:]]?:" "^/:")
- name))
- (string-match tramp-file-name-regexp name))))
+ (and (stringp name)
+ ;; No "/:" and "/c:". This is not covered by `tramp-file-name-regexp'.
+ (not (string-match-p
+ (if (memq system-type '(cygwin windows-nt))
+ "^/[[:alpha:]]?:" "^/:")
+ name))
+ (string-match-p tramp-file-name-regexp name)
+ t))
(defun tramp-find-method (method user host)
"Return the right method string to use.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 0b558b4: * lisp/net/tramp.el (tramp-tramp-file-p): Use `string-match-p'.,
Michael Albinus <=