diff options
| author | Miles Bader | 2000-09-08 00:10:48 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-09-08 00:10:48 +0000 |
| commit | aad407371fb519eb6dea10490399a5d9e9420bec (patch) | |
| tree | da45c5771fd255e4ab41297ba267795f2a37b260 /src | |
| parent | 096a9a373beccf5811fa46233551f5c3551e581a (diff) | |
| download | emacs-aad407371fb519eb6dea10490399a5d9e9420bec.tar.gz emacs-aad407371fb519eb6dea10490399a5d9e9420bec.zip | |
(default_face_vector): Function removed.
(Finternal_merge_in_global_face): Restore old global/local
attribute override order. Use inline loop instead of calling
default_face_vector.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/xfaces.c | 35 |
2 files changed, 20 insertions, 22 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 23b259e80e6..4c40722274f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2000-09-08 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * xfaces.c (default_face_vector): Function removed. | ||
| 4 | (Finternal_merge_in_global_face): Restore old global/local | ||
| 5 | attribute override order. Use inline loop instead of calling | ||
| 6 | default_face_vector. | ||
| 7 | |||
| 1 | 2000-09-07 Gerd Moellmann <gerd@gnu.org> | 8 | 2000-09-07 Gerd Moellmann <gerd@gnu.org> |
| 2 | 9 | ||
| 3 | * ralloc.c (obtain, relinquish, relinquish, r_alloc_size_in_use) | 10 | * ralloc.c (obtain, relinquish, relinquish, r_alloc_size_in_use) |
diff --git a/src/xfaces.c b/src/xfaces.c index 0f69e754abb..0049268e033 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -509,7 +509,6 @@ static int face_numeric_slant P_ ((Lisp_Object)); | |||
| 509 | static int face_numeric_swidth P_ ((Lisp_Object)); | 509 | static int face_numeric_swidth P_ ((Lisp_Object)); |
| 510 | static int face_fontset P_ ((Lisp_Object *)); | 510 | static int face_fontset P_ ((Lisp_Object *)); |
| 511 | static char *choose_face_font P_ ((struct frame *, Lisp_Object *, int, int)); | 511 | static char *choose_face_font P_ ((struct frame *, Lisp_Object *, int, int)); |
| 512 | static void default_face_vector P_ ((Lisp_Object *, Lisp_Object*)); | ||
| 513 | static void merge_face_vectors P_ ((struct frame *, Lisp_Object *, Lisp_Object*, Lisp_Object)); | 512 | static void merge_face_vectors P_ ((struct frame *, Lisp_Object *, Lisp_Object*, Lisp_Object)); |
| 514 | static void merge_face_inheritance P_ ((struct frame *f, Lisp_Object, | 513 | static void merge_face_inheritance P_ ((struct frame *f, Lisp_Object, |
| 515 | Lisp_Object *, Lisp_Object)); | 514 | Lisp_Object *, Lisp_Object)); |
| @@ -3133,22 +3132,6 @@ merge_face_heights (from, to, invalid, gcpro) | |||
| 3133 | } | 3132 | } |
| 3134 | 3133 | ||
| 3135 | 3134 | ||
| 3136 | /* Default any unspecified face attributes in LFACE from DEFAULTS. | ||
| 3137 | Unlike merge_face_vectors, below, this function simply fills in any | ||
| 3138 | unspecified attributes in LFACE from the those in DEFAULTS, and will | ||
| 3139 | not do face inheritance or make relative attributes absolute. */ | ||
| 3140 | |||
| 3141 | static INLINE void | ||
| 3142 | default_face_vector (lface, defaults) | ||
| 3143 | Lisp_Object *lface, *defaults; | ||
| 3144 | { | ||
| 3145 | int i; | ||
| 3146 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) | ||
| 3147 | if (UNSPECIFIEDP (lface[i])) | ||
| 3148 | lface[i] = defaults[i]; | ||
| 3149 | } | ||
| 3150 | |||
| 3151 | |||
| 3152 | /* Merge two Lisp face attribute vectors on frame F, FROM and TO, and | 3135 | /* Merge two Lisp face attribute vectors on frame F, FROM and TO, and |
| 3153 | store the resulting attributes in TO, which must be already be | 3136 | store the resulting attributes in TO, which must be already be |
| 3154 | completely specified and contain only absolute attributes. Every | 3137 | completely specified and contain only absolute attributes. Every |
| @@ -4579,19 +4562,27 @@ Value is nil if ATTR doesn't have a discrete set of valid values.") | |||
| 4579 | 4562 | ||
| 4580 | DEFUN ("internal-merge-in-global-face", Finternal_merge_in_global_face, | 4563 | DEFUN ("internal-merge-in-global-face", Finternal_merge_in_global_face, |
| 4581 | Sinternal_merge_in_global_face, 2, 2, 0, | 4564 | Sinternal_merge_in_global_face, 2, 2, 0, |
| 4582 | "Add attributes from frame-default definition of FACE to FACE on FRAME.") | 4565 | "Add attributes from frame-default definition of FACE to FACE on FRAME. |
| 4566 | Default face attributes override any local face attributes.") | ||
| 4583 | (face, frame) | 4567 | (face, frame) |
| 4584 | Lisp_Object face, frame; | 4568 | Lisp_Object face, frame; |
| 4585 | { | 4569 | { |
| 4586 | Lisp_Object global_lface, local_lface; | 4570 | int i; |
| 4571 | Lisp_Object global_lface, local_lface, *gvec, *lvec; | ||
| 4572 | |||
| 4587 | CHECK_LIVE_FRAME (frame, 1); | 4573 | CHECK_LIVE_FRAME (frame, 1); |
| 4574 | |||
| 4588 | global_lface = lface_from_face_name (NULL, face, 1); | 4575 | global_lface = lface_from_face_name (NULL, face, 1); |
| 4589 | local_lface = lface_from_face_name (XFRAME (frame), face, 0); | 4576 | local_lface = lface_from_face_name (XFRAME (frame), face, 0); |
| 4590 | if (NILP (local_lface)) | 4577 | if (NILP (local_lface)) |
| 4591 | local_lface = Finternal_make_lisp_face (face, frame); | 4578 | local_lface = Finternal_make_lisp_face (face, frame); |
| 4592 | default_face_vector (XVECTOR (local_lface)->contents, | 4579 | |
| 4593 | XVECTOR (global_lface)->contents); | 4580 | /* Make every specified global attribute override the local one. */ |
| 4594 | return face; | 4581 | lvec = XVECTOR (local_lface)->contents; |
| 4582 | gvec = XVECTOR (global_lface)->contents; | ||
| 4583 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) | ||
| 4584 | if (! UNSPECIFIEDP (gvec[i])) | ||
| 4585 | lvec[i] = gvec[i]; | ||
| 4595 | } | 4586 | } |
| 4596 | 4587 | ||
| 4597 | 4588 | ||