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/keymap.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/keymap.c')
| -rw-r--r-- | src/keymap.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/keymap.c b/src/keymap.c index 368903db5e6..fa2d4e942b8 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1299,7 +1299,8 @@ define_as_prefix (Lisp_Object keymap, Lisp_Object c) | |||
| 1299 | static Lisp_Object | 1299 | static Lisp_Object |
| 1300 | append_key (Lisp_Object key_sequence, Lisp_Object key) | 1300 | append_key (Lisp_Object key_sequence, Lisp_Object key) |
| 1301 | { | 1301 | { |
| 1302 | return Fvconcat (2, ((Lisp_Object []) { key_sequence, scoped_list1 (key) })); | 1302 | AUTO_LIST1 (key_list, key); |
| 1303 | return Fvconcat (2, ((Lisp_Object []) { key_sequence, key_list })); | ||
| 1303 | } | 1304 | } |
| 1304 | 1305 | ||
| 1305 | /* Given a event type C which is a symbol, | 1306 | /* Given a event type C which is a symbol, |
| @@ -1338,7 +1339,8 @@ silly_event_symbol_error (Lisp_Object c) | |||
| 1338 | *p = 0; | 1339 | *p = 0; |
| 1339 | 1340 | ||
| 1340 | c = reorder_modifiers (c); | 1341 | c = reorder_modifiers (c); |
| 1341 | keystring = concat2 (SCOPED_STRING (new_mods), XCDR (assoc)); | 1342 | AUTO_STRING (new_modstring, new_mods); |
| 1343 | keystring = concat2 (new_modstring, XCDR (assoc)); | ||
| 1342 | 1344 | ||
| 1343 | error ("To bind the key %s, use [?%s], not [%s]", | 1345 | error ("To bind the key %s, use [?%s], not [%s]", |
| 1344 | SDATA (SYMBOL_NAME (c)), SDATA (keystring), | 1346 | SDATA (SYMBOL_NAME (c)), SDATA (keystring), |
| @@ -2242,9 +2244,12 @@ around function keys and event symbols. */) | |||
| 2242 | 2244 | ||
| 2243 | if (CONSP (key) && INTEGERP (XCAR (key)) && INTEGERP (XCDR (key))) | 2245 | if (CONSP (key) && INTEGERP (XCAR (key)) && INTEGERP (XCDR (key))) |
| 2244 | /* An interval from a map-char-table. */ | 2246 | /* An interval from a map-char-table. */ |
| 2245 | return concat3 (Fsingle_key_description (XCAR (key), no_angles), | 2247 | { |
| 2246 | SCOPED_STRING (".."), | 2248 | AUTO_STRING (dotdot, ".."); |
| 2247 | Fsingle_key_description (XCDR (key), no_angles)); | 2249 | return concat3 (Fsingle_key_description (XCAR (key), no_angles), |
| 2250 | dotdot, | ||
| 2251 | Fsingle_key_description (XCDR (key), no_angles)); | ||
| 2252 | } | ||
| 2248 | 2253 | ||
| 2249 | key = EVENT_HEAD (key); | 2254 | key = EVENT_HEAD (key); |
| 2250 | 2255 | ||
| @@ -3439,9 +3444,9 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args, | |||
| 3439 | /* Call Fkey_description first, to avoid GC bug for the other string. */ | 3444 | /* Call Fkey_description first, to avoid GC bug for the other string. */ |
| 3440 | if (!NILP (prefix) && XFASTINT (Flength (prefix)) > 0) | 3445 | if (!NILP (prefix) && XFASTINT (Flength (prefix)) > 0) |
| 3441 | { | 3446 | { |
| 3442 | Lisp_Object tem; | 3447 | Lisp_Object tem = Fkey_description (prefix, Qnil); |
| 3443 | tem = Fkey_description (prefix, Qnil); | 3448 | AUTO_STRING (space, " "); |
| 3444 | elt_prefix = concat2 (tem, SCOPED_STRING (" ")); | 3449 | elt_prefix = concat2 (tem, space); |
| 3445 | } | 3450 | } |
| 3446 | prefix = Qnil; | 3451 | prefix = Qnil; |
| 3447 | } | 3452 | } |