From fd6f900c21e90d5dd6661e7b29f5ffe2c049400c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 20 Oct 2008 19:54:28 +0000 Subject: [PATCH] (Creating Strings): Add xrefs to `split-string-and-unquote' and `combine-and-quote-strings'. --- doc/lispref/ChangeLog | 7 +++++++ doc/lispref/strings.texi | 8 +++++++- etc/NEWS | 11 +++++++++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index ade2722c77a..4effa167368 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,10 @@ +2008-10-20 Eli Zaretskii + + * processes.texi (Shell Arguments): Document `split-string-and-unquote' + and `combine-and-quote-strings'. + + * strings.texi (Creating Strings): Add xrefs for them. + 2008-10-19 Eli Zaretskii * elisp.texi (Top): Make descriptive text for "Reading File Names" diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 37c19fc4f3e..1b57e665388 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -272,7 +272,9 @@ printed form is with @code{format} (@pxref{Formatting Strings}) or For information about other concatenation functions, see the description of @code{mapconcat} in @ref{Mapping Functions}, @code{vconcat} in @ref{Vector Functions}, and @code{append} in @ref{Building -Lists}. +Lists}. For concatenating individual command-line arguments into a +string to be used as a shell command, see @ref{Shell Arguments, +combine-and-quote-strings}. @end defun @defun split-string string &optional separators omit-nulls @@ -357,6 +359,10 @@ practice: (split-string "ooo" "\\|o+" t) @result{} ("o" "o" "o") @end example + +If you need to split a string that is a shell command, where +individual arguments could be quoted, see @ref{Shell Arguments, +split-string-and-unquote}. @end defun @defvar split-string-default-separators diff --git a/etc/NEWS b/etc/NEWS index e811f99bc66..9d088e94b6a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1599,9 +1599,16 @@ attributes of a given face. *** `window-full-width-p' returns t if a window is as wide as its frame. -*** `split-string-and-unquote' does (what?) ++++ +*** `split-string-and-unquote' splits a string into a list of substrings +on the boundaries of a given delimiter, and unquotes the substrings that +are quoted. Useful for taking apart shell commands. -*** `combine-and-quote-strings' does (what?) ++++ +*** `combine-and-quote-strings' produces a single string from a list of strings +sticking a separator string in between each pair, and quoting those +strings that include the separator as their substring. Useful for +consing shell command lines from the individual arguments. *** `image-refresh' refreshes all images associated with a given image specification. -- 2.39.5