emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/subr.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/subr.el,v
Date: Mon, 07 Apr 2008 16:29:58 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/04/07 16:29:58

Index: subr.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/subr.el,v
retrieving revision 1.588
retrieving revision 1.589
diff -u -b -r1.588 -r1.589
--- subr.el     5 Apr 2008 20:22:17 -0000       1.588
+++ subr.el     7 Apr 2008 16:29:54 -0000       1.589
@@ -2987,10 +2987,11 @@
 This tries to quote the strings to avoid ambiguity such that
   (split-string-and-unquote (combine-and-quote-strings strs)) == strs
 Only some SEPARATORs will work properly."
-  (let ((sep (or separator " ")))
+  (let* ((sep (or separator " "))
+         (re (concat "[\\\"]" "\\|" (regexp-quote sep))))
     (mapconcat
      (lambda (str)
-       (if (string-match "[\\\"]" str)
+       (if (string-match re str)
           (concat "\"" (replace-regexp-in-string "[\\\"]" "\\\\\\&" str) "\"")
         str))
      strings sep)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]