464 |
OVERLAY_START (overlay) = start; |
OVERLAY_START (overlay) = start; |
465 |
OVERLAY_END (overlay) = end; |
OVERLAY_END (overlay) = end; |
466 |
OVERLAY_PLIST (overlay) = Fcopy_sequence (OVERLAY_PLIST (old_overlay)); |
OVERLAY_PLIST (overlay) = Fcopy_sequence (OVERLAY_PLIST (old_overlay)); |
467 |
|
|
468 |
result = Fcons (overlay, result); |
result = Fcons (overlay, result); |
469 |
} |
} |
470 |
|
|
471 |
return Fnreverse (result); |
return Fnreverse (result); |
472 |
} |
} |
473 |
|
|
474 |
|
|
475 |
/* Clone per-buffer values of buffer FROM. |
/* Clone per-buffer values of buffer FROM. |
476 |
|
|
487 |
int offset; |
int offset; |
488 |
|
|
489 |
XSETBUFFER (to_buffer, to); |
XSETBUFFER (to_buffer, to); |
490 |
|
|
491 |
for (offset = PER_BUFFER_VAR_OFFSET (name) + sizeof (Lisp_Object); |
for (offset = PER_BUFFER_VAR_OFFSET (name) + sizeof (Lisp_Object); |
492 |
offset < sizeof *to; |
offset < sizeof *to; |
493 |
offset += sizeof (Lisp_Object)) |
offset += sizeof (Lisp_Object)) |
507 |
} |
} |
508 |
|
|
509 |
bcopy (from->local_flags, to->local_flags, sizeof to->local_flags); |
bcopy (from->local_flags, to->local_flags, sizeof to->local_flags); |
510 |
|
|
511 |
to->overlays_before = copy_overlays (to, from->overlays_before); |
to->overlays_before = copy_overlays (to, from->overlays_before); |
512 |
to->overlays_after = copy_overlays (to, from->overlays_after); |
to->overlays_after = copy_overlays (to, from->overlays_after); |
513 |
} |
} |
816 |
} |
} |
817 |
|
|
818 |
DEFUN ("buffer-local-value", Fbuffer_local_value, |
DEFUN ("buffer-local-value", Fbuffer_local_value, |
819 |
Sbuffer_local_value, 2, 2, 0, |
Sbuffer_local_value, 2, 2, 0, |
820 |
doc: /* Return the value of VARIABLE in BUFFER. |
doc: /* Return the value of VARIABLE in BUFFER. |
821 |
If VARIABLE does not have a buffer-local binding in BUFFER, the value |
If VARIABLE does not have a buffer-local binding in BUFFER, the value |
822 |
is the default binding of variable. */) |
is the default binding of variable. */) |
833 |
|
|
834 |
/* Look in local_var_list */ |
/* Look in local_var_list */ |
835 |
result = Fassoc (symbol, buf->local_var_alist); |
result = Fassoc (symbol, buf->local_var_alist); |
836 |
if (NILP (result)) |
if (NILP (result)) |
837 |
{ |
{ |
838 |
int offset, idx; |
int offset, idx; |
839 |
int found = 0; |
int found = 0; |
846 |
{ |
{ |
847 |
idx = PER_BUFFER_IDX (offset); |
idx = PER_BUFFER_IDX (offset); |
848 |
if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx)) |
if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx)) |
849 |
&& SYMBOLP (PER_BUFFER_SYMBOL (offset)) |
&& SYMBOLP (PER_BUFFER_SYMBOL (offset)) |
850 |
&& EQ (PER_BUFFER_SYMBOL (offset), symbol)) |
&& EQ (PER_BUFFER_SYMBOL (offset), symbol)) |
851 |
{ |
{ |
852 |
result = PER_BUFFER_VALUE (buf, offset); |
result = PER_BUFFER_VALUE (buf, offset); |
853 |
found = 1; |
found = 1; |
1005 |
#endif /* CLASH_DETECTION */ |
#endif /* CLASH_DETECTION */ |
1006 |
|
|
1007 |
SAVE_MODIFF = NILP (flag) ? MODIFF : 0; |
SAVE_MODIFF = NILP (flag) ? MODIFF : 0; |
1008 |
|
|
1009 |
/* Set update_mode_lines only if buffer is displayed in some window. |
/* Set update_mode_lines only if buffer is displayed in some window. |
1010 |
Packages like jit-lock or lazy-lock preserve a buffer's modified |
Packages like jit-lock or lazy-lock preserve a buffer's modified |
1011 |
state by recording/restoring the state around blocks of code. |
state by recording/restoring the state around blocks of code. |
1024 |
++update_mode_lines; |
++update_mode_lines; |
1025 |
current_buffer->prevent_redisplay_optimizations_p = 1; |
current_buffer->prevent_redisplay_optimizations_p = 1; |
1026 |
} |
} |
1027 |
|
|
1028 |
return flag; |
return flag; |
1029 |
} |
} |
1030 |
|
|
1038 |
{ |
{ |
1039 |
#ifdef CLASH_DETECTION |
#ifdef CLASH_DETECTION |
1040 |
Lisp_Object fn; |
Lisp_Object fn; |
1041 |
|
|
1042 |
/* If buffer becoming modified, lock the file. |
/* If buffer becoming modified, lock the file. |
1043 |
If buffer becoming unmodified, unlock the file. */ |
If buffer becoming unmodified, unlock the file. */ |
1044 |
|
|
1053 |
unlock_file (fn); |
unlock_file (fn); |
1054 |
} |
} |
1055 |
#endif /* CLASH_DETECTION */ |
#endif /* CLASH_DETECTION */ |
1056 |
|
|
1057 |
SAVE_MODIFF = NILP (flag) ? MODIFF : 0; |
SAVE_MODIFF = NILP (flag) ? MODIFF : 0; |
1058 |
return flag; |
return flag; |
1059 |
} |
} |
1152 |
|
|
1153 |
/* Consider buffers that have been seen in the selected frame |
/* Consider buffers that have been seen in the selected frame |
1154 |
before other buffers. */ |
before other buffers. */ |
1155 |
|
|
1156 |
tem = frame_buffer_list (frame); |
tem = frame_buffer_list (frame); |
1157 |
add_ons = Qnil; |
add_ons = Qnil; |
1158 |
while (CONSP (tem)) |
while (CONSP (tem)) |
1354 |
|
|
1355 |
UNGCPRO; |
UNGCPRO; |
1356 |
} |
} |
1357 |
|
|
1358 |
/* Make this buffer not be current. |
/* Make this buffer not be current. |
1359 |
In the process, notice if this is the sole visible buffer |
In the process, notice if this is the sole visible buffer |
1360 |
and give up if so. */ |
and give up if so. */ |
1495 |
Vbuffer_alist = XCDR (Vbuffer_alist); |
Vbuffer_alist = XCDR (Vbuffer_alist); |
1496 |
else |
else |
1497 |
XSETCDR (prev, XCDR (XCDR (prev))); |
XSETCDR (prev, XCDR (XCDR (prev))); |
1498 |
|
|
1499 |
XSETCDR (link, Vbuffer_alist); |
XSETCDR (link, Vbuffer_alist); |
1500 |
Vbuffer_alist = link; |
Vbuffer_alist = link; |
1501 |
|
|
1519 |
XCDR (frame_buffer_list (frame))); |
XCDR (frame_buffer_list (frame))); |
1520 |
else |
else |
1521 |
XSETCDR (prev, XCDR (XCDR (prev))); |
XSETCDR (prev, XCDR (XCDR (prev))); |
1522 |
|
|
1523 |
XSETCDR (link, frame_buffer_list (frame)); |
XSETCDR (link, frame_buffer_list (frame)); |
1524 |
set_frame_buffer_list (frame, link); |
set_frame_buffer_list (frame, link); |
1525 |
} |
} |
1549 |
&& NILP (Fget (current_buffer->major_mode, Qmode_class))) |
&& NILP (Fget (current_buffer->major_mode, Qmode_class))) |
1550 |
function = current_buffer->major_mode; |
function = current_buffer->major_mode; |
1551 |
} |
} |
1552 |
|
|
1553 |
if (NILP (function) || EQ (function, Qfundamental_mode)) |
if (NILP (function) || EQ (function, Qfundamental_mode)) |
1554 |
return Qnil; |
return Qnil; |
1555 |
|
|
1709 |
if (b->text->beg == NULL) |
if (b->text->beg == NULL) |
1710 |
enlarge_buffer_text (b, 0); |
enlarge_buffer_text (b, 0); |
1711 |
#endif /* USE_MMAP_FOR_BUFFERS */ |
#endif /* USE_MMAP_FOR_BUFFERS */ |
1712 |
|
|
1713 |
if (current_buffer == b) |
if (current_buffer == b) |
1714 |
return; |
return; |
1715 |
|
|
1937 |
else |
else |
1938 |
{ |
{ |
1939 |
Lisp_Object buf1; |
Lisp_Object buf1; |
1940 |
|
|
1941 |
buf1 = Fget_buffer (buffer); |
buf1 = Fget_buffer (buffer); |
1942 |
if (NILP (buf1)) |
if (NILP (buf1)) |
1943 |
nsberror (buffer); |
nsberror (buffer); |
2175 |
p = GAP_END_ADDR; |
p = GAP_END_ADDR; |
2176 |
stop = Z; |
stop = Z; |
2177 |
} |
} |
2178 |
|
|
2179 |
if (UNIBYTE_STR_AS_MULTIBYTE_P (p, stop - pos, bytes)) |
if (UNIBYTE_STR_AS_MULTIBYTE_P (p, stop - pos, bytes)) |
2180 |
p += bytes, pos += bytes; |
p += bytes, pos += bytes; |
2181 |
else |
else |
2328 |
|
|
2329 |
/* Any which are supposed to be permanent, |
/* Any which are supposed to be permanent, |
2330 |
make local again, with the same values they had. */ |
make local again, with the same values they had. */ |
2331 |
|
|
2332 |
for (alist = oalist; !NILP (alist); alist = XCDR (alist)) |
for (alist = oalist; !NILP (alist); alist = XCDR (alist)) |
2333 |
{ |
{ |
2334 |
sym = XCAR (XCAR (alist)); |
sym = XCAR (XCAR (alist)); |
2390 |
} |
} |
2391 |
|
|
2392 |
/* Find all the overlays in the current buffer that contain position POS. |
/* Find all the overlays in the current buffer that contain position POS. |
2393 |
Return the number found, and store them in a vector in *VEC_PTR. |
Return the number found, and store them in a vector in *VEC_PTR. |
2394 |
Store in *LEN_PTR the size allocated for the vector. |
Store in *LEN_PTR the size allocated for the vector. |
2395 |
Store in *NEXT_PTR the next position after POS where an overlay starts, |
Store in *NEXT_PTR the next position after POS where an overlay starts, |
2396 |
or ZV if there are no more overlays. |
or ZV if there are no more overlays. |
2542 |
/* Find all the overlays in the current buffer that overlap the range BEG-END |
/* Find all the overlays in the current buffer that overlap the range BEG-END |
2543 |
or are empty at BEG. |
or are empty at BEG. |
2544 |
|
|
2545 |
Return the number found, and store them in a vector in *VEC_PTR. |
Return the number found, and store them in a vector in *VEC_PTR. |
2546 |
Store in *LEN_PTR the size allocated for the vector. |
Store in *LEN_PTR the size allocated for the vector. |
2547 |
Store in *NEXT_PTR the next position after POS where an overlay starts, |
Store in *NEXT_PTR the next position after POS where an overlay starts, |
2548 |
or ZV if there are no more overlays. |
or ZV if there are no more overlays. |
2691 |
int end = OVERLAY_POSITION (OVERLAY_END (overlay)); |
int end = OVERLAY_POSITION (OVERLAY_END (overlay)); |
2692 |
int n, i, size; |
int n, i, size; |
2693 |
Lisp_Object *v, tem; |
Lisp_Object *v, tem; |
2694 |
|
|
2695 |
size = 10; |
size = 10; |
2696 |
v = (Lisp_Object *) alloca (size * sizeof *v); |
v = (Lisp_Object *) alloca (size * sizeof *v); |
2697 |
n = overlays_in (start, end, 0, &v, &size, NULL, NULL); |
n = overlays_in (start, end, 0, &v, &size, NULL, NULL); |
3545 |
XOVERLAY (overlay)->end = end; |
XOVERLAY (overlay)->end = end; |
3546 |
XOVERLAY (overlay)->plist = Qnil; |
XOVERLAY (overlay)->plist = Qnil; |
3547 |
|
|
3548 |
/* Put the new overlay on the wrong list. */ |
/* Put the new overlay on the wrong list. */ |
3549 |
end = OVERLAY_END (overlay); |
end = OVERLAY_END (overlay); |
3550 |
if (OVERLAY_POSITION (end) < XINT (b->overlay_center)) |
if (OVERLAY_POSITION (end) < XINT (b->overlay_center)) |
3551 |
b->overlays_after = Fcons (overlay, b->overlays_after); |
b->overlays_after = Fcons (overlay, b->overlays_after); |
3576 |
} |
} |
3577 |
|
|
3578 |
BUF_COMPUTE_UNCHANGED (buf, start, end); |
BUF_COMPUTE_UNCHANGED (buf, start, end); |
3579 |
|
|
3580 |
/* If this is a buffer not in the selected window, |
/* If this is a buffer not in the selected window, |
3581 |
we must do other windows. */ |
we must do other windows. */ |
3582 |
if (buf != XBUFFER (XWINDOW (selected_window)->buffer)) |
if (buf != XBUFFER (XWINDOW (selected_window)->buffer)) |
3682 |
Fset_marker (OVERLAY_START (overlay), beg, buffer); |
Fset_marker (OVERLAY_START (overlay), beg, buffer); |
3683 |
Fset_marker (OVERLAY_END (overlay), end, buffer); |
Fset_marker (OVERLAY_END (overlay), end, buffer); |
3684 |
|
|
3685 |
/* Put the overlay on the wrong list. */ |
/* Put the overlay on the wrong list. */ |
3686 |
end = OVERLAY_END (overlay); |
end = OVERLAY_END (overlay); |
3687 |
if (OVERLAY_POSITION (end) < XINT (b->overlay_center)) |
if (OVERLAY_POSITION (end) < XINT (b->overlay_center)) |
3688 |
b->overlays_after = Fcons (overlay, b->overlays_after); |
b->overlays_after = Fcons (overlay, b->overlays_after); |
3712 |
|
|
3713 |
b = XBUFFER (buffer); |
b = XBUFFER (buffer); |
3714 |
specbind (Qinhibit_quit, Qt); |
specbind (Qinhibit_quit, Qt); |
3715 |
|
|
3716 |
b->overlays_before = Fdelq (overlay, b->overlays_before); |
b->overlays_before = Fdelq (overlay, b->overlays_before); |
3717 |
b->overlays_after = Fdelq (overlay, b->overlays_after); |
b->overlays_after = Fdelq (overlay, b->overlays_after); |
3718 |
modify_overlay (b, |
modify_overlay (b, |
4276 |
{ |
{ |
4277 |
Lisp_Object sym; |
Lisp_Object sym; |
4278 |
char *type_name; |
char *type_name; |
4279 |
|
|
4280 |
switch (XINT (PER_BUFFER_TYPE (offset))) |
switch (XINT (PER_BUFFER_TYPE (offset))) |
4281 |
{ |
{ |
4282 |
case Lisp_Int: |
case Lisp_Int: |
4283 |
type_name = "integers"; |
type_name = "integers"; |
4284 |
break; |
break; |
4285 |
|
|
4286 |
case Lisp_String: |
case Lisp_String: |
4287 |
type_name = "strings"; |
type_name = "strings"; |
4288 |
break; |
break; |
4289 |
|
|
4290 |
case Lisp_Symbol: |
case Lisp_Symbol: |
4291 |
type_name = "symbols"; |
type_name = "symbols"; |
4292 |
break; |
break; |
4293 |
|
|
4294 |
default: |
default: |
4295 |
abort (); |
abort (); |
4296 |
} |
} |
4353 |
{ |
{ |
4354 |
/* User-specified size. */ |
/* User-specified size. */ |
4355 |
size_t nbytes_specified; |
size_t nbytes_specified; |
4356 |
|
|
4357 |
/* Number of bytes mapped */ |
/* Number of bytes mapped */ |
4358 |
size_t nbytes_mapped; |
size_t nbytes_mapped; |
4359 |
|
|
4444 |
{ |
{ |
4445 |
struct mmap_region *r; |
struct mmap_region *r; |
4446 |
char *s = (char *) start, *e = (char *) end; |
char *s = (char *) start, *e = (char *) end; |
4447 |
|
|
4448 |
for (r = mmap_regions; r; r = r->next) |
for (r = mmap_regions; r; r = r->next) |
4449 |
{ |
{ |
4450 |
char *rstart = (char *) r; |
char *rstart = (char *) r; |
4478 |
r->prev->next = r->next; |
r->prev->next = r->next; |
4479 |
else |
else |
4480 |
mmap_regions = r->next; |
mmap_regions = r->next; |
4481 |
|
|
4482 |
if (munmap ((POINTER_TYPE *) r, r->nbytes_mapped) == -1) |
if (munmap ((POINTER_TYPE *) r, r->nbytes_mapped) == -1) |
4483 |
{ |
{ |
4484 |
fprintf (stderr, "munmap: %s\n", emacs_strerror (errno)); |
fprintf (stderr, "munmap: %s\n", emacs_strerror (errno)); |
4516 |
else if (npages > 0) |
else if (npages > 0) |
4517 |
{ |
{ |
4518 |
nbytes = npages * mmap_page_size; |
nbytes = npages * mmap_page_size; |
4519 |
|
|
4520 |
/* Try to map additional pages at the end of the region. We |
/* Try to map additional pages at the end of the region. We |
4521 |
cannot do this if the address range is already occupied by |
cannot do this if the address range is already occupied by |
4522 |
something else because mmap deletes any previous mapping. |
something else because mmap deletes any previous mapping. |
4524 |
if (!MMAP_ALLOCATED_P (region_end, region_end + nbytes)) |
if (!MMAP_ALLOCATED_P (region_end, region_end + nbytes)) |
4525 |
{ |
{ |
4526 |
POINTER_TYPE *p; |
POINTER_TYPE *p; |
4527 |
|
|
4528 |
p = mmap (region_end, nbytes, PROT_READ | PROT_WRITE, |
p = mmap (region_end, nbytes, PROT_READ | PROT_WRITE, |
4529 |
MAP_ANON | MAP_PRIVATE | MAP_FIXED, mmap_fd, 0); |
MAP_ANON | MAP_PRIVATE | MAP_FIXED, mmap_fd, 0); |
4530 |
if (p == MAP_FAILED) |
if (p == MAP_FAILED) |
4605 |
map = ROUND (nbytes + MMAP_REGION_STRUCT_SIZE, mmap_page_size); |
map = ROUND (nbytes + MMAP_REGION_STRUCT_SIZE, mmap_page_size); |
4606 |
p = mmap (NULL, map, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, |
p = mmap (NULL, map, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, |
4607 |
mmap_fd, 0); |
mmap_fd, 0); |
4608 |
|
|
4609 |
if (p == MAP_FAILED) |
if (p == MAP_FAILED) |
4610 |
{ |
{ |
4611 |
if (errno != ENOMEM) |
if (errno != ENOMEM) |
4615 |
else |
else |
4616 |
{ |
{ |
4617 |
struct mmap_region *r = (struct mmap_region *) p; |
struct mmap_region *r = (struct mmap_region *) p; |
4618 |
|
|
4619 |
r->nbytes_specified = nbytes; |
r->nbytes_specified = nbytes; |
4620 |
r->nbytes_mapped = map; |
r->nbytes_mapped = map; |
4621 |
r->var = var; |
r->var = var; |
4624 |
if (r->next) |
if (r->next) |
4625 |
r->next->prev = r; |
r->next->prev = r; |
4626 |
mmap_regions = r; |
mmap_regions = r; |
4627 |
|
|
4628 |
p = MMAP_USER_AREA (p); |
p = MMAP_USER_AREA (p); |
4629 |
} |
} |
4630 |
|
|
4631 |
return *var = p; |
return *var = p; |
4632 |
} |
} |
4633 |
|
|
4643 |
size_t nbytes; |
size_t nbytes; |
4644 |
{ |
{ |
4645 |
POINTER_TYPE *result; |
POINTER_TYPE *result; |
4646 |
|
|
4647 |
mmap_init (); |
mmap_init (); |
4648 |
|
|
4649 |
if (*var == NULL) |
if (*var == NULL) |
4650 |
result = mmap_alloc (var, nbytes); |
result = mmap_alloc (var, nbytes); |
4651 |
else if (nbytes == 0) |
else if (nbytes == 0) |
4652 |
{ |
{ |
4653 |
mmap_free (var); |
mmap_free (var); |
4654 |
result = mmap_alloc (var, nbytes); |
result = mmap_alloc (var, nbytes); |
4657 |
{ |
{ |
4658 |
struct mmap_region *r = MMAP_REGION (*var); |
struct mmap_region *r = MMAP_REGION (*var); |
4659 |
size_t room = r->nbytes_mapped - MMAP_REGION_STRUCT_SIZE; |
size_t room = r->nbytes_mapped - MMAP_REGION_STRUCT_SIZE; |
4660 |
|
|
4661 |
if (room < nbytes) |
if (room < nbytes) |
4662 |
{ |
{ |
4663 |
/* Must enlarge. */ |
/* Must enlarge. */ |
4718 |
POINTER_TYPE **var; |
POINTER_TYPE **var; |
4719 |
{ |
{ |
4720 |
mmap_init (); |
mmap_init (); |
4721 |
|
|
4722 |
if (*var) |
if (*var) |
4723 |
{ |
{ |
4724 |
mmap_free_1 (MMAP_REGION (*var)); |
mmap_free_1 (MMAP_REGION (*var)); |
4747 |
if (mmap_initialized_p) |
if (mmap_initialized_p) |
4748 |
return; |
return; |
4749 |
mmap_initialized_p = 1; |
mmap_initialized_p = 1; |
4750 |
|
|
4751 |
#if MAP_ANON != 0 |
#if MAP_ANON != 0 |
4752 |
mmap_fd = -1; |
mmap_fd = -1; |
4753 |
#endif |
#endif |
4754 |
|
|
4755 |
mmap_page_size = getpagesize (); |
mmap_page_size = getpagesize (); |
4756 |
} |
} |
4757 |
|
|
4778 |
size_t nbytes; |
size_t nbytes; |
4779 |
{ |
{ |
4780 |
POINTER_TYPE *p; |
POINTER_TYPE *p; |
4781 |
|
|
4782 |
BLOCK_INPUT; |
BLOCK_INPUT; |
4783 |
#if defined USE_MMAP_FOR_BUFFERS |
#if defined USE_MMAP_FOR_BUFFERS |
4784 |
p = mmap_alloc ((POINTER_TYPE **) &b->text->beg, nbytes); |
p = mmap_alloc ((POINTER_TYPE **) &b->text->beg, nbytes); |
4787 |
#else |
#else |
4788 |
p = xmalloc (nbytes); |
p = xmalloc (nbytes); |
4789 |
#endif |
#endif |
4790 |
|
|
4791 |
if (p == NULL) |
if (p == NULL) |
4792 |
{ |
{ |
4793 |
UNBLOCK_INPUT; |
UNBLOCK_INPUT; |
4817 |
#else |
#else |
4818 |
p = xrealloc (b->text->beg, nbytes); |
p = xrealloc (b->text->beg, nbytes); |
4819 |
#endif |
#endif |
4820 |
|
|
4821 |
if (p == NULL) |
if (p == NULL) |
4822 |
{ |
{ |
4823 |
UNBLOCK_INPUT; |
UNBLOCK_INPUT; |
4844 |
#else |
#else |
4845 |
xfree (b->text->beg); |
xfree (b->text->beg); |
4846 |
#endif |
#endif |
4847 |
|
|
4848 |
BUF_BEG_ADDR (b) = NULL; |
BUF_BEG_ADDR (b) = NULL; |
4849 |
UNBLOCK_INPUT; |
UNBLOCK_INPUT; |
4850 |
} |
} |
4975 |
XSETFASTINT (buffer_local_flags.cache_long_line_scans, idx); ++idx; |
XSETFASTINT (buffer_local_flags.cache_long_line_scans, idx); ++idx; |
4976 |
XSETFASTINT (buffer_local_flags.category_table, idx); ++idx; |
XSETFASTINT (buffer_local_flags.category_table, idx); ++idx; |
4977 |
XSETFASTINT (buffer_local_flags.direction_reversed, idx); ++idx; |
XSETFASTINT (buffer_local_flags.direction_reversed, idx); ++idx; |
4978 |
XSETFASTINT (buffer_local_flags.buffer_file_coding_system, idx); |
XSETFASTINT (buffer_local_flags.buffer_file_coding_system, idx); |
4979 |
/* Make this one a permanent local. */ |
/* Make this one a permanent local. */ |
4980 |
buffer_permanent_local_flags[idx++] = 1; |
buffer_permanent_local_flags[idx++] = 1; |
4981 |
XSETFASTINT (buffer_local_flags.left_margin_width, idx); ++idx; |
XSETFASTINT (buffer_local_flags.left_margin_width, idx); ++idx; |
4991 |
if (idx >= MAX_PER_BUFFER_VARS) |
if (idx >= MAX_PER_BUFFER_VARS) |
4992 |
abort (); |
abort (); |
4993 |
last_per_buffer_idx = idx; |
last_per_buffer_idx = idx; |
4994 |
|
|
4995 |
Vbuffer_alist = Qnil; |
Vbuffer_alist = Qnil; |
4996 |
current_buffer = 0; |
current_buffer = 0; |
4997 |
all_buffers = 0; |
all_buffers = 0; |
5036 |
text pointers will have been set to null in the dumped Emacs. |
text pointers will have been set to null in the dumped Emacs. |
5037 |
Map new memory. */ |
Map new memory. */ |
5038 |
struct buffer *b; |
struct buffer *b; |
5039 |
|
|
5040 |
for (b = all_buffers; b; b = b->next) |
for (b = all_buffers; b; b = b->next) |
5041 |
if (b->text->beg == NULL) |
if (b->text->beg == NULL) |
5042 |
enlarge_buffer_text (b, 0); |
enlarge_buffer_text (b, 0); |
5043 |
} |
} |
5044 |
#endif /* USE_MMAP_FOR_BUFFERS */ |
#endif /* USE_MMAP_FOR_BUFFERS */ |
5045 |
|
|
5046 |
Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); |
Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); |
5047 |
if (NILP (buffer_defaults.enable_multibyte_characters)) |
if (NILP (buffer_defaults.enable_multibyte_characters)) |
5048 |
Fset_buffer_multibyte (Qnil); |
Fset_buffer_multibyte (Qnil); |
5181 |
&buffer_defaults.direction_reversed, |
&buffer_defaults.direction_reversed, |
5182 |
doc: /* Default value of `direction_reversed' for buffers that do not override it. |
doc: /* Default value of `direction_reversed' for buffers that do not override it. |
5183 |
This is the same as (default-value 'direction-reversed). */); |
This is the same as (default-value 'direction-reversed). */); |
5184 |
|
|
5185 |
DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", |
DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", |
5186 |
&buffer_defaults.enable_multibyte_characters, |
&buffer_defaults.enable_multibyte_characters, |
5187 |
doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. |
doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. |
5188 |
This is the same as (default-value 'enable-multibyte-characters). */); |
This is the same as (default-value 'enable-multibyte-characters). */); |
5189 |
|
|
5190 |
DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system", |
DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system", |
5191 |
&buffer_defaults.buffer_file_coding_system, |
&buffer_defaults.buffer_file_coding_system, |
5192 |
doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. |
doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. |
5193 |
This is the same as (default-value 'buffer-file-coding-system). */); |
This is the same as (default-value 'buffer-file-coding-system). */); |
5194 |
|
|
5195 |
DEFVAR_LISP_NOPRO ("default-truncate-lines", |
DEFVAR_LISP_NOPRO ("default-truncate-lines", |
5196 |
&buffer_defaults.truncate_lines, |
&buffer_defaults.truncate_lines, |
5197 |
doc: /* Default value of `truncate-lines' for buffers that do not override it. |
doc: /* Default value of `truncate-lines' for buffers that do not override it. |
5218 |
This is the same as (default-value 'case-fold-search). */); |
This is the same as (default-value 'case-fold-search). */); |
5219 |
|
|
5220 |
#ifdef DOS_NT |
#ifdef DOS_NT |
5221 |
DEFVAR_LISP_NOPRO ("default-buffer-file-type", |
DEFVAR_LISP_NOPRO ("default-buffer-file-type", |
5222 |
&buffer_defaults.buffer_file_type, |
&buffer_defaults.buffer_file_type, |
5223 |
doc: /* Default file type for buffers that do not override it. |
doc: /* Default file type for buffers that do not override it. |
5224 |
This is the same as (default-value 'buffer-file-type). |
This is the same as (default-value 'buffer-file-type). |
5234 |
&buffer_defaults.right_margin_width, |
&buffer_defaults.right_margin_width, |
5235 |
doc: /* Default value of `right_margin_width' for buffers that don't override it. |
doc: /* Default value of `right_margin_width' for buffers that don't override it. |
5236 |
This is the same as (default-value 'right-margin-width). */); |
This is the same as (default-value 'right-margin-width). */); |
5237 |
|
|
5238 |
DEFVAR_LISP_NOPRO ("default-indicate-empty-lines", |
DEFVAR_LISP_NOPRO ("default-indicate-empty-lines", |
5239 |
&buffer_defaults.indicate_empty_lines, |
&buffer_defaults.indicate_empty_lines, |
5240 |
doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. |
doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. |
5241 |
This is the same as (default-value 'indicate-empty-lines). */); |
This is the same as (default-value 'indicate-empty-lines). */); |
5242 |
|
|
5243 |
DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", |
DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", |
5244 |
&buffer_defaults.scroll_up_aggressively, |
&buffer_defaults.scroll_up_aggressively, |
5245 |
doc: /* Default value of `scroll-up-aggressively'. |
doc: /* Default value of `scroll-up-aggressively'. |
5246 |
This value applies in buffers that don't have their own local values. |
This value applies in buffers that don't have their own local values. |
5247 |
This variable is an alias for (default-value 'scroll-up-aggressively). */); |
This variable is an alias for (default-value 'scroll-up-aggressively). */); |
5248 |
|
|
5249 |
DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively", |
DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively", |
5250 |
&buffer_defaults.scroll_down_aggressively, |
&buffer_defaults.scroll_down_aggressively, |
5251 |
doc: /* Default value of `scroll-down-aggressively'. |
doc: /* Default value of `scroll-down-aggressively'. |
5252 |
This value applies in buffers that don't have their own local values. |
This value applies in buffers that don't have their own local values. |
5253 |
This variable is an alias for (default-value 'scroll-down-aggressively). */); |
This variable is an alias for (default-value 'scroll-down-aggressively). */); |
5254 |
|
|
5255 |
DEFVAR_PER_BUFFER ("header-line-format", |
DEFVAR_PER_BUFFER ("header-line-format", |
5256 |
¤t_buffer->header_line_format, |
¤t_buffer->header_line_format, |
5257 |
Qnil, |
Qnil, |
5258 |
doc: /* Analogous to `mode-line-format', but controls the header line. |
doc: /* Analogous to `mode-line-format', but controls the header line. |
5259 |
The header line appears, optionally, at the top of a window; |
The header line appears, optionally, at the top of a window; |
5260 |
the mode line appears at the bottom. */); |
the mode line appears at the bottom. */); |
5261 |
|
|
5262 |
DEFVAR_PER_BUFFER ("mode-line-format", ¤t_buffer->mode_line_format, |
DEFVAR_PER_BUFFER ("mode-line-format", ¤t_buffer->mode_line_format, |
5263 |
Qnil, |
Qnil, |
5264 |
doc: /* Template for displaying mode line for current buffer. |
doc: /* Template for displaying mode line for current buffer. |
5269 |
A string appearing directly as the value of a symbol is processed verbatim |
A string appearing directly as the value of a symbol is processed verbatim |
5270 |
in that the %-constructs below are not recognized. |
in that the %-constructs below are not recognized. |
5271 |
Note that unless the symbol is marked as a `risky-local-variable', all |
Note that unless the symbol is marked as a `risky-local-variable', all |
5272 |
properties in any strings, as well as all :eval and :propertize forms |
properties in any strings, as well as all :eval and :propertize forms |
5273 |
in the value of that symbol will be ignored. |
in the value of that symbol will be ignored. |
5274 |
For a list of the form `(:eval FORM)', FORM is evaluated and the result |
For a list of the form `(:eval FORM)', FORM is evaluated and the result |
5275 |
is used as a mode line element. Be careful--FORM should not load any files, |
is used as a mode line element. Be careful--FORM should not load any files, |
5506 |
Qnil, |
Qnil, |
5507 |
doc: /* *Width of left marginal area for display of a buffer. |
doc: /* *Width of left marginal area for display of a buffer. |
5508 |
A value of nil means no marginal area. */); |
A value of nil means no marginal area. */); |
5509 |
|
|
5510 |
DEFVAR_PER_BUFFER ("right-margin-width", ¤t_buffer->right_margin_width, |
DEFVAR_PER_BUFFER ("right-margin-width", ¤t_buffer->right_margin_width, |
5511 |
Qnil, |
Qnil, |
5512 |
doc: /* *Width of right marginal area for display of a buffer. |
doc: /* *Width of right marginal area for display of a buffer. |
5513 |
A value of nil means no marginal area. */); |
A value of nil means no marginal area. */); |
5514 |
|
|
5515 |
DEFVAR_PER_BUFFER ("indicate-empty-lines", |
DEFVAR_PER_BUFFER ("indicate-empty-lines", |
5516 |
¤t_buffer->indicate_empty_lines, Qnil, |
¤t_buffer->indicate_empty_lines, Qnil, |
5517 |
doc: /* *Visually indicate empty lines after the buffer end. |
doc: /* *Visually indicate empty lines after the buffer end. |
5518 |
If non-nil, a bitmap is displayed in the left fringe of a window on |
If non-nil, a bitmap is displayed in the left fringe of a window on |
5519 |
window-systems. */); |
window-systems. */); |
5520 |
|
|
5521 |
DEFVAR_PER_BUFFER ("scroll-up-aggressively", |
DEFVAR_PER_BUFFER ("scroll-up-aggressively", |
5522 |
¤t_buffer->scroll_up_aggressively, Qnil, |
¤t_buffer->scroll_up_aggressively, Qnil, |
5523 |
doc: /* How far to scroll windows upward. |
doc: /* How far to scroll windows upward. |
5530 |
point goes at the top, so that in that simple case, the window |
point goes at the top, so that in that simple case, the window |
5531 |
window scrolls by a full window height. Meaningful values are |
window scrolls by a full window height. Meaningful values are |
5532 |
between 0.0 and 1.0, inclusive. */); |
between 0.0 and 1.0, inclusive. */); |
5533 |
|
|
5534 |
DEFVAR_PER_BUFFER ("scroll-down-aggressively", |
DEFVAR_PER_BUFFER ("scroll-down-aggressively", |
5535 |
¤t_buffer->scroll_down_aggressively, Qnil, |
¤t_buffer->scroll_down_aggressively, Qnil, |
5536 |
doc: /* How far to scroll windows downward. |
doc: /* How far to scroll windows downward. |
5543 |
point goes at the bottom, so that in that simple case, the window |
point goes at the bottom, so that in that simple case, the window |
5544 |
window scrolls by a full window height. Meaningful values are |
window scrolls by a full window height. Meaningful values are |
5545 |
between 0.0 and 1.0, inclusive. */); |
between 0.0 and 1.0, inclusive. */); |
5546 |
|
|
5547 |
/*DEFVAR_LISP ("debug-check-symbol", &Vcheck_symbol, |
/*DEFVAR_LISP ("debug-check-symbol", &Vcheck_symbol, |
5548 |
"Don't ask."); |
"Don't ask."); |
5549 |
*/ |
*/ |