summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-08-29 19:17:54 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-08-29 19:18:38 -0700
commit70bb510a7eb1a3010cfa034884b7e5ab2063ece3 (patch)
tree1be6cb843782bf1389850cc3589e7c22109646d9 /lisp/files.el
parent0001ff27c4a114fdfe75c8e35b0970ecd939a53d (diff)
downloademacs-70bb510a7eb1a3010cfa034884b7e5ab2063ece3.tar.gz
Prefer file-name-quote to concat "/:"
Suggested by Michael Albinus (Bug#28264#13). * lisp/files.el (files--splice-dirname-file): Use file-name-quote rather than attempting to do it by hand.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 5f55aa75a70..7754be29643 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1156,16 +1156,16 @@ names beginning with `~'."
(defun files--splice-dirname-file (dirname file)
"Splice DIRNAME to FILE like the operating system would.
If FILENAME is relative, return DIRNAME concatenated to FILE.
-Otherwise return FILE, quoted with `/:' if DIRNAME and FILE have
+Otherwise return FILE, quoted as needed if DIRNAME and FILE have
different handlers; although this quoting is dubious if DIRNAME
-is remote, it is not clear what would be better. This function
+is magic, it is not clear what would be better. This function
differs from `expand-file-name' in that DIRNAME must be a
directory name and leading `~' and `/:' are not special in FILE."
(if (files--name-absolute-system-p file)
(if (eq (find-file-name-handler dirname 'file-symlink-p)
(find-file-name-handler file 'file-symlink-p))
file
- (concat "/:" file))
+ (file-name-quote file))
(concat dirname file)))
(defun file-truename (filename &optional counter prev-dirs)