1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-01 11:14:55 +00:00

(split-string-and-unquote): Simplify regexp.

This commit is contained in:
Andreas Schwab 2008-10-20 17:29:29 +00:00
parent 713c75b00d
commit d551d20dda
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2008-10-20 Andreas Schwab <schwab@suse.de>
* subr.el (split-string-and-unquote): Simplify regexp.
2008-10-20 Eli Zaretskii <eliz@gnu.org>
* subr.el (top-level): Require `cl' when compiling.

View File

@ -2922,7 +2922,7 @@ It understands Emacs Lisp quoting within STRING, such that
(split-string-and-unquote (combine-and-quote-strings strs)) == strs
The SEPARATOR regexp defaults to \"\\s-+\"."
(let ((sep (or separator "\\s-+"))
(i (string-match "[\"]" string)))
(i (string-match "\"" string)))
(if (null i)
(split-string string sep t) ; no quoting: easy
(append (unless (eq i 0) (split-string (substring string 0 i) sep t))