emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/textprop.c [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/textprop.c [emacs-unicode-2]
Date: Mon, 28 Jun 2004 03:55:32 -0400

Index: emacs/src/textprop.c
diff -c emacs/src/textprop.c:1.135.4.1 emacs/src/textprop.c:1.135.4.2
*** emacs/src/textprop.c:1.135.4.1      Fri Apr 16 12:50:50 2004
--- emacs/src/textprop.c        Mon Jun 28 07:29:24 2004
***************
*** 637,666 ****
      }
    if (BUFFERP (object))
      {
-       int posn = XINT (position);
        int noverlays;
!       Lisp_Object *overlay_vec, tem;
!       int len;
        struct buffer *obuf = current_buffer;
  
        set_buffer_temp (XBUFFER (object));
  
!       /* First try with room for 40 overlays.  */
!       len = 40;
!       overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
! 
!       noverlays = overlays_at (posn, 0, &overlay_vec, &len,
!                              NULL, NULL, 0);
! 
!       /* If there are more than 40,
!        make enough space for all, and try again.  */
!       if (noverlays > len)
!       {
!         len = noverlays;
!         overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
!         noverlays = overlays_at (posn, 0, &overlay_vec, &len,
!                                  NULL, NULL, 0);
!       }
        noverlays = sort_overlays (overlay_vec, noverlays, w);
  
        set_buffer_temp (obuf);
--- 637,649 ----
      }
    if (BUFFERP (object))
      {
        int noverlays;
!       Lisp_Object *overlay_vec;
        struct buffer *obuf = current_buffer;
  
        set_buffer_temp (XBUFFER (object));
  
!       GET_OVERLAYS_AT (XINT (position), overlay_vec, noverlays, NULL, 0);
        noverlays = sort_overlays (overlay_vec, noverlays, w);
  
        set_buffer_temp (obuf);
***************
*** 668,674 ****
        /* Now check the overlays in order of decreasing priority.  */
        while (--noverlays >= 0)
        {
!         tem = Foverlay_get (overlay_vec[noverlays], prop);
          if (!NILP (tem))
            {
              if (overlay)
--- 651,657 ----
        /* Now check the overlays in order of decreasing priority.  */
        while (--noverlays >= 0)
        {
!         Lisp_Object tem = Foverlay_get (overlay_vec[noverlays], prop);
          if (!NILP (tem))
            {
              if (overlay)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]