[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange problem with latest CVS
From: |
Masatake YAMATO |
Subject: |
Re: Strange problem with latest CVS |
Date: |
Sun, 11 Apr 2004 02:56:15 +0900 (JST) |
> + make_empty = 1;
> + tem = startpos;
> + startpos = endpos;
> + endpos = tem;
>
> It is a bit convoluted, and I suspect it could be done more simply.
> However, if it fixes the bug, please install it.
>
> The biggest question is that whether I should use overlay-start or
> overlay-end to make an overlay empty.
>
> It may not make much difference, but I think it is better to use
> overlay-end. That is the earlier address in this case, and the result
> will be that the overlay stays before the inserted text. However, I
> wouldn't say that the other choice is wrong. In this bizarre
> situation, the best we can hope for is to keep things consistent, one
> way or another.
I have made the patch simpler. I will install this one.
Should I install it to HEAD?
2004-04-11 Masatake YAMATO <address@hidden>
* buffer.c (fix_start_end_in_overlays): make overlays
empty if they are backwards.
cvs diff: warning: unrecognized response `access control disabled, clients can
connect from any host' from cvs server
Index: src/buffer.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/buffer.c,v
retrieving revision 1.446
diff -u -r1.446 buffer.c
--- src/buffer.c 25 Mar 2004 18:05:29 -0000 1.446
+++ src/buffer.c 10 Apr 2004 17:36:02 -0000
@@ -3290,8 +3290,7 @@
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 @@
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 @@
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)
- Re: Strange problem with latest CVS, (continued)
- Re: Strange problem with latest CVS, Richard Stallman, 2004/04/14
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/19
- Re: Strange problem with latest CVS, Richard Stallman, 2004/04/19
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/20
- Re: Strange problem with latest CVS, Richard Stallman, 2004/04/20
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/21
Re: Strange problem with latest CVS, Richard Stallman, 2004/04/07
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/08
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/08
- Re: Strange problem with latest CVS, Richard Stallman, 2004/04/09
- Re: Strange problem with latest CVS,
Masatake YAMATO <=
- Re: Strange problem with latest CVS, Kim F. Storm, 2004/04/10
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/10