aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2018-11-03 12:39:59 +0200
committerEli Zaretskii2018-11-03 12:39:59 +0200
commit07048183a86134b63cb7132038fab6f36a1e57ca (patch)
treea102b64bbfb8c0612f2caf2350b0cc687d4b7390 /src
parent4a344bcab50e688db76c9e123fb7725796cb260b (diff)
downloademacs-07048183a86134b63cb7132038fab6f36a1e57ca.tar.gz
emacs-07048183a86134b63cb7132038fab6f36a1e57ca.zip
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')
-rw-r--r--src/fringe.c8
-rw-r--r--src/xfaces.c1
2 files changed, 9 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)
909 if (w->pseudo_window_p) 909 if (w->pseudo_window_p)
910 return updated_p; 910 return updated_p;
911 911
912 /* We must switch to the window's buffer to use its local value of
913 the fringe face, in case it's been remapped in face-remapping-alist. */
914 Lisp_Object window_buffer = w->contents;
915 struct buffer *oldbuf = current_buffer;
916 set_buffer_internal_1 (XBUFFER (window_buffer));
917
912 /* Must draw line if no fringe */ 918 /* Must draw line if no fringe */
913 if (no_fringe_p 919 if (no_fringe_p
914 && (WINDOW_LEFT_FRINGE_WIDTH (w) == 0 920 && (WINDOW_LEFT_FRINGE_WIDTH (w) == 0
@@ -926,6 +932,8 @@ draw_window_fringes (struct window *w, bool no_fringe_p)
926 updated_p = 1; 932 updated_p = 1;
927 } 933 }
928 934
935 set_buffer_internal_1 (oldbuf);
936
929 return updated_p; 937 return updated_p;
930} 938}
931 939
diff --git a/src/xfaces.c b/src/xfaces.c
index 50593f6804c..6e06d56ba1d 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6755,6 +6755,7 @@ Because Emacs normally only redraws screen areas when the underlying
6755buffer contents change, you may need to call `redraw-display' after 6755buffer contents change, you may need to call `redraw-display' after
6756changing this variable for it to take effect. */); 6756changing this variable for it to take effect. */);
6757 Vface_remapping_alist = Qnil; 6757 Vface_remapping_alist = Qnil;
6758 DEFSYM (Qface_remapping_alist,"face-remapping-alist");
6758 6759
6759 DEFVAR_LISP ("face-font-rescale-alist", Vface_font_rescale_alist, 6760 DEFVAR_LISP ("face-font-rescale-alist", Vface_font_rescale_alist,
6760 doc: /* Alist of fonts vs the rescaling factors. 6761 doc: /* Alist of fonts vs the rescaling factors.