aboutsummaryrefslogtreecommitdiffstats
path: root/lispref/strings.texi
diff options
context:
space:
mode:
authorMiles Bader2006-08-16 14:08:49 +0000
committerMiles Bader2006-08-16 14:08:49 +0000
commitde20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65 (patch)
tree80243ce02b52cbf7945c614bd213dd63142b861a /lispref/strings.texi
parent7a5c2a42040b12b037940a067aee6ac6fde01680 (diff)
parent5ebdc2990a95cc38b21f772eea4de3ceee149e54 (diff)
downloademacs-de20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65.tar.gz
emacs-de20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 382-398) - Update from CVS - Update from erc--emacs--22 - Fix ERC bug introduced in last patch - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 123-125) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-101
Diffstat (limited to 'lispref/strings.texi')
-rw-r--r--lispref/strings.texi15
1 files changed, 13 insertions, 2 deletions
diff --git a/lispref/strings.texi b/lispref/strings.texi
index 46c01982f32..17a62b546b4 100644
--- a/lispref/strings.texi
+++ b/lispref/strings.texi
@@ -700,8 +700,8 @@ in the copy with encodings of the corresponding @var{objects}. The
700arguments @var{objects} are the computed values to be formatted. 700arguments @var{objects} are the computed values to be formatted.
701 701
702The characters in @var{string}, other than the format specifications, 702The characters in @var{string}, other than the format specifications,
703are copied directly into the output; if they have text properties, 703are copied directly into the output, including their text properties,
704these are copied into the output also. 704if any.
705@end defun 705@end defun
706 706
707@cindex @samp{%} in format 707@cindex @samp{%} in format
@@ -719,6 +719,17 @@ For example:
719@end group 719@end group
720@end example 720@end example
721 721
722 Since @code{format} interprets @samp{%} characters as format
723specifications, you should @emph{never} pass an arbitrary string as
724the first argument. This is particularly true when the string is
725generated by some Lisp code. Unless the string is @emph{known} to
726never include any @samp{%} characters, pass @code{"%s"}, described
727below, as the first argument, and the string as the second, like this:
728
729@example
730 (format "%s" @var{arbitrary-string})
731@end example
732
722 If @var{string} contains more than one format specification, the 733 If @var{string} contains more than one format specification, the
723format specifications correspond to successive values from 734format specifications correspond to successive values from
724@var{objects}. Thus, the first format specification in @var{string} 735@var{objects}. Thus, the first format specification in @var{string}