From: Noam Postavsky Date: Sun, 29 Mar 2020 01:20:02 +0000 (-0400) Subject: Don't suggest setting face-remapping-alist to a literal (Bug#39812) X-Git-Tag: emacs-27.0.91~54 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ee47e00f4e;p=emacs.git Don't suggest setting face-remapping-alist to a literal (Bug#39812) * src/xfaces.c (syms_of_xfaces) : Use copy-tree in the costring example code, and note why. --- diff --git a/src/xfaces.c b/src/xfaces.c index 91a7a8533e8..6ff252b0233 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6953,10 +6953,13 @@ could define a face `my-mode-default', and then in the mode setup function, do: (set (make-local-variable \\='face-remapping-alist) - \\='((default my-mode-default)))). + (copy-tree \\='((default my-mode-default)))). You probably want to use the face-remap package included in Emacs -instead of manipulating face-remapping-alist directly. +instead of manipulating face-remapping-alist directly. Note that many +of the functions inthat package modify the list destructively, so make +sure to set it to a fresh value (for instance, use `copy-tree' as in +the example above). Because Emacs normally only redraws screen areas when the underlying buffer contents change, you may need to call `redraw-display' after