Mercurial > emacs
comparison src/buffer.c @ 49600:23a1cea22d13
Trailing whitespace deleted.
| author | Juanma Barranquero <lekktu@gmail.com> |
|---|---|
| date | Tue, 04 Feb 2003 14:56:31 +0000 |
| parents | a80513b20297 |
| children | 8bcbac2617a9 |
comparison
equal
deleted
inserted
replaced
| 49599:5ade352e8d1c | 49600:23a1cea22d13 |
|---|---|
| 462 overlay = allocate_misc (); | 462 overlay = allocate_misc (); |
| 463 XMISCTYPE (overlay) = Lisp_Misc_Overlay; | 463 XMISCTYPE (overlay) = Lisp_Misc_Overlay; |
| 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 |
| 477 Buffer TO gets the same per-buffer values as FROM, with the | 477 Buffer TO gets the same per-buffer values as FROM, with the |
| 478 following exceptions: (1) TO's name is left untouched, (2) markers | 478 following exceptions: (1) TO's name is left untouched, (2) markers |
| 485 { | 485 { |
| 486 Lisp_Object to_buffer; | 486 Lisp_Object to_buffer; |
| 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)) |
| 494 { | 494 { |
| 495 Lisp_Object obj; | 495 Lisp_Object obj; |
| 505 | 505 |
| 506 PER_BUFFER_VALUE (to, offset) = obj; | 506 PER_BUFFER_VALUE (to, offset) = obj; |
| 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 } |
| 514 | 514 |
| 515 | 515 |
| 814 XSETBUFFER (base_buffer, base); | 814 XSETBUFFER (base_buffer, base); |
| 815 return base_buffer; | 815 return base_buffer; |
| 816 } | 816 } |
| 817 | 817 |
| 818 DEFUN ("buffer-local-value", Fbuffer_local_value, | 818 DEFUN ("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. |
| 821 If VARIABLE does not have a buffer-local binding in BUFFER, the value | 821 If VARIABLE does not have a buffer-local binding in BUFFER, the value |
| 822 is the default binding of variable. */) | 822 is the default binding of variable. */) |
| 823 (symbol, buffer) | 823 (symbol, buffer) |
| 824 register Lisp_Object symbol; | 824 register Lisp_Object symbol; |
| 831 CHECK_BUFFER (buffer); | 831 CHECK_BUFFER (buffer); |
| 832 buf = XBUFFER (buffer); | 832 buf = XBUFFER (buffer); |
| 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; |
| 840 | 840 |
| 841 /* Look in special slots */ | 841 /* Look in special slots */ |
| 844 /* sizeof EMACS_INT == sizeof Lisp_Object */ | 844 /* sizeof EMACS_INT == sizeof Lisp_Object */ |
| 845 offset += (sizeof (EMACS_INT))) | 845 offset += (sizeof (EMACS_INT))) |
| 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; |
| 854 break; | 854 break; |
| 855 } | 855 } |
| 1003 unlock_file (fn); | 1003 unlock_file (fn); |
| 1004 } | 1004 } |
| 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. |
| 1012 Setting update_mode_lines makes redisplay consider all windows | 1012 Setting update_mode_lines makes redisplay consider all windows |
| 1013 (on all frames). Stealth fontification of buffers not displayed | 1013 (on all frames). Stealth fontification of buffers not displayed |
| 1022 if (WINDOWP (window)) | 1022 if (WINDOWP (window)) |
| 1023 { | 1023 { |
| 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 |
| 1031 DEFUN ("restore-buffer-modified-p", Frestore_buffer_modified_p, | 1031 DEFUN ("restore-buffer-modified-p", Frestore_buffer_modified_p, |
| 1032 Srestore_buffer_modified_p, 1, 1, 0, | 1032 Srestore_buffer_modified_p, 1, 1, 0, |
| 1036 (flag) | 1036 (flag) |
| 1037 Lisp_Object flag; | 1037 Lisp_Object flag; |
| 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 |
| 1045 fn = current_buffer->file_truename; | 1045 fn = current_buffer->file_truename; |
| 1046 /* Test buffer-file-name so that binding it to nil is effective. */ | 1046 /* Test buffer-file-name so that binding it to nil is effective. */ |
| 1051 lock_file (fn); | 1051 lock_file (fn); |
| 1052 else if (already && NILP (flag)) | 1052 else if (already && NILP (flag)) |
| 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 } |
| 1060 | 1060 |
| 1061 DEFUN ("buffer-modified-tick", Fbuffer_modified_tick, Sbuffer_modified_tick, | 1061 DEFUN ("buffer-modified-tick", Fbuffer_modified_tick, Sbuffer_modified_tick, |
| 1150 tail = Vbuffer_alist; | 1150 tail = Vbuffer_alist; |
| 1151 pred = frame_buffer_predicate (frame); | 1151 pred = frame_buffer_predicate (frame); |
| 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)) |
| 1159 { | 1159 { |
| 1160 if (BUFFERP (XCAR (tem))) | 1160 if (BUFFERP (XCAR (tem))) |
| 1352 Fkill_buffer (buf); | 1352 Fkill_buffer (buf); |
| 1353 } | 1353 } |
| 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. */ |
| 1361 if (b == current_buffer) | 1361 if (b == current_buffer) |
| 1362 { | 1362 { |
| 1493 | 1493 |
| 1494 if (NILP (prev)) | 1494 if (NILP (prev)) |
| 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 |
| 1502 /* Now move this buffer to the front of frame_buffer_list also. */ | 1502 /* Now move this buffer to the front of frame_buffer_list also. */ |
| 1503 | 1503 |
| 1517 if (NILP (prev)) | 1517 if (NILP (prev)) |
| 1518 set_frame_buffer_list (frame, | 1518 set_frame_buffer_list (frame, |
| 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 } |
| 1526 else | 1526 else |
| 1527 set_frame_buffer_list (frame, Fcons (buf, frame_buffer_list (frame))); | 1527 set_frame_buffer_list (frame, Fcons (buf, frame_buffer_list (frame))); |
| 1547 function = buffer_defaults.major_mode; | 1547 function = buffer_defaults.major_mode; |
| 1548 if (NILP (function) | 1548 if (NILP (function) |
| 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 |
| 1556 count = SPECPDL_INDEX (); | 1556 count = SPECPDL_INDEX (); |
| 1557 | 1557 |
| 1707 | 1707 |
| 1708 #ifdef USE_MMAP_FOR_BUFFERS | 1708 #ifdef USE_MMAP_FOR_BUFFERS |
| 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 |
| 1716 old_buf = current_buffer; | 1716 old_buf = current_buffer; |
| 1717 current_buffer = b; | 1717 current_buffer = b; |
| 1935 } | 1935 } |
| 1936 } | 1936 } |
| 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); |
| 1944 buffer = buf1; | 1944 buffer = buf1; |
| 1945 } | 1945 } |
| 2173 if (pos == Z) | 2173 if (pos == Z) |
| 2174 break; | 2174 break; |
| 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 |
| 2182 { | 2182 { |
| 2183 unsigned char tmp[MAX_MULTIBYTE_LENGTH]; | 2183 unsigned char tmp[MAX_MULTIBYTE_LENGTH]; |
| 2326 | 2326 |
| 2327 reset_buffer_local_variables (current_buffer, 0); | 2327 reset_buffer_local_variables (current_buffer, 0); |
| 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)); |
| 2335 tem = Fget (sym, Qpermanent_local); | 2335 tem = Fget (sym, Qpermanent_local); |
| 2336 if (! NILP (tem)) | 2336 if (! NILP (tem)) |
| 2388 } | 2388 } |
| 2389 } | 2389 } |
| 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. |
| 2397 Store in *PREV_PTR the previous position before POS where an overlay ends, | 2397 Store in *PREV_PTR the previous position before POS where an overlay ends, |
| 2398 or where an overlay starts which ends at or after POS; | 2398 or where an overlay starts which ends at or after POS; |
| 2540 } | 2540 } |
| 2541 | 2541 |
| 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. |
| 2549 Store in *PREV_PTR the previous position before POS where an overlay ends, | 2549 Store in *PREV_PTR the previous position before POS where an overlay ends, |
| 2550 or BEGV if there are no previous overlays. | 2550 or BEGV if there are no previous overlays. |
| 2689 { | 2689 { |
| 2690 int start = OVERLAY_POSITION (OVERLAY_START (overlay)); | 2690 int start = OVERLAY_POSITION (OVERLAY_START (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); |
| 2698 if (n > size) | 2698 if (n > size) |
| 2699 { | 2699 { |
| 3543 XMISCTYPE (overlay) = Lisp_Misc_Overlay; | 3543 XMISCTYPE (overlay) = Lisp_Misc_Overlay; |
| 3544 XOVERLAY (overlay)->start = beg; | 3544 XOVERLAY (overlay)->start = beg; |
| 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); |
| 3552 else | 3552 else |
| 3553 b->overlays_before = Fcons (overlay, b->overlays_before); | 3553 b->overlays_before = Fcons (overlay, b->overlays_before); |
| 3574 start = end; | 3574 start = end; |
| 3575 end = temp; | 3575 end = temp; |
| 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)) |
| 3583 windows_or_buffers_changed = 1; | 3583 windows_or_buffers_changed = 1; |
| 3584 /* If multiple windows show this buffer, we must do other windows. */ | 3584 /* If multiple windows show this buffer, we must do other windows. */ |
| 3680 } | 3680 } |
| 3681 | 3681 |
| 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); |
| 3689 else | 3689 else |
| 3690 b->overlays_before = Fcons (overlay, b->overlays_before); | 3690 b->overlays_before = Fcons (overlay, b->overlays_before); |
| 3710 if (NILP (buffer)) | 3710 if (NILP (buffer)) |
| 3711 return Qnil; | 3711 return Qnil; |
| 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, |
| 3719 marker_position (OVERLAY_START (overlay)), | 3719 marker_position (OVERLAY_START (overlay)), |
| 3720 marker_position (OVERLAY_END (overlay))); | 3720 marker_position (OVERLAY_END (overlay))); |
| 4274 buffer_slot_type_mismatch (offset) | 4274 buffer_slot_type_mismatch (offset) |
| 4275 int offset; | 4275 int 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 } |
| 4297 | 4297 |
| 4298 sym = PER_BUFFER_SYMBOL (offset); | 4298 sym = PER_BUFFER_SYMBOL (offset); |
| 4351 | 4351 |
| 4352 struct mmap_region | 4352 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 |
| 4360 /* Pointer to the location holding the address of the memory | 4360 /* Pointer to the location holding the address of the memory |
| 4361 allocated with the mmap'd block. The variable actually points | 4361 allocated with the mmap'd block. The variable actually points |
| 4442 mmap_find (start, end) | 4442 mmap_find (start, end) |
| 4443 POINTER_TYPE *start, *end; | 4443 POINTER_TYPE *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; |
| 4451 char *rend = rstart + r->nbytes_mapped; | 4451 char *rend = rstart + r->nbytes_mapped; |
| 4452 | 4452 |
| 4476 r->next->prev = r->prev; | 4476 r->next->prev = r->prev; |
| 4477 if (r->prev) | 4477 if (r->prev) |
| 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)); |
| 4485 return 0; | 4485 return 0; |
| 4486 } | 4486 } |
| 4514 } | 4514 } |
| 4515 } | 4515 } |
| 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. |
| 4523 I'm not sure this is worth doing, let's see. */ | 4523 I'm not sure this is worth doing, let's see. */ |
| 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) |
| 4531 ; /* fprintf (stderr, "mmap: %s\n", emacs_strerror (errno)); */ | 4531 ; /* fprintf (stderr, "mmap: %s\n", emacs_strerror (errno)); */ |
| 4532 else if (p != (POINTER_TYPE *) region_end) | 4532 else if (p != (POINTER_TYPE *) region_end) |
| 4603 mmap_init (); | 4603 mmap_init (); |
| 4604 | 4604 |
| 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) |
| 4612 fprintf (stderr, "mmap: %s\n", emacs_strerror (errno)); | 4612 fprintf (stderr, "mmap: %s\n", emacs_strerror (errno)); |
| 4613 p = NULL; | 4613 p = NULL; |
| 4614 } | 4614 } |
| 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; |
| 4622 r->prev = NULL; | 4622 r->prev = NULL; |
| 4623 r->next = mmap_regions; | 4623 r->next = mmap_regions; |
| 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 |
| 4634 | 4634 |
| 4635 /* Given a pointer at address VAR to data allocated with mmap_alloc, | 4635 /* Given a pointer at address VAR to data allocated with mmap_alloc, |
| 4641 mmap_realloc (var, nbytes) | 4641 mmap_realloc (var, nbytes) |
| 4642 POINTER_TYPE **var; | 4642 POINTER_TYPE **var; |
| 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); |
| 4655 } | 4655 } |
| 4656 else | 4656 else |
| 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. */ |
| 4664 POINTER_TYPE *old_ptr = *var; | 4664 POINTER_TYPE *old_ptr = *var; |
| 4665 | 4665 |
| 4716 static void | 4716 static void |
| 4717 mmap_free (var) | 4717 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)); |
| 4725 *var = NULL; | 4725 *var = NULL; |
| 4726 } | 4726 } |
| 4745 #endif /* MAP_ANON == 0 */ | 4745 #endif /* MAP_ANON == 0 */ |
| 4746 | 4746 |
| 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 |
| 4758 #endif /* USE_MMAP_FOR_BUFFERS */ | 4758 #endif /* USE_MMAP_FOR_BUFFERS */ |
| 4759 | 4759 |
| 4776 alloc_buffer_text (b, nbytes) | 4776 alloc_buffer_text (b, nbytes) |
| 4777 struct buffer *b; | 4777 struct buffer *b; |
| 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); |
| 4785 #elif defined REL_ALLOC | 4785 #elif defined REL_ALLOC |
| 4786 p = r_alloc ((POINTER_TYPE **) &b->text->beg, nbytes); | 4786 p = r_alloc ((POINTER_TYPE **) &b->text->beg, 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; |
| 4794 memory_full (); | 4794 memory_full (); |
| 4795 } | 4795 } |
| 4815 #elif defined REL_ALLOC | 4815 #elif defined REL_ALLOC |
| 4816 p = r_re_alloc ((POINTER_TYPE **) &b->text->beg, nbytes); | 4816 p = r_re_alloc ((POINTER_TYPE **) &b->text->beg, nbytes); |
| 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; |
| 4824 memory_full (); | 4824 memory_full (); |
| 4825 } | 4825 } |
| 4842 #elif defined REL_ALLOC | 4842 #elif defined REL_ALLOC |
| 4843 r_alloc_free ((POINTER_TYPE **) &b->text->beg); | 4843 r_alloc_free ((POINTER_TYPE **) &b->text->beg); |
| 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 } |
| 4851 | 4851 |
| 4852 | 4852 |
| 4973 #endif | 4973 #endif |
| 4974 XSETFASTINT (buffer_local_flags.syntax_table, idx); ++idx; | 4974 XSETFASTINT (buffer_local_flags.syntax_table, idx); ++idx; |
| 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; |
| 4982 XSETFASTINT (buffer_local_flags.right_margin_width, idx); ++idx; | 4982 XSETFASTINT (buffer_local_flags.right_margin_width, idx); ++idx; |
| 4983 XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx; | 4983 XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx; |
| 4989 | 4989 |
| 4990 /* Need more room? */ | 4990 /* Need more room? */ |
| 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; |
| 4998 | 4998 |
| 4999 QSFundamental = build_string ("Fundamental"); | 4999 QSFundamental = build_string ("Fundamental"); |
| 5034 { | 5034 { |
| 5035 /* When using the ralloc implementation based on mmap(2), buffer | 5035 /* When using the ralloc implementation based on mmap(2), 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); |
| 5049 | 5049 |
| 5050 /* If PWD is accurate, use it instead of calling getwd. PWD is | 5050 /* If PWD is accurate, use it instead of calling getwd. PWD is |
| 5179 | 5179 |
| 5180 DEFVAR_LISP_NOPRO ("default-direction-reversed", | 5180 DEFVAR_LISP_NOPRO ("default-direction-reversed", |
| 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. |
| 5183 This is the same as (default-value 'direction-reversed). */); | 5183 This 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. |
| 5188 This is the same as (default-value 'enable-multibyte-characters). */); | 5188 This 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. |
| 5193 This is the same as (default-value 'buffer-file-coding-system). */); | 5193 This 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. |
| 5198 This is the same as (default-value 'truncate-lines). */); | 5198 This is the same as (default-value 'truncate-lines). */); |
| 5199 | 5199 |
| 5216 &buffer_defaults.case_fold_search, | 5216 &buffer_defaults.case_fold_search, |
| 5217 doc: /* Default value of `case-fold-search' for buffers that don't override it. | 5217 doc: /* Default value of `case-fold-search' for buffers that don't override it. |
| 5218 This is the same as (default-value 'case-fold-search). */); | 5218 This 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. |
| 5224 This is the same as (default-value 'buffer-file-type). | 5224 This is the same as (default-value 'buffer-file-type). |
| 5225 The file type is nil for text, t for binary. */); | 5225 The file type is nil for text, t for binary. */); |
| 5226 #endif | 5226 #endif |
| 5232 | 5232 |
| 5233 DEFVAR_LISP_NOPRO ("default-right-margin-width", | 5233 DEFVAR_LISP_NOPRO ("default-right-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. |
| 5236 This is the same as (default-value 'right-margin-width). */); | 5236 This 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. |
| 5241 This is the same as (default-value 'indicate-empty-lines). */); | 5241 This 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'. |
| 5246 This value applies in buffers that don't have their own local values. | 5246 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). */); | 5247 This 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'. |
| 5252 This value applies in buffers that don't have their own local values. | 5252 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). */); | 5253 This 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 ¤t_buffer->header_line_format, | 5256 ¤t_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. |
| 5259 The header line appears, optionally, at the top of a window; | 5259 The header line appears, optionally, at the top of a window; |
| 5260 the mode line appears at the bottom. */); | 5260 the mode line appears at the bottom. */); |
| 5261 | 5261 |
| 5262 DEFVAR_PER_BUFFER ("mode-line-format", ¤t_buffer->mode_line_format, | 5262 DEFVAR_PER_BUFFER ("mode-line-format", ¤t_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. |
| 5265 Each buffer has its own value of this variable. | 5265 Each buffer has its own value of this variable. |
| 5266 Value may be nil, a string, a symbol or a list or cons cell. | 5266 Value may be nil, a string, a symbol or a list or cons cell. |
| 5267 A value of nil means don't display a mode line. | 5267 A value of nil means don't display a mode line. |
| 5268 For a symbol, its value is used (but it is ignored if t or nil). | 5268 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. |
| 5274 For a list of the form `(:eval FORM)', FORM is evaluated and the result | 5274 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, | 5275 is used as a mode line element. Be careful--FORM should not load any files, |
| 5276 because that can cause an infinite recursion. | 5276 because that can cause an infinite recursion. |
| 5277 For a list of the form `(:propertize ELT PROPS...)', ELT is displayed | 5277 For a list of the form `(:propertize ELT PROPS...)', ELT is displayed |
| 5504 | 5504 |
| 5505 DEFVAR_PER_BUFFER ("left-margin-width", ¤t_buffer->left_margin_width, | 5505 DEFVAR_PER_BUFFER ("left-margin-width", ¤t_buffer->left_margin_width, |
| 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. |
| 5508 A value of nil means no marginal area. */); | 5508 A value of nil means no marginal area. */); |
| 5509 | 5509 |
| 5510 DEFVAR_PER_BUFFER ("right-margin-width", ¤t_buffer->right_margin_width, | 5510 DEFVAR_PER_BUFFER ("right-margin-width", ¤t_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. |
| 5513 A value of nil means no marginal area. */); | 5513 A value of nil means no marginal area. */); |
| 5514 | 5514 |
| 5515 DEFVAR_PER_BUFFER ("indicate-empty-lines", | 5515 DEFVAR_PER_BUFFER ("indicate-empty-lines", |
| 5516 ¤t_buffer->indicate_empty_lines, Qnil, | 5516 ¤t_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. |
| 5518 If non-nil, a bitmap is displayed in the left fringe of a window on | 5518 If non-nil, a bitmap is displayed in the left fringe of a window on |
| 5519 window-systems. */); | 5519 window-systems. */); |
| 5520 | 5520 |
| 5521 DEFVAR_PER_BUFFER ("scroll-up-aggressively", | 5521 DEFVAR_PER_BUFFER ("scroll-up-aggressively", |
| 5522 ¤t_buffer->scroll_up_aggressively, Qnil, | 5522 ¤t_buffer->scroll_up_aggressively, Qnil, |
| 5523 doc: /* How far to scroll windows upward. | 5523 doc: /* How far to scroll windows upward. |
| 5524 If you move point off the bottom, the window scrolls automatically. | 5524 If you move point off the bottom, the window scrolls automatically. |
| 5525 This variable controls how far it scrolls. nil, the default, | 5525 This variable controls how far it scrolls. nil, the default, |
| 5528 When the value is 0.0, point goes at the bottom line, which in the simple | 5528 When the value is 0.0, point goes at the bottom line, which in the simple |
| 5529 case that you moved off with C-f means scrolling just one line. 1.0 means | 5529 case that you moved off with C-f means scrolling just one line. 1.0 means |
| 5530 point goes at the top, so that in that simple case, the window | 5530 point goes at the top, so that in that simple case, the window |
| 5531 window scrolls by a full window height. Meaningful values are | 5531 window scrolls by a full window height. Meaningful values are |
| 5532 between 0.0 and 1.0, inclusive. */); | 5532 between 0.0 and 1.0, inclusive. */); |
| 5533 | 5533 |
| 5534 DEFVAR_PER_BUFFER ("scroll-down-aggressively", | 5534 DEFVAR_PER_BUFFER ("scroll-down-aggressively", |
| 5535 ¤t_buffer->scroll_down_aggressively, Qnil, | 5535 ¤t_buffer->scroll_down_aggressively, Qnil, |
| 5536 doc: /* How far to scroll windows downward. | 5536 doc: /* How far to scroll windows downward. |
| 5537 If you move point off the top, the window scrolls automatically. | 5537 If you move point off the top, the window scrolls automatically. |
| 5538 This variable controls how far it scrolls. nil, the default, | 5538 This variable controls how far it scrolls. nil, the default, |
| 5541 When the value is 0.0, point goes at the top line, which in the simple | 5541 When the value is 0.0, point goes at the top line, which in the simple |
| 5542 case that you moved off with C-b means scrolling just one line. 1.0 means | 5542 case that you moved off with C-b means scrolling just one line. 1.0 means |
| 5543 point goes at the bottom, so that in that simple case, the window | 5543 point goes at the bottom, so that in that simple case, the window |
| 5544 window scrolls by a full window height. Meaningful values are | 5544 window scrolls by a full window height. Meaningful values are |
| 5545 between 0.0 and 1.0, inclusive. */); | 5545 between 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 */ |
| 5550 | 5550 |
| 5551 DEFVAR_LISP ("before-change-functions", &Vbefore_change_functions, | 5551 DEFVAR_LISP ("before-change-functions", &Vbefore_change_functions, |
