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 [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/textprop.c [lexbind]
Date: Tue, 14 Oct 2003 19:23:25 -0400

Index: emacs/src/textprop.c
diff -c emacs/src/textprop.c:1.128.2.1 emacs/src/textprop.c:1.128.2.2
*** emacs/src/textprop.c:1.128.2.1      Fri Apr  4 01:21:03 2003
--- emacs/src/textprop.c        Tue Oct 14 19:22:47 2003
***************
*** 1,5 ****
  /* Interface code for dealing with text properties.
!    Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002
     Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
--- 1,5 ----
  /* Interface code for dealing with text properties.
!    Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003
     Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
***************
*** 1703,1725 ****
  /* Return the direction from which the text-property PROP would be
     inherited by any new text inserted at POS: 1 if it would be
     inherited from the char after POS, -1 if it would be inherited from
!    the char before POS, and 0 if from neither.  */
  
  int
! text_property_stickiness (prop, pos)
!      Lisp_Object prop;
!      Lisp_Object pos;
  {
    Lisp_Object prev_pos, front_sticky;
    int is_rear_sticky = 1, is_front_sticky = 0; /* defaults */
  
!   if (XINT (pos) > BEGV)
      /* Consider previous character.  */
      {
        Lisp_Object rear_non_sticky;
  
        prev_pos = make_number (XINT (pos) - 1);
!       rear_non_sticky = Fget_text_property (prev_pos, Qrear_nonsticky, Qnil);
  
        if (!NILP (CONSP (rear_non_sticky)
                 ? Fmemq (prop, rear_non_sticky)
--- 1703,1728 ----
  /* Return the direction from which the text-property PROP would be
     inherited by any new text inserted at POS: 1 if it would be
     inherited from the char after POS, -1 if it would be inherited from
!    the char before POS, and 0 if from neither.
!    BUFFER can be either a buffer or nil (meaning current buffer).  */
  
  int
! text_property_stickiness (prop, pos, buffer)
!      Lisp_Object prop, pos, buffer;
  {
    Lisp_Object prev_pos, front_sticky;
    int is_rear_sticky = 1, is_front_sticky = 0; /* defaults */
  
!   if (NILP (buffer))
!     XSETBUFFER (buffer, current_buffer);
! 
!   if (XINT (pos) > BUF_BEGV (XBUFFER (buffer)))
      /* Consider previous character.  */
      {
        Lisp_Object rear_non_sticky;
  
        prev_pos = make_number (XINT (pos) - 1);
!       rear_non_sticky = Fget_text_property (prev_pos, Qrear_nonsticky, 
buffer);
  
        if (!NILP (CONSP (rear_non_sticky)
                 ? Fmemq (prop, rear_non_sticky)
***************
*** 1729,1735 ****
      }
  
    /* Consider following character.  */
!   front_sticky = Fget_text_property (pos, Qfront_sticky, Qnil);
  
    if (EQ (front_sticky, Qt)
        || (CONSP (front_sticky)
--- 1732,1738 ----
      }
  
    /* Consider following character.  */
!   front_sticky = Fget_text_property (pos, Qfront_sticky, buffer);
  
    if (EQ (front_sticky, Qt)
        || (CONSP (front_sticky)
***************
*** 1749,1755 ****
       disambiguate.  Basically, rear-sticky wins, _except_ if the
       property that would be inherited has a value of nil, in which case
       front-sticky wins.  */
!   if (XINT (pos) == BEGV || NILP (Fget_text_property (prev_pos, prop, Qnil)))
      return 1;
    else
      return -1;
--- 1752,1759 ----
       disambiguate.  Basically, rear-sticky wins, _except_ if the
       property that would be inherited has a value of nil, in which case
       front-sticky wins.  */
!   if (XINT (pos) == BUF_BEGV (XBUFFER (buffer))
!       || NILP (Fget_text_property (prev_pos, prop, buffer)))
      return 1;
    else
      return -1;
***************
*** 2291,2293 ****
--- 2295,2300 ----
  /*  defsubr (&Serase_text_properties); */
  /*  defsubr (&Scopy_text_properties); */
  }
+ 
+ /* arch-tag: 454cdde8-5f86-4faa-a078-101e3625d479
+    (do not change this comment) */




reply via email to

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