emacs-devel
[Top][All Lists]
Advanced

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

Re: (split-string-and-unquote (combine-and-quote-strings STRINGS)) fails


From: Chong Yidong
Subject: Re: (split-string-and-unquote (combine-and-quote-strings STRINGS)) fails on trivial case
Date: Mon, 07 Apr 2008 01:31:34 -0400

> The documentation strings for both split-string-and-unquote and
> combine-and-quote-strings state that they attempt to achieve this
> property:
>
>   (split-string-and-unquote (combine-and-quote-strings strs)) == strs
>
> Here is a trivial case that they fail on; the following sexp wrongly
> evaluates to nil:
>
>   (let ((l '("a b" "c")))
>     (equal l
>            (split-string-and-unquote (combine-and-quote-strings l))))

I think this is a docstring mistake.  IIUC, the equation

 (split-string-and-unquote (combine-and-quote-strings strs)) == strs

only holds if STRS is a list containing a single string.  The point the
docstrings are trying to make is that combine-and-quote-strings performs
string quoting, while split-string-and-unquote performs unquoting.

If there are no objections to this interpretation, I'll check in a doc
fix shortly.




reply via email to

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