Function: minibuffer-maybe-quote-filename
minibuffer-maybe-quote-filename is a byte-compiled function defined in
minibuffer.el.gz.
Signature
(minibuffer-maybe-quote-filename FILENAME)
Documentation
Protect FILENAME from substitute-in-file-name, as needed.
Useful to give the user default values that won't be substituted.
Source Code
;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defun minibuffer-maybe-quote-filename (filename)
"Protect FILENAME from `substitute-in-file-name', as needed.
Useful to give the user default values that won't be substituted."
(if (and (not (file-name-quoted-p filename))
(file-name-absolute-p filename)
(string-match-p (if (memq system-type '(windows-nt ms-dos))
"[/\\]~" "/~")
(file-local-name filename)))
(file-name-quote filename)
(minibuffer--double-dollars filename)))