aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorPaul Eggert2014-09-30 20:28:16 -0700
committerPaul Eggert2014-09-30 20:28:16 -0700
commit27900ac72a8959291062eda9ef5eda9fc3f8595f (patch)
tree780e22aa62de9c01e3faf00e5c123b1dfb87ddd3 /src/buffer.c
parentcebe0e68947ec46b44f5c3c9868814f8a5464173 (diff)
downloademacs-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/buffer.c')
-rw-r--r--src/buffer.c22
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). */)
1552 return notsogood; 1552 return notsogood;
1553 else 1553 else
1554 { 1554 {
1555 buf = Fget_buffer (SCOPED_STRING ("*scratch*")); 1555 AUTO_STRING (scratch, "*scratch*");
1556 buf = Fget_buffer (scratch);
1556 if (NILP (buf)) 1557 if (NILP (buf))
1557 { 1558 {
1558 buf = Fget_buffer_create (SCOPED_STRING ("*scratch*")); 1559 buf = Fget_buffer_create (scratch);
1559 Fset_buffer_major_mode (buf); 1560 Fset_buffer_major_mode (buf);
1560 } 1561 }
1561 return buf; 1562 return buf;
@@ -1575,10 +1576,11 @@ other_buffer_safely (Lisp_Object buffer)
1575 if (candidate_buffer (buf, buffer)) 1576 if (candidate_buffer (buf, buffer))
1576 return buf; 1577 return buf;
1577 1578
1578 buf = Fget_buffer (SCOPED_STRING ("*scratch*")); 1579 AUTO_STRING (scratch, "*scratch*");
1580 buf = Fget_buffer (scratch);
1579 if (NILP (buf)) 1581 if (NILP (buf))
1580 { 1582 {
1581 buf = Fget_buffer_create (SCOPED_STRING ("*scratch*")); 1583 buf = Fget_buffer_create (scratch);
1582 Fset_buffer_major_mode (buf); 1584 Fset_buffer_major_mode (buf);
1583 } 1585 }
1584 1586
@@ -5289,7 +5291,8 @@ init_buffer (int initialized)
5289 (void) initialized; 5291 (void) initialized;
5290#endif /* USE_MMAP_FOR_BUFFERS */ 5292#endif /* USE_MMAP_FOR_BUFFERS */
5291 5293
5292 Fset_buffer (Fget_buffer_create (SCOPED_STRING ("*scratch*"))); 5294 AUTO_STRING (scratch, "*scratch*");
5295 Fset_buffer (Fget_buffer_create (scratch));
5293 if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters))) 5296 if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))
5294 Fset_buffer_multibyte (Qnil); 5297 Fset_buffer_multibyte (Qnil);
5295 5298
@@ -5326,9 +5329,12 @@ init_buffer (int initialized)
5326 However, it is not necessary to turn / into /:/. 5329 However, it is not necessary to turn / into /:/.
5327 So avoid doing that. */ 5330 So avoid doing that. */
5328 && strcmp ("/", SSDATA (BVAR (current_buffer, directory)))) 5331 && strcmp ("/", SSDATA (BVAR (current_buffer, directory))))
5329 bset_directory 5332 {
5330 (current_buffer, 5333 AUTO_STRING (slash_colon, "/:");
5331 concat2 (SCOPED_STRING ("/:"), BVAR (current_buffer, directory))); 5334 bset_directory (current_buffer,
5335 concat2 (slash_colon,
5336 BVAR (current_buffer, directory)));
5337 }
5332 5338
5333 temp = get_minibuffer (0); 5339 temp = get_minibuffer (0);
5334 bset_directory (XBUFFER (temp), BVAR (current_buffer, directory)); 5340 bset_directory (XBUFFER (temp), BVAR (current_buffer, directory));