aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoam Postavsky2020-03-28 21:20:02 -0400
committerNoam Postavsky2020-03-28 21:22:49 -0400
commitee47e00f4e0a644a0948743ac43892710663b243 (patch)
tree62b7484057c26ed5fd47ac82a97b8e05620f2750
parentc2b8ce4439935e2e158d4357d234135a251c5767 (diff)
downloademacs-ee47e00f4e0a644a0948743ac43892710663b243.tar.gz
emacs-ee47e00f4e0a644a0948743ac43892710663b243.zip
Don't suggest setting face-remapping-alist to a literal (Bug#39812)
* src/xfaces.c (syms_of_xfaces) <face-remapping-alist>: Use copy-tree in the costring example code, and note why.
-rw-r--r--src/xfaces.c7
1 files changed, 5 insertions, 2 deletions
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
6953function, do: 6953function, do:
6954 6954
6955 (set (make-local-variable \\='face-remapping-alist) 6955 (set (make-local-variable \\='face-remapping-alist)
6956 \\='((default my-mode-default)))). 6956 (copy-tree \\='((default my-mode-default)))).
6957 6957
6958You probably want to use the face-remap package included in Emacs 6958You probably want to use the face-remap package included in Emacs
6959instead of manipulating face-remapping-alist directly. 6959instead of manipulating face-remapping-alist directly. Note that many
6960of the functions inthat package modify the list destructively, so make
6961sure to set it to a fresh value (for instance, use `copy-tree' as in
6962the example above).
6960 6963
6961Because Emacs normally only redraws screen areas when the underlying 6964Because Emacs normally only redraws screen areas when the underlying
6962buffer contents change, you may need to call `redraw-display' after 6965buffer contents change, you may need to call `redraw-display' after