/[emacs]/emacs/src/xfaces.c
ViewVC logotype

Diff of /emacs/src/xfaces.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.255.2.18 by miles, Sat Sep 4 09:24:38 2004 UTC revision 1.255.2.19 by miles, Thu Sep 16 00:15:01 2004 UTC
# Line 385  Lisp_Object Qforeground_color, Qbackgrou Line 385  Lisp_Object Qforeground_color, Qbackgrou
385  Lisp_Object Qface;  Lisp_Object Qface;
386  extern Lisp_Object Qmouse_face;  extern Lisp_Object Qmouse_face;
387    
388    /* Property for basic faces which other faces cannot inherit.  */
389    
390    Lisp_Object Qface_no_inherit;
391    
392  /* Error symbol for wrong_type_argument in load_pixmap.  */  /* Error symbol for wrong_type_argument in load_pixmap.  */
393    
394  Lisp_Object Qbitmap_spec_p;  Lisp_Object Qbitmap_spec_p;
# Line 3865  Value is a vector of face attributes.  * Line 3869  Value is a vector of face attributes.  *
3869       depend on the face, make sure they are all removed.  This is done       depend on the face, make sure they are all removed.  This is done
3870       by incrementing face_change_count.  The next call to       by incrementing face_change_count.  The next call to
3871       init_iterator will then free realized faces.  */       init_iterator will then free realized faces.  */
3872    ++face_change_count;    if (NILP (Fget (face, Qface_no_inherit)))
3873    ++windows_or_buffers_changed;      {
3874          ++face_change_count;
3875          ++windows_or_buffers_changed;
3876        }
3877    
3878    xassert (LFACEP (lface));    xassert (LFACEP (lface));
3879    check_lface (lface);    check_lface (lface);
# Line 3941  The value is TO.  */) Line 3948  The value is TO.  */)
3948       depend on the face, make sure they are all removed.  This is done       depend on the face, make sure they are all removed.  This is done
3949       by incrementing face_change_count.  The next call to       by incrementing face_change_count.  The next call to
3950       init_iterator will then free realized faces.  */       init_iterator will then free realized faces.  */
3951    ++face_change_count;    if (NILP (Fget (to, Qface_no_inherit)))
3952    ++windows_or_buffers_changed;      {
3953          ++face_change_count;
3954          ++windows_or_buffers_changed;
3955        }
3956    
3957    return to;    return to;
3958  }  }
# Line 4299  FRAME 0 means change the face on all fra Line 4309  FRAME 0 means change the face on all fra
4309       by incrementing face_change_count.  The next call to       by incrementing face_change_count.  The next call to
4310       init_iterator will then free realized faces.  */       init_iterator will then free realized faces.  */
4311    if (!EQ (frame, Qt)    if (!EQ (frame, Qt)
4312          && NILP (Fget (face, Qface_no_inherit))
4313        && (EQ (attr, QCfont)        && (EQ (attr, QCfont)
4314            || NILP (Fequal (old_value, value))))            || NILP (Fequal (old_value, value))))
4315      {      {
# Line 4451  update_face_from_frame_parameter (f, par Line 4462  update_face_from_frame_parameter (f, par
4462       struct frame *f;       struct frame *f;
4463       Lisp_Object param, new_value;       Lisp_Object param, new_value;
4464  {  {
4465      Lisp_Object face = Qnil;
4466    Lisp_Object lface;    Lisp_Object lface;
4467    
4468    /* If there are no faces yet, give up.  This is the case when called    /* If there are no faces yet, give up.  This is the case when called
# Line 4459  update_face_from_frame_parameter (f, par Line 4471  update_face_from_frame_parameter (f, par
4471    if (NILP (f->face_alist))    if (NILP (f->face_alist))
4472      return;      return;
4473    
   /* Changing a named face means that all realized faces depending on  
      that face are invalid.  Since we cannot tell which realized faces  
      depend on the face, make sure they are all removed.  This is done  
      by incrementing face_change_count.  The next call to  
      init_iterator will then free realized faces.  */  
   ++face_change_count;  
   ++windows_or_buffers_changed;  
   
4474    if (EQ (param, Qforeground_color))    if (EQ (param, Qforeground_color))
4475      {      {
4476        lface = lface_from_face_name (f, Qdefault, 1);        face = Qdefault;
4477          lface = lface_from_face_name (f, face, 1);
4478        LFACE_FOREGROUND (lface) = (STRINGP (new_value)        LFACE_FOREGROUND (lface) = (STRINGP (new_value)
4479                                    ? new_value : Qunspecified);                                    ? new_value : Qunspecified);
4480        realize_basic_faces (f);        realize_basic_faces (f);
# Line 4484  update_face_from_frame_parameter (f, par Line 4489  update_face_from_frame_parameter (f, par
4489        XSETFRAME (frame, f);        XSETFRAME (frame, f);
4490        call1 (Qframe_update_face_colors, frame);        call1 (Qframe_update_face_colors, frame);
4491    
4492        lface = lface_from_face_name (f, Qdefault, 1);        face = Qdefault;
4493          lface = lface_from_face_name (f, face, 1);
4494        LFACE_BACKGROUND (lface) = (STRINGP (new_value)        LFACE_BACKGROUND (lface) = (STRINGP (new_value)
4495                                    ? new_value : Qunspecified);                                    ? new_value : Qunspecified);
4496        realize_basic_faces (f);        realize_basic_faces (f);
4497      }      }
4498    if (EQ (param, Qborder_color))    else if (EQ (param, Qborder_color))
4499      {      {
4500        lface = lface_from_face_name (f, Qborder, 1);        face = Qborder;
4501          lface = lface_from_face_name (f, face, 1);
4502        LFACE_BACKGROUND (lface) = (STRINGP (new_value)        LFACE_BACKGROUND (lface) = (STRINGP (new_value)
4503                                    ? new_value : Qunspecified);                                    ? new_value : Qunspecified);
4504      }      }
4505    else if (EQ (param, Qcursor_color))    else if (EQ (param, Qcursor_color))
4506      {      {
4507        lface = lface_from_face_name (f, Qcursor, 1);        face = Qcursor;
4508          lface = lface_from_face_name (f, face, 1);
4509        LFACE_BACKGROUND (lface) = (STRINGP (new_value)        LFACE_BACKGROUND (lface) = (STRINGP (new_value)
4510                                    ? new_value : Qunspecified);                                    ? new_value : Qunspecified);
4511      }      }
4512    else if (EQ (param, Qmouse_color))    else if (EQ (param, Qmouse_color))
4513      {      {
4514        lface = lface_from_face_name (f, Qmouse, 1);        face = Qmouse;
4515          lface = lface_from_face_name (f, face, 1);
4516        LFACE_BACKGROUND (lface) = (STRINGP (new_value)        LFACE_BACKGROUND (lface) = (STRINGP (new_value)
4517                                    ? new_value : Qunspecified);                                    ? new_value : Qunspecified);
4518      }      }
4519    
4520      /* Changing a named face means that all realized faces depending on
4521         that face are invalid.  Since we cannot tell which realized faces
4522         depend on the face, make sure they are all removed.  This is done
4523         by incrementing face_change_count.  The next call to
4524         init_iterator will then free realized faces.  */
4525      if (!NILP (face)
4526          && NILP (Fget (face, Qface_no_inherit)))
4527        {
4528          ++face_change_count;
4529          ++windows_or_buffers_changed;
4530        }
4531  }  }
4532    
4533    
# Line 7758  syms_of_xfaces () Line 7779  syms_of_xfaces ()
7779  {  {
7780    Qface = intern ("face");    Qface = intern ("face");
7781    staticpro (&Qface);    staticpro (&Qface);
7782      Qface_no_inherit = intern ("face-no-inherit");
7783      staticpro (&Qface_no_inherit);
7784    Qbitmap_spec_p = intern ("bitmap-spec-p");    Qbitmap_spec_p = intern ("bitmap-spec-p");
7785    staticpro (&Qbitmap_spec_p);    staticpro (&Qbitmap_spec_p);
7786    Qframe_update_face_colors = intern ("frame-update-face-colors");    Qframe_update_face_colors = intern ("frame-update-face-colors");

Legend:
Removed from v.1.255.2.18  
changed lines
  Added in v.1.255.2.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26