diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2014-09-30 20:28:16 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2014-09-30 20:28:16 -0700 |
| commit | 27900ac72a8959291062eda9ef5eda9fc3f8595f (patch) | |
| tree | 780e22aa62de9c01e3faf00e5c123b1dfb87ddd3 /src/buffer.c | |
| parent | cebe0e68947ec46b44f5c3c9868814f8a5464173 (diff) | |
| download | emacs-27900ac72a8959291062eda9ef5eda9fc3f8595f.tar.gz | |
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/buffer.c')
| -rw-r--r-- | src/buffer.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/buffer.c b/src/buffer.c index 9d376346a0a..b46993a3cdb 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1552,10 +1552,11 @@ exists, return the buffer `*scratch*' (creating it if necessary). */) return notsogood; else { - buf = Fget_buffer (SCOPED_STRING ("*scratch*")); + AUTO_STRING (scratch, "*scratch*"); + buf = Fget_buffer (scratch); if (NILP (buf)) { - buf = Fget_buffer_create (SCOPED_STRING ("*scratch*")); + buf = Fget_buffer_create (scratch); Fset_buffer_major_mode (buf); } return buf; @@ -1575,10 +1576,11 @@ other_buffer_safely (Lisp_Object buffer) if (candidate_buffer (buf, buffer)) return buf; - buf = Fget_buffer (SCOPED_STRING ("*scratch*")); + AUTO_STRING (scratch, "*scratch*"); + buf = Fget_buffer (scratch); if (NILP (buf)) { - buf = Fget_buffer_create (SCOPED_STRING ("*scratch*")); + buf = Fget_buffer_create (scratch); Fset_buffer_major_mode (buf); } @@ -5289,7 +5291,8 @@ init_buffer (int initialized) (void) initialized; #endif /* USE_MMAP_FOR_BUFFERS */ - Fset_buffer (Fget_buffer_create (SCOPED_STRING ("*scratch*"))); + AUTO_STRING (scratch, "*scratch*"); + Fset_buffer (Fget_buffer_create (scratch)); if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters))) Fset_buffer_multibyte (Qnil); @@ -5326,9 +5329,12 @@ init_buffer (int initialized) However, it is not necessary to turn / into /:/. So avoid doing that. */ && strcmp ("/", SSDATA (BVAR (current_buffer, directory)))) - bset_directory - (current_buffer, - concat2 (SCOPED_STRING ("/:"), BVAR (current_buffer, directory))); + { + AUTO_STRING (slash_colon, "/:"); + bset_directory (current_buffer, + concat2 (slash_colon, + BVAR (current_buffer, directory))); + } temp = get_minibuffer (0); bset_directory (XBUFFER (temp), BVAR (current_buffer, directory)); |
