Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
8be05193
Commit
8be05193
authored
Apr 17, 1998
by
Geoff Voelker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Qforeground_color, Qbackground_color): Declare.
(compute_char_face, merge_face_list): Update from xterm.c.
parent
ead2be98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
69 deletions
+67
-69
src/w32faces.c
src/w32faces.c
+67
-69
No files found.
src/w32faces.c
View file @
8be05193
...
...
@@ -139,6 +139,9 @@ static int new_computed_face ( /* FRAME_PTR, struct face * */ );
static
int
intern_computed_face
(
/* FRAME_PTR, struct face * */
);
static
void
ensure_face_ready
(
/* FRAME_PTR, int id */
);
void
recompute_basic_faces
(
/* FRAME_PTR f */
);
static
void
merge_face_list
(
/* FRAME_PTR, struct face *, Lisp_Object */
);
extern
Lisp_Object
Qforeground_color
,
Qbackground_color
;
/* Allocating, copying, and comparing struct faces. */
...
...
@@ -663,7 +666,6 @@ compute_glyph_face_1 (f, face_name, current_face)
the time this function can take.
If MOUSE is nonzero, use the character's mouse-face, not its face. */
int
compute_char_face
(
f
,
w
,
pos
,
region_beg
,
region_end
,
endptr
,
limit
,
mouse
)
struct
frame
*
f
;
...
...
@@ -746,82 +748,23 @@ compute_char_face (f, w, pos, region_beg, region_end, endptr, limit, mouse)
compute_base_face
(
f
,
&
face
);
if
(
CONSP
(
prop
))
{
/* We have a list of faces, merge them in reverse order */
Lisp_Object
length
=
Flength
(
prop
);
int
len
=
XINT
(
length
);
Lisp_Object
*
faces
;
/* Put them into an array */
faces
=
(
Lisp_Object
*
)
alloca
(
len
*
sizeof
(
Lisp_Object
));
for
(
j
=
0
;
j
<
len
;
j
++
)
{
faces
[
j
]
=
Fcar
(
prop
);
prop
=
Fcdr
(
prop
);
}
/* So that we can merge them in the reverse order */
for
(
j
=
len
-
1
;
j
>=
0
;
j
--
)
{
facecode
=
face_name_id_number
(
f
,
faces
[
j
]);
if
(
facecode
>=
0
&&
facecode
<
FRAME_N_PARAM_FACES
(
f
)
&&
FRAME_PARAM_FACES
(
f
)
[
facecode
]
!=
0
)
merge_faces
(
FRAME_PARAM_FACES
(
f
)
[
facecode
],
&
face
);
}
}
else
if
(
!
NILP
(
prop
))
{
facecode
=
face_name_id_number
(
f
,
prop
);
if
(
facecode
>=
0
&&
facecode
<
FRAME_N_PARAM_FACES
(
f
)
&&
FRAME_PARAM_FACES
(
f
)
[
facecode
]
!=
0
)
merge_faces
(
FRAME_PARAM_FACES
(
f
)
[
facecode
],
&
face
);
}
merge_face_list
(
f
,
&
face
,
prop
);
noverlays
=
sort_overlays
(
overlay_vec
,
noverlays
,
w
);
/* Now merge the overlay data in that order. */
for
(
i
=
0
;
i
<
noverlays
;
i
++
)
{
prop
=
Foverlay_get
(
overlay_vec
[
i
],
propname
);
if
(
CONSP
(
prop
))
{
/* We have a list of faces, merge them in reverse order */
Lisp_Object
length
=
Flength
(
prop
);
int
len
=
XINT
(
length
);
Lisp_Object
*
faces
;
int
i
;
/* Put them into an array */
faces
=
(
Lisp_Object
*
)
alloca
(
len
*
sizeof
(
Lisp_Object
));
for
(
j
=
0
;
j
<
len
;
j
++
)
{
faces
[
j
]
=
Fcar
(
prop
);
prop
=
Fcdr
(
prop
);
}
/* So that we can merge them in the reverse order */
for
(
j
=
len
-
1
;
j
>=
0
;
j
--
)
{
facecode
=
face_name_id_number
(
f
,
faces
[
j
]);
if
(
facecode
>=
0
&&
facecode
<
FRAME_N_PARAM_FACES
(
f
)
&&
FRAME_PARAM_FACES
(
f
)
[
facecode
]
!=
0
)
merge_faces
(
FRAME_PARAM_FACES
(
f
)
[
facecode
],
&
face
);
}
}
else
if
(
!
NILP
(
prop
))
{
Lisp_Object
oend
;
int
oendpos
;
Lisp_Object
oend
;
int
oendpos
;
facecode
=
face_name_id_number
(
f
,
prop
);
if
(
facecode
>=
0
&&
facecode
<
FRAME_N_PARAM_FACES
(
f
)
&&
FRAME_PARAM_FACES
(
f
)
[
facecode
]
!=
0
)
merge_faces
(
FRAME_PARAM_FACES
(
f
)[
facecode
],
&
face
);
prop
=
Foverlay_get
(
overlay_vec
[
i
],
propname
);
merge_face_list
(
f
,
&
face
,
prop
);
oend
=
OVERLAY_END
(
overlay_vec
[
i
]);
oendpos
=
OVERLAY_POSITION
(
oend
);
if
(
oendpos
<
endpos
)
endpos
=
oendpos
;
}
oend
=
OVERLAY_END
(
overlay_vec
[
i
]);
oendpos
=
OVERLAY_POSITION
(
oend
);
if
(
oendpos
<
endpos
)
endpos
=
oendpos
;
}
if
(
pos
>=
region_beg
&&
pos
<
region_end
)
...
...
@@ -836,6 +779,61 @@ compute_char_face (f, w, pos, region_beg, region_end, endptr, limit, mouse)
return
intern_computed_face
(
f
,
&
face
);
}
static
void
merge_face_list
(
f
,
face
,
prop
)
FRAME_PTR
f
;
struct
face
*
face
;
Lisp_Object
prop
;
{
Lisp_Object
length
;
int
len
;
Lisp_Object
*
faces
;
int
j
;
if
(
CONSP
(
prop
)
&&
!
STRINGP
(
XCONS
(
prop
)
->
cdr
))
{
/* We have a list of faces, merge them in reverse order. */
length
=
Fsafe_length
(
prop
);
len
=
XFASTINT
(
length
);
/* Put them into an array. */
faces
=
(
Lisp_Object
*
)
alloca
(
len
*
sizeof
(
Lisp_Object
));
for
(
j
=
0
;
j
<
len
;
j
++
)
{
faces
[
j
]
=
Fcar
(
prop
);
prop
=
Fcdr
(
prop
);
}
/* So that we can merge them in the reverse order. */
}
else
{
faces
=
(
Lisp_Object
*
)
alloca
(
sizeof
(
Lisp_Object
));
faces
[
0
]
=
prop
;
len
=
1
;
}
for
(
j
=
len
-
1
;
j
>=
0
;
j
--
)
{
if
(
CONSP
(
faces
[
j
]))
{
if
(
EQ
(
XCONS
(
faces
[
j
])
->
car
,
Qbackground_color
))
face
->
background
=
load_color
(
f
,
XCONS
(
faces
[
j
])
->
cdr
);
if
(
EQ
(
XCONS
(
faces
[
j
])
->
car
,
Qforeground_color
))
face
->
foreground
=
load_color
(
f
,
XCONS
(
faces
[
j
])
->
cdr
);
}
else
{
int
facecode
=
face_name_id_number
(
f
,
faces
[
j
]);
if
(
facecode
>=
0
&&
facecode
<
FRAME_N_PARAM_FACES
(
f
)
&&
FRAME_PARAM_FACES
(
f
)
[
facecode
]
!=
0
)
merge_faces
(
FRAME_PARAM_FACES
(
f
)
[
facecode
],
face
);
}
}
}
/* Recompute the GC's for the default and modeline faces.
We call this after changing frame parameters on which those GC's
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment