Commit 702b4f7f authored by Andreas Schwab's avatar Andreas Schwab

(comint-quote-filename): Correctly handle backslash

in comint-file-name-quote-list.
parent 8babaa59
......@@ -2625,11 +2625,13 @@ Magic characters are those in `comint-file-name-quote-list'."
(if (null comint-file-name-quote-list)
(let ((regexp
(format "\\(^\\|[^\\]\\)\\([%s]\\)"
(format "[%s]"
(mapconcat 'char-to-string comint-file-name-quote-list ""))))
(while (string-match regexp filename)
(setq filename (replace-match "\\1\\\\\\2" nil nil filename)))
(let ((i 0))
(while (string-match regexp filename i)
(setq filename (replace-match "\\\\\\&" nil nil filename))
(setq i (1+ (match-end 0)))))
(defun comint-unquote-filename (filename)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment