* lisp/net/tramp.el (tramp-tramp-file-p): Use `string-match-p'.
Reported by Clément Pit-Claudel <cpitclaudel@gmail.com>.
This commit is contained in:
parent
ea39d470bf
commit
0b558b4acb
1 changed files with 8 additions and 8 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue