From: YAMAMOTO Mitsuharu Date: Tue, 16 Oct 2007 09:00:09 +0000 (+0000) Subject: (handle_display_prop): Ignore display specs after X-Git-Tag: emacs-pretest-22.1.90~599 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da6658e85d66433b154a0b48cb4f8377e12ceff0;p=emacs.git (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. --- diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 96129ec22d4..1f8d0fec762 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -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. diff --git a/src/ChangeLog b/src/ChangeLog index 2317e4302a9..5a4c51c84d8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2007-10-16 YAMAMOTO Mitsuharu + + * 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 * eval.c (do_autoload): Don't save autoloads. diff --git a/src/xdisp.c b/src/xdisp.c index 22a0b9dbe05..92c0af8c5ed 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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 */