diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/strings.texi | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index dd004927caf..09c3bdf71f6 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -812,15 +812,19 @@ formatting feature described here; they differ from @code{format-message} only | |||
| 812 | in how they use the result of formatting. | 812 | in how they use the result of formatting. |
| 813 | 813 | ||
| 814 | @defun format string &rest objects | 814 | @defun format string &rest objects |
| 815 | This function returns a new string that is made by copying | 815 | This function returns a string equal to @var{string}, replacing any format |
| 816 | @var{string} and then replacing any format specification | 816 | specifications with encodings of the corresponding @var{objects}. The |
| 817 | in the copy with encodings of the corresponding @var{objects}. The | ||
| 818 | arguments @var{objects} are the computed values to be formatted. | 817 | arguments @var{objects} are the computed values to be formatted. |
| 819 | 818 | ||
| 820 | The characters in @var{string}, other than the format specifications, | 819 | The characters in @var{string}, other than the format specifications, |
| 821 | are copied directly into the output, including their text properties, | 820 | are copied directly into the output, including their text properties, |
| 822 | if any. Any text properties of the format specifications are copied | 821 | if any. Any text properties of the format specifications are copied |
| 823 | to the produced string representations of the argument @var{objects}. | 822 | to the produced string representations of the argument @var{objects}. |
| 823 | |||
| 824 | The output string need not be newly-allocated. For example, if | ||
| 825 | @code{x} is the string @code{"foo"}, the expressions @code{(eq x | ||
| 826 | (format x))} and @code{(eq x (format "%s" x))} might both yield | ||
| 827 | @code{t}. | ||
| 824 | @end defun | 828 | @end defun |
| 825 | 829 | ||
| 826 | @defun format-message string &rest objects | 830 | @defun format-message string &rest objects |