From: Paul Eggert Date: Sun, 19 Aug 2012 19:22:41 +0000 (-0700) Subject: * xdisp.c (handle_invisible_prop): Make it a bit faster X-Git-Tag: emacs-24.2.90~606 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=32bd425074e32184d3d4d9f985fd1a60814d78b2;p=emacs.git * xdisp.c (handle_invisible_prop): Make it a bit faster and avoid a gcc -Wmaybe-uninitialized diagnostic. --- diff --git a/src/ChangeLog b/src/ChangeLog index 63b968c8bb5..7f15a1a7921 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-08-19 Paul Eggert + + * xdisp.c (handle_invisible_prop): Make it a bit faster + and avoid a gcc -Wmaybe-uninitialized diagnostic. + 2012-08-19 Chong Yidong * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string diff --git a/src/xdisp.c b/src/xdisp.c index aab643f9fe8..e41783d03c1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4094,7 +4094,7 @@ handle_invisible_prop (struct it *it) /* Get the position at which the next visible text can be found in IT->string, if any. */ - len = SCHARS (it->string); + endpos = len = SCHARS (it->string); XSETINT (limit, len); do { @@ -4109,12 +4109,12 @@ handle_invisible_prop (struct it *it) display_ellipsis_p = 1; } } - while (invis_p && INTEGERP (end_charpos) && endpos < len); + while (invis_p && endpos < len); if (display_ellipsis_p) it->ellipsis_p = 1; - if (INTEGERP (end_charpos) && endpos < len) + if (endpos < len) { /* Text at END_CHARPOS is visible. Move IT there. */ struct text_pos old;