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


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/src/textprop.c
Date: Mon, 26 Nov 2001 15:10:04 -0500

Index: emacs/src/textprop.c
diff -u emacs/src/textprop.c:1.121 emacs/src/textprop.c:1.122
--- emacs/src/textprop.c:1.121  Sun Nov 25 21:19:38 2001
+++ emacs/src/textprop.c        Mon Nov 26 15:10:04 2001
@@ -1304,7 +1304,7 @@
    the text.  This does not obey any hooks.
    You can provide the interval that START is located in as I,
    or pass NULL for I and this function will find it.
-   This function assumes that START < END.  */
+   START and END can be in any order.  */
 
 void
 set_text_properties_1 (start, end, properties, buffer, i)
@@ -1317,7 +1317,14 @@
 
   s = XINT (start);
   len = XINT (end) - s;
-  eassert (len > 0);
+  if (len == 0)
+    return;
+  if (len < 0)
+    {
+      s = s + len;
+      len = - len;
+    }
+
   if (i == 0)
     i = find_interval (BUF_INTERVALS (XBUFFER (buffer)), s);
 



reply via email to

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