aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBill Wohler2013-02-18 10:11:43 -0800
committerBill Wohler2013-02-18 10:11:43 -0800
commit21733e4f154f8830fa568a347a0d6dbd59793c2b (patch)
tree3170dbbcdfafeb42f6c381d6b80b251e9f31b788 /src/buffer.c
parent6d14beddb06b5ae86f9dd770a1661ebd24846f28 (diff)
parent587feed443522f738b65b57b22a31cc8a25525c5 (diff)
downloademacs-21733e4f154f8830fa568a347a0d6dbd59793c2b.tar.gz
emacs-21733e4f154f8830fa568a347a0d6dbd59793c2b.zip
Merge from trunk; up to 2013-02-18T01:30:27Z!monnier@iro.umontreal.ca.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c180
1 files changed, 83 insertions, 97 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 6e2191dc22f..aa3fcf8c234 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1,6 +1,7 @@
1/* Buffer manipulation primitives for GNU Emacs. 1/* Buffer manipulation primitives for GNU Emacs.
2 2
3Copyright (C) 1985-1989, 1993-1995, 1997-2012 Free Software Foundation, Inc. 3Copyright (C) 1985-1989, 1993-1995, 1997-2013 Free Software Foundation,
4Inc.
4 5
5This file is part of GNU Emacs. 6This file is part of GNU Emacs.
6 7
@@ -371,9 +372,6 @@ bset_zv_marker (struct buffer *b, Lisp_Object val)
371 b->INTERNAL_FIELD (zv_marker) = val; 372 b->INTERNAL_FIELD (zv_marker) = val;
372} 373}
373 374
374/* For debugging; temporary. See set_buffer_internal. */
375/* Lisp_Object Qlisp_mode, Vcheck_symbol; */
376
377void 375void
378nsberror (Lisp_Object spec) 376nsberror (Lisp_Object spec)
379{ 377{
@@ -547,6 +545,8 @@ even if it is dead. The return value is never nil. */)
547 b->base_buffer = NULL; 545 b->base_buffer = NULL;
548 /* No one shares the text with us now. */ 546 /* No one shares the text with us now. */
549 b->indirections = 0; 547 b->indirections = 0;
548 /* No one shows us now. */
549 b->window_count = 0;
550 550
551 BUF_GAP_SIZE (b) = 20; 551 BUF_GAP_SIZE (b) = 20;
552 block_input (); 552 block_input ();
@@ -573,6 +573,7 @@ even if it is dead. The return value is never nil. */)
573 BUF_CHARS_MODIFF (b) = 1; 573 BUF_CHARS_MODIFF (b) = 1;
574 BUF_OVERLAY_MODIFF (b) = 1; 574 BUF_OVERLAY_MODIFF (b) = 1;
575 BUF_SAVE_MODIFF (b) = 1; 575 BUF_SAVE_MODIFF (b) = 1;
576 BUF_COMPACT (b) = 1;
576 set_buffer_intervals (b, NULL); 577 set_buffer_intervals (b, NULL);
577 BUF_UNCHANGED_MODIFIED (b) = 1; 578 BUF_UNCHANGED_MODIFIED (b) = 1;
578 BUF_OVERLAY_UNCHANGED_MODIFIED (b) = 1; 579 BUF_OVERLAY_UNCHANGED_MODIFIED (b) = 1;
@@ -794,6 +795,8 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
794 b->indirections = -1; 795 b->indirections = -1;
795 /* Notify base buffer that we share the text now. */ 796 /* Notify base buffer that we share the text now. */
796 b->base_buffer->indirections++; 797 b->base_buffer->indirections++;
798 /* Always -1 for an indirect buffer. */
799 b->window_count = -1;
797 800
798 b->pt = b->base_buffer->pt; 801 b->pt = b->base_buffer->pt;
799 b->begv = b->base_buffer->begv; 802 b->begv = b->base_buffer->begv;
@@ -1336,7 +1339,7 @@ DEFUN ("set-buffer-modified-p", Fset_buffer_modified_p, Sset_buffer_modified_p,
1336A non-nil FLAG means mark the buffer modified. */) 1339A non-nil FLAG means mark the buffer modified. */)
1337 (Lisp_Object flag) 1340 (Lisp_Object flag)
1338{ 1341{
1339 Lisp_Object fn, buffer, window; 1342 Lisp_Object fn;
1340 1343
1341#ifdef CLASH_DETECTION 1344#ifdef CLASH_DETECTION
1342 /* If buffer becoming modified, lock the file. 1345 /* If buffer becoming modified, lock the file.
@@ -1389,9 +1392,7 @@ A non-nil FLAG means mark the buffer modified. */)
1389 Ideally, I think there should be another mechanism for fontifying 1392 Ideally, I think there should be another mechanism for fontifying
1390 buffers without "modifying" buffers, or redisplay should be 1393 buffers without "modifying" buffers, or redisplay should be
1391 smarter about updating the `*' in mode lines. --gerd */ 1394 smarter about updating the `*' in mode lines. --gerd */
1392 XSETBUFFER (buffer, current_buffer); 1395 if (buffer_window_count (current_buffer))
1393 window = Fget_buffer_window (buffer, Qt);
1394 if (WINDOWP (window))
1395 { 1396 {
1396 ++update_mode_lines; 1397 ++update_mode_lines;
1397 current_buffer->prevent_redisplay_optimizations_p = 1; 1398 current_buffer->prevent_redisplay_optimizations_p = 1;
@@ -1665,7 +1666,7 @@ compact_buffer (struct buffer *buffer)
1665 which aren't changed since last compaction. */ 1666 which aren't changed since last compaction. */
1666 if (BUFFER_LIVE_P (buffer) 1667 if (BUFFER_LIVE_P (buffer)
1667 && (buffer->base_buffer == NULL) 1668 && (buffer->base_buffer == NULL)
1668 && (buffer->text->compact != buffer->text->modiff)) 1669 && (BUF_COMPACT (buffer) != BUF_MODIFF (buffer)))
1669 { 1670 {
1670 /* If a buffer's undo list is Qt, that means that undo is 1671 /* If a buffer's undo list is Qt, that means that undo is
1671 turned off in that buffer. Calling truncate_undo_list on 1672 turned off in that buffer. Calling truncate_undo_list on
@@ -1678,19 +1679,15 @@ compact_buffer (struct buffer *buffer)
1678 if (!buffer->text->inhibit_shrinking) 1679 if (!buffer->text->inhibit_shrinking)
1679 { 1680 {
1680 /* If a buffer's gap size is more than 10% of the buffer 1681 /* If a buffer's gap size is more than 10% of the buffer
1681 size, or larger than 2000 bytes, then shrink it 1682 size, or larger than GAP_BYTES_DFL bytes, then shrink it
1682 accordingly. Keep a minimum size of 20 bytes. */ 1683 accordingly. Keep a minimum size of GAP_BYTES_MIN bytes. */
1683 int size = min (2000, max (20, (buffer->text->z_byte / 10))); 1684 ptrdiff_t size = clip_to_bounds (GAP_BYTES_MIN,
1684 1685 BUF_Z_BYTE (buffer) / 10,
1685 if (buffer->text->gap_size > size) 1686 GAP_BYTES_DFL);
1686 { 1687 if (BUF_GAP_SIZE (buffer) > size)
1687 struct buffer *save_current = current_buffer; 1688 make_gap_1 (buffer, -(BUF_GAP_SIZE (buffer) - size));
1688 current_buffer = buffer;
1689 make_gap (-(buffer->text->gap_size - size));
1690 current_buffer = save_current;
1691 }
1692 } 1689 }
1693 buffer->text->compact = buffer->text->modiff; 1690 BUF_COMPACT (buffer) = BUF_MODIFF (buffer);
1694 } 1691 }
1695} 1692}
1696 1693
@@ -1929,10 +1926,16 @@ cleaning up all windows currently displaying the buffer to be killed. */)
1929 eassert (b->indirections == -1); 1926 eassert (b->indirections == -1);
1930 b->base_buffer->indirections--; 1927 b->base_buffer->indirections--;
1931 eassert (b->base_buffer->indirections >= 0); 1928 eassert (b->base_buffer->indirections >= 0);
1929 /* Make sure that we wasn't confused. */
1930 eassert (b->window_count == -1);
1932 } 1931 }
1933 else 1932 else
1934 /* No one shares our buffer text, can free it. */ 1933 {
1935 free_buffer_text (b); 1934 /* Make sure that no one shows us. */
1935 eassert (b->window_count == 0);
1936 /* No one shares our buffer text, can free it. */
1937 free_buffer_text (b);
1938 }
1936 1939
1937 if (b->newline_cache) 1940 if (b->newline_cache)
1938 { 1941 {
@@ -2039,7 +2042,7 @@ DEFUN ("bury-buffer-internal", Fbury_buffer_internal, Sbury_buffer_internal,
2039DEFUN ("set-buffer-major-mode", Fset_buffer_major_mode, Sset_buffer_major_mode, 1, 1, 0, 2042DEFUN ("set-buffer-major-mode", Fset_buffer_major_mode, Sset_buffer_major_mode, 1, 1, 0,
2040 doc: /* Set an appropriate major mode for BUFFER. 2043 doc: /* Set an appropriate major mode for BUFFER.
2041For the *scratch* buffer, use `initial-major-mode', otherwise choose a mode 2044For the *scratch* buffer, use `initial-major-mode', otherwise choose a mode
2042according to `default-major-mode'. 2045according to the default value of `major-mode'.
2043Use this function before selecting the buffer, since it may need to inspect 2046Use this function before selecting the buffer, since it may need to inspect
2044the current buffer's major mode. */) 2047the current buffer's major mode. */)
2045 (Lisp_Object buffer) 2048 (Lisp_Object buffer)
@@ -2681,10 +2684,11 @@ current buffer is cleared. */)
2681 2684
2682 UNGCPRO; 2685 UNGCPRO;
2683 2686
2684 /* Changing the multibyteness of a buffer means that all windows
2685 showing that buffer must be updated thoroughly. */
2686 current_buffer->prevent_redisplay_optimizations_p = 1; 2687 current_buffer->prevent_redisplay_optimizations_p = 1;
2687 ++windows_or_buffers_changed; 2688
2689 /* If buffer is shown in a window, let redisplay consider other windows. */
2690 if (buffer_window_count (current_buffer))
2691 ++windows_or_buffers_changed;
2688 2692
2689 /* Copy this buffer's new multibyte status 2693 /* Copy this buffer's new multibyte status
2690 into all of its indirect buffers. */ 2694 into all of its indirect buffers. */
@@ -3147,7 +3151,10 @@ ptrdiff_t
3147sort_overlays (Lisp_Object *overlay_vec, ptrdiff_t noverlays, struct window *w) 3151sort_overlays (Lisp_Object *overlay_vec, ptrdiff_t noverlays, struct window *w)
3148{ 3152{
3149 ptrdiff_t i, j; 3153 ptrdiff_t i, j;
3150 struct sortvec *sortvec = alloca (noverlays * sizeof *sortvec); 3154 USE_SAFE_ALLOCA;
3155 struct sortvec *sortvec;
3156
3157 SAFE_NALLOCA (sortvec, 1, noverlays);
3151 3158
3152 /* Put the valid and relevant overlays into sortvec. */ 3159 /* Put the valid and relevant overlays into sortvec. */
3153 3160
@@ -3193,6 +3200,8 @@ sort_overlays (Lisp_Object *overlay_vec, ptrdiff_t noverlays, struct window *w)
3193 3200
3194 for (i = 0; i < noverlays; i++) 3201 for (i = 0; i < noverlays; i++)
3195 overlay_vec[i] = sortvec[i].overlay; 3202 overlay_vec[i] = sortvec[i].overlay;
3203
3204 SAFE_FREE ();
3196 return (noverlays); 3205 return (noverlays);
3197} 3206}
3198 3207
@@ -3880,17 +3889,17 @@ modify_overlay (struct buffer *buf, ptrdiff_t start, ptrdiff_t end)
3880 3889
3881 BUF_COMPUTE_UNCHANGED (buf, start, end); 3890 BUF_COMPUTE_UNCHANGED (buf, start, end);
3882 3891
3883 /* If this is a buffer not in the selected window, 3892 /* If BUF is visible, consider updating the display if ... */
3884 we must do other windows. */ 3893 if (buffer_window_count (buf) > 0)
3885 if (buf != XBUFFER (XWINDOW (selected_window)->buffer)) 3894 {
3886 windows_or_buffers_changed = 1; 3895 /* ... it's visible in other window than selected, */
3887 /* If multiple windows show this buffer, we must do other windows. */ 3896 if (buf != XBUFFER (XWINDOW (selected_window)->buffer))
3888 else if (buffer_shared > 1) 3897 windows_or_buffers_changed = 1;
3889 windows_or_buffers_changed = 1; 3898 /* ... or if we modify an overlay at the end of the buffer
3890 /* If we modify an overlay at the end of the buffer, we cannot 3899 and so we cannot be sure that window end is still valid. */
3891 be sure that window end is still valid. */ 3900 else if (end >= ZV && start <= ZV)
3892 else if (end >= ZV && start <= ZV) 3901 windows_or_buffers_changed = 1;
3893 windows_or_buffers_changed = 1; 3902 }
3894 3903
3895 ++BUF_OVERLAY_MODIFF (buf); 3904 ++BUF_OVERLAY_MODIFF (buf);
3896} 3905}
@@ -4569,27 +4578,7 @@ evaporate_overlays (ptrdiff_t pos)
4569 for (; CONSP (hit_list); hit_list = XCDR (hit_list)) 4578 for (; CONSP (hit_list); hit_list = XCDR (hit_list))
4570 Fdelete_overlay (XCAR (hit_list)); 4579 Fdelete_overlay (XCAR (hit_list));
4571} 4580}
4572
4573/* Somebody has tried to store a value with an unacceptable type
4574 in the slot with offset OFFSET. */
4575
4576void
4577buffer_slot_type_mismatch (Lisp_Object newval, int type)
4578{
4579 Lisp_Object predicate;
4580
4581 switch (type)
4582 {
4583 case_Lisp_Int: predicate = Qintegerp; break;
4584 case Lisp_String: predicate = Qstringp; break;
4585 case Lisp_Symbol: predicate = Qsymbolp; break;
4586 default: emacs_abort ();
4587 }
4588
4589 wrong_type_argument (predicate, newval);
4590}
4591 4581
4592
4593/*********************************************************************** 4582/***********************************************************************
4594 Allocation with mmap 4583 Allocation with mmap
4595 ***********************************************************************/ 4584 ***********************************************************************/
@@ -5125,6 +5114,9 @@ init_buffer_once (void)
5125 /* No one will share the text with these buffers, but let's play it safe. */ 5114 /* No one will share the text with these buffers, but let's play it safe. */
5126 buffer_defaults.indirections = 0; 5115 buffer_defaults.indirections = 0;
5127 buffer_local_symbols.indirections = 0; 5116 buffer_local_symbols.indirections = 0;
5117 /* Likewise no one will display them. */
5118 buffer_defaults.window_count = 0;
5119 buffer_local_symbols.window_count = 0;
5128 set_buffer_intervals (&buffer_defaults, NULL); 5120 set_buffer_intervals (&buffer_defaults, NULL);
5129 set_buffer_intervals (&buffer_local_symbols, NULL); 5121 set_buffer_intervals (&buffer_local_symbols, NULL);
5130 /* This is not strictly necessary, but let's make them initialized. */ 5122 /* This is not strictly necessary, but let's make them initialized. */
@@ -5360,25 +5352,23 @@ init_buffer (void)
5360 free (pwd); 5352 free (pwd);
5361} 5353}
5362 5354
5363/* Similar to defvar_lisp but define a variable whose value is the Lisp 5355/* Similar to defvar_lisp but define a variable whose value is the
5364 Object stored in the current buffer. address is the address of the slot 5356 Lisp_Object stored in the current buffer. LNAME is the Lisp-level
5365 in the buffer that is current now. */ 5357 variable name. VNAME is the name of the buffer slot. PREDICATE
5366 5358 is nil for a general Lisp variable. If PREDICATE is non-nil, then
5367/* TYPE is nil for a general Lisp variable. 5359 only Lisp values that satisfies the PREDICATE are allowed (except
5368 An integer specifies a type; then only Lisp values 5360 that nil is allowed too). DOC is a dummy where you write the doc
5369 with that type code are allowed (except that nil is allowed too). 5361 string as a comment. */
5370 LNAME is the Lisp-level variable name. 5362
5371 VNAME is the name of the buffer slot. 5363#define DEFVAR_PER_BUFFER(lname, vname, predicate, doc) \
5372 DOC is a dummy where you write the doc string as a comment. */ 5364 do { \
5373#define DEFVAR_PER_BUFFER(lname, vname, type, doc) \ 5365 static struct Lisp_Buffer_Objfwd bo_fwd; \
5374 do { \ 5366 defvar_per_buffer (&bo_fwd, lname, vname, predicate); \
5375 static struct Lisp_Buffer_Objfwd bo_fwd; \
5376 defvar_per_buffer (&bo_fwd, lname, vname, type); \
5377 } while (0) 5367 } while (0)
5378 5368
5379static void 5369static void
5380defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring, 5370defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring,
5381 Lisp_Object *address, Lisp_Object type) 5371 Lisp_Object *address, Lisp_Object predicate)
5382{ 5372{
5383 struct Lisp_Symbol *sym; 5373 struct Lisp_Symbol *sym;
5384 int offset; 5374 int offset;
@@ -5388,7 +5378,7 @@ defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring,
5388 5378
5389 bo_fwd->type = Lisp_Fwd_Buffer_Obj; 5379 bo_fwd->type = Lisp_Fwd_Buffer_Obj;
5390 bo_fwd->offset = offset; 5380 bo_fwd->offset = offset;
5391 bo_fwd->slottype = type; 5381 bo_fwd->predicate = predicate;
5392 sym->declared_special = 1; 5382 sym->declared_special = 1;
5393 sym->redirect = SYMBOL_FORWARDED; 5383 sym->redirect = SYMBOL_FORWARDED;
5394 { 5384 {
@@ -5651,7 +5641,7 @@ Decimal digits after the % specify field width to which to pad. */);
5651 doc: /* Value of `major-mode' for new buffers. */); 5641 doc: /* Value of `major-mode' for new buffers. */);
5652 5642
5653 DEFVAR_PER_BUFFER ("major-mode", &BVAR (current_buffer, major_mode), 5643 DEFVAR_PER_BUFFER ("major-mode", &BVAR (current_buffer, major_mode),
5654 make_number (Lisp_Symbol), 5644 Qsymbolp,
5655 doc: /* Symbol for current buffer's major mode. 5645 doc: /* Symbol for current buffer's major mode.
5656The default value (normally `fundamental-mode') affects new buffers. 5646The default value (normally `fundamental-mode') affects new buffers.
5657A value of nil means to use the current buffer's major mode, provided 5647A value of nil means to use the current buffer's major mode, provided
@@ -5682,17 +5672,17 @@ Use the command `abbrev-mode' to change this variable. */);
5682 doc: /* Non-nil if searches and matches should ignore case. */); 5672 doc: /* Non-nil if searches and matches should ignore case. */);
5683 5673
5684 DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column), 5674 DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column),
5685 make_number (Lisp_Int0), 5675 Qintegerp,
5686 doc: /* Column beyond which automatic line-wrapping should happen. 5676 doc: /* Column beyond which automatic line-wrapping should happen.
5687Interactively, you can set the buffer local value using \\[set-fill-column]. */); 5677Interactively, you can set the buffer local value using \\[set-fill-column]. */);
5688 5678
5689 DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin), 5679 DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin),
5690 make_number (Lisp_Int0), 5680 Qintegerp,
5691 doc: /* Column for the default `indent-line-function' to indent to. 5681 doc: /* Column for the default `indent-line-function' to indent to.
5692Linefeed indents to this column in Fundamental mode. */); 5682Linefeed indents to this column in Fundamental mode. */);
5693 5683
5694 DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width), 5684 DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width),
5695 make_number (Lisp_Int0), 5685 Qintegerp,
5696 doc: /* Distance between tab stops (for display of tab characters), in columns. 5686 doc: /* Distance between tab stops (for display of tab characters), in columns.
5697This should be an integer greater than zero. */); 5687This should be an integer greater than zero. */);
5698 5688
@@ -5777,7 +5767,7 @@ visual lines rather than logical lines. See the documentation of
5777`visual-line-mode'. */); 5767`visual-line-mode'. */);
5778 5768
5779 DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory), 5769 DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory),
5780 make_number (Lisp_String), 5770 Qstringp,
5781 doc: /* Name of default directory of current buffer. Should end with slash. 5771 doc: /* Name of default directory of current buffer. Should end with slash.
5782To interactively change the default directory, use command `cd'. */); 5772To interactively change the default directory, use command `cd'. */);
5783 5773
@@ -5790,18 +5780,18 @@ NOTE: This variable is not a hook;
5790its value may not be a list of functions. */); 5780its value may not be a list of functions. */);
5791 5781
5792 DEFVAR_PER_BUFFER ("buffer-file-name", &BVAR (current_buffer, filename), 5782 DEFVAR_PER_BUFFER ("buffer-file-name", &BVAR (current_buffer, filename),
5793 make_number (Lisp_String), 5783 Qstringp,
5794 doc: /* Name of file visited in current buffer, or nil if not visiting a file. */); 5784 doc: /* Name of file visited in current buffer, or nil if not visiting a file. */);
5795 5785
5796 DEFVAR_PER_BUFFER ("buffer-file-truename", &BVAR (current_buffer, file_truename), 5786 DEFVAR_PER_BUFFER ("buffer-file-truename", &BVAR (current_buffer, file_truename),
5797 make_number (Lisp_String), 5787 Qstringp,
5798 doc: /* Abbreviated truename of file visited in current buffer, or nil if none. 5788 doc: /* Abbreviated truename of file visited in current buffer, or nil if none.
5799The truename of a file is calculated by `file-truename' 5789The truename of a file is calculated by `file-truename'
5800and then abbreviated with `abbreviate-file-name'. */); 5790and then abbreviated with `abbreviate-file-name'. */);
5801 5791
5802 DEFVAR_PER_BUFFER ("buffer-auto-save-file-name", 5792 DEFVAR_PER_BUFFER ("buffer-auto-save-file-name",
5803 &BVAR (current_buffer, auto_save_file_name), 5793 &BVAR (current_buffer, auto_save_file_name),
5804 make_number (Lisp_String), 5794 Qstringp,
5805 doc: /* Name of file for auto-saving current buffer. 5795 doc: /* Name of file for auto-saving current buffer.
5806If it is nil, that means don't auto-save this buffer. */); 5796If it is nil, that means don't auto-save this buffer. */);
5807 5797
@@ -5813,7 +5803,7 @@ If it is nil, that means don't auto-save this buffer. */);
5813Backing up is done before the first time the file is saved. */); 5803Backing up is done before the first time the file is saved. */);
5814 5804
5815 DEFVAR_PER_BUFFER ("buffer-saved-size", &BVAR (current_buffer, save_length), 5805 DEFVAR_PER_BUFFER ("buffer-saved-size", &BVAR (current_buffer, save_length),
5816 make_number (Lisp_Int0), 5806 Qintegerp,
5817 doc: /* Length of current buffer when last read in, saved or auto-saved. 5807 doc: /* Length of current buffer when last read in, saved or auto-saved.
58180 initially. 58080 initially.
5819-1 means auto-saving turned off until next real save. 5809-1 means auto-saving turned off until next real save.
@@ -5883,23 +5873,23 @@ In addition, a char-table has six extra slots to control the display of:
5883See also the functions `display-table-slot' and `set-display-table-slot'. */); 5873See also the functions `display-table-slot' and `set-display-table-slot'. */);
5884 5874
5885 DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols), 5875 DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols),
5886 Qnil, 5876 Qintegerp,
5887 doc: /* Width of left marginal area for display of a buffer. 5877 doc: /* Width of left marginal area for display of a buffer.
5888A value of nil means no marginal area. */); 5878A value of nil means no marginal area. */);
5889 5879
5890 DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols), 5880 DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols),
5891 Qnil, 5881 Qintegerp,
5892 doc: /* Width of right marginal area for display of a buffer. 5882 doc: /* Width of right marginal area for display of a buffer.
5893A value of nil means no marginal area. */); 5883A value of nil means no marginal area. */);
5894 5884
5895 DEFVAR_PER_BUFFER ("left-fringe-width", &BVAR (current_buffer, left_fringe_width), 5885 DEFVAR_PER_BUFFER ("left-fringe-width", &BVAR (current_buffer, left_fringe_width),
5896 Qnil, 5886 Qintegerp,
5897 doc: /* Width of this buffer's left fringe (in pixels). 5887 doc: /* Width of this buffer's left fringe (in pixels).
5898A value of 0 means no left fringe is shown in this buffer's window. 5888A value of 0 means no left fringe is shown in this buffer's window.
5899A value of nil means to use the left fringe width from the window's frame. */); 5889A value of nil means to use the left fringe width from the window's frame. */);
5900 5890
5901 DEFVAR_PER_BUFFER ("right-fringe-width", &BVAR (current_buffer, right_fringe_width), 5891 DEFVAR_PER_BUFFER ("right-fringe-width", &BVAR (current_buffer, right_fringe_width),
5902 Qnil, 5892 Qintegerp,
5903 doc: /* Width of this buffer's right fringe (in pixels). 5893 doc: /* Width of this buffer's right fringe (in pixels).
5904A value of 0 means no right fringe is shown in this buffer's window. 5894A value of 0 means no right fringe is shown in this buffer's window.
5905A value of nil means to use the right fringe width from the window's frame. */); 5895A value of nil means to use the right fringe width from the window's frame. */);
@@ -5910,7 +5900,7 @@ A value of nil means to use the right fringe width from the window's frame. */)
5910A value of nil means to display fringes between margins and buffer text. */); 5900A value of nil means to display fringes between margins and buffer text. */);
5911 5901
5912 DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width), 5902 DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width),
5913 Qnil, 5903 Qintegerp,
5914 doc: /* Width of this buffer's scroll bars in pixels. 5904 doc: /* Width of this buffer's scroll bars in pixels.
5915A value of nil means to use the scroll bar width from the window's frame. */); 5905A value of nil means to use the scroll bar width from the window's frame. */);
5916 5906
@@ -5990,7 +5980,7 @@ BITMAP is the corresponding fringe bitmap shown for the logical
5990cursor type. */); 5980cursor type. */);
5991 5981
5992 DEFVAR_PER_BUFFER ("scroll-up-aggressively", 5982 DEFVAR_PER_BUFFER ("scroll-up-aggressively",
5993 &BVAR (current_buffer, scroll_up_aggressively), Qnil, 5983 &BVAR (current_buffer, scroll_up_aggressively), Qfloatp,
5994 doc: /* How far to scroll windows upward. 5984 doc: /* How far to scroll windows upward.
5995If you move point off the bottom, the window scrolls automatically. 5985If you move point off the bottom, the window scrolls automatically.
5996This variable controls how far it scrolls. The value nil, the default, 5986This variable controls how far it scrolls. The value nil, the default,
@@ -6003,7 +5993,7 @@ window scrolls by a full window height. Meaningful values are
6003between 0.0 and 1.0, inclusive. */); 5993between 0.0 and 1.0, inclusive. */);
6004 5994
6005 DEFVAR_PER_BUFFER ("scroll-down-aggressively", 5995 DEFVAR_PER_BUFFER ("scroll-down-aggressively",
6006 &BVAR (current_buffer, scroll_down_aggressively), Qnil, 5996 &BVAR (current_buffer, scroll_down_aggressively), Qfloatp,
6007 doc: /* How far to scroll windows downward. 5997 doc: /* How far to scroll windows downward.
6008If you move point off the top, the window scrolls automatically. 5998If you move point off the top, the window scrolls automatically.
6009This variable controls how far it scrolls. The value nil, the default, 5999This variable controls how far it scrolls. The value nil, the default,
@@ -6015,10 +6005,6 @@ simple case that you moved off with C-b means scrolling just one line.
6015window scrolls by a full window height. Meaningful values are 6005window scrolls by a full window height. Meaningful values are
6016between 0.0 and 1.0, inclusive. */); 6006between 0.0 and 1.0, inclusive. */);
6017 6007
6018/*DEFVAR_LISP ("debug-check-symbol", &Vcheck_symbol,
6019 "Don't ask.");
6020*/
6021
6022 DEFVAR_LISP ("before-change-functions", Vbefore_change_functions, 6008 DEFVAR_LISP ("before-change-functions", Vbefore_change_functions,
6023 doc: /* List of functions to call before each text change. 6009 doc: /* List of functions to call before each text change.
6024Two arguments are passed to each function: the positions of 6010Two arguments are passed to each function: the positions of
@@ -6157,7 +6143,7 @@ then characters with property value PROP are invisible,
6157and they have an ellipsis as well if ELLIPSIS is non-nil. */); 6143and they have an ellipsis as well if ELLIPSIS is non-nil. */);
6158 6144
6159 DEFVAR_PER_BUFFER ("buffer-display-count", 6145 DEFVAR_PER_BUFFER ("buffer-display-count",
6160 &BVAR (current_buffer, display_count), Qnil, 6146 &BVAR (current_buffer, display_count), Qintegerp,
6161 doc: /* A number incremented each time this buffer is displayed in a window. 6147 doc: /* A number incremented each time this buffer is displayed in a window.
6162The function `set-window-buffer' increments it. */); 6148The function `set-window-buffer' increments it. */);
6163 6149
@@ -6216,7 +6202,7 @@ cursor's appearance is instead controlled by the variable
6216`cursor-in-non-selected-windows'. */); 6202`cursor-in-non-selected-windows'. */);
6217 6203
6218 DEFVAR_PER_BUFFER ("line-spacing", 6204 DEFVAR_PER_BUFFER ("line-spacing",
6219 &BVAR (current_buffer, extra_line_spacing), Qnil, 6205 &BVAR (current_buffer, extra_line_spacing), Qnumberp,
6220 doc: /* Additional space to put between lines when displaying a buffer. 6206 doc: /* Additional space to put between lines when displaying a buffer.
6221The space is measured in pixels, and put below lines on graphic displays, 6207The space is measured in pixels, and put below lines on graphic displays,
6222see `display-graphic-p'. 6208see `display-graphic-p'.