aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorMiles Bader2004-06-28 07:56:49 +0000
committerMiles Bader2004-06-28 07:56:49 +0000
commit327719ee8a3fcdb36ed6acaf6d8cb5fbdf0bd801 (patch)
tree21de188e13b5e41a79bb50040933072ae0235217 /src/buffer.c
parent852f73b7fa7b71910282eacb6263b3ecfd4ee783 (diff)
parent376de73927383d6062483db10b8a82448505f52b (diff)
downloademacs-327719ee8a3fcdb36ed6acaf6d8cb5fbdf0bd801.tar.gz
emacs-327719ee8a3fcdb36ed6acaf6d8cb5fbdf0bd801.zip
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-15
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-218 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-220 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-221 Restore deleted tagline in etc/TUTORIAL.ru * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-222 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-228 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-229 Remove TeX output files from the archive * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-230 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-247 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-248 src/lisp.h (CYCLE_CHECK): Macro moved from xfaces.c * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-249 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-256 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-258 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-263 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-264 Update from CVS: lispref/display.texi: emacs -> Emacs. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-265 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-274 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-275 Update from CVS: man/makefile.w32-in: Revert last change * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-276 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-295 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-296 Allow restarting an existing debugger session that's exited * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-297 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-299 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-300 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-327 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-328 Update from CVS: src/.gdbinit (xsymbol): Fix last change. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-329 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-344 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-345 Tweak source regexps so that building in place won't cause problems * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-346 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-351 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-352 Update from CVS: lisp/flymake.el: New file. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-353 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-361 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-362 Support " [...]" style defaults in minibuffer-electric-default-mode * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-363 (read-number): Use canonical format for default in prompt. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-364 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-367 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-368 Improve display-supports-face-attributes-p on non-ttys * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-369 Rewrite face-differs-from-default-p * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-370 Move `display-supports-face-attributes-p' entirely into C code * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-371 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-372 Simplify face-differs-from-default-p; don't consider :stipple. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-373 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-374 (tty_supports_face_attributes_p): Ensure attributes differ from default * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-375 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-376 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-377 (Fdisplay_supports_face_attributes_p): Work around bootstrapping problem * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-378 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-380 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-381 Face merging cleanups * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-382 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-384 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-385 src/xfaces.c (push_named_merge_point): Return 0 if a cycle is detected * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-386 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-395 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-396 Tweak arch tagging to make build/install-in-place less annoying * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397 Work around vc-arch problems when building eshell * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-398 Tweak permissions * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-399 Tweak directory permissions * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-400 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-401 More build-in-place tweaking of arch tagging * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-402 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-403 Yet more build-in-place tweaking of arch tagging * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-404 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-409 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-410 Make sure image types are initialized for lookup too * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-411 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-416 Update from CVS
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c45
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
488clone_per_buffer_values (from, to) 488clone_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. */)
833DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer, 841DEFUN ("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.
836If BUFFER is not indirect, return nil. */) 844If BUFFER is not indirect, return nil.
845BUFFER 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.
1684If BUFFER is nil, then some other buffer is chosen. 1693If BUFFER is nil, then some other buffer is chosen.
1685If `pop-up-windows' is non-nil, windows can be split to do this. 1694If `pop-up-windows' is non-nil, windows can be split to do this.
1686If optional second arg OTHER-WINDOW is nil, insist on finding another 1695If optional second arg OTHER-WINDOW is non-nil, insist on finding another
1687window even if BUFFER is already visible in the selected window, 1696window even if BUFFER is already visible in the selected window,
1688and ignore `same-window-regexps' and `same-window-buffer-names'. 1697and ignore `same-window-regexps' and `same-window-buffer-names'.
1689This uses the function `display-buffer' as a subroutine; see the documentation 1698This 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", &current_buffer->fill_column, 5453 DEFVAR_PER_BUFFER ("fill-column", &current_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.
5447Interactively, you can set this using \\[set-fill-column]. */); 5456Interactively, you can set the buffer local value using \\[set-fill-column]. */);
5448 5457
5449 DEFVAR_PER_BUFFER ("left-margin", &current_buffer->left_margin, 5458 DEFVAR_PER_BUFFER ("left-margin", &current_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.
5855Non-nil also enables highlighting of the region whenever the mark is active. 5864Non-nil also enables highlighting of the region whenever the mark is active.
5856The variable `highlight-nonselected-windows' controls whether to highlight 5865The variable `highlight-nonselected-windows' controls whether to highlight
5857all windows or just the selected window. */); 5866all windows or just the selected window.
5867
5868If the value is `lambda', that enables Transient Mark mode temporarily
5869until the next buffer modification. If a command sets the value to `only',
5870that 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
5878When the buffer is displayed in a nonselected window, 5895When the buffer is displayed in a nonselected window,
5879this variable has no effect; the cursor appears as a hollow box. */); 5896this 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 &current_buffer->extra_line_spacing, Qnil, 5899 &current_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.
5884The space is measured in pixels, and put below lines on window systems. */); 5901The space is measured in pixels, and put below lines on window systems.
5902If value is a floating point number, it specifies the spacing relative
5903to 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. */);