diff options
| author | Noam Postavsky | 2020-03-28 21:20:02 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2020-03-28 21:22:49 -0400 |
| commit | ee47e00f4e0a644a0948743ac43892710663b243 (patch) | |
| tree | 62b7484057c26ed5fd47ac82a97b8e05620f2750 | |
| parent | c2b8ce4439935e2e158d4357d234135a251c5767 (diff) | |
| download | emacs-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.c | 7 |
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 | |||
| 6953 | function, do: | 6953 | function, 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 | ||
| 6958 | You probably want to use the face-remap package included in Emacs | 6958 | You probably want to use the face-remap package included in Emacs |
| 6959 | instead of manipulating face-remapping-alist directly. | 6959 | instead of manipulating face-remapping-alist directly. Note that many |
| 6960 | of the functions inthat package modify the list destructively, so make | ||
| 6961 | sure to set it to a fresh value (for instance, use `copy-tree' as in | ||
| 6962 | the example above). | ||
| 6960 | 6963 | ||
| 6961 | Because Emacs normally only redraws screen areas when the underlying | 6964 | Because Emacs normally only redraws screen areas when the underlying |
| 6962 | buffer contents change, you may need to call `redraw-display' after | 6965 | buffer contents change, you may need to call `redraw-display' after |