(Fprevious_single_char_property_change): Return 0
authorMartin Rudalics <rudalics@gmx.at>
Mon, 3 Nov 2008 17:31:56 +0000 (17:31 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Mon, 3 Nov 2008 17:31:56 +0000 (17:31 +0000)
when there's no change in a string.  (Bug#1301)

src/ChangeLog
src/textprop.c

index 787ed51..e78abfd 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-03  Martin Rudalics  <rudalics@gmx.at>
+
+       * textprop.c (Fprevious_single_char_property_change): Return 0
+       when there's no change in a string.  (Bug#1301)
+
 2008-11-02  Martin Rudalics  <rudalics@gmx.at>
 
        * frame.c (do_switch_frame): New argument NORECORD passed to
index 6bc1938..120c428 100644 (file)
@@ -883,7 +883,7 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT.  */)
       if (NILP (position))
        {
          if (NILP (limit))
-           position = make_number (SCHARS (object));
+           position = make_number (0);
          else
            {
              CHECK_NUMBER (limit);