/[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.281.2.16 by miles, Fri Aug 27 07:00:34 2004 UTC revision 1.281.2.17 by miles, Wed Sep 15 09:00:02 2004 UTC
# Line 389  Lisp_Object Qforeground_color, Qbackgrou Line 389  Lisp_Object Qforeground_color, Qbackgrou
389  Lisp_Object Qface;  Lisp_Object Qface;
390  extern Lisp_Object Qmouse_face;  extern Lisp_Object Qmouse_face;
391    
392    /* Property for basic faces which other faces cannot inherit.  */
393    
394    Lisp_Object Qface_no_inherit;
395    
396  /* Error symbol for wrong_type_argument in load_pixmap.  */  /* Error symbol for wrong_type_argument in load_pixmap.  */
397    
398  Lisp_Object Qbitmap_spec_p;  Lisp_Object Qbitmap_spec_p;
# Line 3944  Value is a vector of face attributes.  * Line 3948  Value is a vector of face attributes.  *
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 (face, Qface_no_inherit)))
3952    ++windows_or_buffers_changed;      {
3953          ++face_change_count;
3954          ++windows_or_buffers_changed;
3955        }
3956    
3957    xassert (LFACEP (lface));    xassert (LFACEP (lface));
3958    check_lface (lface);    check_lface (lface);
# Line 4020  The value is TO.  */) Line 4027  The value is TO.  */)
4027       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
4028       by incrementing face_change_count.  The next call to       by incrementing face_change_count.  The next call to
4029       init_iterator will then free realized faces.  */       init_iterator will then free realized faces.  */
4030    ++face_change_count;    if (NILP (Fget (to, Qface_no_inherit)))
4031    ++windows_or_buffers_changed;      {
4032          ++face_change_count;
4033          ++windows_or_buffers_changed;
4034        }
4035    
4036    return to;    return to;
4037  }  }
# Line 4385  FRAME 0 means change the face on all fra Line 4395  FRAME 0 means change the face on all fra
4395       by incrementing face_change_count.  The next call to       by incrementing face_change_count.  The next call to
4396       init_iterator will then free realized faces.  */       init_iterator will then free realized faces.  */
4397    if (!EQ (frame, Qt)    if (!EQ (frame, Qt)
4398          && NILP (Fget (face, Qface_no_inherit))
4399        && (EQ (attr, QCfont)        && (EQ (attr, QCfont)
4400            || EQ (attr, QCfontset)            || EQ (attr, QCfontset)
4401            || NILP (Fequal (old_value, value))))            || NILP (Fequal (old_value, value))))
# Line 4538  update_face_from_frame_parameter (f, par Line 4549  update_face_from_frame_parameter (f, par
4549       struct frame *f;       struct frame *f;
4550       Lisp_Object param, new_value;       Lisp_Object param, new_value;
4551  {  {
4552      Lisp_Object face = Qnil;
4553    Lisp_Object lface;    Lisp_Object lface;
4554    
4555    /* 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 4546  update_face_from_frame_parameter (f, par Line 4558  update_face_from_frame_parameter (f, par
4558    if (NILP (f->face_alist))    if (NILP (f->face_alist))
4559      return;      return;
4560    
   /* 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;  
   
4561    if (EQ (param, Qforeground_color))    if (EQ (param, Qforeground_color))
4562      {      {
4563        lface = lface_from_face_name (f, Qdefault, 1);        face = Qdefault;
4564          lface = lface_from_face_name (f, face, 1);
4565        LFACE_FOREGROUND (lface) = (STRINGP (new_value)        LFACE_FOREGROUND (lface) = (STRINGP (new_value)
4566                                    ? new_value : Qunspecified);                                    ? new_value : Qunspecified);
4567        realize_basic_faces (f);        realize_basic_faces (f);
# Line 4571  update_face_from_frame_parameter (f, par Line 4576  update_face_from_frame_parameter (f, par
4576        XSETFRAME (frame, f);        XSETFRAME (frame, f);
4577        call1 (Qframe_update_face_colors, frame);        call1 (Qframe_update_face_colors, frame);
4578    
4579        lface = lface_from_face_name (f, Qdefault, 1);        face = Qdefault;
4580          lface = lface_from_face_name (f, face, 1);
4581        LFACE_BACKGROUND (lface) = (STRINGP (new_value)        LFACE_BACKGROUND (lface) = (STRINGP (new_value)
4582                                    ? new_value : Qunspecified);                                    ? new_value : Qunspecified);
4583        realize_basic_faces (f);        realize_basic_faces (f);
4584      }      }
4585    if (EQ (param, Qborder_color))    else if (EQ (param, Qborder_color))
4586      {      {
4587        lface = lface_from_face_name (f, Qborder, 1);        face = Qborder;
4588          lface = lface_from_face_name (f, face, 1);
4589        LFACE_BACKGROUND (lface) = (STRINGP (new_value)        LFACE_BACKGROUND (lface) = (STRINGP (new_value)
4590                                    ? new_value : Qunspecified);                                    ? new_value : Qunspecified);
4591      }      }
4592    else if (EQ (param, Qcursor_color))    else if (EQ (param, Qcursor_color))
4593      {      {
4594        lface = lface_from_face_name (f, Qcursor, 1);        face = Qcursor;
4595          lface = lface_from_face_name (f, face, 1);
4596        LFACE_BACKGROUND (lface) = (STRINGP (new_value)        LFACE_BACKGROUND (lface) = (STRINGP (new_value)
4597                                    ? new_value : Qunspecified);                                    ? new_value : Qunspecified);
4598      }      }
4599    else if (EQ (param, Qmouse_color))    else if (EQ (param, Qmouse_color))
4600      {      {
4601        lface = lface_from_face_name (f, Qmouse, 1);        face = Qmouse;
4602          lface = lface_from_face_name (f, face, 1);
4603        LFACE_BACKGROUND (lface) = (STRINGP (new_value)        LFACE_BACKGROUND (lface) = (STRINGP (new_value)
4604                                    ? new_value : Qunspecified);                                    ? new_value : Qunspecified);
4605      }      }
4606    
4607      /* Changing a named face means that all realized faces depending on
4608         that face are invalid.  Since we cannot tell which realized faces
4609         depend on the face, make sure they are all removed.  This is done
4610         by incrementing face_change_count.  The next call to
4611         init_iterator will then free realized faces.  */
4612      if (!NILP (face)
4613          && NILP (Fget (face, Qface_no_inherit)))
4614        {
4615          ++face_change_count;
4616          ++windows_or_buffers_changed;
4617        }
4618  }  }
4619    
4620    
# Line 7951  syms_of_xfaces () Line 7972  syms_of_xfaces ()
7972  {  {
7973    Qface = intern ("face");    Qface = intern ("face");
7974    staticpro (&Qface);    staticpro (&Qface);
7975      Qface_no_inherit = intern ("face-no-inherit");
7976      staticpro (&Qface_no_inherit);
7977    Qbitmap_spec_p = intern ("bitmap-spec-p");    Qbitmap_spec_p = intern ("bitmap-spec-p");
7978    staticpro (&Qbitmap_spec_p);    staticpro (&Qbitmap_spec_p);
7979    Qframe_update_face_colors = intern ("frame-update-face-colors");    Qframe_update_face_colors = intern ("frame-update-face-colors");

Legend:
Removed from v.1.281.2.16  
changed lines
  Added in v.1.281.2.17

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