aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c61
1 files changed, 24 insertions, 37 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 1fea19b0d65..ca8d1ec5db3 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -128,7 +128,6 @@ static Lisp_Object Qchange_major_mode_hook;
128Lisp_Object Qfirst_change_hook; 128Lisp_Object Qfirst_change_hook;
129Lisp_Object Qbefore_change_functions; 129Lisp_Object Qbefore_change_functions;
130Lisp_Object Qafter_change_functions; 130Lisp_Object Qafter_change_functions;
131static Lisp_Object Qucs_set_table_for_input;
132 131
133static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; 132static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local;
134static Lisp_Object Qpermanent_local_hook; 133static Lisp_Object Qpermanent_local_hook;
@@ -402,13 +401,6 @@ even if it is dead. The return value is never nil. */)
402 if (!NILP (Vrun_hooks)) 401 if (!NILP (Vrun_hooks))
403 call1 (Vrun_hooks, Qbuffer_list_update_hook); 402 call1 (Vrun_hooks, Qbuffer_list_update_hook);
404 403
405 /* An error in calling the function here (should someone redefine it)
406 can lead to infinite regress until you run out of stack. rms
407 says that's not worth protecting against. */
408 if (!NILP (Ffboundp (Qucs_set_table_for_input)))
409 /* buffer is on buffer-alist, so no gcpro. */
410 call1 (Qucs_set_table_for_input, buffer);
411
412 return buffer; 404 return buffer;
413} 405}
414 406
@@ -5043,8 +5035,6 @@ init_buffer_once (void)
5043 Qkill_buffer_hook = intern_c_string ("kill-buffer-hook"); 5035 Qkill_buffer_hook = intern_c_string ("kill-buffer-hook");
5044 Fput (Qkill_buffer_hook, Qpermanent_local, Qt); 5036 Fput (Qkill_buffer_hook, Qpermanent_local, Qt);
5045 5037
5046 Qucs_set_table_for_input = intern_c_string ("ucs-set-table-for-input");
5047
5048 /* super-magic invisible buffer */ 5038 /* super-magic invisible buffer */
5049 Vprin1_to_string_buffer = Fget_buffer_create (make_pure_c_string (" prin1")); 5039 Vprin1_to_string_buffer = Fget_buffer_create (make_pure_c_string (" prin1"));
5050 Vbuffer_alist = Qnil; 5040 Vbuffer_alist = Qnil;
@@ -5200,9 +5190,6 @@ syms_of_buffer (void)
5200 DEFSYM (Qafter_change_functions, "after-change-functions"); 5190 DEFSYM (Qafter_change_functions, "after-change-functions");
5201 DEFSYM (Qkill_buffer_query_functions, "kill-buffer-query-functions"); 5191 DEFSYM (Qkill_buffer_query_functions, "kill-buffer-query-functions");
5202 5192
5203 /* The next one is initialized in init_buffer_once. */
5204 staticpro (&Qucs_set_table_for_input);
5205
5206 Fput (Qprotected_field, Qerror_conditions, 5193 Fput (Qprotected_field, Qerror_conditions,
5207 pure_cons (Qprotected_field, pure_cons (Qerror, Qnil))); 5194 pure_cons (Qprotected_field, pure_cons (Qerror, Qnil)));
5208 Fput (Qprotected_field, Qerror_message, 5195 Fput (Qprotected_field, Qerror_message,
@@ -5244,7 +5231,7 @@ This is the same as (default-value 'ctl-arrow). */);
5244 5231
5245 DEFVAR_BUFFER_DEFAULTS ("default-enable-multibyte-characters", 5232 DEFVAR_BUFFER_DEFAULTS ("default-enable-multibyte-characters",
5246 enable_multibyte_characters, 5233 enable_multibyte_characters,
5247 doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. 5234 doc: /* Default value of `enable-multibyte-characters' for buffers not overriding it.
5248This is the same as (default-value 'enable-multibyte-characters). */); 5235This is the same as (default-value 'enable-multibyte-characters). */);
5249 5236
5250 DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-coding-system", 5237 DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-coding-system",
@@ -5406,7 +5393,7 @@ A string is printed verbatim in the mode line except for %-constructs:
5406Decimal digits after the % specify field width to which to pad. */); 5393Decimal digits after the % specify field width to which to pad. */);
5407 5394
5408 DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode, 5395 DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode,
5409 doc: /* *Value of `major-mode' for new buffers. */); 5396 doc: /* Value of `major-mode' for new buffers. */);
5410 5397
5411 DEFVAR_PER_BUFFER ("major-mode", &BVAR (current_buffer, major_mode), 5398 DEFVAR_PER_BUFFER ("major-mode", &BVAR (current_buffer, major_mode),
5412 make_number (Lisp_Symbol), 5399 make_number (Lisp_Symbol),
@@ -5437,25 +5424,25 @@ Use the command `abbrev-mode' to change this variable. */);
5437 5424
5438 DEFVAR_PER_BUFFER ("case-fold-search", &BVAR (current_buffer, case_fold_search), 5425 DEFVAR_PER_BUFFER ("case-fold-search", &BVAR (current_buffer, case_fold_search),
5439 Qnil, 5426 Qnil,
5440 doc: /* *Non-nil if searches and matches should ignore case. */); 5427 doc: /* Non-nil if searches and matches should ignore case. */);
5441 5428
5442 DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column), 5429 DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column),
5443 make_number (LISP_INT_TAG), 5430 make_number (LISP_INT_TAG),
5444 doc: /* *Column beyond which automatic line-wrapping should happen. 5431 doc: /* Column beyond which automatic line-wrapping should happen.
5445Interactively, you can set the buffer local value using \\[set-fill-column]. */); 5432Interactively, you can set the buffer local value using \\[set-fill-column]. */);
5446 5433
5447 DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin), 5434 DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin),
5448 make_number (LISP_INT_TAG), 5435 make_number (LISP_INT_TAG),
5449 doc: /* *Column for the default `indent-line-function' to indent to. 5436 doc: /* Column for the default `indent-line-function' to indent to.
5450Linefeed indents to this column in Fundamental mode. */); 5437Linefeed indents to this column in Fundamental mode. */);
5451 5438
5452 DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width), 5439 DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width),
5453 make_number (LISP_INT_TAG), 5440 make_number (LISP_INT_TAG),
5454 doc: /* *Distance between tab stops (for display of tab characters), in columns. 5441 doc: /* Distance between tab stops (for display of tab characters), in columns.
5455This should be an integer greater than zero. */); 5442This should be an integer greater than zero. */);
5456 5443
5457 DEFVAR_PER_BUFFER ("ctl-arrow", &BVAR (current_buffer, ctl_arrow), Qnil, 5444 DEFVAR_PER_BUFFER ("ctl-arrow", &BVAR (current_buffer, ctl_arrow), Qnil,
5458 doc: /* *Non-nil means display control chars with uparrow. 5445 doc: /* Non-nil means display control chars with uparrow.
5459A value of nil means use backslash and octal digits. 5446A value of nil means use backslash and octal digits.
5460This variable does not apply to characters whose display is specified 5447This variable does not apply to characters whose display is specified
5461in the current display table (if there is one). */); 5448in the current display table (if there is one). */);
@@ -5496,7 +5483,7 @@ This variable is never applied to a way of decoding a file while reading it. */
5496 5483
5497 DEFVAR_PER_BUFFER ("bidi-paragraph-direction", 5484 DEFVAR_PER_BUFFER ("bidi-paragraph-direction",
5498 &BVAR (current_buffer, bidi_paragraph_direction), Qnil, 5485 &BVAR (current_buffer, bidi_paragraph_direction), Qnil,
5499 doc: /* *If non-nil, forces directionality of text paragraphs in the buffer. 5486 doc: /* If non-nil, forces directionality of text paragraphs in the buffer.
5500 5487
5501If this is nil (the default), the direction of each paragraph is 5488If this is nil (the default), the direction of each paragraph is
5502determined by the first strong directional character of its text. 5489determined by the first strong directional character of its text.
@@ -5507,7 +5494,7 @@ This variable has no effect unless the buffer's value of
5507\`bidi-display-reordering' is non-nil. */); 5494\`bidi-display-reordering' is non-nil. */);
5508 5495
5509 DEFVAR_PER_BUFFER ("truncate-lines", &BVAR (current_buffer, truncate_lines), Qnil, 5496 DEFVAR_PER_BUFFER ("truncate-lines", &BVAR (current_buffer, truncate_lines), Qnil,
5510 doc: /* *Non-nil means do not display continuation lines. 5497 doc: /* Non-nil means do not display continuation lines.
5511Instead, give each line of text just one screen line. 5498Instead, give each line of text just one screen line.
5512 5499
5513Note that this is overridden by the variable 5500Note that this is overridden by the variable
@@ -5517,7 +5504,7 @@ and this buffer is not full-frame width.
5517Minibuffers set this variable to nil. */); 5504Minibuffers set this variable to nil. */);
5518 5505
5519 DEFVAR_PER_BUFFER ("word-wrap", &BVAR (current_buffer, word_wrap), Qnil, 5506 DEFVAR_PER_BUFFER ("word-wrap", &BVAR (current_buffer, word_wrap), Qnil,
5520 doc: /* *Non-nil means to use word-wrapping for continuation lines. 5507 doc: /* Non-nil means to use word-wrapping for continuation lines.
5521When word-wrapping is on, continuation lines are wrapped at the space 5508When word-wrapping is on, continuation lines are wrapped at the space
5522or tab character nearest to the right window edge. 5509or tab character nearest to the right window edge.
5523If nil, continuation lines are wrapped at the right screen edge. 5510If nil, continuation lines are wrapped at the right screen edge.
@@ -5638,39 +5625,39 @@ See also the functions `display-table-slot' and `set-display-table-slot'. */);
5638 5625
5639 DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols), 5626 DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols),
5640 Qnil, 5627 Qnil,
5641 doc: /* *Width of left marginal area for display of a buffer. 5628 doc: /* Width of left marginal area for display of a buffer.
5642A value of nil means no marginal area. */); 5629A value of nil means no marginal area. */);
5643 5630
5644 DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols), 5631 DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols),
5645 Qnil, 5632 Qnil,
5646 doc: /* *Width of right marginal area for display of a buffer. 5633 doc: /* Width of right marginal area for display of a buffer.
5647A value of nil means no marginal area. */); 5634A value of nil means no marginal area. */);
5648 5635
5649 DEFVAR_PER_BUFFER ("left-fringe-width", &BVAR (current_buffer, left_fringe_width), 5636 DEFVAR_PER_BUFFER ("left-fringe-width", &BVAR (current_buffer, left_fringe_width),
5650 Qnil, 5637 Qnil,
5651 doc: /* *Width of this buffer's left fringe (in pixels). 5638 doc: /* Width of this buffer's left fringe (in pixels).
5652A value of 0 means no left fringe is shown in this buffer's window. 5639A value of 0 means no left fringe is shown in this buffer's window.
5653A value of nil means to use the left fringe width from the window's frame. */); 5640A value of nil means to use the left fringe width from the window's frame. */);
5654 5641
5655 DEFVAR_PER_BUFFER ("right-fringe-width", &BVAR (current_buffer, right_fringe_width), 5642 DEFVAR_PER_BUFFER ("right-fringe-width", &BVAR (current_buffer, right_fringe_width),
5656 Qnil, 5643 Qnil,
5657 doc: /* *Width of this buffer's right fringe (in pixels). 5644 doc: /* Width of this buffer's right fringe (in pixels).
5658A value of 0 means no right fringe is shown in this buffer's window. 5645A value of 0 means no right fringe is shown in this buffer's window.
5659A value of nil means to use the right fringe width from the window's frame. */); 5646A value of nil means to use the right fringe width from the window's frame. */);
5660 5647
5661 DEFVAR_PER_BUFFER ("fringes-outside-margins", &BVAR (current_buffer, fringes_outside_margins), 5648 DEFVAR_PER_BUFFER ("fringes-outside-margins", &BVAR (current_buffer, fringes_outside_margins),
5662 Qnil, 5649 Qnil,
5663 doc: /* *Non-nil means to display fringes outside display margins. 5650 doc: /* Non-nil means to display fringes outside display margins.
5664A value of nil means to display fringes between margins and buffer text. */); 5651A value of nil means to display fringes between margins and buffer text. */);
5665 5652
5666 DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width), 5653 DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width),
5667 Qnil, 5654 Qnil,
5668 doc: /* *Width of this buffer's scroll bars in pixels. 5655 doc: /* Width of this buffer's scroll bars in pixels.
5669A value of nil means to use the scroll bar width from the window's frame. */); 5656A value of nil means to use the scroll bar width from the window's frame. */);
5670 5657
5671 DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type), 5658 DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type),
5672 Qnil, 5659 Qnil,
5673 doc: /* *Position of this buffer's vertical scroll bar. 5660 doc: /* Position of this buffer's vertical scroll bar.
5674The value takes effect whenever you tell a window to display this buffer; 5661The value takes effect whenever you tell a window to display this buffer;
5675for instance, with `set-window-buffer' or when `display-buffer' displays it. 5662for instance, with `set-window-buffer' or when `display-buffer' displays it.
5676 5663
@@ -5680,13 +5667,13 @@ A value of t (the default) means do whatever the window's frame specifies. */);
5680 5667
5681 DEFVAR_PER_BUFFER ("indicate-empty-lines", 5668 DEFVAR_PER_BUFFER ("indicate-empty-lines",
5682 &BVAR (current_buffer, indicate_empty_lines), Qnil, 5669 &BVAR (current_buffer, indicate_empty_lines), Qnil,
5683 doc: /* *Visually indicate empty lines after the buffer end. 5670 doc: /* Visually indicate empty lines after the buffer end.
5684If non-nil, a bitmap is displayed in the left fringe of a window on 5671If non-nil, a bitmap is displayed in the left fringe of a window on
5685window-systems. */); 5672window-systems. */);
5686 5673
5687 DEFVAR_PER_BUFFER ("indicate-buffer-boundaries", 5674 DEFVAR_PER_BUFFER ("indicate-buffer-boundaries",
5688 &BVAR (current_buffer, indicate_buffer_boundaries), Qnil, 5675 &BVAR (current_buffer, indicate_buffer_boundaries), Qnil,
5689 doc: /* *Visually indicate buffer boundaries and scrolling. 5676 doc: /* Visually indicate buffer boundaries and scrolling.
5690If non-nil, the first and last line of the buffer are marked in the fringe 5677If non-nil, the first and last line of the buffer are marked in the fringe
5691of a window on window-systems with angle bitmaps, or if the window can be 5678of a window on window-systems with angle bitmaps, or if the window can be
5692scrolled, the top and bottom line of the window are marked with up and down 5679scrolled, the top and bottom line of the window are marked with up and down
@@ -5711,7 +5698,7 @@ fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). */);
5711 5698
5712 DEFVAR_PER_BUFFER ("fringe-indicator-alist", 5699 DEFVAR_PER_BUFFER ("fringe-indicator-alist",
5713 &BVAR (current_buffer, fringe_indicator_alist), Qnil, 5700 &BVAR (current_buffer, fringe_indicator_alist), Qnil,
5714 doc: /* *Mapping from logical to physical fringe indicator bitmaps. 5701 doc: /* Mapping from logical to physical fringe indicator bitmaps.
5715The value is an alist where each element (INDICATOR . BITMAPS) 5702The value is an alist where each element (INDICATOR . BITMAPS)
5716specifies the fringe bitmaps used to display a specific logical 5703specifies the fringe bitmaps used to display a specific logical
5717fringe indicator. 5704fringe indicator.
@@ -5730,7 +5717,7 @@ symbol which is used in both left and right fringes. */);
5730 5717
5731 DEFVAR_PER_BUFFER ("fringe-cursor-alist", 5718 DEFVAR_PER_BUFFER ("fringe-cursor-alist",
5732 &BVAR (current_buffer, fringe_cursor_alist), Qnil, 5719 &BVAR (current_buffer, fringe_cursor_alist), Qnil,
5733 doc: /* *Mapping from logical to physical fringe cursor bitmaps. 5720 doc: /* Mapping from logical to physical fringe cursor bitmaps.
5734The value is an alist where each element (CURSOR . BITMAP) 5721The value is an alist where each element (CURSOR . BITMAP)
5735specifies the fringe bitmaps used to display a specific logical 5722specifies the fringe bitmaps used to display a specific logical
5736cursor type in the fringe. 5723cursor type in the fringe.
@@ -5894,7 +5881,7 @@ set when a file is visited. */);
5894 5881
5895 DEFVAR_PER_BUFFER ("buffer-auto-save-file-format", 5882 DEFVAR_PER_BUFFER ("buffer-auto-save-file-format",
5896 &BVAR (current_buffer, auto_save_file_format), Qnil, 5883 &BVAR (current_buffer, auto_save_file_format), Qnil,
5897 doc: /* *Format in which to write auto-save files. 5884 doc: /* Format in which to write auto-save files.
5898Should be a list of symbols naming formats that are defined in `format-alist'. 5885Should be a list of symbols naming formats that are defined in `format-alist'.
5899If it is t, which is the default, auto-save files are written in the 5886If it is t, which is the default, auto-save files are written in the
5900same format as a regular save would use. */); 5887same format as a regular save would use. */);
@@ -5944,7 +5931,7 @@ Lisp programs may give this variable certain special values:
5944 Vtransient_mark_mode = Qnil; 5931 Vtransient_mark_mode = Qnil;
5945 5932
5946 DEFVAR_LISP ("inhibit-read-only", Vinhibit_read_only, 5933 DEFVAR_LISP ("inhibit-read-only", Vinhibit_read_only,
5947 doc: /* *Non-nil means disregard read-only status of buffers or characters. 5934 doc: /* Non-nil means disregard read-only status of buffers or characters.
5948If the value is t, disregard `buffer-read-only' and all `read-only' 5935If the value is t, disregard `buffer-read-only' and all `read-only'
5949text properties. If the value is a list, disregard `buffer-read-only' 5936text properties. If the value is a list, disregard `buffer-read-only'
5950and disregard a `read-only' text property if the property value 5937and disregard a `read-only' text property if the property value
@@ -5979,7 +5966,7 @@ to the default frame line height. A value of nil means add no extra space. */)
5979 5966
5980 DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", 5967 DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows",
5981 &BVAR (current_buffer, cursor_in_non_selected_windows), Qnil, 5968 &BVAR (current_buffer, cursor_in_non_selected_windows), Qnil,
5982 doc: /* *Non-nil means show a cursor in non-selected windows. 5969 doc: /* Non-nil means show a cursor in non-selected windows.
5983If nil, only shows a cursor in the selected window. 5970If nil, only shows a cursor in the selected window.
5984If t, displays a cursor related to the usual cursor type 5971If t, displays a cursor related to the usual cursor type
5985\(a solid box becomes hollow, a bar becomes a narrower bar). 5972\(a solid box becomes hollow, a bar becomes a narrower bar).