aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2005-11-20 22:35:48 +0000
committerChong Yidong2005-11-20 22:35:48 +0000
commit67d23e016655c1e79e1f9ba43c22d4fb67a8057e (patch)
tree8ae7d9ee14934310e8d842ac36320027aecbd002 /src
parent8c2fb42f85ae6992dc046c4772b0e3f6bd9321ea (diff)
downloademacs-67d23e016655c1e79e1f9ba43c22d4fb67a8057e.tar.gz
emacs-67d23e016655c1e79e1f9ba43c22d4fb67a8057e.zip
(merge_face_vectors): Don't do :ignore-defface overwriting here.
(Finternal_merge_in_global_face): Do it here.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/xfaces.c16
2 files changed, 14 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e70e00e2f57..addb672d10d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -4,6 +4,8 @@
4 :ignore-defface for new frame defaults when `unspecified' is 4 :ignore-defface for new frame defaults when `unspecified' is
5 supplied. 5 supplied.
6 (Finternal_get_lisp_face_attribute): Hide :ignore-defface. 6 (Finternal_get_lisp_face_attribute): Hide :ignore-defface.
7 (merge_face_vectors): Don't do :ignore-defface overwriting here.
8 (Finternal_merge_in_global_face): Do it here.
7 9
82005-11-20 Juri Linkov <juri@jurta.org> 102005-11-20 Juri Linkov <juri@jurta.org>
9 11
diff --git a/src/xfaces.c b/src/xfaces.c
index 8729441925a..7923686eb50 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3576,8 +3576,6 @@ merge_face_vectors (f, from, to, named_merge_points)
3576 { 3576 {
3577 if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i])) 3577 if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i]))
3578 to[i] = merge_face_heights (from[i], to[i], to[i]); 3578 to[i] = merge_face_heights (from[i], to[i], to[i]);
3579 else if (IGNORE_DEFFACE_P (from[i]))
3580 to[i] = Qunspecified;
3581 else 3579 else
3582 to[i] = from[i]; 3580 to[i] = from[i];
3583 } 3581 }
@@ -4056,8 +4054,15 @@ FRAME 0 means change the face on all frames, and change the default
4056 if (EQ (frame, Qt)) 4054 if (EQ (frame, Qt))
4057 { 4055 {
4058 lface = lface_from_face_name (NULL, face, 1); 4056 lface = lface_from_face_name (NULL, face, 1);
4057
4058 /* When updating face-new-frame-defaults, we put :ignore-defface
4059 where the caller wants `unspecified'. This forces the frame
4060 defaults to ignore the defface value. Otherwise, the defface
4061 will take effect, which is generally not what is intended.
4062 The value of that attribute will be inherited from some other
4063 face during face merging. See internal_merge_in_global_face. */
4059 if (UNSPECIFIEDP (value)) 4064 if (UNSPECIFIEDP (value))
4060 value = Qignore_defface; 4065 value = Qignore_defface;
4061 } 4066 }
4062 else 4067 else
4063 { 4068 {
@@ -4969,7 +4974,10 @@ Default face attributes override any local face attributes. */)
4969 gvec = XVECTOR (global_lface)->contents; 4974 gvec = XVECTOR (global_lface)->contents;
4970 for (i = 1; i < LFACE_VECTOR_SIZE; ++i) 4975 for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
4971 if (! UNSPECIFIEDP (gvec[i])) 4976 if (! UNSPECIFIEDP (gvec[i]))
4972 lvec[i] = gvec[i]; 4977 if (IGNORE_DEFFACE_P (gvec[i]))
4978 lvec[i] = Qunspecified;
4979 else
4980 lvec[i] = gvec[i];
4973 4981
4974 return Qnil; 4982 return Qnil;
4975} 4983}