aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2009-12-05 22:49:00 +0000
committerChong Yidong2009-12-05 22:49:00 +0000
commit426ac9499e082e4ab83a18639fd45b720584f347 (patch)
treecf52547f8d1cfb11b7505854fbe88405c8c83241 /src
parent9a594ee6eadd63fbf9daa69b701401c86aeddf01 (diff)
downloademacs-426ac9499e082e4ab83a18639fd45b720584f347.tar.gz
emacs-426ac9499e082e4ab83a18639fd45b720584f347.zip
* xdisp.c (push_display_prop): Don't set avoid_cursor_p. Return 0
if push failed. (handle_line_prefix): Set avoid_cursor_p here. Check return value of push_display_prop (Bug#5000).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c18
2 files changed, 14 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 1909af820fb..aec5dc18286 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
12009-12-05 Chong Yidong <cyd@stupidchicken.com> 12009-12-05 Chong Yidong <cyd@stupidchicken.com>
2 2
3 * xdisp.c (push_display_prop): Don't set avoid_cursor_p. Return 0
4 if push failed.
5 (handle_line_prefix): Set avoid_cursor_p here. Check return value
6 of push_display_prop (Bug#5000).
7
3 * xfaces.c (Fx_family_fonts): Handle 2009-07-14 change to return 8 * xfaces.c (Fx_family_fonts): Handle 2009-07-14 change to return
4 value of font_list_entities (Bug#5085). 9 value of font_list_entities (Bug#5085).
5 10
diff --git a/src/xdisp.c b/src/xdisp.c
index 05bcd136865..449d42dcf17 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -16384,22 +16384,20 @@ cursor_row_p (w, row)
16384 16384
16385 16385
16386/* Push the display property PROP so that it will be rendered at the 16386/* Push the display property PROP so that it will be rendered at the
16387 current position in IT. */ 16387 current position in IT. Return 1 if PROP was successfully pushed,
16388 0 otherwise. */
16388 16389
16389static void 16390static int
16390push_display_prop (struct it *it, Lisp_Object prop) 16391push_display_prop (struct it *it, Lisp_Object prop)
16391{ 16392{
16392 push_it (it); 16393 push_it (it);
16393 16394
16394 /* Never display a cursor on the prefix. */
16395 it->avoid_cursor_p = 1;
16396
16397 if (STRINGP (prop)) 16395 if (STRINGP (prop))
16398 { 16396 {
16399 if (SCHARS (prop) == 0) 16397 if (SCHARS (prop) == 0)
16400 { 16398 {
16401 pop_it (it); 16399 pop_it (it);
16402 return; 16400 return 0;
16403 } 16401 }
16404 16402
16405 it->string = prop; 16403 it->string = prop;
@@ -16426,8 +16424,10 @@ push_display_prop (struct it *it, Lisp_Object prop)
16426 else 16424 else
16427 { 16425 {
16428 pop_it (it); /* bogus display property, give up */ 16426 pop_it (it); /* bogus display property, give up */
16429 return; 16427 return 0;
16430 } 16428 }
16429
16430 return 1;
16431} 16431}
16432 16432
16433/* Return the character-property PROP at the current position in IT. */ 16433/* Return the character-property PROP at the current position in IT. */
@@ -16467,13 +16467,13 @@ handle_line_prefix (struct it *it)
16467 if (NILP (prefix)) 16467 if (NILP (prefix))
16468 prefix = Vline_prefix; 16468 prefix = Vline_prefix;
16469 } 16469 }
16470 if (! NILP (prefix)) 16470 if (! NILP (prefix) && push_display_prop (it, prefix))
16471 { 16471 {
16472 push_display_prop (it, prefix);
16473 /* If the prefix is wider than the window, and we try to wrap 16472 /* If the prefix is wider than the window, and we try to wrap
16474 it, it would acquire its own wrap prefix, and so on till the 16473 it, it would acquire its own wrap prefix, and so on till the
16475 iterator stack overflows. So, don't wrap the prefix. */ 16474 iterator stack overflows. So, don't wrap the prefix. */
16476 it->line_wrap = TRUNCATE; 16475 it->line_wrap = TRUNCATE;
16476 it->avoid_cursor_p = 1;
16477 } 16477 }
16478} 16478}
16479 16479