diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/src/buffer.c b/src/buffer.c index 4c7e709adb5..bd4e061b05f 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -488,7 +488,7 @@ static void | |||
| 488 | clone_per_buffer_values (from, to) | 488 | clone_per_buffer_values (from, to) |
| 489 | struct buffer *from, *to; | 489 | struct buffer *from, *to; |
| 490 | { | 490 | { |
| 491 | Lisp_Object to_buffer; | 491 | Lisp_Object to_buffer, tem; |
| 492 | int offset; | 492 | int offset; |
| 493 | 493 | ||
| 494 | XSETBUFFER (to_buffer, to); | 494 | XSETBUFFER (to_buffer, to); |
| @@ -515,6 +515,14 @@ clone_per_buffer_values (from, to) | |||
| 515 | 515 | ||
| 516 | to->overlays_before = copy_overlays (to, from->overlays_before); | 516 | to->overlays_before = copy_overlays (to, from->overlays_before); |
| 517 | to->overlays_after = copy_overlays (to, from->overlays_after); | 517 | to->overlays_after = copy_overlays (to, from->overlays_after); |
| 518 | |||
| 519 | /* Copy the alist of local variables, | ||
| 520 | and all the alist elements too. */ | ||
| 521 | to->local_var_alist | ||
| 522 | = Fcopy_sequence (from->local_var_alist); | ||
| 523 | for (tem = to->local_var_alist; CONSP (tem); | ||
| 524 | tem = XCDR (tem)) | ||
| 525 | XSETCAR (tem, Fcons (XCAR (XCAR (tem)), XCDR (XCAR (tem)))); | ||
| 518 | } | 526 | } |
| 519 | 527 | ||
| 520 | 528 | ||
| @@ -833,7 +841,8 @@ No argument or nil as argument means use the current buffer. */) | |||
| 833 | DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer, | 841 | DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer, |
| 834 | 0, 1, 0, | 842 | 0, 1, 0, |
| 835 | doc: /* Return the base buffer of indirect buffer BUFFER. | 843 | doc: /* Return the base buffer of indirect buffer BUFFER. |
| 836 | If BUFFER is not indirect, return nil. */) | 844 | If BUFFER is not indirect, return nil. |
| 845 | BUFFER defaults to the current buffer. */) | ||
| 837 | (buffer) | 846 | (buffer) |
| 838 | register Lisp_Object buffer; | 847 | register Lisp_Object buffer; |
| 839 | { | 848 | { |
| @@ -1683,7 +1692,7 @@ DEFUN ("pop-to-buffer", Fpop_to_buffer, Spop_to_buffer, 1, 3, 0, | |||
| 1683 | doc: /* Select buffer BUFFER in some window, preferably a different one. | 1692 | doc: /* Select buffer BUFFER in some window, preferably a different one. |
| 1684 | If BUFFER is nil, then some other buffer is chosen. | 1693 | If BUFFER is nil, then some other buffer is chosen. |
| 1685 | If `pop-up-windows' is non-nil, windows can be split to do this. | 1694 | If `pop-up-windows' is non-nil, windows can be split to do this. |
| 1686 | If optional second arg OTHER-WINDOW is nil, insist on finding another | 1695 | If optional second arg OTHER-WINDOW is non-nil, insist on finding another |
| 1687 | window even if BUFFER is already visible in the selected window, | 1696 | window even if BUFFER is already visible in the selected window, |
| 1688 | and ignore `same-window-regexps' and `same-window-buffer-names'. | 1697 | and ignore `same-window-regexps' and `same-window-buffer-names'. |
| 1689 | This uses the function `display-buffer' as a subroutine; see the documentation | 1698 | This uses the function `display-buffer' as a subroutine; see the documentation |
| @@ -2145,7 +2154,7 @@ current buffer is cleared. */) | |||
| 2145 | GPT = GPT_BYTE; | 2154 | GPT = GPT_BYTE; |
| 2146 | TEMP_SET_PT_BOTH (PT_BYTE, PT_BYTE); | 2155 | TEMP_SET_PT_BOTH (PT_BYTE, PT_BYTE); |
| 2147 | 2156 | ||
| 2148 | 2157 | ||
| 2149 | for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next) | 2158 | for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next) |
| 2150 | tail->charpos = tail->bytepos; | 2159 | tail->charpos = tail->bytepos; |
| 2151 | 2160 | ||
| @@ -3354,7 +3363,7 @@ fix_start_end_in_overlays (start, end) | |||
| 3354 | 3363 | ||
| 3355 | if (endpos < start) | 3364 | if (endpos < start) |
| 3356 | break; | 3365 | break; |
| 3357 | 3366 | ||
| 3358 | if (endpos < end | 3367 | if (endpos < end |
| 3359 | || (startpos >= start && startpos < end)) | 3368 | || (startpos >= start && startpos < end)) |
| 3360 | { | 3369 | { |
| @@ -3397,7 +3406,7 @@ fix_start_end_in_overlays (start, end) | |||
| 3397 | { | 3406 | { |
| 3398 | startpos = endpos; | 3407 | startpos = endpos; |
| 3399 | Fset_marker (OVERLAY_START (overlay), make_number (startpos), | 3408 | Fset_marker (OVERLAY_START (overlay), make_number (startpos), |
| 3400 | Qnil); | 3409 | Qnil); |
| 3401 | } | 3410 | } |
| 3402 | 3411 | ||
| 3403 | if (startpos >= end) | 3412 | if (startpos >= end) |
| @@ -4208,7 +4217,7 @@ report_overlay_modification (start, end, after, arg1, arg2, arg3) | |||
| 4208 | add_overlay_mod_hooklist (prop, overlay); | 4217 | add_overlay_mod_hooklist (prop, overlay); |
| 4209 | } | 4218 | } |
| 4210 | } | 4219 | } |
| 4211 | 4220 | ||
| 4212 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) | 4221 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) |
| 4213 | { | 4222 | { |
| 4214 | int startpos, endpos; | 4223 | int startpos, endpos; |
| @@ -5444,7 +5453,7 @@ nil here means use current buffer's major mode. */); | |||
| 5444 | DEFVAR_PER_BUFFER ("fill-column", ¤t_buffer->fill_column, | 5453 | DEFVAR_PER_BUFFER ("fill-column", ¤t_buffer->fill_column, |
| 5445 | make_number (Lisp_Int), | 5454 | make_number (Lisp_Int), |
| 5446 | doc: /* *Column beyond which automatic line-wrapping should happen. | 5455 | doc: /* *Column beyond which automatic line-wrapping should happen. |
| 5447 | Interactively, you can set this using \\[set-fill-column]. */); | 5456 | Interactively, you can set the buffer local value using \\[set-fill-column]. */); |
| 5448 | 5457 | ||
| 5449 | DEFVAR_PER_BUFFER ("left-margin", ¤t_buffer->left_margin, | 5458 | DEFVAR_PER_BUFFER ("left-margin", ¤t_buffer->left_margin, |
| 5450 | make_number (Lisp_Int), | 5459 | make_number (Lisp_Int), |
| @@ -5854,7 +5863,11 @@ If the buffer has never been shown in a window, the value is nil. */); | |||
| 5854 | doc: /* *Non-nil means deactivate the mark when the buffer contents change. | 5863 | doc: /* *Non-nil means deactivate the mark when the buffer contents change. |
| 5855 | Non-nil also enables highlighting of the region whenever the mark is active. | 5864 | Non-nil also enables highlighting of the region whenever the mark is active. |
| 5856 | The variable `highlight-nonselected-windows' controls whether to highlight | 5865 | The variable `highlight-nonselected-windows' controls whether to highlight |
| 5857 | all windows or just the selected window. */); | 5866 | all windows or just the selected window. |
| 5867 | |||
| 5868 | If the value is `lambda', that enables Transient Mark mode temporarily | ||
| 5869 | until the next buffer modification. If a command sets the value to `only', | ||
| 5870 | that enables Transient Mark mode for the following command only. */); | ||
| 5858 | Vtransient_mark_mode = Qnil; | 5871 | Vtransient_mark_mode = Qnil; |
| 5859 | 5872 | ||
| 5860 | DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only, | 5873 | DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only, |
| @@ -5871,9 +5884,13 @@ Values are interpreted as follows: | |||
| 5871 | 5884 | ||
| 5872 | t use the cursor specified for the frame | 5885 | t use the cursor specified for the frame |
| 5873 | nil don't display a cursor | 5886 | nil don't display a cursor |
| 5874 | bar display a bar cursor with default width | 5887 | box display a filled box cursor |
| 5875 | (bar . WIDTH) display a bar cursor with width WIDTH | 5888 | hollow display a hollow box cursor |
| 5876 | ANYTHING ELSE display a box cursor. | 5889 | bar display a vertical bar cursor with default width |
| 5890 | (bar . WIDTH) display a vertical bar cursor with width WIDTH | ||
| 5891 | hbar display a horisontal bar cursor with default width | ||
| 5892 | (hbar . WIDTH) display a horisontal bar cursor with width WIDTH | ||
| 5893 | ANYTHING ELSE display a hollow box cursor. | ||
| 5877 | 5894 | ||
| 5878 | When the buffer is displayed in a nonselected window, | 5895 | When the buffer is displayed in a nonselected window, |
| 5879 | this variable has no effect; the cursor appears as a hollow box. */); | 5896 | this variable has no effect; the cursor appears as a hollow box. */); |
| @@ -5881,7 +5898,9 @@ this variable has no effect; the cursor appears as a hollow box. */); | |||
| 5881 | DEFVAR_PER_BUFFER ("line-spacing", | 5898 | DEFVAR_PER_BUFFER ("line-spacing", |
| 5882 | ¤t_buffer->extra_line_spacing, Qnil, | 5899 | ¤t_buffer->extra_line_spacing, Qnil, |
| 5883 | doc: /* Additional space to put between lines when displaying a buffer. | 5900 | doc: /* Additional space to put between lines when displaying a buffer. |
| 5884 | The space is measured in pixels, and put below lines on window systems. */); | 5901 | The space is measured in pixels, and put below lines on window systems. |
| 5902 | If value is a floating point number, it specifies the spacing relative | ||
| 5903 | to the default frame line height. */); | ||
| 5885 | 5904 | ||
| 5886 | DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, | 5905 | DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, |
| 5887 | doc: /* List of functions called with no args to query before killing a buffer. */); | 5906 | doc: /* List of functions called with no args to query before killing a buffer. */); |