diff options
| author | Robert Pluim | 2019-02-06 09:30:07 +0100 |
|---|---|---|
| committer | Robert Pluim | 2019-08-23 10:06:40 +0200 |
| commit | ef49439ff9b5b09e9f77425c13713f55b7b6316a (patch) | |
| tree | 3700ffd92e93bba743bb2501ceea19ee002d42cd /src | |
| parent | 11bfc0ffcc547fad689a028fe17676534d33a5cb (diff) | |
| download | emacs-ef49439ff9b5b09e9f77425c13713f55b7b6316a.tar.gz emacs-ef49439ff9b5b09e9f77425c13713f55b7b6316a.zip | |
Move default face lookup
* src/xdisp.c (extend_face_to_end_of_line): Move default face
lookup lower.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index dea80a1f9a4..41d36bd7b92 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -20463,7 +20463,7 @@ append_space_for_newline (struct it *it, bool default_face_p) | |||
| 20463 | static void | 20463 | static void |
| 20464 | extend_face_to_end_of_line (struct it *it) | 20464 | extend_face_to_end_of_line (struct it *it) |
| 20465 | { | 20465 | { |
| 20466 | struct face *face, *default_face; | 20466 | struct face *face; |
| 20467 | struct frame *f = it->f; | 20467 | struct frame *f = it->f; |
| 20468 | 20468 | ||
| 20469 | /* If line is already filled, do nothing. Non window-system frames | 20469 | /* If line is already filled, do nothing. Non window-system frames |
| @@ -20481,10 +20481,6 @@ extend_face_to_end_of_line (struct it *it) | |||
| 20481 | || WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0)) | 20481 | || WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0)) |
| 20482 | return; | 20482 | return; |
| 20483 | 20483 | ||
| 20484 | /* The default face, possibly remapped. */ | ||
| 20485 | default_face = | ||
| 20486 | FACE_FROM_ID_OR_NULL (f, lookup_basic_face (it->w, f, DEFAULT_FACE_ID)); | ||
| 20487 | |||
| 20488 | /* Face extension extends the background and box of IT->face_id | 20484 | /* Face extension extends the background and box of IT->face_id |
| 20489 | to the end of the line. If the background equals the background | 20485 | to the end of the line. If the background equals the background |
| 20490 | of the frame, we don't have to do anything. */ | 20486 | of the frame, we don't have to do anything. */ |
| @@ -20518,6 +20514,12 @@ extend_face_to_end_of_line (struct it *it) | |||
| 20518 | } | 20514 | } |
| 20519 | 20515 | ||
| 20520 | #ifdef HAVE_WINDOW_SYSTEM | 20516 | #ifdef HAVE_WINDOW_SYSTEM |
| 20517 | /* The default face, possibly remapped. */ | ||
| 20518 | struct face *default_face = | ||
| 20519 | FACE_FROM_ID (f, lookup_basic_face (it->w, f, DEFAULT_FACE_ID)); | ||
| 20520 | if (default_face == NULL) | ||
| 20521 | error ("extend_face_to_end_of_line: default_face is not set!"); | ||
| 20522 | |||
| 20521 | if (FRAME_WINDOW_P (f)) | 20523 | if (FRAME_WINDOW_P (f)) |
| 20522 | { | 20524 | { |
| 20523 | /* If the row is empty, add a space with the current face of IT, | 20525 | /* If the row is empty, add a space with the current face of IT, |