diff options
| author | Chong Yidong | 2012-06-09 17:37:47 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-06-09 17:37:47 +0800 |
| commit | 1682701f2588a1ecc069a4f778dead6447a55270 (patch) | |
| tree | 92680c6be57060d87abdb5aa8ec87566320bd459 /src | |
| parent | dbab98c7afe359308f03d6c4a8d13cbbf2665137 (diff) | |
| download | emacs-1682701f2588a1ecc069a4f778dead6447a55270.tar.gz emacs-1682701f2588a1ecc069a4f778dead6447a55270.zip | |
* xfaces.c (face_for_overlay_string): Handle face remapping.
Fixes: debbugs:2066
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/xfaces.c | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c221746824a..ef770cbf7ec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2012-06-09 Chong Yidong <cyd@gnu.org> | 1 | 2012-06-09 Chong Yidong <cyd@gnu.org> |
| 2 | 2 | ||
| 3 | * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066). | ||
| 4 | |||
| 3 | * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive | 5 | * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive |
| 4 | case (Bug#9752). | 6 | case (Bug#9752). |
| 5 | 7 | ||
diff --git a/src/xfaces.c b/src/xfaces.c index 84a47cf6ccf..10d1c93fef8 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -4579,7 +4579,7 @@ lookup_named_face (struct frame *f, Lisp_Object symbol, int signal_p) | |||
| 4579 | } | 4579 | } |
| 4580 | 4580 | ||
| 4581 | 4581 | ||
| 4582 | /* Return the display face-id of the basic face who's canonical face-id | 4582 | /* Return the display face-id of the basic face whose canonical face-id |
| 4583 | is FACE_ID. The return value will usually simply be FACE_ID, unless that | 4583 | is FACE_ID. The return value will usually simply be FACE_ID, unless that |
| 4584 | basic face has bee remapped via Vface_remapping_alist. This function is | 4584 | basic face has bee remapped via Vface_remapping_alist. This function is |
| 4585 | conservative: if something goes wrong, it will simply return FACE_ID | 4585 | conservative: if something goes wrong, it will simply return FACE_ID |
| @@ -5336,11 +5336,11 @@ realize_default_face (struct frame *f) | |||
| 5336 | /* If the `default' face is not yet known, create it. */ | 5336 | /* If the `default' face is not yet known, create it. */ |
| 5337 | lface = lface_from_face_name (f, Qdefault, 0); | 5337 | lface = lface_from_face_name (f, Qdefault, 0); |
| 5338 | if (NILP (lface)) | 5338 | if (NILP (lface)) |
| 5339 | { | 5339 | { |
| 5340 | Lisp_Object frame; | 5340 | Lisp_Object frame; |
| 5341 | XSETFRAME (frame, f); | 5341 | XSETFRAME (frame, f); |
| 5342 | lface = Finternal_make_lisp_face (Qdefault, frame); | 5342 | lface = Finternal_make_lisp_face (Qdefault, frame); |
| 5343 | } | 5343 | } |
| 5344 | 5344 | ||
| 5345 | #ifdef HAVE_WINDOW_SYSTEM | 5345 | #ifdef HAVE_WINDOW_SYSTEM |
| 5346 | if (FRAME_WINDOW_P (f)) | 5346 | if (FRAME_WINDOW_P (f)) |
| @@ -6111,14 +6111,14 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos, | |||
| 6111 | 6111 | ||
| 6112 | *endptr = endpos; | 6112 | *endptr = endpos; |
| 6113 | 6113 | ||
| 6114 | default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID); | 6114 | /* Optimize common case where we can use the default face. */ |
| 6115 | |||
| 6116 | /* Optimize common cases where we can use the default face. */ | ||
| 6117 | if (NILP (prop) | 6115 | if (NILP (prop) |
| 6118 | && !(pos >= region_beg && pos < region_end)) | 6116 | && !(pos >= region_beg && pos < region_end) |
| 6117 | && NILP (Vface_remapping_alist)) | ||
| 6119 | return DEFAULT_FACE_ID; | 6118 | return DEFAULT_FACE_ID; |
| 6120 | 6119 | ||
| 6121 | /* Begin with attributes from the default face. */ | 6120 | /* Begin with attributes from the default face. */ |
| 6121 | default_face = FACE_FROM_ID (f, lookup_basic_face (f, DEFAULT_FACE_ID)); | ||
| 6122 | memcpy (attrs, default_face->lface, sizeof attrs); | 6122 | memcpy (attrs, default_face->lface, sizeof attrs); |
| 6123 | 6123 | ||
| 6124 | /* Merge in attributes specified via text properties. */ | 6124 | /* Merge in attributes specified via text properties. */ |