aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/files.el8
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ddc0c9e6563..7c6485c52ba 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12015-01-04 Paul Eggert <eggert@cs.ucla.edu>
2
3 Fix dired quoting bug with "Hit`N`Hide"
4 Fixes Bug#19498.
5 * files.el (shell-quote-wildcard-pattern): Also quote "`".
6
12015-01-04 Dmitry Gutov <dgutov@yandex.ru> 72015-01-04 Dmitry Gutov <dgutov@yandex.ru>
2 8
3 Unbreak `mouse-action' property in text buttons. 9 Unbreak `mouse-action' property in text buttons.
diff --git a/lisp/files.el b/lisp/files.el
index 568242ad8b5..088924427ee 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6051,7 +6051,7 @@ and `list-directory-verbose-switches'."
6051 6051
6052PATTERN is assumed to represent a file-name wildcard suitable for the 6052PATTERN is assumed to represent a file-name wildcard suitable for the
6053underlying filesystem. For Unix and GNU/Linux, each character from the 6053underlying filesystem. For Unix and GNU/Linux, each character from the
6054set [ \\t\\n;<>&|()'\"#$] is quoted with a backslash; for DOS/Windows, all 6054set [ \\t\\n;<>&|()`'\"#$] is quoted with a backslash; for DOS/Windows, all
6055the parts of the pattern which don't include wildcard characters are 6055the parts of the pattern which don't include wildcard characters are
6056quoted with double quotes. 6056quoted with double quotes.
6057 6057
@@ -6065,12 +6065,12 @@ need to be passed verbatim to shell commands."
6065 ;; argument has quotes, we can safely assume it is already 6065 ;; argument has quotes, we can safely assume it is already
6066 ;; quoted by the caller. 6066 ;; quoted by the caller.
6067 (if (or (string-match "[\"]" pattern) 6067 (if (or (string-match "[\"]" pattern)
6068 ;; We quote [&()#$'] in case their shell is a port of a 6068 ;; We quote [&()#$`'] in case their shell is a port of a
6069 ;; Unixy shell. We quote [,=+] because stock DOS and 6069 ;; Unixy shell. We quote [,=+] because stock DOS and
6070 ;; Windows shells require that in some cases, such as 6070 ;; Windows shells require that in some cases, such as
6071 ;; passing arguments to batch files that use positional 6071 ;; passing arguments to batch files that use positional
6072 ;; arguments like %1. 6072 ;; arguments like %1.
6073 (not (string-match "[ \t;&()#$',=+]" pattern))) 6073 (not (string-match "[ \t;&()#$`',=+]" pattern)))
6074 pattern 6074 pattern
6075 (let ((result "\"") 6075 (let ((result "\"")
6076 (beg 0) 6076 (beg 0)
@@ -6085,7 +6085,7 @@ need to be passed verbatim to shell commands."
6085 (concat result (substring pattern beg) "\"")))) 6085 (concat result (substring pattern beg) "\""))))
6086 (t 6086 (t
6087 (let ((beg 0)) 6087 (let ((beg 0))
6088 (while (string-match "[ \t\n;<>&|()'\"#$]" pattern beg) 6088 (while (string-match "[ \t\n;<>&|()`'\"#$]" pattern beg)
6089 (setq pattern 6089 (setq pattern
6090 (concat (substring pattern 0 (match-beginning 0)) 6090 (concat (substring pattern 0 (match-beginning 0))
6091 "\\" 6091 "\\"