Mercurial > emacs
diff src/xfaces.c @ 89978:566253900690
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-40
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-535
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-536
sync-tree with gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-537
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-538
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-539
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-540
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-541
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-542
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-545
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-546
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-547
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-548
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-549
Use symbol-matching for generic-mode keywords
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-550
Update from CVS
* miles@gnu.org--gnu-2004/gnus--devo--0--patch-2
Add {arch}/=cvs-sync-make-log
* miles@gnu.org--gnu-2004/gnus--rel--5.8--base-0
Import from Gnus CVS branch V5-8
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-1
{arch}/=tagging-method: Add CVS and autoconf grot to junk regexp
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-2
Use explicit tags for autoconf input files
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-3
Remove RCS keywords
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-4
Fix copied explicit id-tags
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-5
Add {arch}/=cvs-sync-make-log
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-6
configure.in: Use ifelse instead of m4_if for arch-tag: comment
* miles@gnu.org--gnu-2004/gnus--rel--5.10--base-0
tag of miles@gnu.org--gnu-2004/gnus--rel--5.8--base-0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-1
Gnus 5.10, from CVS branch v5-10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-2
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-3
Use explicit tags for autoconf input files
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-4
sync-tree with gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-5
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-6
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-7
Remove RCS keywords
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-8
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-9
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-10
Add {arch}/=cvs-sync-make-log
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-11
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-12
Update from CVS: make.bat: Fix line endings around arch-tag.
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-13
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-17
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-21
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-22
Update from CVS: lisp/nndb.el (require): Remove tcp and duplicate cl.
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-23
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-24
lisp/nnimap.el (nnimap-open-connection): Remove extraneous end-paren
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-25
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-26
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 15 Sep 2004 09:00:10 +0000 |
parents | d8411455de48 0d0a17cf1b63 |
children | cb7f41387eb3 |
line wrap: on
line diff
--- a/src/xfaces.c Tue Sep 14 07:55:38 2004 +0000 +++ b/src/xfaces.c Wed Sep 15 09:00:10 2004 +0000 @@ -389,6 +389,10 @@ Lisp_Object Qface; extern Lisp_Object Qmouse_face; +/* Property for basic faces which other faces cannot inherit. */ + +Lisp_Object Qface_no_inherit; + /* Error symbol for wrong_type_argument in load_pixmap. */ Lisp_Object Qbitmap_spec_p; @@ -3944,8 +3948,11 @@ 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; + if (NILP (Fget (face, Qface_no_inherit))) + { + ++face_change_count; + ++windows_or_buffers_changed; + } xassert (LFACEP (lface)); check_lface (lface); @@ -4020,8 +4027,11 @@ 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; + if (NILP (Fget (to, Qface_no_inherit))) + { + ++face_change_count; + ++windows_or_buffers_changed; + } return to; } @@ -4385,6 +4395,7 @@ by incrementing face_change_count. The next call to init_iterator will then free realized faces. */ if (!EQ (frame, Qt) + && NILP (Fget (face, Qface_no_inherit)) && (EQ (attr, QCfont) || EQ (attr, QCfontset) || NILP (Fequal (old_value, value)))) @@ -4538,6 +4549,7 @@ struct frame *f; Lisp_Object param, new_value; { + Lisp_Object face = Qnil; Lisp_Object lface; /* If there are no faces yet, give up. This is the case when called @@ -4546,17 +4558,10 @@ if (NILP (f->face_alist)) return; - /* 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; - if (EQ (param, Qforeground_color)) { - lface = lface_from_face_name (f, Qdefault, 1); + face = Qdefault; + lface = lface_from_face_name (f, face, 1); LFACE_FOREGROUND (lface) = (STRINGP (new_value) ? new_value : Qunspecified); realize_basic_faces (f); @@ -4571,29 +4576,45 @@ XSETFRAME (frame, f); call1 (Qframe_update_face_colors, frame); - lface = lface_from_face_name (f, Qdefault, 1); + face = Qdefault; + lface = lface_from_face_name (f, face, 1); LFACE_BACKGROUND (lface) = (STRINGP (new_value) ? new_value : Qunspecified); realize_basic_faces (f); } - if (EQ (param, Qborder_color)) - { - lface = lface_from_face_name (f, Qborder, 1); + else if (EQ (param, Qborder_color)) + { + face = Qborder; + lface = lface_from_face_name (f, face, 1); LFACE_BACKGROUND (lface) = (STRINGP (new_value) ? new_value : Qunspecified); } else if (EQ (param, Qcursor_color)) { - lface = lface_from_face_name (f, Qcursor, 1); + face = Qcursor; + lface = lface_from_face_name (f, face, 1); LFACE_BACKGROUND (lface) = (STRINGP (new_value) ? new_value : Qunspecified); } else if (EQ (param, Qmouse_color)) { - lface = lface_from_face_name (f, Qmouse, 1); + face = Qmouse; + lface = lface_from_face_name (f, face, 1); LFACE_BACKGROUND (lface) = (STRINGP (new_value) ? new_value : Qunspecified); } + + /* 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. */ + if (!NILP (face) + && NILP (Fget (face, Qface_no_inherit))) + { + ++face_change_count; + ++windows_or_buffers_changed; + } } @@ -7951,6 +7972,8 @@ { Qface = intern ("face"); staticpro (&Qface); + Qface_no_inherit = intern ("face-no-inherit"); + staticpro (&Qface_no_inherit); Qbitmap_spec_p = intern ("bitmap-spec-p"); staticpro (&Qbitmap_spec_p); Qframe_update_face_colors = intern ("frame-update-face-colors");