diff options
| author | YAMAMOTO Mitsuharu | 2007-10-16 09:00:09 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2007-10-16 09:00:09 +0000 |
| commit | da6658e85d66433b154a0b48cb4f8377e12ceff0 (patch) | |
| tree | f9d00b09fba0cbb1822df0ffd8d263f86cf0bf0b | |
| parent | 974992a66b4d7e85549b76411b607836f27f6045 (diff) | |
| download | emacs-da6658e85d66433b154a0b48cb4f8377e12ceff0.tar.gz emacs-da6658e85d66433b154a0b48cb4f8377e12ceff0.zip | |
(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.
| -rw-r--r-- | admin/FOR-RELEASE | 8 | ||||
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 26 |
3 files changed, 28 insertions, 13 deletions
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 | |||
| 57 | ** ams@gnu.org, 9 July: eshell and external commands | 57 | ** ams@gnu.org, 9 July: eshell and external commands |
| 58 | http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00385.html | 58 | http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00385.html |
| 59 | 59 | ||
| 60 | ** jbw@macs.hw.ac.uk, Sep 19: redisplay goes horribly wrong when a | ||
| 61 | before-string contains multiple display properties | ||
| 62 | http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg02442.html | ||
| 63 | |||
| 64 | ** jbw@macs.hw.ac.uk, Sep 19: part of display property on before-string | ||
| 65 | property is not displayed | ||
| 66 | http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00138.html | ||
| 67 | |||
| 68 | ** lekktu@gmail.com, Oct 11: frame-local variables weirdness | 60 | ** lekktu@gmail.com, Oct 11: frame-local variables weirdness |
| 69 | I proposed a patch, which fixed this and seemed right, but the patch | 61 | I proposed a patch, which fixed this and seemed right, but the patch |
| 70 | caused other problems. They are being investigated now. | 62 | 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 @@ | |||
| 1 | 2007-10-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * xdisp.c (handle_display_prop): Ignore display specs after | ||
| 4 | replacing one when string text is being replaced. | ||
| 5 | (handle_single_display_spec): Pretend as if characters with display | ||
| 6 | property haven't been consumed only when buffer text is being replaced. | ||
| 7 | |||
| 1 | 2007-10-14 Juanma Barranquero <lekktu@gmail.com> | 8 | 2007-10-14 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 9 | ||
| 3 | * eval.c (do_autoload): Don't save autoloads. | 10 | * 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) | |||
| 3839 | { | 3839 | { |
| 3840 | if (handle_single_display_spec (it, XCAR (prop), object, | 3840 | if (handle_single_display_spec (it, XCAR (prop), object, |
| 3841 | position, display_replaced_p)) | 3841 | position, display_replaced_p)) |
| 3842 | display_replaced_p = 1; | 3842 | { |
| 3843 | display_replaced_p = 1; | ||
| 3844 | /* If some text in a string is replaced, `position' no | ||
| 3845 | longer points to the position of `object'. */ | ||
| 3846 | if (STRINGP (object)) | ||
| 3847 | break; | ||
| 3848 | } | ||
| 3843 | } | 3849 | } |
| 3844 | } | 3850 | } |
| 3845 | else if (VECTORP (prop)) | 3851 | else if (VECTORP (prop)) |
| @@ -3848,7 +3854,13 @@ handle_display_prop (it) | |||
| 3848 | for (i = 0; i < ASIZE (prop); ++i) | 3854 | for (i = 0; i < ASIZE (prop); ++i) |
| 3849 | if (handle_single_display_spec (it, AREF (prop, i), object, | 3855 | if (handle_single_display_spec (it, AREF (prop, i), object, |
| 3850 | position, display_replaced_p)) | 3856 | position, display_replaced_p)) |
| 3851 | display_replaced_p = 1; | 3857 | { |
| 3858 | display_replaced_p = 1; | ||
| 3859 | /* If some text in a string is replaced, `position' no | ||
| 3860 | longer points to the position of `object'. */ | ||
| 3861 | if (STRINGP (object)) | ||
| 3862 | break; | ||
| 3863 | } | ||
| 3852 | } | 3864 | } |
| 3853 | else | 3865 | else |
| 3854 | { | 3866 | { |
| @@ -4237,13 +4249,16 @@ handle_single_display_spec (it, spec, object, position, | |||
| 4237 | /* Say that we haven't consumed the characters with | 4249 | /* Say that we haven't consumed the characters with |
| 4238 | `display' property yet. The call to pop_it in | 4250 | `display' property yet. The call to pop_it in |
| 4239 | set_iterator_to_next will clean this up. */ | 4251 | set_iterator_to_next will clean this up. */ |
| 4240 | *position = start_pos; | 4252 | if (BUFFERP (object)) |
| 4253 | it->current.pos = start_pos; | ||
| 4241 | } | 4254 | } |
| 4242 | else if (CONSP (value) && EQ (XCAR (value), Qspace)) | 4255 | else if (CONSP (value) && EQ (XCAR (value), Qspace)) |
| 4243 | { | 4256 | { |
| 4244 | it->method = GET_FROM_STRETCH; | 4257 | it->method = GET_FROM_STRETCH; |
| 4245 | it->object = value; | 4258 | it->object = value; |
| 4246 | *position = it->position = start_pos; | 4259 | it->position = start_pos; |
| 4260 | if (BUFFERP (object)) | ||
| 4261 | it->current.pos = start_pos; | ||
| 4247 | } | 4262 | } |
| 4248 | #ifdef HAVE_WINDOW_SYSTEM | 4263 | #ifdef HAVE_WINDOW_SYSTEM |
| 4249 | else | 4264 | else |
| @@ -4257,7 +4272,8 @@ handle_single_display_spec (it, spec, object, position, | |||
| 4257 | /* Say that we haven't consumed the characters with | 4272 | /* Say that we haven't consumed the characters with |
| 4258 | `display' property yet. The call to pop_it in | 4273 | `display' property yet. The call to pop_it in |
| 4259 | set_iterator_to_next will clean this up. */ | 4274 | set_iterator_to_next will clean this up. */ |
| 4260 | *position = start_pos; | 4275 | if (BUFFERP (object)) |
| 4276 | it->current.pos = start_pos; | ||
| 4261 | } | 4277 | } |
| 4262 | #endif /* HAVE_WINDOW_SYSTEM */ | 4278 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 4263 | 4279 | ||