Mercurial > emacs
comparison src/buffer.c @ 85018:3389713480bb
(Fget_buffer_create, init_buffer_once): Use XSETPVECTYPE.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Tue, 02 Oct 2007 21:09:17 +0000 |
| parents | 1d35aa875508 |
| children | 5039706521c9 |
comparison
equal
deleted
inserted
replaced
| 85017:b0be1b2384d2 | 85018:3389713480bb |
|---|---|
| 427 b->mark = Fmake_marker (); | 427 b->mark = Fmake_marker (); |
| 428 BUF_MARKERS (b) = NULL; | 428 BUF_MARKERS (b) = NULL; |
| 429 b->name = name; | 429 b->name = name; |
| 430 | 430 |
| 431 /* Put this in the alist of all live buffers. */ | 431 /* Put this in the alist of all live buffers. */ |
| 432 XSETPVECTYPE (b, PVEC_BUFFER); | |
| 432 XSETBUFFER (buf, b); | 433 XSETBUFFER (buf, b); |
| 433 Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil)); | 434 Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil)); |
| 434 | 435 |
| 435 /* An error in calling the function here (should someone redefine it) | 436 /* An error in calling the function here (should someone redefine it) |
| 436 can lead to infinite regress until you run out of stack. rms | 437 can lead to infinite regress until you run out of stack. rms |
| 5034 /* Prevent GC from getting confused. */ | 5035 /* Prevent GC from getting confused. */ |
| 5035 buffer_defaults.text = &buffer_defaults.own_text; | 5036 buffer_defaults.text = &buffer_defaults.own_text; |
| 5036 buffer_local_symbols.text = &buffer_local_symbols.own_text; | 5037 buffer_local_symbols.text = &buffer_local_symbols.own_text; |
| 5037 BUF_INTERVALS (&buffer_defaults) = 0; | 5038 BUF_INTERVALS (&buffer_defaults) = 0; |
| 5038 BUF_INTERVALS (&buffer_local_symbols) = 0; | 5039 BUF_INTERVALS (&buffer_local_symbols) = 0; |
| 5040 XSETPVECTYPE (&buffer_defaults, PVEC_BUFFER); | |
| 5039 XSETBUFFER (Vbuffer_defaults, &buffer_defaults); | 5041 XSETBUFFER (Vbuffer_defaults, &buffer_defaults); |
| 5042 XSETPVECTYPE (&buffer_local_symbols, PVEC_BUFFER); | |
| 5040 XSETBUFFER (Vbuffer_local_symbols, &buffer_local_symbols); | 5043 XSETBUFFER (Vbuffer_local_symbols, &buffer_local_symbols); |
| 5041 | 5044 |
| 5042 /* Set up the default values of various buffer slots. */ | 5045 /* Set up the default values of various buffer slots. */ |
| 5043 /* Must do these before making the first buffer! */ | 5046 /* Must do these before making the first buffer! */ |
| 5044 | 5047 |
