Mercurial > emacs
comparison src/buffer.c @ 13446:005d7ed9d69b
(Fmake_overlay): New args front-advance and rear-advance.
(syms_of_buffer): Delete the buffer-redisplay-end-trigger local variable.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Fri, 10 Nov 1995 06:32:38 +0000 |
| parents | 76e69b0af94d |
| children | 71c14edf7d6d |
comparison
equal
deleted
inserted
replaced
| 13445:2e30fc2cbae8 | 13446:005d7ed9d69b |
|---|---|
| 2480 Lisp_Object object; | 2480 Lisp_Object object; |
| 2481 { | 2481 { |
| 2482 return (OVERLAYP (object) ? Qt : Qnil); | 2482 return (OVERLAYP (object) ? Qt : Qnil); |
| 2483 } | 2483 } |
| 2484 | 2484 |
| 2485 DEFUN ("make-overlay", Fmake_overlay, Smake_overlay, 2, 3, 0, | 2485 DEFUN ("make-overlay", Fmake_overlay, Smake_overlay, 2, 5, 0, |
| 2486 "Create a new overlay with range BEG to END in BUFFER.\n\ | 2486 "Create a new overlay with range BEG to END in BUFFER.\n\ |
| 2487 If omitted, BUFFER defaults to the current buffer.\n\ | 2487 If omitted, BUFFER defaults to the current buffer.\n\ |
| 2488 BEG and END may be integers or markers.") | 2488 BEG and END may be integers or markers.\n\ |
| 2489 (beg, end, buffer) | 2489 The fourth arg FRONT-ADVANCE, if non-nil, makes the\n\ |
| 2490 front delimiter advance when text is inserted there.\n\ | |
| 2491 The fifth arg REAR-ADVANCE, if non-nil, makes the\n\ | |
| 2492 rear delimiter advance when text is inserted there.") | |
| 2493 (beg, end, buffer, front_advance, rear_advance) | |
| 2490 Lisp_Object beg, end, buffer; | 2494 Lisp_Object beg, end, buffer; |
| 2495 Lisp_Object front_advance, rear_advance; | |
| 2491 { | 2496 { |
| 2492 Lisp_Object overlay; | 2497 Lisp_Object overlay; |
| 2493 struct buffer *b; | 2498 struct buffer *b; |
| 2494 | 2499 |
| 2495 if (NILP (buffer)) | 2500 if (NILP (buffer)) |
| 2515 b = XBUFFER (buffer); | 2520 b = XBUFFER (buffer); |
| 2516 | 2521 |
| 2517 beg = Fset_marker (Fmake_marker (), beg, buffer); | 2522 beg = Fset_marker (Fmake_marker (), beg, buffer); |
| 2518 end = Fset_marker (Fmake_marker (), end, buffer); | 2523 end = Fset_marker (Fmake_marker (), end, buffer); |
| 2519 | 2524 |
| 2520 XMARKER (end)->insertion_type = 1; | 2525 if (!NILP (front_advance)) |
| 2526 XMARKER (beg)->insertion_type = 1; | |
| 2527 if (!NILP (rear_advance)) | |
| 2528 XMARKER (end)->insertion_type = 1; | |
| 2521 | 2529 |
| 2522 overlay = allocate_misc (); | 2530 overlay = allocate_misc (); |
| 2523 XMISCTYPE (overlay) = Lisp_Misc_Overlay; | 2531 XMISCTYPE (overlay) = Lisp_Misc_Overlay; |
| 2524 XOVERLAY (overlay)->start = beg; | 2532 XOVERLAY (overlay)->start = beg; |
| 2525 XOVERLAY (overlay)->end = end; | 2533 XOVERLAY (overlay)->end = end; |
| 3904 DEFVAR_PER_BUFFER ("buffer-file-format", ¤t_buffer->file_format, Qnil, | 3912 DEFVAR_PER_BUFFER ("buffer-file-format", ¤t_buffer->file_format, Qnil, |
| 3905 "List of formats to use when saving this buffer.\n\ | 3913 "List of formats to use when saving this buffer.\n\ |
| 3906 Formats are defined by `format-alist'. This variable is\n\ | 3914 Formats are defined by `format-alist'. This variable is\n\ |
| 3907 set when a file is visited. Automatically local in all buffers."); | 3915 set when a file is visited. Automatically local in all buffers."); |
| 3908 | 3916 |
| 3909 DEFVAR_PER_BUFFER ("buffer-redisplay-end-trigger", | |
| 3910 ¤t_buffer->redisplay_end_trigger, Qnil, | |
| 3911 "Trigger point for running `redisplay-end-trigger-hook'.\n\ | |
| 3912 This variable is always local in every buffer.\n\ | |
| 3913 If redisplay in the buffer reaches a position larger than the\n\ | |
| 3914 value of `buffer-redisplay-end-trigger', then the hook is run\n\ | |
| 3915 after first setting `buffer-redisplay-end-trigger' to nil.\n\ | |
| 3916 If `buffer-redisplay-end-trigger' is nil, the hook is never run."); | |
| 3917 | |
| 3918 DEFVAR_PER_BUFFER ("buffer-invisibility-spec", | 3917 DEFVAR_PER_BUFFER ("buffer-invisibility-spec", |
| 3919 ¤t_buffer->invisibility_spec, Qnil, | 3918 ¤t_buffer->invisibility_spec, Qnil, |
| 3920 "Invisibility spec of this buffer.\n\ | 3919 "Invisibility spec of this buffer.\n\ |
| 3921 The default is t, which means that text is invisible\n\ | 3920 The default is t, which means that text is invisible\n\ |
| 3922 if it has a non-nil `invisible' property.\n\ | 3921 if it has a non-nil `invisible' property.\n\ |
