all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Masatake YAMATO <jet@gyve.org>
Cc: emacs-devel@gnu.org
Subject: Re: overlay-start > overlay-end
Date: Tue, 23 Mar 2004 17:45:01 +0900 (JST)	[thread overview]
Message-ID: <20040323.174501.129085852.jet@gyve.org> (raw)
In-Reply-To: <E1B5cDn-0003EL-4e@fencepost.gnu.org>

>     +  /* Canonicalize the order of start and end. */
>     +  if (tail)
>     +    {
> 
> This fixes just one overlay.  What if there are several
> such overlays?  I think it is necessary to have a loop
> here, to fix as many broken overlays as there may be.

Thank you for suggestion. I found a function for the
purpose: fix_overlays_in_range. I put it inside
`fix_overlays_before'. Instead I put it to the upper
level function.

BTW, how do you think changing function names:

fix_overlays_in_range => fix_start_end_in_overlays
fix_overlays_before   => fix_order_of_overlays_in_buffer

Both functions fix orders. However the scope(target?) of order
is different; fix_overlays_in_range fixes the order inside
an overlay and fix_overlays_before fixed the order insdie
buffer's overlay list. The function names don't show the
difference of scope.

Regards,
Masatake YAMATO

cvs diff: warning: unrecognized response `access control disabled, clients can connect from any host' from cvs server
Index: src/insdel.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/insdel.c,v
retrieving revision 1.176
diff -u -r1.176 insdel.c
--- src/insdel.c	1 Sep 2003 15:45:52 -0000	1.176
+++ src/insdel.c	23 Mar 2004 08:37:12 -0000
@@ -441,9 +441,13 @@
     }
 
   /* Adjusting only markers whose insertion-type is t may result in
-     disordered overlays in the slot `overlays_before'.  */
+     - disordered start and end in overlays, and 
+     - disordered overlays in the slot `overlays_before' of current_buffer.  */
   if (adjusted)
-    fix_overlays_before (current_buffer, from, to);
+    {
+      fix_overlays_in_range(from, to);
+      fix_overlays_before (current_buffer, from, to);
+    }
 }
 
 /* Adjust point for an insertion of NBYTES bytes, which are NCHARS characters.

  reply	other threads:[~2004-03-23  8:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-18 10:33 Using overlay in register Masatake YAMATO
2004-03-20  4:49 ` Richard Stallman
2004-03-21 14:03   ` Masatake YAMATO
2004-03-22  5:24     ` Richard Stallman
2004-03-22  5:24     ` Richard Stallman
2004-03-22  8:00       ` overlay-start > overlay-end Masatake YAMATO
2004-03-23  3:04         ` Richard Stallman
2004-03-23  8:45           ` Masatake YAMATO [this message]
2004-03-23 14:18             ` Stefan Monnier
2004-03-24  5:34             ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040323.174501.129085852.jet@gyve.org \
    --to=jet@gyve.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.