src/xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
from an Org mode buffer to a Speedbar frame.
2011-08-19 Eli Zaretskii <eliz@gnu.org>
+ * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
+ face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
+ from an Org mode buffer to a Speedbar frame.
+
* xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
a composition, take its buffer position from IT->cmp_it.charpos.
Fixes cursor positioning at the beginning of a line that begins
*endptr = endpos;
- default_face = FACE_FROM_ID (f, base_face_id >= 0 ? base_face_id
- : NILP (Vface_remapping_alist) ? DEFAULT_FACE_ID
- : lookup_basic_face (f, DEFAULT_FACE_ID));
+ {
+ int face_id;
+
+ if (base_face_id >= 0)
+ face_id = base_face_id;
+ else if (NILP (Vface_remapping_alist))
+ face_id = DEFAULT_FACE_ID;
+ else
+ face_id = lookup_basic_face (f, DEFAULT_FACE_ID);
+
+ default_face = FACE_FROM_ID (f, face_id);
+ }
/* Optimize common cases where we can use the default face. */
if (noverlays == 0