Mercurial > emacs
comparison src/buffer.c @ 89909:68c22ea6027c
Sync to HEAD
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 16 Apr 2004 12:51:06 +0000 |
parents | 2f877ed80fa6 |
children | 4c90ffeb71c5 |
comparison
equal
deleted
inserted
replaced
89908:ee1402f7b568 | 89909:68c22ea6027c |
---|---|
1 /* Buffer manipulation primitives for GNU Emacs. | 1 /* Buffer manipulation primitives for GNU Emacs. |
2 Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 02, 2003 | 2 Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 02, 03, 2004 |
3 Free Software Foundation, Inc. | 3 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of GNU Emacs. | 5 This file is part of GNU Emacs. |
6 | 6 |
7 GNU Emacs is free software; you can redistribute it and/or modify | 7 GNU Emacs is free software; you can redistribute it and/or modify |
65 The default value occupies the same slot in this structure | 65 The default value occupies the same slot in this structure |
66 as an individual buffer's value occupies in that buffer. | 66 as an individual buffer's value occupies in that buffer. |
67 Setting the default value also goes through the alist of buffers | 67 Setting the default value also goes through the alist of buffers |
68 and stores into each buffer that does not say it has a local value. */ | 68 and stores into each buffer that does not say it has a local value. */ |
69 | 69 |
70 struct buffer buffer_defaults; | 70 DECL_ALIGN (struct buffer, buffer_defaults); |
71 | 71 |
72 /* A Lisp_Object pointer to the above, used for staticpro */ | 72 /* A Lisp_Object pointer to the above, used for staticpro */ |
73 | 73 |
74 static Lisp_Object Vbuffer_defaults; | 74 static Lisp_Object Vbuffer_defaults; |
75 | 75 |
87 and the corresponding slot in buffer_defaults is not used. | 87 and the corresponding slot in buffer_defaults is not used. |
88 | 88 |
89 If a slot is -2, then there is no DEFVAR_PER_BUFFER for it, | 89 If a slot is -2, then there is no DEFVAR_PER_BUFFER for it, |
90 but there is a default value which is copied into each buffer. | 90 but there is a default value which is copied into each buffer. |
91 | 91 |
92 If a slot in this structure is negative, then even though there may | |
93 be a DEFVAR_PER_BUFFER for the slot, there is no default value for it; | |
94 and the corresponding slot in buffer_defaults is not used. | |
95 | |
96 If a slot in this structure corresponding to a DEFVAR_PER_BUFFER is | 92 If a slot in this structure corresponding to a DEFVAR_PER_BUFFER is |
97 zero, that is a bug */ | 93 zero, that is a bug */ |
98 | 94 |
99 struct buffer buffer_local_flags; | 95 struct buffer buffer_local_flags; |
100 | 96 |
101 /* This structure holds the names of symbols whose values may be | 97 /* This structure holds the names of symbols whose values may be |
102 buffer-local. It is indexed and accessed in the same way as the above. */ | 98 buffer-local. It is indexed and accessed in the same way as the above. */ |
103 | 99 |
104 struct buffer buffer_local_symbols; | 100 DECL_ALIGN (struct buffer, buffer_local_symbols); |
101 | |
105 /* A Lisp_Object pointer to the above, used for staticpro */ | 102 /* A Lisp_Object pointer to the above, used for staticpro */ |
106 static Lisp_Object Vbuffer_local_symbols; | 103 static Lisp_Object Vbuffer_local_symbols; |
107 | 104 |
108 /* This structure holds the required types for the values in the | 105 /* This structure holds the required types for the values in the |
109 buffer-local slots. If a slot contains Qnil, then the | 106 buffer-local slots. If a slot contains Qnil, then the |
523 | 520 |
524 DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, | 521 DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, |
525 2, 3, | 522 2, 3, |
526 "bMake indirect buffer (to buffer): \nBName of indirect buffer: ", | 523 "bMake indirect buffer (to buffer): \nBName of indirect buffer: ", |
527 doc: /* Create and return an indirect buffer for buffer BASE-BUFFER, named NAME. | 524 doc: /* Create and return an indirect buffer for buffer BASE-BUFFER, named NAME. |
528 BASE-BUFFER should be an existing buffer (or buffer name). | 525 BASE-BUFFER should be a live buffer, or the name of an existing buffer. |
529 NAME should be a string which is not the name of an existing buffer. | 526 NAME should be a string which is not the name of an existing buffer. |
530 Optional argument CLONE non-nil means preserve BASE-BUFFER's state, | 527 Optional argument CLONE non-nil means preserve BASE-BUFFER's state, |
531 such as major and minor modes, in the indirect buffer. | 528 such as major and minor modes, in the indirect buffer. |
532 CLONE nil means the indirect buffer's state is reset to default values. */) | 529 CLONE nil means the indirect buffer's state is reset to default values. */) |
533 (base_buffer, name, clone) | 530 (base_buffer, name, clone) |
534 Lisp_Object base_buffer, name, clone; | 531 Lisp_Object base_buffer, name, clone; |
535 { | 532 { |
536 Lisp_Object buf; | 533 Lisp_Object buf, tem; |
537 struct buffer *b; | 534 struct buffer *b; |
538 | 535 |
536 CHECK_STRING (name); | |
539 buf = Fget_buffer (name); | 537 buf = Fget_buffer (name); |
540 if (!NILP (buf)) | 538 if (!NILP (buf)) |
541 error ("Buffer name `%s' is in use", SDATA (name)); | 539 error ("Buffer name `%s' is in use", SDATA (name)); |
542 | 540 |
541 tem = base_buffer; | |
543 base_buffer = Fget_buffer (base_buffer); | 542 base_buffer = Fget_buffer (base_buffer); |
544 if (NILP (base_buffer)) | 543 if (NILP (base_buffer)) |
545 error ("No such buffer: `%s'", SDATA (name)); | 544 error ("No such buffer: `%s'", SDATA (tem)); |
545 if (NILP (XBUFFER (base_buffer)->name)) | |
546 error ("Base buffer has been killed"); | |
546 | 547 |
547 if (SCHARS (name) == 0) | 548 if (SCHARS (name) == 0) |
548 error ("Empty string for buffer name is not allowed"); | 549 error ("Empty string for buffer name is not allowed"); |
549 | 550 |
550 b = (struct buffer *) allocate_buffer (); | 551 b = (struct buffer *) allocate_buffer (); |
654 eassert (b->overlays_before == NULL); | 655 eassert (b->overlays_before == NULL); |
655 eassert (b->overlays_after == NULL); | 656 eassert (b->overlays_after == NULL); |
656 } | 657 } |
657 | 658 |
658 /* Reinitialize everything about a buffer except its name and contents | 659 /* Reinitialize everything about a buffer except its name and contents |
659 and local variables. | 660 and local variables. |
660 If called on an already-initialized buffer, the list of overlays | 661 If called on an already-initialized buffer, the list of overlays |
661 should be deleted before calling this function, otherwise we end up | 662 should be deleted before calling this function, otherwise we end up |
662 with overlays that claim to belong to the buffer but the buffer | 663 with overlays that claim to belong to the buffer but the buffer |
663 claims it doesn't belong to it. */ | 664 claims it doesn't belong to it. */ |
664 | 665 |
768 DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, Sgenerate_new_buffer_name, | 769 DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, Sgenerate_new_buffer_name, |
769 1, 2, 0, | 770 1, 2, 0, |
770 doc: /* Return a string that is the name of no existing buffer based on NAME. | 771 doc: /* Return a string that is the name of no existing buffer based on NAME. |
771 If there is no live buffer named NAME, then return NAME. | 772 If there is no live buffer named NAME, then return NAME. |
772 Otherwise modify name by appending `<NUMBER>', incrementing NUMBER | 773 Otherwise modify name by appending `<NUMBER>', incrementing NUMBER |
773 until an unused name is found, and then return that name. | 774 \(starting at 2) until an unused name is found, and then return that name. |
774 Optional second argument IGNORE specifies a name that is okay to use | 775 Optional second argument IGNORE specifies a name that is okay to use |
775 \(if it is in the sequence to be tried) | 776 \(if it is in the sequence to be tried) |
776 even if a buffer with that name exists. */) | 777 even if a buffer with that name exists. */) |
777 (name, ignore) | 778 (name, ignore) |
778 register Lisp_Object name, ignore; | 779 register Lisp_Object name, ignore; |
781 int count; | 782 int count; |
782 char number[10]; | 783 char number[10]; |
783 | 784 |
784 CHECK_STRING (name); | 785 CHECK_STRING (name); |
785 | 786 |
787 tem = Fstring_equal (name, ignore); | |
788 if (!NILP (tem)) | |
789 return name; | |
786 tem = Fget_buffer (name); | 790 tem = Fget_buffer (name); |
787 if (NILP (tem)) | 791 if (NILP (tem)) |
788 return name; | 792 return name; |
789 | 793 |
790 count = 1; | 794 count = 1; |
1201 for (; CONSP (tail); tail = XCDR (tail)) | 1205 for (; CONSP (tail); tail = XCDR (tail)) |
1202 { | 1206 { |
1203 buf = Fcdr (XCAR (tail)); | 1207 buf = Fcdr (XCAR (tail)); |
1204 if (EQ (buf, buffer)) | 1208 if (EQ (buf, buffer)) |
1205 continue; | 1209 continue; |
1210 if (NILP (buf)) | |
1211 continue; | |
1212 if (NILP (XBUFFER (buf)->name)) | |
1213 continue; | |
1206 if (SREF (XBUFFER (buf)->name, 0) == ' ') | 1214 if (SREF (XBUFFER (buf)->name, 0) == ' ') |
1207 continue; | 1215 continue; |
1208 /* If the selected frame has a buffer_predicate, | 1216 /* If the selected frame has a buffer_predicate, |
1209 disregard buffers that don't fit the predicate. */ | 1217 disregard buffers that don't fit the predicate. */ |
1210 if (!NILP (pred)) | 1218 if (!NILP (pred)) |
1428 /* Delete any auto-save file, if we saved it in this session. | 1436 /* Delete any auto-save file, if we saved it in this session. |
1429 But not if the buffer is modified. */ | 1437 But not if the buffer is modified. */ |
1430 if (STRINGP (b->auto_save_file_name) | 1438 if (STRINGP (b->auto_save_file_name) |
1431 && b->auto_save_modified != 0 | 1439 && b->auto_save_modified != 0 |
1432 && BUF_SAVE_MODIFF (b) < b->auto_save_modified | 1440 && BUF_SAVE_MODIFF (b) < b->auto_save_modified |
1433 && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) | 1441 && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) |
1442 && NILP (Fsymbol_value (intern ("auto-save-visited-file-name")))) | |
1434 { | 1443 { |
1435 Lisp_Object tem; | 1444 Lisp_Object tem; |
1436 tem = Fsymbol_value (intern ("delete-auto-save-files")); | 1445 tem = Fsymbol_value (intern ("delete-auto-save-files")); |
1437 if (! NILP (tem)) | 1446 if (! NILP (tem)) |
1438 internal_delete_file (b->auto_save_file_name); | 1447 internal_delete_file (b->auto_save_file_name); |
1672 | 1681 |
1673 DEFUN ("pop-to-buffer", Fpop_to_buffer, Spop_to_buffer, 1, 3, 0, | 1682 DEFUN ("pop-to-buffer", Fpop_to_buffer, Spop_to_buffer, 1, 3, 0, |
1674 doc: /* Select buffer BUFFER in some window, preferably a different one. | 1683 doc: /* Select buffer BUFFER in some window, preferably a different one. |
1675 If BUFFER is nil, then some other buffer is chosen. | 1684 If BUFFER is nil, then some other buffer is chosen. |
1676 If `pop-up-windows' is non-nil, windows can be split to do this. | 1685 If `pop-up-windows' is non-nil, windows can be split to do this. |
1677 If optional second arg OTHER-WINDOW is non-nil, insist on finding another | 1686 If optional second arg OTHER-WINDOW is nil, insist on finding another |
1678 window even if BUFFER is already visible in the selected window. | 1687 window even if BUFFER is already visible in the selected window, |
1688 and ignore `same-window-regexps' and `same-window-buffer-names'. | |
1679 This uses the function `display-buffer' as a subroutine; see the documentation | 1689 This uses the function `display-buffer' as a subroutine; see the documentation |
1680 of `display-buffer' for additional customization information. | 1690 of `display-buffer' for additional customization information. |
1681 | 1691 |
1682 Optional third arg NORECORD non-nil means | 1692 Optional third arg NORECORD non-nil means |
1683 do not put this buffer at the front of the list of recently selected ones. */) | 1693 do not put this buffer at the front of the list of recently selected ones. */) |
2080 If FLAG is t, this makes the buffer a multibyte buffer. | 2090 If FLAG is t, this makes the buffer a multibyte buffer. |
2081 If FLAG is nil, this makes the buffer a single-byte buffer. | 2091 If FLAG is nil, this makes the buffer a single-byte buffer. |
2082 In these cases, the buffer contents remain unchanged as a sequence of | 2092 In these cases, the buffer contents remain unchanged as a sequence of |
2083 bytes but the contents viewed as characters do change. | 2093 bytes but the contents viewed as characters do change. |
2084 If FLAG is `to', this makes the buffer a multibyte buffer by changing | 2094 If FLAG is `to', this makes the buffer a multibyte buffer by changing |
2085 all eight-bit bytes to eight-bit characters. */) | 2095 all eight-bit bytes to eight-bit characters. |
2096 If the multibyte flag was really changed, undo information of the | |
2097 current buffer is cleared. */) | |
2086 (flag) | 2098 (flag) |
2087 Lisp_Object flag; | 2099 Lisp_Object flag; |
2088 { | 2100 { |
2089 struct Lisp_Marker *tail, *markers; | 2101 struct Lisp_Marker *tail, *markers; |
2090 struct buffer *other; | 2102 struct buffer *other; |
3299 /* Fix up overlays that were garbled as a result of permuting markers | 3311 /* Fix up overlays that were garbled as a result of permuting markers |
3300 in the range START through END. Any overlay with at least one | 3312 in the range START through END. Any overlay with at least one |
3301 endpoint in this range will need to be unlinked from the overlay | 3313 endpoint in this range will need to be unlinked from the overlay |
3302 list and reinserted in its proper place. | 3314 list and reinserted in its proper place. |
3303 Such an overlay might even have negative size at this point. | 3315 Such an overlay might even have negative size at this point. |
3304 If so, we'll reverse the endpoints. Can you think of anything | 3316 If so, we'll make the overlay empty. */ |
3305 better to do in this situation? */ | |
3306 void | 3317 void |
3307 fix_overlays_in_range (start, end) | 3318 fix_start_end_in_overlays (start, end) |
3308 register int start, end; | 3319 register int start, end; |
3309 { | 3320 { |
3310 Lisp_Object overlay; | 3321 Lisp_Object overlay; |
3311 struct Lisp_Overlay *before_list, *after_list; | 3322 struct Lisp_Overlay *before_list, *after_list; |
3312 /* These are either nil, indicating that before_list or after_list | 3323 /* These are either nil, indicating that before_list or after_list |
3327 that before_list isn't initialized, although it may look | 3338 that before_list isn't initialized, although it may look |
3328 strange. */ | 3339 strange. */ |
3329 for (parent = NULL, tail = current_buffer->overlays_before; tail;) | 3340 for (parent = NULL, tail = current_buffer->overlays_before; tail;) |
3330 { | 3341 { |
3331 XSETMISC (overlay, tail); | 3342 XSETMISC (overlay, tail); |
3343 | |
3332 endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); | 3344 endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); |
3345 startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); | |
3346 | |
3347 /* If the overlay is backwards, make it empty. */ | |
3348 if (endpos < startpos) | |
3349 { | |
3350 startpos = endpos; | |
3351 Fset_marker (OVERLAY_START (overlay), make_number (startpos), | |
3352 Qnil); | |
3353 } | |
3354 | |
3333 if (endpos < start) | 3355 if (endpos < start) |
3334 break; | 3356 break; |
3335 startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); | 3357 |
3336 if (endpos < end | 3358 if (endpos < end |
3337 || (startpos >= start && startpos < end)) | 3359 || (startpos >= start && startpos < end)) |
3338 { | 3360 { |
3339 /* If the overlay is backwards, fix that now. */ | |
3340 if (startpos > endpos) | |
3341 { | |
3342 int tem; | |
3343 Fset_marker (OVERLAY_START (overlay), make_number (endpos), | |
3344 Qnil); | |
3345 Fset_marker (OVERLAY_END (overlay), make_number (startpos), | |
3346 Qnil); | |
3347 tem = startpos; startpos = endpos; endpos = tem; | |
3348 } | |
3349 /* Add it to the end of the wrong list. Later on, | 3361 /* Add it to the end of the wrong list. Later on, |
3350 recenter_overlay_lists will move it to the right place. */ | 3362 recenter_overlay_lists will move it to the right place. */ |
3351 if (endpos < current_buffer->overlay_center) | 3363 if (endpos < current_buffer->overlay_center) |
3352 { | 3364 { |
3353 if (!afterp) | 3365 if (!afterp) |
3374 parent = tail, tail = parent->next; | 3386 parent = tail, tail = parent->next; |
3375 } | 3387 } |
3376 for (parent = NULL, tail = current_buffer->overlays_after; tail;) | 3388 for (parent = NULL, tail = current_buffer->overlays_after; tail;) |
3377 { | 3389 { |
3378 XSETMISC (overlay, tail); | 3390 XSETMISC (overlay, tail); |
3391 | |
3379 startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); | 3392 startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); |
3393 endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); | |
3394 | |
3395 /* If the overlay is backwards, make it empty. */ | |
3396 if (endpos < startpos) | |
3397 { | |
3398 startpos = endpos; | |
3399 Fset_marker (OVERLAY_START (overlay), make_number (startpos), | |
3400 Qnil); | |
3401 } | |
3402 | |
3380 if (startpos >= end) | 3403 if (startpos >= end) |
3381 break; | 3404 break; |
3382 endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); | 3405 |
3383 if (startpos >= start | 3406 if (startpos >= start |
3384 || (endpos >= start && endpos < end)) | 3407 || (endpos >= start && endpos < end)) |
3385 { | 3408 { |
3386 if (startpos > endpos) | |
3387 { | |
3388 int tem; | |
3389 Fset_marker (OVERLAY_START (overlay), make_number (endpos), | |
3390 Qnil); | |
3391 Fset_marker (OVERLAY_END (overlay), make_number (startpos), | |
3392 Qnil); | |
3393 tem = startpos; startpos = endpos; endpos = tem; | |
3394 } | |
3395 if (endpos < current_buffer->overlay_center) | 3409 if (endpos < current_buffer->overlay_center) |
3396 { | 3410 { |
3397 if (!afterp) | 3411 if (!afterp) |
3398 after_list = tail; | 3412 after_list = tail; |
3399 else | 3413 else |
4972 buffer_defaults.right_fringe_width = Qnil; | 4986 buffer_defaults.right_fringe_width = Qnil; |
4973 buffer_defaults.fringes_outside_margins = Qnil; | 4987 buffer_defaults.fringes_outside_margins = Qnil; |
4974 buffer_defaults.scroll_bar_width = Qnil; | 4988 buffer_defaults.scroll_bar_width = Qnil; |
4975 buffer_defaults.vertical_scroll_bar_type = Qt; | 4989 buffer_defaults.vertical_scroll_bar_type = Qt; |
4976 buffer_defaults.indicate_empty_lines = Qnil; | 4990 buffer_defaults.indicate_empty_lines = Qnil; |
4991 buffer_defaults.indicate_buffer_boundaries = Qnil; | |
4977 buffer_defaults.scroll_up_aggressively = Qnil; | 4992 buffer_defaults.scroll_up_aggressively = Qnil; |
4978 buffer_defaults.scroll_down_aggressively = Qnil; | 4993 buffer_defaults.scroll_down_aggressively = Qnil; |
4979 buffer_defaults.display_time = Qnil; | 4994 buffer_defaults.display_time = Qnil; |
4980 | 4995 |
4981 /* Assign the local-flags to the slots that have default values. | 4996 /* Assign the local-flags to the slots that have default values. |
5041 XSETFASTINT (buffer_local_flags.right_fringe_width, idx); ++idx; | 5056 XSETFASTINT (buffer_local_flags.right_fringe_width, idx); ++idx; |
5042 XSETFASTINT (buffer_local_flags.fringes_outside_margins, idx); ++idx; | 5057 XSETFASTINT (buffer_local_flags.fringes_outside_margins, idx); ++idx; |
5043 XSETFASTINT (buffer_local_flags.scroll_bar_width, idx); ++idx; | 5058 XSETFASTINT (buffer_local_flags.scroll_bar_width, idx); ++idx; |
5044 XSETFASTINT (buffer_local_flags.vertical_scroll_bar_type, idx); ++idx; | 5059 XSETFASTINT (buffer_local_flags.vertical_scroll_bar_type, idx); ++idx; |
5045 XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx; | 5060 XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx; |
5061 XSETFASTINT (buffer_local_flags.indicate_buffer_boundaries, idx); ++idx; | |
5046 XSETFASTINT (buffer_local_flags.scroll_up_aggressively, idx); ++idx; | 5062 XSETFASTINT (buffer_local_flags.scroll_up_aggressively, idx); ++idx; |
5047 XSETFASTINT (buffer_local_flags.scroll_down_aggressively, idx); ++idx; | 5063 XSETFASTINT (buffer_local_flags.scroll_down_aggressively, idx); ++idx; |
5048 XSETFASTINT (buffer_local_flags.header_line_format, idx); ++idx; | 5064 XSETFASTINT (buffer_local_flags.header_line_format, idx); ++idx; |
5049 XSETFASTINT (buffer_local_flags.cursor_type, idx); ++idx; | 5065 XSETFASTINT (buffer_local_flags.cursor_type, idx); ++idx; |
5050 XSETFASTINT (buffer_local_flags.extra_line_spacing, idx); ++idx; | 5066 XSETFASTINT (buffer_local_flags.extra_line_spacing, idx); ++idx; |
5328 | 5344 |
5329 DEFVAR_LISP_NOPRO ("default-indicate-empty-lines", | 5345 DEFVAR_LISP_NOPRO ("default-indicate-empty-lines", |
5330 &buffer_defaults.indicate_empty_lines, | 5346 &buffer_defaults.indicate_empty_lines, |
5331 doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. | 5347 doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. |
5332 This is the same as (default-value 'indicate-empty-lines). */); | 5348 This is the same as (default-value 'indicate-empty-lines). */); |
5349 | |
5350 DEFVAR_LISP_NOPRO ("default-indicate-buffer-boundaries", | |
5351 &buffer_defaults.indicate_buffer_boundaries, | |
5352 doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it. | |
5353 This is the same as (default-value 'indicate-buffer-boundaries). */); | |
5333 | 5354 |
5334 DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", | 5355 DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", |
5335 &buffer_defaults.scroll_up_aggressively, | 5356 &buffer_defaults.scroll_up_aggressively, |
5336 doc: /* Default value of `scroll-up-aggressively'. | 5357 doc: /* Default value of `scroll-up-aggressively'. |
5337 This value applies in buffers that don't have their own local values. | 5358 This value applies in buffers that don't have their own local values. |
5386 For a modified read-only buffer, %* gives % and %+ gives *. | 5407 For a modified read-only buffer, %* gives % and %+ gives *. |
5387 %s -- print process status. %l -- print the current line number. | 5408 %s -- print process status. %l -- print the current line number. |
5388 %c -- print the current column number (this makes editing slower). | 5409 %c -- print the current column number (this makes editing slower). |
5389 To make the column number update correctly in all cases, | 5410 To make the column number update correctly in all cases, |
5390 `column-number-mode' must be non-nil. | 5411 `column-number-mode' must be non-nil. |
5412 %i -- print the size of the buffer. | |
5413 %I -- like %i, but use k, M, G, etc., to abbreviate. | |
5391 %p -- print percent of buffer above top of window, or Top, Bot or All. | 5414 %p -- print percent of buffer above top of window, or Top, Bot or All. |
5392 %P -- print percent of buffer above bottom of window, perhaps plus Top, | 5415 %P -- print percent of buffer above bottom of window, perhaps plus Top, |
5393 or print Bottom or All. | 5416 or print Bottom or All. |
5394 %m -- print the mode name. | 5417 %m -- print the mode name. |
5395 %n -- print Narrow if appropriate. | 5418 %n -- print Narrow if appropriate. |
5636 DEFVAR_PER_BUFFER ("indicate-empty-lines", | 5659 DEFVAR_PER_BUFFER ("indicate-empty-lines", |
5637 ¤t_buffer->indicate_empty_lines, Qnil, | 5660 ¤t_buffer->indicate_empty_lines, Qnil, |
5638 doc: /* *Visually indicate empty lines after the buffer end. | 5661 doc: /* *Visually indicate empty lines after the buffer end. |
5639 If non-nil, a bitmap is displayed in the left fringe of a window on | 5662 If non-nil, a bitmap is displayed in the left fringe of a window on |
5640 window-systems. */); | 5663 window-systems. */); |
5664 | |
5665 DEFVAR_PER_BUFFER ("indicate-buffer-boundaries", | |
5666 ¤t_buffer->indicate_buffer_boundaries, Qnil, | |
5667 doc: /* *Visually indicate buffer boundaries and scrolling. | |
5668 If non-nil, the first and last line of the buffer are marked in the fringe | |
5669 of a window on window-systems with angle bitmaps, or if the window can be | |
5670 scrolled, the top and bottom line of the window are marked with up and down | |
5671 arrow bitmaps. | |
5672 If value is `left' or `right', both angle and arrow bitmaps are displayed in | |
5673 the left or right fringe, resp. Any other non-nil value causes the | |
5674 bitmap on the top line to be displayed in the left fringe, and the | |
5675 bitmap on the bottom line in the right fringe. | |
5676 If value is a cons (ANGLES . ARROWS), the car specifies the position | |
5677 of the angle bitmaps, and the cdr specifies the position of the arrow | |
5678 bitmaps. For example, (t . right) places the top angle bitmap in left | |
5679 fringe, the bottom angle bitmap in right fringe, and both arrow | |
5680 bitmaps in right fringe. To show just the angle bitmaps in the left | |
5681 fringe, but no arrow bitmaps, use (left . nil). */); | |
5641 | 5682 |
5642 DEFVAR_PER_BUFFER ("scroll-up-aggressively", | 5683 DEFVAR_PER_BUFFER ("scroll-up-aggressively", |
5643 ¤t_buffer->scroll_up_aggressively, Qnil, | 5684 ¤t_buffer->scroll_up_aggressively, Qnil, |
5644 doc: /* How far to scroll windows upward. | 5685 doc: /* How far to scroll windows upward. |
5645 If you move point off the bottom, the window scrolls automatically. | 5686 If you move point off the bottom, the window scrolls automatically. |
5905 | 5946 |
5906 /* This must not be in syms_of_buffer, because Qdisabled is not | 5947 /* This must not be in syms_of_buffer, because Qdisabled is not |
5907 initialized when that function gets called. */ | 5948 initialized when that function gets called. */ |
5908 Fput (intern ("erase-buffer"), Qdisabled, Qt); | 5949 Fput (intern ("erase-buffer"), Qdisabled, Qt); |
5909 } | 5950 } |
5951 | |
5952 /* arch-tag: e48569bf-69a9-4b65-a23b-8e68769436e1 | |
5953 (do not change this comment) */ |