aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 1dbae8f5d4b..29af25aab4f 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3900,8 +3900,10 @@ where field is [0-9]+ followed by a literal dollar "$", flags is
3900[+ #-0]+, width is [0-9]+, and precision is a literal period "." 3900[+ #-0]+, width is [0-9]+, and precision is a literal period "."
3901followed by [0-9]+. 3901followed by [0-9]+.
3902 3902
3903If field is given, it must be a one-based argument number; the given 3903If a %-sequence is numbered with a field with positive value N, the
3904argument is substituted instead of the next one. 3904Nth argument is substituted instead of the next one. A format can
3905contain either numbered or unnumbered %-sequences but not both, except
3906that %% can be mixed with numbered %-sequences.
3905 3907
3906The + flag character inserts a + before any positive number, while a 3908The + flag character inserts a + before any positive number, while a
3907space inserts a space before any positive number; these flags only 3909space inserts a space before any positive number; these flags only
@@ -4081,8 +4083,6 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4081 num = str2num (format, &num_end); 4083 num = str2num (format, &num_end);
4082 if (*num_end == '$') 4084 if (*num_end == '$')
4083 { 4085 {
4084 if (num == 0)
4085 error ("Invalid format field number 0");
4086 n = num - 1; 4086 n = num - 1;
4087 format = num_end + 1; 4087 format = num_end + 1;
4088 } 4088 }