aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/data.c b/src/data.c
index b71d88506d0..9977a3aaadd 100644
--- a/src/data.c
+++ b/src/data.c
@@ -979,14 +979,15 @@ wrong_choice (Lisp_Object choice, Lisp_Object wrong)
979{ 979{
980 ptrdiff_t i = 0, len = XINT (Flength (choice)); 980 ptrdiff_t i = 0, len = XINT (Flength (choice));
981 Lisp_Object obj, *args; 981 Lisp_Object obj, *args;
982 Lisp_Object should_be_specified = SCOPED_STRING (" should be specified"); 982 AUTO_STRING (one_of, "One of ");
983 Lisp_Object or = SCOPED_STRING (" or "); 983 AUTO_STRING (comma, ", ");
984 Lisp_Object comma = SCOPED_STRING (", "); 984 AUTO_STRING (or, " or ");
985 AUTO_STRING (should_be_specified, " should be specified");
985 986
986 USE_SAFE_ALLOCA; 987 USE_SAFE_ALLOCA;
987 SAFE_ALLOCA_LISP (args, len * 2 + 1); 988 SAFE_ALLOCA_LISP (args, len * 2 + 1);
988 989
989 args[i++] = SCOPED_STRING ("One of "); 990 args[i++] = one_of;
990 991
991 for (obj = choice; !NILP (obj); obj = XCDR (obj)) 992 for (obj = choice; !NILP (obj); obj = XCDR (obj))
992 { 993 {
@@ -1006,11 +1007,13 @@ wrong_choice (Lisp_Object choice, Lisp_Object wrong)
1006static void 1007static void
1007wrong_range (Lisp_Object min, Lisp_Object max, Lisp_Object wrong) 1008wrong_range (Lisp_Object min, Lisp_Object max, Lisp_Object wrong)
1008{ 1009{
1009 xsignal2 (Qerror, Fconcat (4, ((Lisp_Object []) 1010 AUTO_STRING (value_should_be_from, "Value should be from ");
1010 { SCOPED_STRING ("Value should be from "), 1011 AUTO_STRING (to, " to ");
1011 Fnumber_to_string (min), 1012 xsignal2 (Qerror,
1012 SCOPED_STRING (" to "), 1013 Fconcat (4, ((Lisp_Object [])
1013 Fnumber_to_string (max) })), wrong); 1014 {value_should_be_from, Fnumber_to_string (min),
1015 to, Fnumber_to_string (max)})),
1016 wrong);
1014} 1017}
1015 1018
1016/* Store NEWVAL into SYMBOL, where VALCONTENTS is found in the value cell 1019/* Store NEWVAL into SYMBOL, where VALCONTENTS is found in the value cell