summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 135ccfafb92..8e6fb9ff725 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2260,7 +2260,7 @@ we don't actually set it to the same mode the buffer already has."
(unless done
(if buffer-file-name
(let ((name buffer-file-name)
- (remote-id (file-remote-p buffer-file-name)))
+ (remote-id (regexp-quote (file-remote-p buffer-file-name))))
;; Remove remote file name identification.
(when (and (stringp remote-id)
(string-match remote-id name))