From: Gerd Moellmann Date: Wed, 3 May 2000 19:48:35 +0000 (+0000) Subject: (handle_single_display_prop): If display property value X-Git-Tag: emacs-pretest-21.0.90~4054 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a21a394398aebd999207a103b3b47f2045eb07fd;p=emacs.git (handle_single_display_prop): If display property value is invalid, or something not supported on the frame, restore iterator's position to what it was initially. Make sure to return 0 for invalid and unsupported property values. --- diff --git a/src/xdisp.c b/src/xdisp.c index 2f766bf46e8..f377a9b61d6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2439,7 +2439,6 @@ handle_single_display_prop (it, prop, object, position) /* Characters having this form of property are not displayed, so we have to find the end of the property. */ - space_or_image_found_p = 1; start_pos = *position; *position = display_prop_end (it, object, start_pos); value = Qnil; @@ -2489,6 +2488,8 @@ handle_single_display_prop (it, prop, object, position) || NILP (location)) && valid_p) { + space_or_image_found_p = 1; + /* Save current settings of IT so that we can restore them when we are finished with the glyph property value. */ push_it (it); @@ -2534,6 +2535,10 @@ handle_single_display_prop (it, prop, object, position) } #endif /* HAVE_WINDOW_SYSTEM */ } + else + /* Invalid property or property not supported. Restore + the position to what it was before. */ + *position = start_pos; } return space_or_image_found_p;