diff options
| author | Chong Yidong | 2005-11-18 01:48:42 +0000 |
|---|---|---|
| committer | Chong Yidong | 2005-11-18 01:48:42 +0000 |
| commit | 2ff10663846ffc1b994504361767cf1435379026 (patch) | |
| tree | 600fe4b143448cd63c0da54cbfd6bcb906ab758f /src | |
| parent | 39c7cde2a4db6801eb22d4e2e7d39b5ce1084649 (diff) | |
| download | emacs-2ff10663846ffc1b994504361767cf1435379026.tar.gz emacs-2ff10663846ffc1b994504361767cf1435379026.zip | |
* xfaces.c (Qignore_defface): New variable.
(syms_of_xfaces): Provide `:ignore-defface'.
(IGNORE_DEFFACE_P): New macro.
(check_lface_attrs): Qignore_defface is a possible value.
(lface_fully_specified_p): Likewise.
(Finternal_set_lisp_face_attribute): Likewise.
(merge_face_vectors): The merged face is `unspecified' if the
mergee specifies `:ignore-defface'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/xfaces.c | 59 |
2 files changed, 53 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 900db33db3d..dcdc481f37b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2005-11-17 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * xfaces.c (Qignore_defface): New variable. | ||
| 4 | (syms_of_xfaces): Provide `:ignore-defface'. | ||
| 5 | (IGNORE_DEFFACE_P): New macro. | ||
| 6 | (check_lface_attrs): Qignore_defface is a possible value. | ||
| 7 | (lface_fully_specified_p): Likewise. | ||
| 8 | (Finternal_set_lisp_face_attribute): Likewise. | ||
| 9 | (merge_face_vectors): The merged face is `unspecified' if the | ||
| 10 | mergee specifies `:ignore-defface'. | ||
| 11 | |||
| 1 | 2005-11-16 Stefan Monnier <monnier@iro.umontreal.ca> | 12 | 2005-11-16 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 13 | ||
| 3 | * lread.c (readevalloop): Add missing GCPROs. | 14 | * lread.c (readevalloop): Add missing GCPROs. |
diff --git a/src/xfaces.c b/src/xfaces.c index f13fdf74909..aafa9e5e378 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -274,6 +274,10 @@ Boston, MA 02110-1301, USA. */ | |||
| 274 | 274 | ||
| 275 | #define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified) | 275 | #define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified) |
| 276 | 276 | ||
| 277 | /* Non-zero if face attribute ATTR is `ignore-defface'. */ | ||
| 278 | |||
| 279 | #define IGNORE_DEFFACE_P(ATTR) EQ ((ATTR), Qignore_defface) | ||
| 280 | |||
| 277 | /* Value is the number of elements of VECTOR. */ | 281 | /* Value is the number of elements of VECTOR. */ |
| 278 | 282 | ||
| 279 | #define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR)) | 283 | #define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR)) |
| @@ -312,6 +316,7 @@ Lisp_Object Qultra_expanded; | |||
| 312 | Lisp_Object Qreleased_button, Qpressed_button; | 316 | Lisp_Object Qreleased_button, Qpressed_button; |
| 313 | Lisp_Object QCstyle, QCcolor, QCline_width; | 317 | Lisp_Object QCstyle, QCcolor, QCline_width; |
| 314 | Lisp_Object Qunspecified; | 318 | Lisp_Object Qunspecified; |
| 319 | Lisp_Object Qignore_defface; | ||
| 315 | 320 | ||
| 316 | char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg"; | 321 | char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg"; |
| 317 | 322 | ||
| @@ -3104,48 +3109,64 @@ check_lface_attrs (attrs) | |||
| 3104 | Lisp_Object *attrs; | 3109 | Lisp_Object *attrs; |
| 3105 | { | 3110 | { |
| 3106 | xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX]) | 3111 | xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX]) |
| 3112 | || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX]) | ||
| 3107 | || STRINGP (attrs[LFACE_FAMILY_INDEX])); | 3113 | || STRINGP (attrs[LFACE_FAMILY_INDEX])); |
| 3108 | xassert (UNSPECIFIEDP (attrs[LFACE_SWIDTH_INDEX]) | 3114 | xassert (UNSPECIFIEDP (attrs[LFACE_SWIDTH_INDEX]) |
| 3115 | || IGNORE_DEFFACE_P (attrs[LFACE_SWIDTH_INDEX]) | ||
| 3109 | || SYMBOLP (attrs[LFACE_SWIDTH_INDEX])); | 3116 | || SYMBOLP (attrs[LFACE_SWIDTH_INDEX])); |
| 3110 | xassert (UNSPECIFIEDP (attrs[LFACE_AVGWIDTH_INDEX]) | 3117 | xassert (UNSPECIFIEDP (attrs[LFACE_AVGWIDTH_INDEX]) |
| 3118 | || IGNORE_DEFFACE_P (attrs[LFACE_AVGWIDTH_INDEX]) | ||
| 3111 | || INTEGERP (attrs[LFACE_AVGWIDTH_INDEX])); | 3119 | || INTEGERP (attrs[LFACE_AVGWIDTH_INDEX])); |
| 3112 | xassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX]) | 3120 | xassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX]) |
| 3121 | || IGNORE_DEFFACE_P (attrs[LFACE_HEIGHT_INDEX]) | ||
| 3113 | || INTEGERP (attrs[LFACE_HEIGHT_INDEX]) | 3122 | || INTEGERP (attrs[LFACE_HEIGHT_INDEX]) |
| 3114 | || FLOATP (attrs[LFACE_HEIGHT_INDEX]) | 3123 | || FLOATP (attrs[LFACE_HEIGHT_INDEX]) |
| 3115 | || FUNCTIONP (attrs[LFACE_HEIGHT_INDEX])); | 3124 | || FUNCTIONP (attrs[LFACE_HEIGHT_INDEX])); |
| 3116 | xassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX]) | 3125 | xassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX]) |
| 3126 | || IGNORE_DEFFACE_P (attrs[LFACE_WEIGHT_INDEX]) | ||
| 3117 | || SYMBOLP (attrs[LFACE_WEIGHT_INDEX])); | 3127 | || SYMBOLP (attrs[LFACE_WEIGHT_INDEX])); |
| 3118 | xassert (UNSPECIFIEDP (attrs[LFACE_SLANT_INDEX]) | 3128 | xassert (UNSPECIFIEDP (attrs[LFACE_SLANT_INDEX]) |
| 3129 | || IGNORE_DEFFACE_P (attrs[LFACE_SLANT_INDEX]) | ||
| 3119 | || SYMBOLP (attrs[LFACE_SLANT_INDEX])); | 3130 | || SYMBOLP (attrs[LFACE_SLANT_INDEX])); |
| 3120 | xassert (UNSPECIFIEDP (attrs[LFACE_UNDERLINE_INDEX]) | 3131 | xassert (UNSPECIFIEDP (attrs[LFACE_UNDERLINE_INDEX]) |
| 3132 | || IGNORE_DEFFACE_P (attrs[LFACE_UNDERLINE_INDEX]) | ||
| 3121 | || SYMBOLP (attrs[LFACE_UNDERLINE_INDEX]) | 3133 | || SYMBOLP (attrs[LFACE_UNDERLINE_INDEX]) |
| 3122 | || STRINGP (attrs[LFACE_UNDERLINE_INDEX])); | 3134 | || STRINGP (attrs[LFACE_UNDERLINE_INDEX])); |
| 3123 | xassert (UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX]) | 3135 | xassert (UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX]) |
| 3136 | || IGNORE_DEFFACE_P (attrs[LFACE_OVERLINE_INDEX]) | ||
| 3124 | || SYMBOLP (attrs[LFACE_OVERLINE_INDEX]) | 3137 | || SYMBOLP (attrs[LFACE_OVERLINE_INDEX]) |
| 3125 | || STRINGP (attrs[LFACE_OVERLINE_INDEX])); | 3138 | || STRINGP (attrs[LFACE_OVERLINE_INDEX])); |
| 3126 | xassert (UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX]) | 3139 | xassert (UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX]) |
| 3140 | || IGNORE_DEFFACE_P (attrs[LFACE_STRIKE_THROUGH_INDEX]) | ||
| 3127 | || SYMBOLP (attrs[LFACE_STRIKE_THROUGH_INDEX]) | 3141 | || SYMBOLP (attrs[LFACE_STRIKE_THROUGH_INDEX]) |
| 3128 | || STRINGP (attrs[LFACE_STRIKE_THROUGH_INDEX])); | 3142 | || STRINGP (attrs[LFACE_STRIKE_THROUGH_INDEX])); |
| 3129 | xassert (UNSPECIFIEDP (attrs[LFACE_BOX_INDEX]) | 3143 | xassert (UNSPECIFIEDP (attrs[LFACE_BOX_INDEX]) |
| 3144 | || IGNORE_DEFFACE_P (attrs[LFACE_BOX_INDEX]) | ||
| 3130 | || SYMBOLP (attrs[LFACE_BOX_INDEX]) | 3145 | || SYMBOLP (attrs[LFACE_BOX_INDEX]) |
| 3131 | || STRINGP (attrs[LFACE_BOX_INDEX]) | 3146 | || STRINGP (attrs[LFACE_BOX_INDEX]) |
| 3132 | || INTEGERP (attrs[LFACE_BOX_INDEX]) | 3147 | || INTEGERP (attrs[LFACE_BOX_INDEX]) |
| 3133 | || CONSP (attrs[LFACE_BOX_INDEX])); | 3148 | || CONSP (attrs[LFACE_BOX_INDEX])); |
| 3134 | xassert (UNSPECIFIEDP (attrs[LFACE_INVERSE_INDEX]) | 3149 | xassert (UNSPECIFIEDP (attrs[LFACE_INVERSE_INDEX]) |
| 3150 | || IGNORE_DEFFACE_P (attrs[LFACE_INVERSE_INDEX]) | ||
| 3135 | || SYMBOLP (attrs[LFACE_INVERSE_INDEX])); | 3151 | || SYMBOLP (attrs[LFACE_INVERSE_INDEX])); |
| 3136 | xassert (UNSPECIFIEDP (attrs[LFACE_FOREGROUND_INDEX]) | 3152 | xassert (UNSPECIFIEDP (attrs[LFACE_FOREGROUND_INDEX]) |
| 3153 | || IGNORE_DEFFACE_P (attrs[LFACE_FOREGROUND_INDEX]) | ||
| 3137 | || STRINGP (attrs[LFACE_FOREGROUND_INDEX])); | 3154 | || STRINGP (attrs[LFACE_FOREGROUND_INDEX])); |
| 3138 | xassert (UNSPECIFIEDP (attrs[LFACE_BACKGROUND_INDEX]) | 3155 | xassert (UNSPECIFIEDP (attrs[LFACE_BACKGROUND_INDEX]) |
| 3156 | || IGNORE_DEFFACE_P (attrs[LFACE_BACKGROUND_INDEX]) | ||
| 3139 | || STRINGP (attrs[LFACE_BACKGROUND_INDEX])); | 3157 | || STRINGP (attrs[LFACE_BACKGROUND_INDEX])); |
| 3140 | xassert (UNSPECIFIEDP (attrs[LFACE_INHERIT_INDEX]) | 3158 | xassert (UNSPECIFIEDP (attrs[LFACE_INHERIT_INDEX]) |
| 3159 | || IGNORE_DEFFACE_P (attrs[LFACE_INHERIT_INDEX]) | ||
| 3141 | || NILP (attrs[LFACE_INHERIT_INDEX]) | 3160 | || NILP (attrs[LFACE_INHERIT_INDEX]) |
| 3142 | || SYMBOLP (attrs[LFACE_INHERIT_INDEX]) | 3161 | || SYMBOLP (attrs[LFACE_INHERIT_INDEX]) |
| 3143 | || CONSP (attrs[LFACE_INHERIT_INDEX])); | 3162 | || CONSP (attrs[LFACE_INHERIT_INDEX])); |
| 3144 | #ifdef HAVE_WINDOW_SYSTEM | 3163 | #ifdef HAVE_WINDOW_SYSTEM |
| 3145 | xassert (UNSPECIFIEDP (attrs[LFACE_STIPPLE_INDEX]) | 3164 | xassert (UNSPECIFIEDP (attrs[LFACE_STIPPLE_INDEX]) |
| 3165 | || IGNORE_DEFFACE_P (attrs[LFACE_STIPPLE_INDEX]) | ||
| 3146 | || SYMBOLP (attrs[LFACE_STIPPLE_INDEX]) | 3166 | || SYMBOLP (attrs[LFACE_STIPPLE_INDEX]) |
| 3147 | || !NILP (Fbitmap_spec_p (attrs[LFACE_STIPPLE_INDEX]))); | 3167 | || !NILP (Fbitmap_spec_p (attrs[LFACE_STIPPLE_INDEX]))); |
| 3148 | xassert (UNSPECIFIEDP (attrs[LFACE_FONT_INDEX]) | 3168 | xassert (UNSPECIFIEDP (attrs[LFACE_FONT_INDEX]) |
| 3169 | || IGNORE_DEFFACE_P (attrs[LFACE_FONT_INDEX]) | ||
| 3149 | || NILP (attrs[LFACE_FONT_INDEX]) | 3170 | || NILP (attrs[LFACE_FONT_INDEX]) |
| 3150 | || STRINGP (attrs[LFACE_FONT_INDEX])); | 3171 | || STRINGP (attrs[LFACE_FONT_INDEX])); |
| 3151 | #endif | 3172 | #endif |
| @@ -3340,7 +3361,7 @@ lface_fully_specified_p (attrs) | |||
| 3340 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) | 3361 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) |
| 3341 | if (i != LFACE_FONT_INDEX && i != LFACE_INHERIT_INDEX | 3362 | if (i != LFACE_FONT_INDEX && i != LFACE_INHERIT_INDEX |
| 3342 | && i != LFACE_AVGWIDTH_INDEX) | 3363 | && i != LFACE_AVGWIDTH_INDEX) |
| 3343 | if (UNSPECIFIEDP (attrs[i]) | 3364 | if ((UNSPECIFIEDP (attrs[i]) || IGNORE_DEFFACE_P (attrs[i])) |
| 3344 | #ifdef MAC_OS | 3365 | #ifdef MAC_OS |
| 3345 | /* MAC_TODO: No stipple support on Mac OS yet, this index is | 3366 | /* MAC_TODO: No stipple support on Mac OS yet, this index is |
| 3346 | always unspecified. */ | 3367 | always unspecified. */ |
| @@ -3555,6 +3576,8 @@ merge_face_vectors (f, from, to, named_merge_points) | |||
| 3555 | { | 3576 | { |
| 3556 | if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i])) | 3577 | if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i])) |
| 3557 | 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; | ||
| 3558 | else | 3581 | else |
| 3559 | to[i] = from[i]; | 3582 | to[i] = from[i]; |
| 3560 | } | 3583 | } |
| @@ -4047,7 +4070,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4047 | 4070 | ||
| 4048 | if (EQ (attr, QCfamily)) | 4071 | if (EQ (attr, QCfamily)) |
| 4049 | { | 4072 | { |
| 4050 | if (!UNSPECIFIEDP (value)) | 4073 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4051 | { | 4074 | { |
| 4052 | CHECK_STRING (value); | 4075 | CHECK_STRING (value); |
| 4053 | if (SCHARS (value) == 0) | 4076 | if (SCHARS (value) == 0) |
| @@ -4059,7 +4082,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4059 | } | 4082 | } |
| 4060 | else if (EQ (attr, QCheight)) | 4083 | else if (EQ (attr, QCheight)) |
| 4061 | { | 4084 | { |
| 4062 | if (!UNSPECIFIEDP (value)) | 4085 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4063 | { | 4086 | { |
| 4064 | Lisp_Object test; | 4087 | Lisp_Object test; |
| 4065 | 4088 | ||
| @@ -4080,7 +4103,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4080 | } | 4103 | } |
| 4081 | else if (EQ (attr, QCweight)) | 4104 | else if (EQ (attr, QCweight)) |
| 4082 | { | 4105 | { |
| 4083 | if (!UNSPECIFIEDP (value)) | 4106 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4084 | { | 4107 | { |
| 4085 | CHECK_SYMBOL (value); | 4108 | CHECK_SYMBOL (value); |
| 4086 | if (face_numeric_weight (value) < 0) | 4109 | if (face_numeric_weight (value) < 0) |
| @@ -4092,7 +4115,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4092 | } | 4115 | } |
| 4093 | else if (EQ (attr, QCslant)) | 4116 | else if (EQ (attr, QCslant)) |
| 4094 | { | 4117 | { |
| 4095 | if (!UNSPECIFIEDP (value)) | 4118 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4096 | { | 4119 | { |
| 4097 | CHECK_SYMBOL (value); | 4120 | CHECK_SYMBOL (value); |
| 4098 | if (face_numeric_slant (value) < 0) | 4121 | if (face_numeric_slant (value) < 0) |
| @@ -4104,7 +4127,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4104 | } | 4127 | } |
| 4105 | else if (EQ (attr, QCunderline)) | 4128 | else if (EQ (attr, QCunderline)) |
| 4106 | { | 4129 | { |
| 4107 | if (!UNSPECIFIEDP (value)) | 4130 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4108 | if ((SYMBOLP (value) | 4131 | if ((SYMBOLP (value) |
| 4109 | && !EQ (value, Qt) | 4132 | && !EQ (value, Qt) |
| 4110 | && !EQ (value, Qnil)) | 4133 | && !EQ (value, Qnil)) |
| @@ -4118,7 +4141,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4118 | } | 4141 | } |
| 4119 | else if (EQ (attr, QCoverline)) | 4142 | else if (EQ (attr, QCoverline)) |
| 4120 | { | 4143 | { |
| 4121 | if (!UNSPECIFIEDP (value)) | 4144 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4122 | if ((SYMBOLP (value) | 4145 | if ((SYMBOLP (value) |
| 4123 | && !EQ (value, Qt) | 4146 | && !EQ (value, Qt) |
| 4124 | && !EQ (value, Qnil)) | 4147 | && !EQ (value, Qnil)) |
| @@ -4132,7 +4155,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4132 | } | 4155 | } |
| 4133 | else if (EQ (attr, QCstrike_through)) | 4156 | else if (EQ (attr, QCstrike_through)) |
| 4134 | { | 4157 | { |
| 4135 | if (!UNSPECIFIEDP (value)) | 4158 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4136 | if ((SYMBOLP (value) | 4159 | if ((SYMBOLP (value) |
| 4137 | && !EQ (value, Qt) | 4160 | && !EQ (value, Qt) |
| 4138 | && !EQ (value, Qnil)) | 4161 | && !EQ (value, Qnil)) |
| @@ -4153,7 +4176,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4153 | if (EQ (value, Qt)) | 4176 | if (EQ (value, Qt)) |
| 4154 | value = make_number (1); | 4177 | value = make_number (1); |
| 4155 | 4178 | ||
| 4156 | if (UNSPECIFIEDP (value)) | 4179 | if (UNSPECIFIEDP (value) || IGNORE_DEFFACE_P (value)) |
| 4157 | valid_p = 1; | 4180 | valid_p = 1; |
| 4158 | else if (NILP (value)) | 4181 | else if (NILP (value)) |
| 4159 | valid_p = 1; | 4182 | valid_p = 1; |
| @@ -4210,7 +4233,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4210 | else if (EQ (attr, QCinverse_video) | 4233 | else if (EQ (attr, QCinverse_video) |
| 4211 | || EQ (attr, QCreverse_video)) | 4234 | || EQ (attr, QCreverse_video)) |
| 4212 | { | 4235 | { |
| 4213 | if (!UNSPECIFIEDP (value)) | 4236 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4214 | { | 4237 | { |
| 4215 | CHECK_SYMBOL (value); | 4238 | CHECK_SYMBOL (value); |
| 4216 | if (!EQ (value, Qt) && !NILP (value)) | 4239 | if (!EQ (value, Qt) && !NILP (value)) |
| @@ -4221,7 +4244,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4221 | } | 4244 | } |
| 4222 | else if (EQ (attr, QCforeground)) | 4245 | else if (EQ (attr, QCforeground)) |
| 4223 | { | 4246 | { |
| 4224 | if (!UNSPECIFIEDP (value)) | 4247 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4225 | { | 4248 | { |
| 4226 | /* Don't check for valid color names here because it depends | 4249 | /* Don't check for valid color names here because it depends |
| 4227 | on the frame (display) whether the color will be valid | 4250 | on the frame (display) whether the color will be valid |
| @@ -4235,7 +4258,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4235 | } | 4258 | } |
| 4236 | else if (EQ (attr, QCbackground)) | 4259 | else if (EQ (attr, QCbackground)) |
| 4237 | { | 4260 | { |
| 4238 | if (!UNSPECIFIEDP (value)) | 4261 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4239 | { | 4262 | { |
| 4240 | /* Don't check for valid color names here because it depends | 4263 | /* Don't check for valid color names here because it depends |
| 4241 | on the frame (display) whether the color will be valid | 4264 | on the frame (display) whether the color will be valid |
| @@ -4250,7 +4273,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4250 | else if (EQ (attr, QCstipple)) | 4273 | else if (EQ (attr, QCstipple)) |
| 4251 | { | 4274 | { |
| 4252 | #ifdef HAVE_X_WINDOWS | 4275 | #ifdef HAVE_X_WINDOWS |
| 4253 | if (!UNSPECIFIEDP (value) | 4276 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value) |
| 4254 | && !NILP (value) | 4277 | && !NILP (value) |
| 4255 | && NILP (Fbitmap_spec_p (value))) | 4278 | && NILP (Fbitmap_spec_p (value))) |
| 4256 | signal_error ("Invalid stipple attribute", value); | 4279 | signal_error ("Invalid stipple attribute", value); |
| @@ -4260,7 +4283,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4260 | } | 4283 | } |
| 4261 | else if (EQ (attr, QCwidth)) | 4284 | else if (EQ (attr, QCwidth)) |
| 4262 | { | 4285 | { |
| 4263 | if (!UNSPECIFIEDP (value)) | 4286 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4264 | { | 4287 | { |
| 4265 | CHECK_SYMBOL (value); | 4288 | CHECK_SYMBOL (value); |
| 4266 | if (face_numeric_swidth (value) < 0) | 4289 | if (face_numeric_swidth (value) < 0) |
| @@ -4285,7 +4308,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4285 | else | 4308 | else |
| 4286 | f = check_x_frame (frame); | 4309 | f = check_x_frame (frame); |
| 4287 | 4310 | ||
| 4288 | if (!UNSPECIFIEDP (value)) | 4311 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4289 | { | 4312 | { |
| 4290 | CHECK_STRING (value); | 4313 | CHECK_STRING (value); |
| 4291 | 4314 | ||
| @@ -4333,7 +4356,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4333 | signal_error ("Invalid face attribute name", attr); | 4356 | signal_error ("Invalid face attribute name", attr); |
| 4334 | 4357 | ||
| 4335 | if (font_related_attr_p | 4358 | if (font_related_attr_p |
| 4336 | && !UNSPECIFIEDP (value)) | 4359 | && !UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) |
| 4337 | /* If a font-related attribute other than QCfont is specified, the | 4360 | /* If a font-related attribute other than QCfont is specified, the |
| 4338 | original `font' attribute nor that of default face is useless | 4361 | original `font' attribute nor that of default face is useless |
| 4339 | to determine a new font. Thus, we set it to nil so that font | 4362 | to determine a new font. Thus, we set it to nil so that font |
| @@ -4354,7 +4377,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4354 | ++windows_or_buffers_changed; | 4377 | ++windows_or_buffers_changed; |
| 4355 | } | 4378 | } |
| 4356 | 4379 | ||
| 4357 | if (!UNSPECIFIEDP (value) | 4380 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value) |
| 4358 | && NILP (Fequal (old_value, value))) | 4381 | && NILP (Fequal (old_value, value))) |
| 4359 | { | 4382 | { |
| 4360 | Lisp_Object param; | 4383 | Lisp_Object param; |
| @@ -8012,6 +8035,8 @@ syms_of_xfaces () | |||
| 8012 | staticpro (&Qforeground_color); | 8035 | staticpro (&Qforeground_color); |
| 8013 | Qunspecified = intern ("unspecified"); | 8036 | Qunspecified = intern ("unspecified"); |
| 8014 | staticpro (&Qunspecified); | 8037 | staticpro (&Qunspecified); |
| 8038 | Qignore_defface = intern (":ignore-defface"); | ||
| 8039 | staticpro (&Qignore_defface); | ||
| 8015 | 8040 | ||
| 8016 | Qface_alias = intern ("face-alias"); | 8041 | Qface_alias = intern ("face-alias"); |
| 8017 | staticpro (&Qface_alias); | 8042 | staticpro (&Qface_alias); |