Commit d5e632d8 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/subr.el (shell-quote-argument): Properly quote \n.

Suggested by Flo <>.

Fixes: debbugs:7687
parent d00b05c9
2011-01-21 Stefan Monnier <>
* subr.el (shell-quote-argument): Properly quote \n (bug#7687).
Suggested by Flo <>.
2011-01-21 Glenn Morris <>
* progmodes/compile.el (compilation-error-regexp-alist):
......@@ -2426,13 +2426,8 @@ Note: :data and :device are currently not supported on Windows."
;; Quote everything except POSIX filename characters.
;; This should be safe enough even for really weird shells.
(let ((result "") (start 0) end)
(while (string-match "[^-0-9a-zA-Z_./]" argument start)
(setq end (match-beginning 0)
result (concat result (substring argument start end)
"\\" (substring argument end (1+ end)))
start (1+ end)))
(concat result (substring argument start))))))
(replace-regexp-in-string "\n" "'\n'"
(replace-regexp-in-string "[^-0-9a-zA-Z_./\n]" "\\\\\\&" argument)))))
(defun string-or-null-p (object)
"Return t if OBJECT is a string or nil.
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