aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2017-10-04 11:48:37 +0200
committerMichael Albinus2017-10-04 11:48:37 +0200
commit0b558b4acb8326c6f26fcde47ca85777716ae831 (patch)
treeadafda9b498b3e1864f8e20ddfc54aef99ee9d1a
parentea39d470bf35e45f1d8e39795f06ac74b3c37fc7 (diff)
downloademacs-0b558b4acb8326c6f26fcde47ca85777716ae831.tar.gz
emacs-0b558b4acb8326c6f26fcde47ca85777716ae831.zip
* lisp/net/tramp.el (tramp-tramp-file-p): Use `string-match-p'.
Reported by Clément Pit-Claudel <cpitclaudel@gmail.com>.
-rw-r--r--lisp/net/tramp.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index ac882abae54..c8b6e68f719 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1269,14 +1269,14 @@ entry does not exist, return nil."
1269;;;###tramp-autoload 1269;;;###tramp-autoload
1270(defun tramp-tramp-file-p (name) 1270(defun tramp-tramp-file-p (name)
1271 "Return t if NAME is a string with Tramp file name syntax." 1271 "Return t if NAME is a string with Tramp file name syntax."
1272 (save-match-data 1272 (and (stringp name)
1273 (and (stringp name) 1273 ;; No "/:" and "/c:". This is not covered by `tramp-file-name-regexp'.
1274 ;; No "/:" and "/c:". This is not covered by `tramp-file-name-regexp'. 1274 (not (string-match-p
1275 (not (string-match 1275 (if (memq system-type '(cygwin windows-nt))
1276 (if (memq system-type '(cygwin windows-nt)) 1276 "^/[[:alpha:]]?:" "^/:")
1277 "^/[[:alpha:]]?:" "^/:") 1277 name))
1278 name)) 1278 (string-match-p tramp-file-name-regexp name)
1279 (string-match tramp-file-name-regexp name)))) 1279 t))
1280 1280
1281(defun tramp-find-method (method user host) 1281(defun tramp-find-method (method user host)
1282 "Return the right method string to use. 1282 "Return the right method string to use.