diff options
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/subr.el | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e7a74037af8..7518a3a71d3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -10,6 +10,9 @@ | |||
| 10 | 10 | ||
| 11 | 2008-04-07 Stefan Monnier <monnier@iro.umontreal.ca> | 11 | 2008-04-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 12 | 12 | ||
| 13 | * subr.el (combine-and-quote-strings): Also quote strings that contain | ||
| 14 | the separator. | ||
| 15 | |||
| 13 | * pcvs-util.el (cvs-map): Avoid recursion :-( | 16 | * pcvs-util.el (cvs-map): Avoid recursion :-( |
| 14 | 17 | ||
| 15 | 2008-04-07 Glenn Morris <rgm@gnu.org> | 18 | 2008-04-07 Glenn Morris <rgm@gnu.org> |
diff --git a/lisp/subr.el b/lisp/subr.el index 94ee316f9f4..eee59086419 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2987,10 +2987,11 @@ Modifies the match data; use `save-match-data' if necessary." | |||
| 2987 | This tries to quote the strings to avoid ambiguity such that | 2987 | This tries to quote the strings to avoid ambiguity such that |
| 2988 | (split-string-and-unquote (combine-and-quote-strings strs)) == strs | 2988 | (split-string-and-unquote (combine-and-quote-strings strs)) == strs |
| 2989 | Only some SEPARATORs will work properly." | 2989 | Only some SEPARATORs will work properly." |
| 2990 | (let ((sep (or separator " "))) | 2990 | (let* ((sep (or separator " ")) |
| 2991 | (re (concat "[\\\"]" "\\|" (regexp-quote sep)))) | ||
| 2991 | (mapconcat | 2992 | (mapconcat |
| 2992 | (lambda (str) | 2993 | (lambda (str) |
| 2993 | (if (string-match "[\\\"]" str) | 2994 | (if (string-match re str) |
| 2994 | (concat "\"" (replace-regexp-in-string "[\\\"]" "\\\\\\&" str) "\"") | 2995 | (concat "\"" (replace-regexp-in-string "[\\\"]" "\\\\\\&" str) "\"") |
| 2995 | str)) | 2996 | str)) |
| 2996 | strings sep))) | 2997 | strings sep))) |