aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorKim F. Storm2003-05-24 21:54:43 +0000
committerKim F. Storm2003-05-24 21:54:43 +0000
commit2ad8731a6b1bb76976550e3df25251cb77efe21d (patch)
tree760bbc29b3928fb6b08d10090149cd392c3afb80 /src/buffer.c
parent0416870b3119cdc4c4b716ade904083b7d04fe3c (diff)
downloademacs-2ad8731a6b1bb76976550e3df25251cb77efe21d.tar.gz
emacs-2ad8731a6b1bb76976550e3df25251cb77efe21d.zip
(init_buffer_once): Set buffer_defaults and
buffer_local_flags for new buffer-local variables left_fringe_width, right_fringe_width, fringes_outside_margins, scroll_bar_width, and vertical_scroll_bar_type. (syms_of_buffer): Defvar_per_buffer them, and defvar_lisp_nopro default-* variables for them.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c82
1 files changed, 74 insertions, 8 deletions
diff --git a/src/buffer.c b/src/buffer.c
index e9efad631dd..dd3db48cb98 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1607,7 +1607,7 @@ switch_to_buffer_1 (buffer, norecord)
1607 Fset_window_buffer (EQ (selected_window, minibuf_window) 1607 Fset_window_buffer (EQ (selected_window, minibuf_window)
1608 ? Fnext_window (minibuf_window, Qnil, Qnil) 1608 ? Fnext_window (minibuf_window, Qnil, Qnil)
1609 : selected_window, 1609 : selected_window,
1610 buf); 1610 buf, Qnil);
1611 1611
1612 return buf; 1612 return buf;
1613} 1613}
@@ -4927,6 +4927,13 @@ init_buffer_once ()
4927 buffer_defaults.cache_long_line_scans = Qnil; 4927 buffer_defaults.cache_long_line_scans = Qnil;
4928 buffer_defaults.file_truename = Qnil; 4928 buffer_defaults.file_truename = Qnil;
4929 XSETFASTINT (buffer_defaults.display_count, 0); 4929 XSETFASTINT (buffer_defaults.display_count, 0);
4930 XSETFASTINT (buffer_defaults.left_margin_cols, 0);
4931 XSETFASTINT (buffer_defaults.right_margin_cols, 0);
4932 buffer_defaults.left_fringe_width = Qnil;
4933 buffer_defaults.right_fringe_width = Qnil;
4934 buffer_defaults.fringes_outside_margins = Qnil;
4935 buffer_defaults.scroll_bar_width = Qnil;
4936 buffer_defaults.vertical_scroll_bar_type = Qt;
4930 buffer_defaults.indicate_empty_lines = Qnil; 4937 buffer_defaults.indicate_empty_lines = Qnil;
4931 buffer_defaults.scroll_up_aggressively = Qnil; 4938 buffer_defaults.scroll_up_aggressively = Qnil;
4932 buffer_defaults.scroll_down_aggressively = Qnil; 4939 buffer_defaults.scroll_down_aggressively = Qnil;
@@ -4989,8 +4996,13 @@ init_buffer_once ()
4989 XSETFASTINT (buffer_local_flags.buffer_file_coding_system, idx); 4996 XSETFASTINT (buffer_local_flags.buffer_file_coding_system, idx);
4990 /* Make this one a permanent local. */ 4997 /* Make this one a permanent local. */
4991 buffer_permanent_local_flags[idx++] = 1; 4998 buffer_permanent_local_flags[idx++] = 1;
4992 XSETFASTINT (buffer_local_flags.left_margin_width, idx); ++idx; 4999 XSETFASTINT (buffer_local_flags.left_margin_cols, idx); ++idx;
4993 XSETFASTINT (buffer_local_flags.right_margin_width, idx); ++idx; 5000 XSETFASTINT (buffer_local_flags.right_margin_cols, idx); ++idx;
5001 XSETFASTINT (buffer_local_flags.left_fringe_width, idx); ++idx;
5002 XSETFASTINT (buffer_local_flags.right_fringe_width, idx); ++idx;
5003 XSETFASTINT (buffer_local_flags.fringes_outside_margins, idx); ++idx;
5004 XSETFASTINT (buffer_local_flags.scroll_bar_width, idx); ++idx;
5005 XSETFASTINT (buffer_local_flags.vertical_scroll_bar_type, idx); ++idx;
4994 XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx; 5006 XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx;
4995 XSETFASTINT (buffer_local_flags.scroll_up_aggressively, idx); ++idx; 5007 XSETFASTINT (buffer_local_flags.scroll_up_aggressively, idx); ++idx;
4996 XSETFASTINT (buffer_local_flags.scroll_down_aggressively, idx); ++idx; 5008 XSETFASTINT (buffer_local_flags.scroll_down_aggressively, idx); ++idx;
@@ -5240,15 +5252,40 @@ The file type is nil for text, t for binary. */);
5240#endif 5252#endif
5241 5253
5242 DEFVAR_LISP_NOPRO ("default-left-margin-width", 5254 DEFVAR_LISP_NOPRO ("default-left-margin-width",
5243 &buffer_defaults.left_margin_width, 5255 &buffer_defaults.left_margin_cols,
5244 doc: /* Default value of `left-margin-width' for buffers that don't override it. 5256 doc: /* Default value of `left-margin-width' for buffers that don't override it.
5245This is the same as (default-value 'left-margin-width). */); 5257This is the same as (default-value 'left-margin-width). */);
5246 5258
5247 DEFVAR_LISP_NOPRO ("default-right-margin-width", 5259 DEFVAR_LISP_NOPRO ("default-right-margin-width",
5248 &buffer_defaults.right_margin_width, 5260 &buffer_defaults.right_margin_cols,
5249 doc: /* Default value of `right_margin_width' for buffers that don't override it. 5261 doc: /* Default value of `right-margin-width' for buffers that don't override it.
5250This is the same as (default-value 'right-margin-width). */); 5262This is the same as (default-value 'right-margin-width). */);
5251 5263
5264 DEFVAR_LISP_NOPRO ("default-left-fringe-width",
5265 &buffer_defaults.left_fringe_width,
5266 doc: /* Default value of `left-fringe-width' for buffers that don't override it.
5267This is the same as (default-value 'left-fringe-width). */);
5268
5269 DEFVAR_LISP_NOPRO ("default-right-fringe-width",
5270 &buffer_defaults.right_fringe_width,
5271 doc: /* Default value of `right-fringe-width' for buffers that don't override it.
5272This is the same as (default-value 'right-fringe-width). */);
5273
5274 DEFVAR_LISP_NOPRO ("default-fringes-outside-margins",
5275 &buffer_defaults.fringes_outside_margins,
5276 doc: /* Default value of `fringes-outside-margins' for buffers that don't override it.
5277This is the same as (default-value 'fringes-outside-margins). */);
5278
5279 DEFVAR_LISP_NOPRO ("default-scroll-bar-width",
5280 &buffer_defaults.scroll_bar_width,
5281 doc: /* Default value of `scroll-bar-width' for buffers that don't override it.
5282This is the same as (default-value 'scroll-bar-width). */);
5283
5284 DEFVAR_LISP_NOPRO ("default-vertical-scroll-bar",
5285 &buffer_defaults.vertical_scroll_bar_type,
5286 doc: /* Default value of `vertical-scroll-bar' for buffers that don't override it.
5287This is the same as (default-value 'vertical-scroll-bar). */);
5288
5252 DEFVAR_LISP_NOPRO ("default-indicate-empty-lines", 5289 DEFVAR_LISP_NOPRO ("default-indicate-empty-lines",
5253 &buffer_defaults.indicate_empty_lines, 5290 &buffer_defaults.indicate_empty_lines,
5254 doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. 5291 doc: /* Default value of `indicate-empty-lines' for buffers that don't override it.
@@ -5517,16 +5554,45 @@ In addition, a char-table has six extra slots to control the display of:
5517 5554
5518See also the functions `display-table-slot' and `set-display-table-slot'. */); 5555See also the functions `display-table-slot' and `set-display-table-slot'. */);
5519 5556
5520 DEFVAR_PER_BUFFER ("left-margin-width", &current_buffer->left_margin_width, 5557 DEFVAR_PER_BUFFER ("left-margin-width", &current_buffer->left_margin_cols,
5521 Qnil, 5558 Qnil,
5522 doc: /* *Width of left marginal area for display of a buffer. 5559 doc: /* *Width of left marginal area for display of a buffer.
5523A value of nil means no marginal area. */); 5560A value of nil means no marginal area. */);
5524 5561
5525 DEFVAR_PER_BUFFER ("right-margin-width", &current_buffer->right_margin_width, 5562 DEFVAR_PER_BUFFER ("right-margin-width", &current_buffer->right_margin_cols,
5526 Qnil, 5563 Qnil,
5527 doc: /* *Width of right marginal area for display of a buffer. 5564 doc: /* *Width of right marginal area for display of a buffer.
5528A value of nil means no marginal area. */); 5565A value of nil means no marginal area. */);
5529 5566
5567 DEFVAR_PER_BUFFER ("left-fringe-width", &current_buffer->left_fringe_width,
5568 Qnil,
5569 doc: /* *Width of this buffer's left fringe (in pixels).
5570A value of 0 means no left fringe is shown in this buffer's window.
5571A value of nil means to use the left fringe width from the window's frame. */);
5572
5573 DEFVAR_PER_BUFFER ("right-fringe-width", &current_buffer->right_fringe_width,
5574 Qnil,
5575 doc: /* *Width of this buffer's right fringe (in pixels).
5576A value of 0 means no right fringe is shown in this buffer's window.
5577A value of nil means to use the right fringe width from the window's frame. */);
5578
5579 DEFVAR_PER_BUFFER ("fringes-outside-margins", &current_buffer->fringes_outside_margins,
5580 Qnil,
5581 doc: /* *Non-nil means to display fringes outside display margins.
5582A value of nil means to display fringes between margins and buffer text. */);
5583
5584 DEFVAR_PER_BUFFER ("scroll-bar-width", &current_buffer->scroll_bar_width,
5585 Qnil,
5586 doc: /* *Width of this buffer's scroll bars in pixels.
5587A value of nil means to use the scroll bar width from the window's frame. */);
5588
5589 DEFVAR_PER_BUFFER ("vertical-scroll-bar", &current_buffer->vertical_scroll_bar_type,
5590 Qnil,
5591 doc: /* *Position of this buffer's vertical scroll bar.
5592A value of left or right means to place the vertical scroll bar at that side
5593of the window; a value of nil means that this window has no vertical scroll bar.
5594A value of t means to use the vertical scroll bar type from the window's frame. */);
5595
5530 DEFVAR_PER_BUFFER ("indicate-empty-lines", 5596 DEFVAR_PER_BUFFER ("indicate-empty-lines",
5531 &current_buffer->indicate_empty_lines, Qnil, 5597 &current_buffer->indicate_empty_lines, Qnil,
5532 doc: /* *Visually indicate empty lines after the buffer end. 5598 doc: /* *Visually indicate empty lines after the buffer end.