aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-05-11 09:31:42 +0000
committerGerd Moellmann2000-05-11 09:31:42 +0000
commitc7aca1ad8e41f26e9166056c04e523d38c00fb87 (patch)
treec3cd35458482a46dcecf28eab4ac966872703bc1 /src
parent739f26728c43202851a9d4d6fbe792e09be65ff4 (diff)
downloademacs-c7aca1ad8e41f26e9166056c04e523d38c00fb87.tar.gz
emacs-c7aca1ad8e41f26e9166056c04e523d38c00fb87.zip
(handle_single_display_prop): Don't try to set PT if
we're interating over a string.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index f377a9b61d6..46bf091230f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2314,16 +2314,22 @@ handle_single_display_prop (it, prop, object, position)
2314 struct gcpro gcpro1; 2314 struct gcpro gcpro1;
2315 struct text_pos end_pos, pt; 2315 struct text_pos end_pos, pt;
2316 2316
2317 end_pos = display_prop_end (it, object, *position);
2318 GCPRO1 (form); 2317 GCPRO1 (form);
2318 end_pos = display_prop_end (it, object, *position);
2319 2319
2320 /* Temporarily set point to the end position, and then evaluate 2320 /* Temporarily set point to the end position, and then evaluate
2321 the form. This makes `(eolp)' work as FORM. */ 2321 the form. This makes `(eolp)' work as FORM. */
2322 CHARPOS (pt) = PT; 2322 if (BUFFERP (object))
2323 BYTEPOS (pt) = PT_BYTE; 2323 {
2324 TEMP_SET_PT_BOTH (CHARPOS (end_pos), BYTEPOS (end_pos)); 2324 CHARPOS (pt) = PT;
2325 BYTEPOS (pt) = PT_BYTE;
2326 TEMP_SET_PT_BOTH (CHARPOS (end_pos), BYTEPOS (end_pos));
2327 }
2328
2325 form = eval_form (form); 2329 form = eval_form (form);
2326 TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt)); 2330
2331 if (BUFFERP (object))
2332 TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt));
2327 UNGCPRO; 2333 UNGCPRO;
2328 } 2334 }
2329 2335