From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nathaniel Flath Newsgroups: gmane.emacs.devel Subject: Re: Overalays and point-entered Date: Tue, 6 Oct 2009 14:33:34 -0400 Message-ID: <5e3a506e0910061133r3e9b6146l637c84bee7b0d136@mail.gmail.com> References: <5e3a506e0909101709u2259d56h25f3ef1ec67326aa@mail.gmail.com> <5e3a506e0909140810r38a83a84l387fb6bafeb962c1@mail.gmail.com> <5e3a506e0909161346w1d5a8bebp84f1d51f0f446f28@mail.gmail.com> <5e3a506e0909230841i1d87b7ep397f2809e2cbdef9@mail.gmail.com> <5e3a506e0909240647k18368e10o6e5391a70a79e8@mail.gmail.com> <5e3a506e0909240704t5e716634k86b21e1604ee1912@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=000e0cd17124c9faf204754877a1 X-Trace: ger.gmane.org 1254854049 4136 80.91.229.12 (6 Oct 2009 18:34:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Oct 2009 18:34:09 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 06 20:34:00 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MvEr5-0006gU-4V for ged-emacs-devel@m.gmane.org; Tue, 06 Oct 2009 20:33:48 +0200 Original-Received: from localhost ([127.0.0.1]:40897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvEr4-0000Ac-IU for ged-emacs-devel@m.gmane.org; Tue, 06 Oct 2009 14:33:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvEqy-000091-NL for emacs-devel@gnu.org; Tue, 06 Oct 2009 14:33:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvEqu-0008SG-H1 for emacs-devel@gnu.org; Tue, 06 Oct 2009 14:33:40 -0400 Original-Received: from [199.232.76.173] (port=44310 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvEqu-0008Rz-95 for emacs-devel@gnu.org; Tue, 06 Oct 2009 14:33:36 -0400 Original-Received: from mail-pz0-f181.google.com ([209.85.222.181]:47681) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvEqt-0006Zx-I4 for emacs-devel@gnu.org; Tue, 06 Oct 2009 14:33:36 -0400 Original-Received: by pzk11 with SMTP id 11so2640700pzk.14 for ; Tue, 06 Oct 2009 11:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=g5F6Lyw+JTLTBwLZeNluANLDBeAsrqDtUy6VsQO/jSA=; b=bpG7iw4i/ZGIjKaAbj0vLJSIPEmbL9se4fSxv5pWc2ZoWWapkk0aEuSypjMm3F/EFj wRCN0Eje+IjCa4PWB4TWuL1sPM8tWUyjXtGaK7GIpcQ7qBPhX9thUmDxpj1LPomgTZOG QagHR7TroBrIaBqfFH6bm+INqM6mJXpOBTlcM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=rTF936oHca7WaIg9UnakhV9gio0vHvWo/LitoqFUgbwc0LF42O8TjgQd0ax2gkukSo MllS4Vz9zUQkmiD9TO8IyPinzruUY+/Gnd9NfURfGmhWaotreCOSg4+wc4xo29G/Gu4U 51Agfl3PhPx83Cxg3hlEelt1ybIQjmNFzN8zU= Original-Received: by 10.141.29.15 with SMTP id g15mr304611rvj.32.1254854014662; Tue, 06 Oct 2009 11:33:34 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115939 Archived-At: --000e0cd17124c9faf204754877a1 Content-Type: text/plain; charset=ISO-8859-1 Sorry for taking so long on this - I ended up being pretty busy with school and couldn't work on it for a while. I added a function get_overlays_at_pos which will return a list of overlays active at the given position and buffer - the design is based on get_pos_property. Then at the end of command_loop_1, run_point_motion_hooks is called which will retrieve the overlays at the current position, run the 'point-motion' property with the old point, new point, and overlay, and then run property for all overlays which were just executed. The 'point-motion property is also executed for the text property at current point, and the previous point's text-property if it is different from the one at current point. The diff for this is below - let me know your thoughts. Thanks, Nathaniel Flath diff --git a/src/editfns.c b/src/editfns.c index e52c3c2..7f343f0 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -499,6 +499,48 @@ get_pos_property (position, prop, object) } } +/* Returns an array of overlays that are active at the indication position and buffer. + The lenght of the array will be stored in num_overlays. */ + +Lisp_Object* +get_overlays_at_pos (position, buffer, num_overlays ) + Lisp_Object position, buffer; + int* num_overlays; +{ + CHECK_NUMBER_COERCE_MARKER (position); + + if (NILP (buffer)) + XSETBUFFER (buffer, current_buffer); + + int posn = XINT (position); + int i, noverlays; + Lisp_Object* overlay_vec; + struct buffer *obuf = current_buffer; + set_buffer_temp (XBUFFER (buffer)); + + noverlays = overlays_around (posn, overlay_vec, 0); + overlay_vec = xmalloc (sizeof(Lisp_Object) * noverlays); + noverlays = overlays_around (posn, overlay_vec, noverlays); + noverlays = sort_overlays (overlay_vec, noverlays, NULL); + + set_buffer_temp (obuf); + for (i = 0; i < noverlays; i++) + { + Lisp_Object ol = overlay_vec[i]; + Lisp_Object start = OVERLAY_START (ol), finish = OVERLAY_END (ol); + if ((OVERLAY_POSITION (start) == posn + && XMARKER (start)->insertion_type == 1) + || (OVERLAY_POSITION (finish) == posn + && XMARKER (finish)->insertion_type == 0)) + { + overlay_vec[i] = overlay_vec[noverlays]; + noverlays--; i--; + } + } + *num_overlays = noverlays; + return overlay_vec; +} + /* Find the field surrounding POS in *BEG and *END. If POS is nil, the value of point is used instead. If BEG or END is null, means don't store the beginning or end of the field. diff --git a/src/textprop.c b/src/textprop.c index 0018088..5708040 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -53,6 +53,7 @@ Lisp_Object Qpoint_left; Lisp_Object Qpoint_entered; Lisp_Object Qcategory; Lisp_Object Qlocal_map; +Lisp_Object Qpoint_motion; /* Visual properties text (including strings) may have. */ Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple; @@ -2348,6 +2349,9 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and Qpoint_left = intern ("point-left"); staticpro (&Qpoint_entered); Qpoint_entered = intern ("point-entered"); + staticpro (&Qpoint_entered); + Qpoint_motion = intern ("point-motion"); + defsubr (&Stext_properties_at); defsubr (&Sget_text_property); diff --git a/src/keyboard.c b/src/keyboard.c index 35c338c..a375daf 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1989,6 +1993,93 @@ command_loop_1 () } } +/* Runs 'point-motion hooks on text properties and overlays.*/ + +void +run_point_motion_hooks () +{ + static Lisp_Object* overlay_prev_vec; + static Lisp_Object prev_text_prop; + static int noverlays_prev; + + int i, j, noverlays_cur; + Lisp_Object *overlay_cur_vec; + Lisp_Object point_motion, overlay_window; + extern Lisp_Object Qpoint_motion, Qwindow; + + /* Retrieves vector of overlays in current location and runs 'point-motion + hook for those whose 'window property allows it to be displayed */ + overlay_cur_vec = get_overlays_at_pos (make_number (current_buffer->pt), + current_buffer, + &noverlays_cur); + for (i = 0; i < noverlays_cur; i++) + { + point_motion = Foverlay_get (overlay_cur_vec[i], Qpoint_motion); + overlay_window = Foverlay_get (overlay_cur_vec[i], Qwindow); + if (!NILP (point_motion) && + (NILP (overlay_window) + || !NILP (Feq (overlay_window, Fselected_window())))) + { + call3 (point_motion, + make_number (last_point_position), + make_number (current_buffer->pt), + overlay_cur_vec[i]); + } + } + + /* Runs hooks for all overlays that the point used to be in but no longer is */ + for (i = 0; i < noverlays_prev; i++) + { + point_motion = Foverlay_get (overlay_prev_vec[i], Qpoint_motion); + overlay_window = Foverlay_get (overlay_prev_vec[i], Qwindow); + if (!NILP (point_motion) && + (NILP (overlay_window) + || !NILP (Feq (overlay_window, Fselected_window())))) + { + for (j = 0; noverlays_cur; j++) { + if (!NILP (Feq (overlay_prev_vec[i], overlay_cur_vec[j]))) + goto next; + } + + call3 (point_motion, + make_number (last_point_position), + make_number (current_buffer->pt), + overlay_prev_vec[i]); + next: i=i; + } + } + + /* Runs hook for current text property */ + point_motion = Fget_text_property (make_number (current_buffer->pt), + Qpoint_motion, + Qnil); + if (!NILP (point_motion)) + { + call3 (point_motion, + make_number (last_point_position), + make_number (current_buffer->pt), + Fcurrent_buffer()); + } + + /* Runs hook for previous text property if it is different than the current text property */ + if (prev_text_prop != 0 && !NILP (prev_text_prop)) { + if (NILP (Feq (prev_text_prop, point_motion))) + { + call3 (prev_text_prop, + make_number (last_point_position), + make_number (current_buffer->pt), + Fcurrent_buffer()); + } + } + + prev_text_prop = point_motion; + + /* Frees previous overlays and sets them to the current list */ + free (overlay_prev_vec); + overlay_prev_vec = overlay_cur_vec; + noverlays_prev = noverlays_cur; +} + extern Lisp_Object Qcomposition, Qdisplay; /* Adjust point to a boundary of a region that has such a property On Thu, Sep 24, 2009 at 10:26 AM, Stefan Monnier wrote: > > Never mind, since get_pos_property is a C function and not a Lisp one > this > > probably wouldn't work. > > That's OK. It can still return a list, or else an array. > But if it can return the overlays rather than the property's values, > then you could pass the overlay back to the hook functions, which would > probably be convnient for those functions. > > > Stefan > --000e0cd17124c9faf204754877a1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sorry for taking so long on this - I ended up being pretty busy with school= and couldn't work on it for a while.

I added a function get_ove= rlays_at_pos which will return a list of overlays active at the given posit= ion and buffer - the design is based on get_pos_property.=A0 Then at the en= d of command_loop_1,=A0 run_point_motion_hooks is called which will retriev= e the overlays at the current position, run the 'point-motion' prop= erty with the old point, new point, and overlay, and then run property for = all overlays which were just executed.=A0 The 'point-motion property is= also executed for the text property at current point, and the previous poi= nt's text-property if it is different from the one at current point.
The diff for this is below - let me know your thoughts.

Thanks,<= br>Nathaniel Flath

diff --git a/src/editfns.c b/src/editfns.c
ind= ex e52c3c2..7f343f0 100644
--- a/src/editfns.c
+++ b/src/editfns.c @@ -499,6 +499,48 @@ get_pos_property (position, prop, object)
=A0=A0=A0= =A0 }
=A0}
=A0
+/* Returns an array of overlays that are active at= the indication position and buffer.
+=A0=A0 The lenght of the array wil= l be stored in num_overlays. */
+
+Lisp_Object*
+get_overlays_at_pos (position, buffer, num_overlays = )
+=A0=A0=A0=A0 Lisp_Object position, buffer;
+=A0=A0=A0=A0 int* num_= overlays;
+{
+=A0 CHECK_NUMBER_COERCE_MARKER (position);
+
+=A0= if (NILP (buffer))
+=A0=A0=A0 XSETBUFFER (buffer, current_buffer);
+
+=A0 int posn =3D X= INT (position);
+=A0 int i, noverlays;
+=A0 Lisp_Object* overlay_vec;=
+=A0 struct buffer *obuf =3D current_buffer;
+=A0 set_buffer_temp (X= BUFFER (buffer));
+
+=A0 noverlays =3D overlays_around (posn, overlay_vec, 0);
+=A0 ove= rlay_vec =3D xmalloc (sizeof(Lisp_Object) * noverlays);
+=A0 noverlays = =3D overlays_around (posn, overlay_vec, noverlays);
+=A0 noverlays =3D s= ort_overlays (overlay_vec, noverlays, NULL);
+
+=A0 set_buffer_temp (obuf);
+=A0 for (i =3D 0; i < noverlays; i= ++)
+=A0=A0=A0 {
+=A0=A0=A0=A0=A0 Lisp_Object ol =3D overlay_vec[i];<= br>+=A0=A0=A0=A0=A0 Lisp_Object start =3D OVERLAY_START (ol), finish =3D OV= ERLAY_END (ol);
+=A0=A0=A0=A0=A0 if ((OVERLAY_POSITION (start) =3D=3D po= sn
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 && XMARKER (start)->insertion_ty= pe =3D=3D 1)
+=A0=A0=A0=A0=A0=A0=A0=A0=A0 || (OVERLAY_POSITION (finish) = =3D=3D posn
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 && XMARKER = (finish)->insertion_type =3D=3D 0))
+=A0=A0=A0=A0=A0=A0=A0 {
+=A0= =A0=A0=A0=A0=A0=A0=A0=A0 overlay_vec[i] =3D overlay_vec[noverlays];
+=A0=A0=A0=A0=A0=A0=A0=A0=A0 noverlays--; i--;
+=A0=A0=A0=A0=A0=A0=A0 }<= br>+=A0=A0=A0 }
+=A0 *num_overlays =3D noverlays;
+=A0 return overlay= _vec;
+}
+
=A0/* Find the field surrounding POS in *BEG and *END.= =A0 If POS is nil,
=A0=A0=A0 the value of point is used instead.=A0 If B= EG or END is null,
=A0=A0=A0 means don't store the beginning or end of the field.

<= br>

diff --git a/src/textprop.c b/src/textprop.c
index 0018088..5= 708040 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -53,6 += 53,7 @@ Lisp_Object Qpoint_left;
=A0Lisp_Object Qpoint_entered;
=A0Lisp_Object Qcategory;
=A0Lisp_Obje= ct Qlocal_map;
+Lisp_Object Qpoint_motion;
=A0
=A0/* Visual proper= ties text (including strings) may have.=A0 */
=A0Lisp_Object Qforeground= , Qbackground, Qfont, Qunderline, Qstipple;
@@ -2348,6 +2349,9 @@ inherits it if NONSTICKINESS is nil.=A0 The `front-st= icky' and
=A0=A0 Qpoint_left =3D intern ("point-left");=A0=A0 staticpro (&Qpoint_entered);
=A0=A0 Qpoint_entered =3D inter= n ("point-entered");
+=A0 staticpro (&Qpoint_entered);
+=A0 Qpoint_motion =3D intern (&qu= ot;point-motion");
+
=A0
=A0=A0 defsubr (&Stext_propertie= s_at);
=A0=A0 defsubr (&Sget_text_property);




diff= --git a/src/keyboard.c b/src/keyboard.c
index 35c338c..a375daf 100644
--- a/src/keyboard.c
+++ b/src/keyboard= .c
@@ -1989,6 +1993,93 @@ command_loop_1 ()
=A0=A0=A0=A0 }
=A0}=A0
+/*=A0 Runs 'point-motion hooks on text properties and overlays= .*/
+
+void
+run_point_motion_hooks ()
+{
+=A0 static Lisp_Object* overl= ay_prev_vec;
+=A0 static Lisp_Object prev_text_prop;
+=A0 static int = noverlays_prev;
+
+=A0 int i, j, noverlays_cur;
+=A0 Lisp_Object *= overlay_cur_vec;
+=A0 Lisp_Object point_motion, overlay_window;
+=A0 extern Lisp_Object Q= point_motion, Qwindow;
+
+=A0 /* Retrieves vector of overlays in curr= ent location and runs 'point-motion
+=A0=A0=A0=A0 hook for those who= se 'window property allows it to be displayed */
+=A0 overlay_cur_vec =3D get_overlays_at_pos (make_number (current_buffer-&= gt;pt),
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 current_buffer,+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &noverlays_cur);
+= =A0 for (i =3D 0; i < noverlays_cur; i++)
+=A0=A0=A0 {
+=A0=A0=A0=A0=A0 point_motion =3D Foverlay_get (overlay_cur= _vec[i], Qpoint_motion);
+=A0=A0=A0=A0=A0 overlay_window =3D Foverlay_ge= t (overlay_cur_vec[i], Qwindow);
+=A0=A0=A0=A0=A0 if (!NILP (point_motio= n) &&
+=A0=A0=A0=A0=A0=A0=A0=A0=A0 (NILP (overlay_window)
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 || !NILP (Feq (overlay_window, Fselected_wi= ndow()))))
+=A0=A0=A0=A0=A0=A0=A0 {
+=A0=A0=A0=A0=A0=A0=A0=A0=A0 call= 3 (point_motion,
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 make_= number (last_point_position),
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 make_number (current_buffer->pt),
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 overlay_cur_vec[i]);
+= =A0=A0=A0=A0=A0=A0=A0 }
+=A0=A0=A0 }
+
+=A0 /* Runs hooks for all = overlays that the point used to be in but no longer is */
+=A0 for (i = =3D 0; i < noverlays_prev; i++)
+=A0=A0=A0=A0=A0 {
+=A0=A0=A0=A0= =A0=A0=A0 point_motion =3D Foverlay_get (overlay_prev_vec[i], Qpoint_motion= );
+=A0=A0=A0=A0=A0=A0=A0 overlay_window =3D Foverlay_get (overlay_prev_vec[i]= , Qwindow);
+=A0=A0=A0=A0=A0=A0=A0 if (!NILP (point_motion) &&+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (NILP (overlay_window)
+=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 || !NILP (Feq (overlay_window, Fselected_window= ()))))
+=A0=A0=A0=A0=A0=A0=A0=A0=A0 {
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 for (j= =3D 0; noverlays_cur; j++) {
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 i= f (!NILP (Feq (overlay_prev_vec[i], overlay_cur_vec[j])))
+=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 goto next;
+=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 }
+
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 call3 (point_motion,=
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 make_number (last_p= oint_position),
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = make_number (current_buffer->pt),
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 overlay_prev_vec[i]);
+=A0=A0=A0=A0=A0=A0=A0=A0=A0= next: i=3Di;
+=A0=A0=A0=A0=A0=A0=A0=A0=A0 }
+=A0=A0=A0=A0=A0 }
+<= br> +=A0 /* Runs hook for current text property */
+=A0 point_motion =3D Fge= t_text_property (make_number (current_buffer->pt),
+=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 Qpoint_motion,
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Qn= il);
+=A0 if (!NILP (point_motion))
+=A0=A0=A0 {
+=A0=A0=A0=A0=A0 call3 (p= oint_motion,
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 make_number (last_poi= nt_position),
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 make_number (current= _buffer->pt),
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Fcurrent_buffer()= );
+=A0=A0=A0 }
+
+=A0 /* Runs hook for previous text property if it is different than t= he current text property */
+=A0 if (prev_text_prop !=3D 0 && !N= ILP (prev_text_prop)) {
+=A0=A0=A0 if (NILP (Feq (prev_text_prop, point_= motion)))
+=A0=A0=A0=A0=A0 {
+=A0=A0=A0=A0=A0=A0=A0 call3 (prev_text_prop,
+=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 make_number (last_point_position),<= br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 make_number (current_buffer-= >pt),
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Fcurrent_buffer());=
+=A0=A0=A0=A0=A0 }
+=A0 }
+
+=A0 prev_text_prop =3D point_motion;
+
+=A0 /* Frees previous overla= ys and sets them to the current list */
+=A0 free (overlay_prev_vec);+=A0 overlay_prev_vec =3D overlay_cur_vec;
+=A0 noverlays_prev =3D nove= rlays_cur;
+}
+
=A0extern Lisp_Object Qcomposition, Qdisplay;
=A0
=A0/* Ad= just point to a boundary of a region that has such a property

On Thu, Sep 24, 2009 at 10:26 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Never m= ind, since get_pos_property is a C function and not a Lisp one this
> probably wouldn't work.

That's OK. =A0It can still return a list, or else an array.
But if it can return the overlays rather than the property's values, then you could pass the overlay back to the hook functions, which would
probably be convnient for those functions.


=A0 =A0 =A0 =A0Stefan

--000e0cd17124c9faf204754877a1--