From 77d31fb4c44cfffa23983d1f3335ed17e987206d Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Mon, 8 Sep 2003 07:52:23 +0000 Subject: (syms_of_buffer): Document `%i' and `%I' constructs for `mode-line-format'. --- src/buffer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index de466de485a..e41d114eaa3 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5372,6 +5372,8 @@ A string is printed verbatim in the mode line except for %-constructs: %c -- print the current column number (this makes editing slower). To make the column number update correctly in all cases, `column-number-mode' must be non-nil. + %i -- print the size of the buffer. + %I -- like %i, but use k, M, G, etc., to abbreviate. %p -- print percent of buffer above top of window, or Top, Bot or All. %P -- print percent of buffer above bottom of window, perhaps plus Top, or print Bottom or All. -- cgit v1.2.1 From d674d13e14107bdc860391e08b724310f752235e Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Sun, 28 Dec 2003 22:16:57 +0000 Subject: (Fother_buffer): Don't crash if BUF is nil or if its name is nil. (Fkill_buffer): Don't delete auto-save file if it's the same as the visited file. --- src/buffer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index e41d114eaa3..533e2c9c506 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -89,10 +89,6 @@ static Lisp_Object Vbuffer_defaults; If a slot is -2, then there is no DEFVAR_PER_BUFFER for it, but there is a default value which is copied into each buffer. - If a slot in this structure is negative, then even though there may - be a DEFVAR_PER_BUFFER for the slot, there is no default value for it; - and the corresponding slot in buffer_defaults is not used. - If a slot in this structure corresponding to a DEFVAR_PER_BUFFER is zero, that is a bug */ @@ -1202,6 +1198,10 @@ If BUFFER is omitted or nil, some interesting buffer is returned. */) buf = Fcdr (XCAR (tail)); if (EQ (buf, buffer)) continue; + if (NILP (buf)) + continue; + if (NILP (XBUFFER (buf)->name)) + continue; if (SREF (XBUFFER (buf)->name, 0) == ' ') continue; /* If the selected frame has a buffer_predicate, @@ -1429,7 +1429,8 @@ with SIGHUP. */) if (STRINGP (b->auto_save_file_name) && b->auto_save_modified != 0 && BUF_SAVE_MODIFF (b) < b->auto_save_modified - && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) + && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) + && NILP (Fsymbol_value (intern ("auto-save-visited-file-name")))) { Lisp_Object tem; tem = Fsymbol_value (intern ("delete-auto-save-files")); -- cgit v1.2.1 From 8e8767f80efed7c5d44f88e8c088ed0a0369c36e Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Fri, 16 Jan 2004 18:40:22 +0000 Subject: (init_buffer_once): Set buffer_defaults and buffer_local_flags for indicate_buffer_boundaries. (syms_of_buffer): Defvar_per_buffer it, and defvar_lisp_nopro default- variable for it. --- src/buffer.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 533e2c9c506..b4c530d49fd 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4959,6 +4959,7 @@ init_buffer_once () buffer_defaults.scroll_bar_width = Qnil; buffer_defaults.vertical_scroll_bar_type = Qt; buffer_defaults.indicate_empty_lines = Qnil; + buffer_defaults.indicate_buffer_boundaries = Qnil; buffer_defaults.scroll_up_aggressively = Qnil; buffer_defaults.scroll_down_aggressively = Qnil; buffer_defaults.display_time = Qnil; @@ -5028,6 +5029,7 @@ init_buffer_once () XSETFASTINT (buffer_local_flags.scroll_bar_width, idx); ++idx; XSETFASTINT (buffer_local_flags.vertical_scroll_bar_type, idx); ++idx; XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx; + XSETFASTINT (buffer_local_flags.indicate_buffer_boundaries, idx); ++idx; XSETFASTINT (buffer_local_flags.scroll_up_aggressively, idx); ++idx; XSETFASTINT (buffer_local_flags.scroll_down_aggressively, idx); ++idx; XSETFASTINT (buffer_local_flags.header_line_format, idx); ++idx; @@ -5316,6 +5318,11 @@ This is the same as (default-value 'vertical-scroll-bar). */); doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. This is the same as (default-value 'indicate-empty-lines). */); + DEFVAR_LISP_NOPRO ("default-indicate-buffer-boundaries", + &buffer_defaults.indicate_buffer_boundaries, + doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it. +This is the same as (default-value 'indicate-buffer-boundaries). */); + DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", &buffer_defaults.scroll_up_aggressively, doc: /* Default value of `scroll-up-aggressively'. @@ -5626,6 +5633,14 @@ A value of t means to use the vertical scroll bar type from the window's frame. If non-nil, a bitmap is displayed in the left fringe of a window on window-systems. */); + DEFVAR_PER_BUFFER ("indicate-buffer-boundaries", + ¤t_buffer->indicate_buffer_boundaries, Qnil, + doc: /* *Visually indicate buffer boundaries and scrolling. +If non-nil, the first and last line of the buffer are marked in the left and +right fringe of a window on window-systems. +In addition, if value is t, the top and bottom line of the window are marked +with up and down arrow bitmaps in the right fringe if window can be scrolled. */); + DEFVAR_PER_BUFFER ("scroll-up-aggressively", ¤t_buffer->scroll_up_aggressively, Qnil, doc: /* How far to scroll windows upward. -- cgit v1.2.1 From d4f8198baf47d674798cf6fdb7df44ca92e33a40 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 21 Jan 2004 04:32:19 +0000 Subject: (buffer_defaults, buffer_local_symbols): Use DECL_ALIGN. --- src/buffer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index b4c530d49fd..fa5a9c85c2d 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1,5 +1,5 @@ /* Buffer manipulation primitives for GNU Emacs. - Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 02, 2003 + Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 02, 03, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -67,7 +67,7 @@ struct buffer *all_buffers; Setting the default value also goes through the alist of buffers and stores into each buffer that does not say it has a local value. */ -struct buffer buffer_defaults; +DECL_ALIGN (struct buffer, buffer_defaults); /* A Lisp_Object pointer to the above, used for staticpro */ @@ -97,7 +97,8 @@ struct buffer buffer_local_flags; /* This structure holds the names of symbols whose values may be buffer-local. It is indexed and accessed in the same way as the above. */ -struct buffer buffer_local_symbols; +DECL_ALIGN (struct buffer, buffer_local_symbols); + /* A Lisp_Object pointer to the above, used for staticpro */ static Lisp_Object Vbuffer_local_symbols; -- cgit v1.2.1 From fc1d15f69da0808959f5d6e8c8caa0a8d0b100c7 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 5 Feb 2004 02:16:36 +0000 Subject: (Fset_buffer_multibyte): Fix docstring. --- src/buffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index fa5a9c85c2d..5ebcaa819d1 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2081,7 +2081,9 @@ DEFUN ("set-buffer-multibyte", Fset_buffer_multibyte, Sset_buffer_multibyte, If FLAG is t, this makes the buffer a multibyte buffer. If FLAG is nil, this makes the buffer a single-byte buffer. The buffer contents remain unchanged as a sequence of bytes -but the contents viewed as characters do change. */) +but the contents viewed as characters do change. +If the multibyte flag was really changed, undo information of the +current buffer is cleared. */) (flag) Lisp_Object flag; { -- cgit v1.2.1 From ccbc43315d0214cbba337159bb646edcfe735a13 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Sun, 15 Feb 2004 17:39:43 +0000 Subject: (syms_of_buffer): Doc fix for indicate-buffer-boundaries. --- src/buffer.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 5ebcaa819d1..ad1dde93da7 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5639,10 +5639,20 @@ window-systems. */); DEFVAR_PER_BUFFER ("indicate-buffer-boundaries", ¤t_buffer->indicate_buffer_boundaries, Qnil, doc: /* *Visually indicate buffer boundaries and scrolling. -If non-nil, the first and last line of the buffer are marked in the left and -right fringe of a window on window-systems. -In addition, if value is t, the top and bottom line of the window are marked -with up and down arrow bitmaps in the right fringe if window can be scrolled. */); +If non-nil, the first and last line of the buffer are marked in the fringe +of a window on window-systems with angle bitmaps, or if the window can be +scrolled, the top and bottom line of the window are marked with up and down +arrow bitmaps. +If value is `left' or `right', both angle and arrow bitmaps are displayed in +the left or right fringe, resp. Any other non-nil value causes the +bitmap on the top line to be displayed in the left fringe, and the +bitmap on the bottom line in the right fringe. +If value is a cons (ANGLES . ARROWS), the car specifies the position +of the angle bitmaps, and the cdr specifies the position of the arrow +bitmaps. For example, (t . right) places the top angle bitmap in left +fringe, the bottom angle bitmap in right fringe, and both arrow +bitmaps in right fringe. To show just the angle bitmaps in the left +fringe, but no arrow bitmaps, use (left . nil). */); DEFVAR_PER_BUFFER ("scroll-up-aggressively", ¤t_buffer->scroll_up_aggressively, Qnil, -- cgit v1.2.1 From ae47339f7153f9ba2e8dfbbb8e1032f9f7979a77 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Thu, 4 Mar 2004 17:15:13 +0000 Subject: (Fpop_to_buffer): Doc fix. --- src/buffer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index ad1dde93da7..27b12845c50 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1675,8 +1675,9 @@ DEFUN ("pop-to-buffer", Fpop_to_buffer, Spop_to_buffer, 1, 3, 0, doc: /* Select buffer BUFFER in some window, preferably a different one. If BUFFER is nil, then some other buffer is chosen. If `pop-up-windows' is non-nil, windows can be split to do this. -If optional second arg OTHER-WINDOW is non-nil, insist on finding another -window even if BUFFER is already visible in the selected window. +If optional second arg OTHER-WINDOW is nil, insist on finding another +window even if BUFFER is already visible in the selected window, +and ignore `same-window-regexps' and `same-window-buffer-names'. This uses the function `display-buffer' as a subroutine; see the documentation of `display-buffer' for additional customization information. -- cgit v1.2.1 From abdb9b8306ccc3dc1d0603017466c023f09b9228 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Thu, 25 Mar 2004 18:05:29 +0000 Subject: * insdel.c (adjust_markers_for_insert): Call fix_start_end_in_overlays. * buffer.c (fix_start_end_in_overlays): Rename fix_overlays_in_range. * editfns.c (Ftranspose_regions): Likewise. * lisp.h (top_level): Likewise. --- src/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 27b12845c50..08031a0d72b 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3293,7 +3293,7 @@ adjust_overlays_for_delete (pos, length) If so, we'll reverse the endpoints. Can you think of anything better to do in this situation? */ void -fix_overlays_in_range (start, end) +fix_start_end_in_overlays (start, end) register int start, end; { Lisp_Object overlay; -- cgit v1.2.1 From 99a72bdf2392844d9483ca6446b795effd8aadfb Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Sat, 10 Apr 2004 20:21:50 +0000 Subject: (fix_start_end_in_overlays): make overlays empty if they are backwards. --- src/buffer.c | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 08031a0d72b..455b03efec2 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3290,8 +3290,7 @@ adjust_overlays_for_delete (pos, length) endpoint in this range will need to be unlinked from the overlay list and reinserted in its proper place. Such an overlay might even have negative size at this point. - If so, we'll reverse the endpoints. Can you think of anything - better to do in this situation? */ + If so, we'll make the overlay empty. */ void fix_start_end_in_overlays (start, end) register int start, end; @@ -3318,23 +3317,24 @@ fix_start_end_in_overlays (start, end) for (parent = NULL, tail = current_buffer->overlays_before; tail;) { XSETMISC (overlay, tail); + endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); + startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); + + /* If the overlay is backwards, make it empty. */ + if (endpos < startpos) + { + startpos = endpos; + Fset_marker (OVERLAY_START (overlay), make_number (startpos), + Qnil); + } + if (endpos < start) break; - startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); + if (endpos < end || (startpos >= start && startpos < end)) { - /* If the overlay is backwards, fix that now. */ - if (startpos > endpos) - { - int tem; - Fset_marker (OVERLAY_START (overlay), make_number (endpos), - Qnil); - Fset_marker (OVERLAY_END (overlay), make_number (startpos), - Qnil); - tem = startpos; startpos = endpos; endpos = tem; - } /* Add it to the end of the wrong list. Later on, recenter_overlay_lists will move it to the right place. */ if (endpos < current_buffer->overlay_center) @@ -3365,22 +3365,24 @@ fix_start_end_in_overlays (start, end) for (parent = NULL, tail = current_buffer->overlays_after; tail;) { XSETMISC (overlay, tail); + startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); + endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); + + /* If the overlay is backwards, make it empty. */ + if (endpos < startpos) + { + startpos = endpos; + Fset_marker (OVERLAY_START (overlay), make_number (startpos), + Qnil); + } + if (startpos >= end) break; - endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); + if (startpos >= start || (endpos >= start && endpos < end)) { - if (startpos > endpos) - { - int tem; - Fset_marker (OVERLAY_START (overlay), make_number (endpos), - Qnil); - Fset_marker (OVERLAY_END (overlay), make_number (startpos), - Qnil); - tem = startpos; startpos = endpos; endpos = tem; - } if (endpos < current_buffer->overlay_center) { if (!afterp) -- cgit v1.2.1 From 54dffe35a5d575f94d97b55bce830553480c6177 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 11 Apr 2004 15:44:38 +0000 Subject: (Fgenerate_new_buffer_name): Return NAME argument if IGNORE argument equals NAME. Doc fix. --- src/buffer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 455b03efec2..d62e186fda8 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -766,7 +766,7 @@ DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, Sgenerate_new_buff doc: /* Return a string that is the name of no existing buffer based on NAME. If there is no live buffer named NAME, then return NAME. Otherwise modify name by appending `', incrementing NUMBER -until an unused name is found, and then return that name. +\(starting at 2) until an unused name is found, and then return that name. Optional second argument IGNORE specifies a name that is okay to use \(if it is in the sequence to be tried) even if a buffer with that name exists. */) @@ -779,6 +779,9 @@ even if a buffer with that name exists. */) CHECK_STRING (name); + tem = Fstring_equal (name, ignore); + if (!NILP (tem)) + return name; tem = Fget_buffer (name); if (NILP (tem)) return name; -- cgit v1.2.1 From ab53e0655927e83997ba6d52e4b28844fe4b679d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 12 Apr 2004 12:13:03 +0000 Subject: (Fmake_indirect_buffer): Check that NAME is a string. --- src/buffer.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index d62e186fda8..403baa817d3 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -532,6 +532,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) Lisp_Object buf; struct buffer *b; + CHECK_STRING (name); buf = Fget_buffer (name); if (!NILP (buf)) error ("Buffer name `%s' is in use", SDATA (name)); -- cgit v1.2.1 From c9aac8e6883e26705580fc90883093b6a48423c7 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Tue, 13 Apr 2004 01:16:22 +0000 Subject: (Fmake_indirect_buffer): Throw an error if the intended base buffer has been killed. Correct the error message if the base buffer does not exist. --- src/buffer.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 403baa817d3..ca74dda73bf 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -521,7 +521,7 @@ DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, 2, 3, "bMake indirect buffer (to buffer): \nBName of indirect buffer: ", doc: /* Create and return an indirect buffer for buffer BASE-BUFFER, named NAME. -BASE-BUFFER should be an existing buffer (or buffer name). +BASE-BUFFER should be a live buffer, or the name of an existing buffer. NAME should be a string which is not the name of an existing buffer. Optional argument CLONE non-nil means preserve BASE-BUFFER's state, such as major and minor modes, in the indirect buffer. @@ -529,7 +529,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) (base_buffer, name, clone) Lisp_Object base_buffer, name, clone; { - Lisp_Object buf; + Lisp_Object buf, tem; struct buffer *b; CHECK_STRING (name); @@ -537,9 +537,12 @@ CLONE nil means the indirect buffer's state is reset to default values. */) if (!NILP (buf)) error ("Buffer name `%s' is in use", SDATA (name)); + tem = base_buffer; base_buffer = Fget_buffer (base_buffer); if (NILP (base_buffer)) - error ("No such buffer: `%s'", SDATA (name)); + error ("No such buffer: `%s'", SDATA (tem)); + if (NILP (XBUFFER (base_buffer)->name)) + error ("Base buffer has been killed"); if (SCHARS (name) == 0) error ("Empty string for buffer name is not allowed"); @@ -653,7 +656,7 @@ delete_all_overlays (b) } /* Reinitialize everything about a buffer except its name and contents - and local variables. + and local variables. If called on an already-initialized buffer, the list of overlays should be deleted before calling this function, otherwise we end up with overlays that claim to belong to the buffer but the buffer -- cgit v1.2.1 From 5a72efd483ec5223a4e7773d801fad6c637bafe1 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 17 Apr 2004 02:04:27 +0000 Subject: (Fbuffer_base_buffer): Doc fix. --- src/buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index ca74dda73bf..6e67f07cf38 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -832,7 +832,8 @@ No argument or nil as argument means use the current buffer. */) DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer, 0, 1, 0, doc: /* Return the base buffer of indirect buffer BUFFER. -If BUFFER is not indirect, return nil. */) +If BUFFER is not indirect, return nil. +BUFFER defaults to the current buffer. */) (buffer) register Lisp_Object buffer; { -- cgit v1.2.1 From e198ba8711821da8fec10d1ab5d836f058fcf646 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 25 Apr 2004 23:56:14 +0000 Subject: (Fpop_to_buffer): Fix docstring. --- src/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 6e67f07cf38..db16b22e35a 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1683,7 +1683,7 @@ DEFUN ("pop-to-buffer", Fpop_to_buffer, Spop_to_buffer, 1, 3, 0, doc: /* Select buffer BUFFER in some window, preferably a different one. If BUFFER is nil, then some other buffer is chosen. If `pop-up-windows' is non-nil, windows can be split to do this. -If optional second arg OTHER-WINDOW is nil, insist on finding another +If optional second arg OTHER-WINDOW is non-nil, insist on finding another window even if BUFFER is already visible in the selected window, and ignore `same-window-regexps' and `same-window-buffer-names'. This uses the function `display-buffer' as a subroutine; see the documentation -- cgit v1.2.1 From 60ebfdf3c36549af059140338e2bf00d94d2a9ea Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Thu, 29 Apr 2004 22:36:11 +0000 Subject: (syms_of_buffer) : Allow float value. --- src/buffer.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index db16b22e35a..4f6ac755436 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2143,7 +2143,7 @@ current buffer is cleared. */) GPT = GPT_BYTE; TEMP_SET_PT_BOTH (PT_BYTE, PT_BYTE); - + for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next) tail->charpos = tail->bytepos; @@ -3339,7 +3339,7 @@ fix_start_end_in_overlays (start, end) if (endpos < start) break; - + if (endpos < end || (startpos >= start && startpos < end)) { @@ -3382,7 +3382,7 @@ fix_start_end_in_overlays (start, end) { startpos = endpos; Fset_marker (OVERLAY_START (overlay), make_number (startpos), - Qnil); + Qnil); } if (startpos >= end) @@ -4193,7 +4193,7 @@ report_overlay_modification (start, end, after, arg1, arg2, arg3) add_overlay_mod_hooklist (prop, overlay); } } - + for (tail = current_buffer->overlays_after; tail; tail = tail->next) { int startpos, endpos; @@ -5866,7 +5866,9 @@ this variable has no effect; the cursor appears as a hollow box. */); DEFVAR_PER_BUFFER ("line-spacing", ¤t_buffer->extra_line_spacing, Qnil, doc: /* Additional space to put between lines when displaying a buffer. -The space is measured in pixels, and put below lines on window systems. */); +The space is measured in pixels, and put below lines on window systems. +If value is a floating point number, it specifies the spacing relative +to the default frame line height. */); DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, doc: /* List of functions called with no args to query before killing a buffer. */); -- cgit v1.2.1 From 6431cf0d5ffb55542cce34b2bd89dd33d2139335 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Fri, 30 Apr 2004 22:49:49 +0000 Subject: (syms_of_buffer) : Add hbar value. --- src/buffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 4f6ac755436..d28c0af12ae 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5856,8 +5856,10 @@ Values are interpreted as follows: t use the cursor specified for the frame nil don't display a cursor - bar display a bar cursor with default width - (bar . WIDTH) display a bar cursor with width WIDTH + bar display a vertical bar cursor with default width + (bar . WIDTH) display a vertical bar cursor with width WIDTH + hbar display a horisontal bar cursor with default width + (hbar . WIDTH) display a horisontal bar cursor with width WIDTH ANYTHING ELSE display a box cursor. When the buffer is displayed in a nonselected window, -- cgit v1.2.1 From 038c748875495fbe75e023f97c396d099364c255 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Fri, 30 Apr 2004 22:53:40 +0000 Subject: (syms_of_buffer) : Doc fix. --- src/buffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index d28c0af12ae..7560e696685 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5856,11 +5856,13 @@ Values are interpreted as follows: t use the cursor specified for the frame nil don't display a cursor + box display a filled box cursor + hollow display a hollow box cursor bar display a vertical bar cursor with default width (bar . WIDTH) display a vertical bar cursor with width WIDTH hbar display a horisontal bar cursor with default width (hbar . WIDTH) display a horisontal bar cursor with width WIDTH - ANYTHING ELSE display a box cursor. + ANYTHING ELSE display a hollow box cursor. When the buffer is displayed in a nonselected window, this variable has no effect; the cursor appears as a hollow box. */); -- cgit v1.2.1 From 02f28bbdceb3cad843308d9ad0386ff5c492db9c Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Sat, 22 May 2004 22:20:51 +0000 Subject: (clone_per_buffer_values): Copy the alist of local vars, and the alist pairs too. --- src/buffer.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 7560e696685..532a768ba50 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -487,7 +487,7 @@ static void clone_per_buffer_values (from, to) struct buffer *from, *to; { - Lisp_Object to_buffer; + Lisp_Object to_buffer, tem; int offset; XSETBUFFER (to_buffer, to); @@ -514,6 +514,14 @@ clone_per_buffer_values (from, to) to->overlays_before = copy_overlays (to, from->overlays_before); to->overlays_after = copy_overlays (to, from->overlays_after); + + /* Copy the alist of local variables, + and all the alist elements too. */ + to->local_var_alist + = Fcopy_sequence (from->local_var_alist); + for (tem = to->local_var_alist; CONSP (tem); + tem = XCDR (tem)) + XSETCAR (tem, Fcons (XCAR (XCAR (tem)), XCDR (XCAR (tem)))); } -- cgit v1.2.1 From f1ccb32916f5c1ffae612392debe20dc6a1af19b Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Wed, 16 Jun 2004 22:33:52 +0000 Subject: (syms_of_buffer): Clarify `fill-column' docstring. --- src/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 532a768ba50..b72695d82bc 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5437,7 +5437,7 @@ nil here means use current buffer's major mode. */); DEFVAR_PER_BUFFER ("fill-column", ¤t_buffer->fill_column, make_number (Lisp_Int), doc: /* *Column beyond which automatic line-wrapping should happen. -Interactively, you can set this using \\[set-fill-column]. */); +Interactively, you can set the buffer local value using \\[set-fill-column]. */); DEFVAR_PER_BUFFER ("left-margin", ¤t_buffer->left_margin, make_number (Lisp_Int), -- cgit v1.2.1 From 5a39b770ee5604f23ef031032afab8f47548dafd Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 21 Jun 2004 03:20:20 +0000 Subject: (syms_of_buffer): Doc fix. --- src/buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index b72695d82bc..031f5da8e6e 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5847,7 +5847,11 @@ If the buffer has never been shown in a window, the value is nil. */); doc: /* *Non-nil means deactivate the mark when the buffer contents change. Non-nil also enables highlighting of the region whenever the mark is active. The variable `highlight-nonselected-windows' controls whether to highlight -all windows or just the selected window. */); +all windows or just the selected window. + +If the value is `lambda', that enables Transient Mark mode temporarily +until the next buffer modification. If a command sets the value to `only', +that enables Transient Mark mode for the following command only. */); Vtransient_mark_mode = Qnil; DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only, -- cgit v1.2.1