[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/shell-quasiquote c82d65c 2/4: Use shell-quote-argument
From: |
Stefan Monnier |
Subject: |
[elpa] externals/shell-quasiquote c82d65c 2/4: Use shell-quote-argument in shell-quasiquote.el |
Date: |
Tue, 1 Dec 2020 17:11:30 -0500 (EST) |
branch: externals/shell-quasiquote
commit c82d65ca6212d42f1873dde05c92dea85484ac90
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Use shell-quote-argument in shell-quasiquote.el
* packages/shell-quasiquote/shell-quasiquote.el (shqq--quote-atom):
Use shell-quote-argument.
(shqq--quote-string): Function deleted.
---
shell-quasiquote.el | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/shell-quasiquote.el b/shell-quasiquote.el
index 1d08def..bdea46a 100644
--- a/shell-quasiquote.el
+++ b/shell-quasiquote.el
@@ -58,11 +58,6 @@
;;; Code:
-;;; We don't use `shell-quote-argument' because it doesn't provide any safety
-;;; guarantees, and this quotes shell keywords as well.
-(defun shqq--quote-string (string)
- (concat "'" (replace-regexp-in-string "'" "'\\\\''" string) "'"))
-
(defun shqq--atom-to-string (atom)
(cond
((symbolp atom) (symbol-name atom))
@@ -71,7 +66,7 @@
(t (error "Bad shqq atom: %S" atom))))
(defun shqq--quote-atom (atom)
- (shqq--quote-string (shqq--atom-to-string atom)))
+ (shell-quote-argument (shqq--atom-to-string atom)))
(defun shqq--match-comma (form)
"Matches FORM against ,foo i.e. (\, foo) and returns foo.