diff options
| author | Paul Eggert | 2014-09-30 20:28:16 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-09-30 20:28:16 -0700 |
| commit | 27900ac72a8959291062eda9ef5eda9fc3f8595f (patch) | |
| tree | 780e22aa62de9c01e3faf00e5c123b1dfb87ddd3 /src/data.c | |
| parent | cebe0e68947ec46b44f5c3c9868814f8a5464173 (diff) | |
| download | emacs-27900ac72a8959291062eda9ef5eda9fc3f8595f.tar.gz emacs-27900ac72a8959291062eda9ef5eda9fc3f8595f.zip | |
Use AUTO_CONS instead of SCOPED_CONS, etc.
* doc/lispref/internals.texi (Stack-allocated Objects):
Adjust to match the revised, less error-prone macros.
* src/frame.h (AUTO_FRAME_ARG): Rename from FRAME_PARAMETER.
* src/lisp.h (AUTO_CONS): Rename from scoped_cons.
(AUTO_LIST1): Rename from scoped_list1.
(AUTO_LIST2): Rename from scoped_list2.
(AUTO_LIST3): Rename from scoped_list3.
(AUTO_LIST4): Rename from scoped_list4.
(AUTO_STRING): Rename from SCOPED_STRING.
* src/frame.h (AUTO_FRAME_ARG):
* src/lisp.h (AUTO_CONS, AUTO_LIST1, AUTO_LIST2, AUTO_LIST3)
(AUTO_LIST4, AUTO_STRING):
Prepend a new argument 'name'.
Declare a variable instead of yielding a value.
All uses changed.
* src/lisp.h (STACK_CONS, AUTO_CONS_EXPR): New internal macros.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 21 |
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) | |||
| 1006 | static void | 1007 | static void |
| 1007 | wrong_range (Lisp_Object min, Lisp_Object max, Lisp_Object wrong) | 1008 | wrong_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 |