diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 61 |
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; | |||
| 128 | Lisp_Object Qfirst_change_hook; | 128 | Lisp_Object Qfirst_change_hook; |
| 129 | Lisp_Object Qbefore_change_functions; | 129 | Lisp_Object Qbefore_change_functions; |
| 130 | Lisp_Object Qafter_change_functions; | 130 | Lisp_Object Qafter_change_functions; |
| 131 | static Lisp_Object Qucs_set_table_for_input; | ||
| 132 | 131 | ||
| 133 | static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; | 132 | static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; |
| 134 | static Lisp_Object Qpermanent_local_hook; | 133 | static 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. |
| 5248 | This is the same as (default-value 'enable-multibyte-characters). */); | 5235 | This 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: | |||
| 5406 | Decimal digits after the % specify field width to which to pad. */); | 5393 | Decimal 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. |
| 5445 | Interactively, you can set the buffer local value using \\[set-fill-column]. */); | 5432 | Interactively, 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. |
| 5450 | Linefeed indents to this column in Fundamental mode. */); | 5437 | Linefeed 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. |
| 5455 | This should be an integer greater than zero. */); | 5442 | This 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. |
| 5459 | A value of nil means use backslash and octal digits. | 5446 | A value of nil means use backslash and octal digits. |
| 5460 | This variable does not apply to characters whose display is specified | 5447 | This variable does not apply to characters whose display is specified |
| 5461 | in the current display table (if there is one). */); | 5448 | in 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 | ||
| 5501 | If this is nil (the default), the direction of each paragraph is | 5488 | If this is nil (the default), the direction of each paragraph is |
| 5502 | determined by the first strong directional character of its text. | 5489 | determined 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. |
| 5511 | Instead, give each line of text just one screen line. | 5498 | Instead, give each line of text just one screen line. |
| 5512 | 5499 | ||
| 5513 | Note that this is overridden by the variable | 5500 | Note that this is overridden by the variable |
| @@ -5517,7 +5504,7 @@ and this buffer is not full-frame width. | |||
| 5517 | Minibuffers set this variable to nil. */); | 5504 | Minibuffers 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. |
| 5521 | When word-wrapping is on, continuation lines are wrapped at the space | 5508 | When word-wrapping is on, continuation lines are wrapped at the space |
| 5522 | or tab character nearest to the right window edge. | 5509 | or tab character nearest to the right window edge. |
| 5523 | If nil, continuation lines are wrapped at the right screen edge. | 5510 | If 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. |
| 5642 | A value of nil means no marginal area. */); | 5629 | A 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. |
| 5647 | A value of nil means no marginal area. */); | 5634 | A 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). |
| 5652 | A value of 0 means no left fringe is shown in this buffer's window. | 5639 | A value of 0 means no left fringe is shown in this buffer's window. |
| 5653 | A value of nil means to use the left fringe width from the window's frame. */); | 5640 | A 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). |
| 5658 | A value of 0 means no right fringe is shown in this buffer's window. | 5645 | A value of 0 means no right fringe is shown in this buffer's window. |
| 5659 | A value of nil means to use the right fringe width from the window's frame. */); | 5646 | A 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. |
| 5664 | A value of nil means to display fringes between margins and buffer text. */); | 5651 | A 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. |
| 5669 | A value of nil means to use the scroll bar width from the window's frame. */); | 5656 | A 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. |
| 5674 | The value takes effect whenever you tell a window to display this buffer; | 5661 | The value takes effect whenever you tell a window to display this buffer; |
| 5675 | for instance, with `set-window-buffer' or when `display-buffer' displays it. | 5662 | for 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. |
| 5684 | If non-nil, a bitmap is displayed in the left fringe of a window on | 5671 | If non-nil, a bitmap is displayed in the left fringe of a window on |
| 5685 | window-systems. */); | 5672 | window-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. |
| 5690 | If non-nil, the first and last line of the buffer are marked in the fringe | 5677 | If non-nil, the first and last line of the buffer are marked in the fringe |
| 5691 | of a window on window-systems with angle bitmaps, or if the window can be | 5678 | of a window on window-systems with angle bitmaps, or if the window can be |
| 5692 | scrolled, the top and bottom line of the window are marked with up and down | 5679 | scrolled, 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. |
| 5715 | The value is an alist where each element (INDICATOR . BITMAPS) | 5702 | The value is an alist where each element (INDICATOR . BITMAPS) |
| 5716 | specifies the fringe bitmaps used to display a specific logical | 5703 | specifies the fringe bitmaps used to display a specific logical |
| 5717 | fringe indicator. | 5704 | fringe 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. |
| 5734 | The value is an alist where each element (CURSOR . BITMAP) | 5721 | The value is an alist where each element (CURSOR . BITMAP) |
| 5735 | specifies the fringe bitmaps used to display a specific logical | 5722 | specifies the fringe bitmaps used to display a specific logical |
| 5736 | cursor type in the fringe. | 5723 | cursor 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. |
| 5898 | Should be a list of symbols naming formats that are defined in `format-alist'. | 5885 | Should be a list of symbols naming formats that are defined in `format-alist'. |
| 5899 | If it is t, which is the default, auto-save files are written in the | 5886 | If it is t, which is the default, auto-save files are written in the |
| 5900 | same format as a regular save would use. */); | 5887 | same 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. |
| 5948 | If the value is t, disregard `buffer-read-only' and all `read-only' | 5935 | If the value is t, disregard `buffer-read-only' and all `read-only' |
| 5949 | text properties. If the value is a list, disregard `buffer-read-only' | 5936 | text properties. If the value is a list, disregard `buffer-read-only' |
| 5950 | and disregard a `read-only' text property if the property value | 5937 | and 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. |
| 5983 | If nil, only shows a cursor in the selected window. | 5970 | If nil, only shows a cursor in the selected window. |
| 5984 | If t, displays a cursor related to the usual cursor type | 5971 | If 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). |