diff options
| author | Stefan Monnier | 2000-09-09 00:18:25 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-09-09 00:18:25 +0000 |
| commit | cec33c9095142e53bb35bf6880fc3c91effbc416 (patch) | |
| tree | 9daeb87a3ee9e297bc056d9ee52d42ce8913e967 /src | |
| parent | 460dc922d8339cb9ef76b76d2dd2ea34dfba4e83 (diff) | |
| download | emacs-cec33c9095142e53bb35bf6880fc3c91effbc416.tar.gz emacs-cec33c9095142e53bb35bf6880fc3c91effbc416.zip | |
(Finternal_set_lisp_face_attribute): Minor thinko.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index ca5632730ea..22530657c18 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -3681,12 +3681,11 @@ FRAME 0 means change the face on all frames, and change the default\n\ | |||
| 3681 | { | 3681 | { |
| 3682 | if (!UNSPECIFIEDP (value)) | 3682 | if (!UNSPECIFIEDP (value)) |
| 3683 | { | 3683 | { |
| 3684 | Lisp_Object test = Qnil; | 3684 | Lisp_Object test = |
| 3685 | 3685 | (EQ (face, Qdefault) ? value : | |
| 3686 | if (!EQ (face, Qdefault)) | 3686 | /* The default face must have an absolute size, otherwise, we do |
| 3687 | /* The default face must have an absolute size, otherwise, we do | 3687 | a test merge with a random height to see if VALUE's ok. */ |
| 3688 | a test merge with a random height to see if VALUE's ok. */ | 3688 | merge_face_heights (value, make_number(10), Qnil, Qnil)); |
| 3689 | test = merge_face_heights (value, make_number(10), Qnil, Qnil); | ||
| 3690 | 3689 | ||
| 3691 | if (!INTEGERP(test) || XINT(test) <= 0) | 3690 | if (!INTEGERP(test) || XINT(test) <= 0) |
| 3692 | signal_error ("Invalid face height", value); | 3691 | signal_error ("Invalid face height", value); |
| @@ -4571,13 +4570,16 @@ Default face attributes override any local face attributes.") | |||
| 4571 | Lisp_Object global_lface, local_lface, *gvec, *lvec; | 4570 | Lisp_Object global_lface, local_lface, *gvec, *lvec; |
| 4572 | 4571 | ||
| 4573 | CHECK_LIVE_FRAME (frame, 1); | 4572 | CHECK_LIVE_FRAME (frame, 1); |
| 4574 | |||
| 4575 | global_lface = lface_from_face_name (NULL, face, 1); | 4573 | global_lface = lface_from_face_name (NULL, face, 1); |
| 4576 | local_lface = lface_from_face_name (XFRAME (frame), face, 0); | 4574 | local_lface = lface_from_face_name (XFRAME (frame), face, 0); |
| 4577 | if (NILP (local_lface)) | 4575 | if (NILP (local_lface)) |
| 4578 | local_lface = Finternal_make_lisp_face (face, frame); | 4576 | local_lface = Finternal_make_lisp_face (face, frame); |
| 4579 | 4577 | ||
| 4580 | /* Make every specified global attribute override the local one. */ | 4578 | /* Make every specified global attribute override the local one. |
| 4579 | BEWARE!! This is only used from `face-set-after-frame-default' where | ||
| 4580 | the local frame is defined from default specs in `face-defface-spec' | ||
| 4581 | and those should be overridden by global settings. Hence the strange | ||
| 4582 | "global before local" priority. */ | ||
| 4581 | lvec = XVECTOR (local_lface)->contents; | 4583 | lvec = XVECTOR (local_lface)->contents; |
| 4582 | gvec = XVECTOR (global_lface)->contents; | 4584 | gvec = XVECTOR (global_lface)->contents; |
| 4583 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) | 4585 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) |