]> git.eshelyaron.com Git - emacs.git/commitdiff
(handle_display_prop): Ignore display specs after
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Tue, 16 Oct 2007 09:00:09 +0000 (09:00 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Tue, 16 Oct 2007 09:00:09 +0000 (09:00 +0000)
replacing one when string text is being replaced.
(handle_single_display_spec): Pretend as if characters with display
property haven't been consumed only when buffer text is being replaced.

admin/FOR-RELEASE
src/ChangeLog
src/xdisp.c

index 96129ec22d411c60028eb667cfb77cd5cd375f27..1f8d0fec7623e82eddc93f61345f40c6921eb3a3 100644 (file)
@@ -57,14 +57,6 @@ http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00055.html
 ** ams@gnu.org, 9 July: eshell and external commands
 http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00385.html
 
-** jbw@macs.hw.ac.uk, Sep 19: redisplay goes horribly wrong when a
-before-string contains multiple display properties
-http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg02442.html
-
-** jbw@macs.hw.ac.uk, Sep 19: part of display property on before-string
- property is not displayed
-http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00138.html
-
 ** lekktu@gmail.com, Oct 11: frame-local variables weirdness
 I proposed a patch, which fixed this and seemed right, but the patch
 caused other problems.  They are being investigated now.
index 2317e4302a94804847a69ece264b4ce0069d347c..5a4c51c84d84e82aec6400d596a4bb6d15cf49f8 100644 (file)
@@ -1,3 +1,10 @@
+2007-10-16  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * xdisp.c (handle_display_prop): Ignore display specs after
+       replacing one when string text is being replaced.
+       (handle_single_display_spec): Pretend as if characters with display
+       property haven't been consumed only when buffer text is being replaced.
+
 2007-10-14  Juanma Barranquero  <lekktu@gmail.com>
 
        * eval.c (do_autoload): Don't save autoloads.
index 22a0b9dbe05902f33ae7820c67fc2eb80b4b2505..92c0af8c5ed1bf495d798e2118af6d65f6fd6c81 100644 (file)
@@ -3839,7 +3839,13 @@ handle_display_prop (it)
        {
          if (handle_single_display_spec (it, XCAR (prop), object,
                                          position, display_replaced_p))
-           display_replaced_p = 1;
+           {
+             display_replaced_p = 1;
+             /* If some text in a string is replaced, `position' no
+                longer points to the position of `object'.  */
+             if (STRINGP (object))
+               break;
+           }
        }
     }
   else if (VECTORP (prop))
@@ -3848,7 +3854,13 @@ handle_display_prop (it)
       for (i = 0; i < ASIZE (prop); ++i)
        if (handle_single_display_spec (it, AREF (prop, i), object,
                                        position, display_replaced_p))
-         display_replaced_p = 1;
+         {
+           display_replaced_p = 1;
+           /* If some text in a string is replaced, `position' no
+              longer points to the position of `object'.  */
+           if (STRINGP (object))
+             break;
+         }
     }
   else
     {
@@ -4237,13 +4249,16 @@ handle_single_display_spec (it, spec, object, position,
          /* Say that we haven't consumed the characters with
             `display' property yet.  The call to pop_it in
             set_iterator_to_next will clean this up.  */
-         *position = start_pos;
+         if (BUFFERP (object))
+           it->current.pos = start_pos;
        }
       else if (CONSP (value) && EQ (XCAR (value), Qspace))
        {
          it->method = GET_FROM_STRETCH;
          it->object = value;
-         *position = it->position = start_pos;
+         it->position = start_pos;
+         if (BUFFERP (object))
+           it->current.pos = start_pos;
        }
 #ifdef HAVE_WINDOW_SYSTEM
       else
@@ -4257,7 +4272,8 @@ handle_single_display_spec (it, spec, object, position,
          /* Say that we haven't consumed the characters with
             `display' property yet.  The call to pop_it in
             set_iterator_to_next will clean this up.  */
-         *position = start_pos;
+         if (BUFFERP (object))
+           it->current.pos = start_pos;
        }
 #endif /* HAVE_WINDOW_SYSTEM */