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