diff options
| author | Richard M. Stallman | 2007-11-03 03:48:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-11-03 03:48:12 +0000 |
| commit | 17d6c69d11cf3b63a39d893894d7f360615fedc2 (patch) | |
| tree | 3c0d42005589e1a22f1814cd48a01f4b2f29e12b /src | |
| parent | 490943fe146878558e7e123b0fe7ded4b8df6384 (diff) | |
| download | emacs-17d6c69d11cf3b63a39d893894d7f360615fedc2.tar.gz emacs-17d6c69d11cf3b63a39d893894d7f360615fedc2.zip | |
(handle_face_prop): Use face_at_buffer_position_no_overlays
to get the base face for an overlay string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 31 |
2 files changed, 30 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 42ebbddb652..13c5b452676 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2007-11-03 Richard Stallman <rms@gnu.org> | 1 | 2007-11-03 Richard Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (handle_face_prop): Use face_at_buffer_position_no_overlays | ||
| 4 | to get the base face for an overlay string. | ||
| 5 | |||
| 6 | * dispextern.h (face_at_buffer_position_no_overlays): Add decl. | ||
| 7 | |||
| 8 | * xfaces.c (face_at_buffer_position_no_overlays): New function. | ||
| 9 | |||
| 3 | * xdisp.c (handle_stop): Move some code out of loop. | 10 | * xdisp.c (handle_stop): Move some code out of loop. |
| 4 | 11 | ||
| 5 | 2007-11-01 Johan Bockg,Ae(Brd <bojohan@gnu.org> | 12 | 2007-11-01 Johan Bockg,Ae(Brd <bojohan@gnu.org> |
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) | |||
| 3367 | int base_face_id, bufpos; | 3367 | int base_face_id, bufpos; |
| 3368 | 3368 | ||
| 3369 | if (it->current.overlay_string_index >= 0) | 3369 | if (it->current.overlay_string_index >= 0) |
| 3370 | bufpos = IT_CHARPOS (*it); | 3370 | { |
| 3371 | bufpos = IT_CHARPOS (*it); | ||
| 3372 | /* For an overlay face, the base face depends | ||
| 3373 | only on text properties and ignores overlays. */ | ||
| 3374 | base_face_id | ||
| 3375 | = face_at_buffer_position_no_overlays (it->w, | ||
| 3376 | IT_CHARPOS (*it), | ||
| 3377 | it->region_beg_charpos, | ||
| 3378 | it->region_end_charpos, | ||
| 3379 | &next_stop, | ||
| 3380 | (IT_CHARPOS (*it) | ||
| 3381 | + TEXT_PROP_DISTANCE_LIMIT), | ||
| 3382 | 0); | ||
| 3383 | } | ||
| 3371 | else | 3384 | else |
| 3372 | bufpos = 0; | 3385 | { |
| 3386 | bufpos = 0; | ||
| 3373 | 3387 | ||
| 3374 | /* For strings from a buffer, i.e. overlay strings or strings | 3388 | /* For strings from a `display' property, use the face at |
| 3375 | from a `display' property, use the face at IT's current | 3389 | IT's current buffer position as the base face to merge |
| 3376 | buffer position as the base face to merge with, so that | 3390 | with, so that overlay strings appear in the same face as |
| 3377 | overlay strings appear in the same face as surrounding | 3391 | surrounding text, unless they specify their own |
| 3378 | text, unless they specify their own faces. */ | 3392 | faces. */ |
| 3379 | base_face_id = underlying_face_id (it); | 3393 | base_face_id = underlying_face_id (it); |
| 3394 | } | ||
| 3380 | 3395 | ||
| 3381 | new_face_id = face_at_string_position (it->w, | 3396 | new_face_id = face_at_string_position (it->w, |
| 3382 | it->string, | 3397 | it->string, |