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.
This commit is contained in:
parent
c2b8ce4439
commit
ee47e00f4e
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue