diff options
author | Eli Zaretskii <eliz@gnu.org> | 2018-11-03 12:39:59 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-11-03 12:39:59 +0200 |
commit | 07048183a86134b63cb7132038fab6f36a1e57ca (patch) | |
tree | a102b64bbfb8c0612f2caf2350b0cc687d4b7390 /src/fringe.c | |
parent | 4a344bcab50e688db76c9e123fb7725796cb260b (diff) | |
download | emacs-07048183a86134b63cb7132038fab6f36a1e57ca.tar.gz |
Allow the fringe face to be remapped locally in a buffer
* src/fringe.c (draw_window_fringes): Switch to window's
buffer to get the local value of face-remapping-alist, if
necessary. (Bug#33244)
* src/xfaces.c (syms_of_xfaces) <Qface_remapping_alist>: New
DEFSYM.
Diffstat (limited to 'src/fringe.c')
-rw-r--r-- | src/fringe.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fringe.c b/src/fringe.c index 6a44de1bf24..a1016ad349c 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -909,6 +909,12 @@ draw_window_fringes (struct window *w, bool no_fringe_p) if (w->pseudo_window_p) return updated_p; + /* We must switch to the window's buffer to use its local value of + the fringe face, in case it's been remapped in face-remapping-alist. */ + Lisp_Object window_buffer = w->contents; + struct buffer *oldbuf = current_buffer; + set_buffer_internal_1 (XBUFFER (window_buffer)); + /* Must draw line if no fringe */ if (no_fringe_p && (WINDOW_LEFT_FRINGE_WIDTH (w) == 0 @@ -926,6 +932,8 @@ draw_window_fringes (struct window *w, bool no_fringe_p) updated_p = 1; } + set_buffer_internal_1 (oldbuf); + return updated_p; } |