aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-11-18 14:53:14 +0000
committerKaroly Lorentey2005-11-18 14:53:14 +0000
commite8c0b22fcf9bd83bb501f91dfc880ae912186220 (patch)
tree8292664169593d29eeaa6452aee86c0895e4836e /src
parentbffa514a8b8c947c655b463e8073e8e5ac061bc7 (diff)
parentfe45ad152a8528e795c3d852bf3c2cd18ffe6e02 (diff)
downloademacs-e8c0b22fcf9bd83bb501f91dfc880ae912186220.tar.gz
emacs-e8c0b22fcf9bd83bb501f91dfc880ae912186220.zip
Merged from miles@gnu.org--gnu-2005 (patch 655)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-655 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-441
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog15
-rw-r--r--src/image.c6
-rw-r--r--src/xfaces.c63
3 files changed, 63 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 900db33db3d..1a9fd720167 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,18 @@
12005-11-17 Chong Yidong <cyd@stupidchicken.com>
2
3 * image.c (x_create_bitmap_from_xpm_data): Free attributes on
4 fail.
5
6 * xfaces.c (Qignore_defface): New variable.
7 (syms_of_xfaces): Provide `:ignore-defface'.
8 (IGNORE_DEFFACE_P): New macro.
9 (check_lface_attrs, lface_fully_specified_p)
10 (Finternal_set_lisp_face_attribute)
11 (Fface_attribute_relative_p, Fmerge_face_attribute): Handle
12 Qignore_defface as a possible value.
13 (merge_face_vectors): The merged face is `unspecified' if the
14 mergee specifies `:ignore-defface'.
15
12005-11-16 Stefan Monnier <monnier@iro.umontreal.ca> 162005-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
2 17
3 * lread.c (readevalloop): Add missing GCPROs. 18 * lread.c (readevalloop): Add missing GCPROs.
diff --git a/src/image.c b/src/image.c
index 1ba1cd197ff..c7bc71ee909 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3737,10 +3737,12 @@ x_create_bitmap_from_xpm_data (f, bits)
3737 rc = XpmCreatePixmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 3737 rc = XpmCreatePixmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
3738 bits, &bitmap, &mask, &attrs); 3738 bits, &bitmap, &mask, &attrs);
3739 if (rc != XpmSuccess) 3739 if (rc != XpmSuccess)
3740 return -1; 3740 {
3741 XpmFreeAttributes (&attrs);
3742 return -1;
3743 }
3741 3744
3742 id = x_allocate_bitmap_record (f); 3745 id = x_allocate_bitmap_record (f);
3743
3744 dpyinfo->bitmaps[id - 1].pixmap = bitmap; 3746 dpyinfo->bitmaps[id - 1].pixmap = bitmap;
3745 dpyinfo->bitmaps[id - 1].have_mask = 1; 3747 dpyinfo->bitmaps[id - 1].have_mask = 1;
3746 dpyinfo->bitmaps[id - 1].mask = mask; 3748 dpyinfo->bitmaps[id - 1].mask = mask;
diff --git a/src/xfaces.c b/src/xfaces.c
index 4d9ee22b43f..647cf7bb337 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -277,6 +277,10 @@ Boston, MA 02110-1301, USA. */
277 277
278#define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified) 278#define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified)
279 279
280/* Non-zero if face attribute ATTR is `ignore-defface'. */
281
282#define IGNORE_DEFFACE_P(ATTR) EQ ((ATTR), Qignore_defface)
283
280/* Value is the number of elements of VECTOR. */ 284/* Value is the number of elements of VECTOR. */
281 285
282#define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR)) 286#define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR))
@@ -315,6 +319,7 @@ Lisp_Object Qultra_expanded;
315Lisp_Object Qreleased_button, Qpressed_button; 319Lisp_Object Qreleased_button, Qpressed_button;
316Lisp_Object QCstyle, QCcolor, QCline_width; 320Lisp_Object QCstyle, QCcolor, QCline_width;
317Lisp_Object Qunspecified; 321Lisp_Object Qunspecified;
322Lisp_Object Qignore_defface;
318 323
319char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg"; 324char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg";
320 325
@@ -3107,48 +3112,64 @@ check_lface_attrs (attrs)
3107 Lisp_Object *attrs; 3112 Lisp_Object *attrs;
3108{ 3113{
3109 xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX]) 3114 xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX])
3115 || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX])
3110 || STRINGP (attrs[LFACE_FAMILY_INDEX])); 3116 || STRINGP (attrs[LFACE_FAMILY_INDEX]));
3111 xassert (UNSPECIFIEDP (attrs[LFACE_SWIDTH_INDEX]) 3117 xassert (UNSPECIFIEDP (attrs[LFACE_SWIDTH_INDEX])
3118 || IGNORE_DEFFACE_P (attrs[LFACE_SWIDTH_INDEX])
3112 || SYMBOLP (attrs[LFACE_SWIDTH_INDEX])); 3119 || SYMBOLP (attrs[LFACE_SWIDTH_INDEX]));
3113 xassert (UNSPECIFIEDP (attrs[LFACE_AVGWIDTH_INDEX]) 3120 xassert (UNSPECIFIEDP (attrs[LFACE_AVGWIDTH_INDEX])
3121 || IGNORE_DEFFACE_P (attrs[LFACE_AVGWIDTH_INDEX])
3114 || INTEGERP (attrs[LFACE_AVGWIDTH_INDEX])); 3122 || INTEGERP (attrs[LFACE_AVGWIDTH_INDEX]));
3115 xassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX]) 3123 xassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX])
3124 || IGNORE_DEFFACE_P (attrs[LFACE_HEIGHT_INDEX])
3116 || INTEGERP (attrs[LFACE_HEIGHT_INDEX]) 3125 || INTEGERP (attrs[LFACE_HEIGHT_INDEX])
3117 || FLOATP (attrs[LFACE_HEIGHT_INDEX]) 3126 || FLOATP (attrs[LFACE_HEIGHT_INDEX])
3118 || FUNCTIONP (attrs[LFACE_HEIGHT_INDEX])); 3127 || FUNCTIONP (attrs[LFACE_HEIGHT_INDEX]));
3119 xassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX]) 3128 xassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX])
3129 || IGNORE_DEFFACE_P (attrs[LFACE_WEIGHT_INDEX])
3120 || SYMBOLP (attrs[LFACE_WEIGHT_INDEX])); 3130 || SYMBOLP (attrs[LFACE_WEIGHT_INDEX]));
3121 xassert (UNSPECIFIEDP (attrs[LFACE_SLANT_INDEX]) 3131 xassert (UNSPECIFIEDP (attrs[LFACE_SLANT_INDEX])
3132 || IGNORE_DEFFACE_P (attrs[LFACE_SLANT_INDEX])
3122 || SYMBOLP (attrs[LFACE_SLANT_INDEX])); 3133 || SYMBOLP (attrs[LFACE_SLANT_INDEX]));
3123 xassert (UNSPECIFIEDP (attrs[LFACE_UNDERLINE_INDEX]) 3134 xassert (UNSPECIFIEDP (attrs[LFACE_UNDERLINE_INDEX])
3135 || IGNORE_DEFFACE_P (attrs[LFACE_UNDERLINE_INDEX])
3124 || SYMBOLP (attrs[LFACE_UNDERLINE_INDEX]) 3136 || SYMBOLP (attrs[LFACE_UNDERLINE_INDEX])
3125 || STRINGP (attrs[LFACE_UNDERLINE_INDEX])); 3137 || STRINGP (attrs[LFACE_UNDERLINE_INDEX]));
3126 xassert (UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX]) 3138 xassert (UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX])
3139 || IGNORE_DEFFACE_P (attrs[LFACE_OVERLINE_INDEX])
3127 || SYMBOLP (attrs[LFACE_OVERLINE_INDEX]) 3140 || SYMBOLP (attrs[LFACE_OVERLINE_INDEX])
3128 || STRINGP (attrs[LFACE_OVERLINE_INDEX])); 3141 || STRINGP (attrs[LFACE_OVERLINE_INDEX]));
3129 xassert (UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX]) 3142 xassert (UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX])
3143 || IGNORE_DEFFACE_P (attrs[LFACE_STRIKE_THROUGH_INDEX])
3130 || SYMBOLP (attrs[LFACE_STRIKE_THROUGH_INDEX]) 3144 || SYMBOLP (attrs[LFACE_STRIKE_THROUGH_INDEX])
3131 || STRINGP (attrs[LFACE_STRIKE_THROUGH_INDEX])); 3145 || STRINGP (attrs[LFACE_STRIKE_THROUGH_INDEX]));
3132 xassert (UNSPECIFIEDP (attrs[LFACE_BOX_INDEX]) 3146 xassert (UNSPECIFIEDP (attrs[LFACE_BOX_INDEX])
3147 || IGNORE_DEFFACE_P (attrs[LFACE_BOX_INDEX])
3133 || SYMBOLP (attrs[LFACE_BOX_INDEX]) 3148 || SYMBOLP (attrs[LFACE_BOX_INDEX])
3134 || STRINGP (attrs[LFACE_BOX_INDEX]) 3149 || STRINGP (attrs[LFACE_BOX_INDEX])
3135 || INTEGERP (attrs[LFACE_BOX_INDEX]) 3150 || INTEGERP (attrs[LFACE_BOX_INDEX])
3136 || CONSP (attrs[LFACE_BOX_INDEX])); 3151 || CONSP (attrs[LFACE_BOX_INDEX]));
3137 xassert (UNSPECIFIEDP (attrs[LFACE_INVERSE_INDEX]) 3152 xassert (UNSPECIFIEDP (attrs[LFACE_INVERSE_INDEX])
3153 || IGNORE_DEFFACE_P (attrs[LFACE_INVERSE_INDEX])
3138 || SYMBOLP (attrs[LFACE_INVERSE_INDEX])); 3154 || SYMBOLP (attrs[LFACE_INVERSE_INDEX]));
3139 xassert (UNSPECIFIEDP (attrs[LFACE_FOREGROUND_INDEX]) 3155 xassert (UNSPECIFIEDP (attrs[LFACE_FOREGROUND_INDEX])
3156 || IGNORE_DEFFACE_P (attrs[LFACE_FOREGROUND_INDEX])
3140 || STRINGP (attrs[LFACE_FOREGROUND_INDEX])); 3157 || STRINGP (attrs[LFACE_FOREGROUND_INDEX]));
3141 xassert (UNSPECIFIEDP (attrs[LFACE_BACKGROUND_INDEX]) 3158 xassert (UNSPECIFIEDP (attrs[LFACE_BACKGROUND_INDEX])
3159 || IGNORE_DEFFACE_P (attrs[LFACE_BACKGROUND_INDEX])
3142 || STRINGP (attrs[LFACE_BACKGROUND_INDEX])); 3160 || STRINGP (attrs[LFACE_BACKGROUND_INDEX]));
3143 xassert (UNSPECIFIEDP (attrs[LFACE_INHERIT_INDEX]) 3161 xassert (UNSPECIFIEDP (attrs[LFACE_INHERIT_INDEX])
3162 || IGNORE_DEFFACE_P (attrs[LFACE_INHERIT_INDEX])
3144 || NILP (attrs[LFACE_INHERIT_INDEX]) 3163 || NILP (attrs[LFACE_INHERIT_INDEX])
3145 || SYMBOLP (attrs[LFACE_INHERIT_INDEX]) 3164 || SYMBOLP (attrs[LFACE_INHERIT_INDEX])
3146 || CONSP (attrs[LFACE_INHERIT_INDEX])); 3165 || CONSP (attrs[LFACE_INHERIT_INDEX]));
3147#ifdef HAVE_WINDOW_SYSTEM 3166#ifdef HAVE_WINDOW_SYSTEM
3148 xassert (UNSPECIFIEDP (attrs[LFACE_STIPPLE_INDEX]) 3167 xassert (UNSPECIFIEDP (attrs[LFACE_STIPPLE_INDEX])
3168 || IGNORE_DEFFACE_P (attrs[LFACE_STIPPLE_INDEX])
3149 || SYMBOLP (attrs[LFACE_STIPPLE_INDEX]) 3169 || SYMBOLP (attrs[LFACE_STIPPLE_INDEX])
3150 || !NILP (Fbitmap_spec_p (attrs[LFACE_STIPPLE_INDEX]))); 3170 || !NILP (Fbitmap_spec_p (attrs[LFACE_STIPPLE_INDEX])));
3151 xassert (UNSPECIFIEDP (attrs[LFACE_FONT_INDEX]) 3171 xassert (UNSPECIFIEDP (attrs[LFACE_FONT_INDEX])
3172 || IGNORE_DEFFACE_P (attrs[LFACE_FONT_INDEX])
3152 || NILP (attrs[LFACE_FONT_INDEX]) 3173 || NILP (attrs[LFACE_FONT_INDEX])
3153 || STRINGP (attrs[LFACE_FONT_INDEX])); 3174 || STRINGP (attrs[LFACE_FONT_INDEX]));
3154#endif 3175#endif
@@ -3357,7 +3378,7 @@ lface_fully_specified_p (attrs)
3357 for (i = 1; i < LFACE_VECTOR_SIZE; ++i) 3378 for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
3358 if (i != LFACE_FONT_INDEX && i != LFACE_INHERIT_INDEX 3379 if (i != LFACE_FONT_INDEX && i != LFACE_INHERIT_INDEX
3359 && i != LFACE_AVGWIDTH_INDEX) 3380 && i != LFACE_AVGWIDTH_INDEX)
3360 if (UNSPECIFIEDP (attrs[i]) 3381 if ((UNSPECIFIEDP (attrs[i]) || IGNORE_DEFFACE_P (attrs[i]))
3361#ifdef MAC_OS 3382#ifdef MAC_OS
3362 /* MAC_TODO: No stipple support on Mac OS yet, this index is 3383 /* MAC_TODO: No stipple support on Mac OS yet, this index is
3363 always unspecified. */ 3384 always unspecified. */
@@ -3572,6 +3593,8 @@ merge_face_vectors (f, from, to, named_merge_points)
3572 { 3593 {
3573 if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i])) 3594 if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i]))
3574 to[i] = merge_face_heights (from[i], to[i], to[i]); 3595 to[i] = merge_face_heights (from[i], to[i], to[i]);
3596 else if (IGNORE_DEFFACE_P (from[i]))
3597 to[i] = Qunspecified;
3575 else 3598 else
3576 to[i] = from[i]; 3599 to[i] = from[i];
3577 } 3600 }
@@ -4064,7 +4087,7 @@ FRAME 0 means change the face on all frames, and change the default
4064 4087
4065 if (EQ (attr, QCfamily)) 4088 if (EQ (attr, QCfamily))
4066 { 4089 {
4067 if (!UNSPECIFIEDP (value)) 4090 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4068 { 4091 {
4069 CHECK_STRING (value); 4092 CHECK_STRING (value);
4070 if (SCHARS (value) == 0) 4093 if (SCHARS (value) == 0)
@@ -4076,7 +4099,7 @@ FRAME 0 means change the face on all frames, and change the default
4076 } 4099 }
4077 else if (EQ (attr, QCheight)) 4100 else if (EQ (attr, QCheight))
4078 { 4101 {
4079 if (!UNSPECIFIEDP (value)) 4102 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4080 { 4103 {
4081 Lisp_Object test; 4104 Lisp_Object test;
4082 4105
@@ -4097,7 +4120,7 @@ FRAME 0 means change the face on all frames, and change the default
4097 } 4120 }
4098 else if (EQ (attr, QCweight)) 4121 else if (EQ (attr, QCweight))
4099 { 4122 {
4100 if (!UNSPECIFIEDP (value)) 4123 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4101 { 4124 {
4102 CHECK_SYMBOL (value); 4125 CHECK_SYMBOL (value);
4103 if (face_numeric_weight (value) < 0) 4126 if (face_numeric_weight (value) < 0)
@@ -4109,7 +4132,7 @@ FRAME 0 means change the face on all frames, and change the default
4109 } 4132 }
4110 else if (EQ (attr, QCslant)) 4133 else if (EQ (attr, QCslant))
4111 { 4134 {
4112 if (!UNSPECIFIEDP (value)) 4135 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4113 { 4136 {
4114 CHECK_SYMBOL (value); 4137 CHECK_SYMBOL (value);
4115 if (face_numeric_slant (value) < 0) 4138 if (face_numeric_slant (value) < 0)
@@ -4121,7 +4144,7 @@ FRAME 0 means change the face on all frames, and change the default
4121 } 4144 }
4122 else if (EQ (attr, QCunderline)) 4145 else if (EQ (attr, QCunderline))
4123 { 4146 {
4124 if (!UNSPECIFIEDP (value)) 4147 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4125 if ((SYMBOLP (value) 4148 if ((SYMBOLP (value)
4126 && !EQ (value, Qt) 4149 && !EQ (value, Qt)
4127 && !EQ (value, Qnil)) 4150 && !EQ (value, Qnil))
@@ -4135,7 +4158,7 @@ FRAME 0 means change the face on all frames, and change the default
4135 } 4158 }
4136 else if (EQ (attr, QCoverline)) 4159 else if (EQ (attr, QCoverline))
4137 { 4160 {
4138 if (!UNSPECIFIEDP (value)) 4161 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4139 if ((SYMBOLP (value) 4162 if ((SYMBOLP (value)
4140 && !EQ (value, Qt) 4163 && !EQ (value, Qt)
4141 && !EQ (value, Qnil)) 4164 && !EQ (value, Qnil))
@@ -4149,7 +4172,7 @@ FRAME 0 means change the face on all frames, and change the default
4149 } 4172 }
4150 else if (EQ (attr, QCstrike_through)) 4173 else if (EQ (attr, QCstrike_through))
4151 { 4174 {
4152 if (!UNSPECIFIEDP (value)) 4175 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4153 if ((SYMBOLP (value) 4176 if ((SYMBOLP (value)
4154 && !EQ (value, Qt) 4177 && !EQ (value, Qt)
4155 && !EQ (value, Qnil)) 4178 && !EQ (value, Qnil))
@@ -4170,7 +4193,7 @@ FRAME 0 means change the face on all frames, and change the default
4170 if (EQ (value, Qt)) 4193 if (EQ (value, Qt))
4171 value = make_number (1); 4194 value = make_number (1);
4172 4195
4173 if (UNSPECIFIEDP (value)) 4196 if (UNSPECIFIEDP (value) || IGNORE_DEFFACE_P (value))
4174 valid_p = 1; 4197 valid_p = 1;
4175 else if (NILP (value)) 4198 else if (NILP (value))
4176 valid_p = 1; 4199 valid_p = 1;
@@ -4227,7 +4250,7 @@ FRAME 0 means change the face on all frames, and change the default
4227 else if (EQ (attr, QCinverse_video) 4250 else if (EQ (attr, QCinverse_video)
4228 || EQ (attr, QCreverse_video)) 4251 || EQ (attr, QCreverse_video))
4229 { 4252 {
4230 if (!UNSPECIFIEDP (value)) 4253 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4231 { 4254 {
4232 CHECK_SYMBOL (value); 4255 CHECK_SYMBOL (value);
4233 if (!EQ (value, Qt) && !NILP (value)) 4256 if (!EQ (value, Qt) && !NILP (value))
@@ -4238,7 +4261,7 @@ FRAME 0 means change the face on all frames, and change the default
4238 } 4261 }
4239 else if (EQ (attr, QCforeground)) 4262 else if (EQ (attr, QCforeground))
4240 { 4263 {
4241 if (!UNSPECIFIEDP (value)) 4264 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4242 { 4265 {
4243 /* Don't check for valid color names here because it depends 4266 /* Don't check for valid color names here because it depends
4244 on the frame (display) whether the color will be valid 4267 on the frame (display) whether the color will be valid
@@ -4252,7 +4275,7 @@ FRAME 0 means change the face on all frames, and change the default
4252 } 4275 }
4253 else if (EQ (attr, QCbackground)) 4276 else if (EQ (attr, QCbackground))
4254 { 4277 {
4255 if (!UNSPECIFIEDP (value)) 4278 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4256 { 4279 {
4257 /* Don't check for valid color names here because it depends 4280 /* Don't check for valid color names here because it depends
4258 on the frame (display) whether the color will be valid 4281 on the frame (display) whether the color will be valid
@@ -4267,7 +4290,7 @@ FRAME 0 means change the face on all frames, and change the default
4267 else if (EQ (attr, QCstipple)) 4290 else if (EQ (attr, QCstipple))
4268 { 4291 {
4269#ifdef HAVE_X_WINDOWS 4292#ifdef HAVE_X_WINDOWS
4270 if (!UNSPECIFIEDP (value) 4293 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)
4271 && !NILP (value) 4294 && !NILP (value)
4272 && NILP (Fbitmap_spec_p (value))) 4295 && NILP (Fbitmap_spec_p (value)))
4273 signal_error ("Invalid stipple attribute", value); 4296 signal_error ("Invalid stipple attribute", value);
@@ -4277,7 +4300,7 @@ FRAME 0 means change the face on all frames, and change the default
4277 } 4300 }
4278 else if (EQ (attr, QCwidth)) 4301 else if (EQ (attr, QCwidth))
4279 { 4302 {
4280 if (!UNSPECIFIEDP (value)) 4303 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4281 { 4304 {
4282 CHECK_SYMBOL (value); 4305 CHECK_SYMBOL (value);
4283 if (face_numeric_swidth (value) < 0) 4306 if (face_numeric_swidth (value) < 0)
@@ -4302,7 +4325,7 @@ FRAME 0 means change the face on all frames, and change the default
4302 else 4325 else
4303 f = check_x_frame (frame); 4326 f = check_x_frame (frame);
4304 4327
4305 if (!UNSPECIFIEDP (value)) 4328 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4306 { 4329 {
4307 CHECK_STRING (value); 4330 CHECK_STRING (value);
4308 4331
@@ -4350,7 +4373,7 @@ FRAME 0 means change the face on all frames, and change the default
4350 signal_error ("Invalid face attribute name", attr); 4373 signal_error ("Invalid face attribute name", attr);
4351 4374
4352 if (font_related_attr_p 4375 if (font_related_attr_p
4353 && !UNSPECIFIEDP (value)) 4376 && !UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
4354 /* If a font-related attribute other than QCfont is specified, the 4377 /* If a font-related attribute other than QCfont is specified, the
4355 original `font' attribute nor that of default face is useless 4378 original `font' attribute nor that of default face is useless
4356 to determine a new font. Thus, we set it to nil so that font 4379 to determine a new font. Thus, we set it to nil so that font
@@ -4371,7 +4394,7 @@ FRAME 0 means change the face on all frames, and change the default
4371 ++windows_or_buffers_changed; 4394 ++windows_or_buffers_changed;
4372 } 4395 }
4373 4396
4374 if (!UNSPECIFIEDP (value) 4397 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)
4375 && NILP (Fequal (old_value, value))) 4398 && NILP (Fequal (old_value, value)))
4376 { 4399 {
4377 Lisp_Object param; 4400 Lisp_Object param;
@@ -4788,7 +4811,7 @@ DEFUN ("face-attribute-relative-p", Fface_attribute_relative_p,
4788 (attribute, value) 4811 (attribute, value)
4789 Lisp_Object attribute, value; 4812 Lisp_Object attribute, value;
4790{ 4813{
4791 if (EQ (value, Qunspecified)) 4814 if (EQ (value, Qunspecified) || (EQ (value, Qignore_defface)))
4792 return Qt; 4815 return Qt;
4793 else if (EQ (attribute, QCheight)) 4816 else if (EQ (attribute, QCheight))
4794 return INTEGERP (value) ? Qnil : Qt; 4817 return INTEGERP (value) ? Qnil : Qt;
@@ -4804,7 +4827,7 @@ the result will be absolute, otherwise it will be relative. */)
4804 (attribute, value1, value2) 4827 (attribute, value1, value2)
4805 Lisp_Object attribute, value1, value2; 4828 Lisp_Object attribute, value1, value2;
4806{ 4829{
4807 if (EQ (value1, Qunspecified)) 4830 if (EQ (value1, Qunspecified) || EQ (value1, Qignore_defface))
4808 return value2; 4831 return value2;
4809 else if (EQ (attribute, QCheight)) 4832 else if (EQ (attribute, QCheight))
4810 return merge_face_heights (value1, value2, value1); 4833 return merge_face_heights (value1, value2, value1);
@@ -8035,6 +8058,8 @@ syms_of_xfaces ()
8035 staticpro (&Qforeground_color); 8058 staticpro (&Qforeground_color);
8036 Qunspecified = intern ("unspecified"); 8059 Qunspecified = intern ("unspecified");
8037 staticpro (&Qunspecified); 8060 staticpro (&Qunspecified);
8061 Qignore_defface = intern (":ignore-defface");
8062 staticpro (&Qignore_defface);
8038 8063
8039 Qface_alias = intern ("face-alias"); 8064 Qface_alias = intern ("face-alias");
8040 staticpro (&Qface_alias); 8065 staticpro (&Qface_alias);