aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/data.c b/src/data.c
index 414da4cf6f7..b71d88506d0 100644
--- a/src/data.c
+++ b/src/data.c
@@ -979,18 +979,20 @@ 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");
983 Lisp_Object or = SCOPED_STRING (" or ");
984 Lisp_Object comma = SCOPED_STRING (", ");
982 985
983 USE_SAFE_ALLOCA; 986 USE_SAFE_ALLOCA;
984 SAFE_ALLOCA_LISP (args, len * 2 + 1); 987 SAFE_ALLOCA_LISP (args, len * 2 + 1);
985 988
986 args[i++] = build_local_string ("One of "); 989 args[i++] = SCOPED_STRING ("One of ");
987 990
988 for (obj = choice; !NILP (obj); obj = XCDR (obj)) 991 for (obj = choice; !NILP (obj); obj = XCDR (obj))
989 { 992 {
990 args[i++] = SYMBOL_NAME (XCAR (obj)); 993 args[i++] = SYMBOL_NAME (XCAR (obj));
991 args[i++] = build_local_string 994 args[i++] = (NILP (XCDR (obj)) ? should_be_specified
992 (NILP (XCDR (obj)) ? " should be specified" 995 : NILP (XCDR (XCDR (obj))) ? or : comma);
993 : (NILP (XCDR (XCDR (obj))) ? " or " : ", "));
994 } 996 }
995 997
996 obj = Fconcat (i, args); 998 obj = Fconcat (i, args);
@@ -1005,9 +1007,9 @@ static void
1005wrong_range (Lisp_Object min, Lisp_Object max, Lisp_Object wrong) 1007wrong_range (Lisp_Object min, Lisp_Object max, Lisp_Object wrong)
1006{ 1008{
1007 xsignal2 (Qerror, Fconcat (4, ((Lisp_Object []) 1009 xsignal2 (Qerror, Fconcat (4, ((Lisp_Object [])
1008 { build_local_string ("Value should be from "), 1010 { SCOPED_STRING ("Value should be from "),
1009 Fnumber_to_string (min), 1011 Fnumber_to_string (min),
1010 build_local_string (" to "), 1012 SCOPED_STRING (" to "),
1011 Fnumber_to_string (max) })), wrong); 1013 Fnumber_to_string (max) })), wrong);
1012} 1014}
1013 1015