emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lispref/strings.texi,v


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/lispref/strings.texi,v
Date: Fri, 04 Aug 2006 10:42:15 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    06/08/04 10:42:15

Index: strings.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/lispref/strings.texi,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- strings.texi        18 Jul 2006 00:05:59 -0000      1.46
+++ strings.texi        4 Aug 2006 10:42:14 -0000       1.47
@@ -701,7 +701,6 @@
 
 The characters in @var{string}, other than the format specifications,
 are copied directly into the output; if they have text properties,
-these are copied into the output also.
 @end defun
 
 @cindex @samp{%} in format
@@ -719,6 +718,17 @@
 @end group
 @end example
 
+  Since @code{format} interprets @samp{%} characters as format
+specifications, you should @emph{never} pass an arbitrary string as
+the first argument.  This is particularly true when the string is
+generated by some Lisp code.  Unless the string is @emph{known} to
+never include any @samp{%} characters, pass @code{"%s"}, described
+below, as the first argument, and the string as the second, like this:
+
address@hidden
+  (format "%s" @var{arbitrary-string})
address@hidden example
+
   If @var{string} contains more than one format specification, the
 format specifications correspond to successive values from
 @var{objects}.  Thus, the first format specification in @var{string}




reply via email to

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