emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108538: * xfaces.c (face_for_over


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108538: * xfaces.c (face_for_overlay_string): Handle face remapping.
Date: Fri, 02 Nov 2012 02:28:36 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108538
fixes bug: http://debbugs.gnu.org/2066
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2012-06-09 17:37:47 +0800
message:
  * xfaces.c (face_for_overlay_string): Handle face remapping.
modified:
  src/ChangeLog
  src/xfaces.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-06-09 07:27:15 +0000
+++ b/src/ChangeLog     2012-06-09 09:37:47 +0000
@@ -1,5 +1,7 @@
 2012-06-09  Chong Yidong  <address@hidden>
 
+       * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
+
        * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
        case (Bug#9752).
 

=== modified file 'src/xfaces.c'
--- a/src/xfaces.c      2012-04-09 22:54:59 +0000
+++ b/src/xfaces.c      2012-06-09 09:37:47 +0000
@@ -4579,7 +4579,7 @@
 }
 
 
-/* Return the display face-id of the basic face who's canonical face-id
+/* Return the display face-id of the basic face whose canonical face-id
    is FACE_ID.  The return value will usually simply be FACE_ID, unless that
    basic face has bee remapped via Vface_remapping_alist.  This function is
    conservative: if something goes wrong, it will simply return FACE_ID
@@ -5336,11 +5336,11 @@
   /* If the `default' face is not yet known, create it.  */
   lface = lface_from_face_name (f, Qdefault, 0);
   if (NILP (lface))
-  {
+    {
        Lisp_Object frame;
        XSETFRAME (frame, f);
        lface = Finternal_make_lisp_face (Qdefault, frame);
-  }
+    }
 
 #ifdef HAVE_WINDOW_SYSTEM
   if (FRAME_WINDOW_P (f))
@@ -6111,14 +6111,14 @@
 
   *endptr = endpos;
 
-  default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
-
-  /* Optimize common cases where we can use the default face.  */
+  /* Optimize common case where we can use the default face.  */
   if (NILP (prop)
-      && !(pos >= region_beg && pos < region_end))
+      && !(pos >= region_beg && pos < region_end)
+      && NILP (Vface_remapping_alist))
     return DEFAULT_FACE_ID;
 
   /* Begin with attributes from the default face.  */
+  default_face = FACE_FROM_ID (f, lookup_basic_face (f, DEFAULT_FACE_ID));
   memcpy (attrs, default_face->lface, sizeof attrs);
 
   /* Merge in attributes specified via text properties.  */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]