From: Richard M. Stallman Date: Sat, 3 Nov 2007 03:48:12 +0000 (+0000) Subject: (handle_face_prop): Use face_at_buffer_position_no_overlays X-Git-Tag: emacs-pretest-22.1.90~433 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=17d6c69d11cf3b63a39d893894d7f360615fedc2;p=emacs.git (handle_face_prop): Use face_at_buffer_position_no_overlays to get the base face for an overlay string. --- diff --git a/src/ChangeLog b/src/ChangeLog index 42ebbddb652..13c5b452676 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2007-11-03 Richard Stallman + * xdisp.c (handle_face_prop): Use face_at_buffer_position_no_overlays + to get the base face for an overlay string. + + * dispextern.h (face_at_buffer_position_no_overlays): Add decl. + + * xfaces.c (face_at_buffer_position_no_overlays): New function. + * xdisp.c (handle_stop): Move some code out of loop. 2007-11-01 Johan Bockg,Ae(Brd diff --git a/src/xdisp.c b/src/xdisp.c index ef8c6c836aa..4e3c0445e2e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3367,16 +3367,31 @@ handle_face_prop (it) int base_face_id, bufpos; if (it->current.overlay_string_index >= 0) - bufpos = IT_CHARPOS (*it); + { + bufpos = IT_CHARPOS (*it); + /* For an overlay face, the base face depends + only on text properties and ignores overlays. */ + base_face_id + = face_at_buffer_position_no_overlays (it->w, + IT_CHARPOS (*it), + it->region_beg_charpos, + it->region_end_charpos, + &next_stop, + (IT_CHARPOS (*it) + + TEXT_PROP_DISTANCE_LIMIT), + 0); + } else - bufpos = 0; + { + bufpos = 0; - /* For strings from a buffer, i.e. overlay strings or strings - from a `display' property, use the face at IT's current - buffer position as the base face to merge with, so that - overlay strings appear in the same face as surrounding - text, unless they specify their own faces. */ - base_face_id = underlying_face_id (it); + /* For strings from a `display' property, use the face at + IT's current buffer position as the base face to merge + with, so that overlay strings appear in the same face as + surrounding text, unless they specify their own + faces. */ + base_face_id = underlying_face_id (it); + } new_face_id = face_at_string_position (it->w, it->string,