|
25 | 25 |
|
26 | 26 | [![Screenshot of Emacs][screenshot]][screenshot]
|
27 | 27 |
|
28 |
| -[screenshot]: https://i.imgur.com/OUFvQdh.png |
| 28 | +[screenshot]: https://i.imgur.com/3BttNWM.png |
29 | 29 |
|
30 | 30 | If you are already comfortable with Emacs and only want to understand
|
31 | 31 | the content of the [`.emacs`] file, you can skip ahead directly to the
|
@@ -55,6 +55,7 @@ Contents
|
55 | 55 | * [Install Packages](#install-packages)
|
56 | 56 | * [Inferior Lisp Program](#inferior-lisp-program)
|
57 | 57 | * [Add Hooks](#add-hooks)
|
| 58 | + * [Colorful Parentheses](#colorful-parentheses) |
58 | 59 | * [Opinion References](#opinion-references)
|
59 | 60 | * [Channels](#channels)
|
60 | 61 | * [License](#license)
|
@@ -1109,6 +1110,36 @@ Dec 2020. See https://github.com/Fanael/rainbow-delimiters/issues/57 for
|
1109 | 1110 | more details.
|
1110 | 1111 |
|
1111 | 1112 |
|
| 1113 | +### Colorful Parentheses |
| 1114 | +
|
| 1115 | +The default colors that Rainbow Delimiters chooses for the nested |
| 1116 | +parentheses are too subtle to easily recognize the matching pair of |
| 1117 | +parentheses. Some Lisp programmers like to customize the colors to |
| 1118 | +make the parentheses look more colorful. This section shows one way to |
| 1119 | +do this. |
| 1120 | +
|
| 1121 | + - This is necessary to use the various Rainbow Delimiters faces that |
| 1122 | + appear in the next point. |
| 1123 | +
|
| 1124 | + ```elisp |
| 1125 | + (require 'rainbow-delimiters) |
| 1126 | + ``` |
| 1127 | +
|
| 1128 | + - Set different colors for parentheses at different nesting level. |
| 1129 | +
|
| 1130 | + ```elisp |
| 1131 | + (set-face-foreground 'rainbow-delimiters-depth-1-face "#f99") ; red |
| 1132 | + (set-face-foreground 'rainbow-delimiters-depth-2-face "#9f9") ; green |
| 1133 | + (set-face-foreground 'rainbow-delimiters-depth-3-face "#9cf") ; blue |
| 1134 | + (set-face-foreground 'rainbow-delimiters-depth-4-face "#ff9") ; yellow |
| 1135 | + (set-face-foreground 'rainbow-delimiters-depth-5-face "#9ff") ; cyan |
| 1136 | + (set-face-foreground 'rainbow-delimiters-depth-6-face "#f9f") ; magenta |
| 1137 | + (set-face-foreground 'rainbow-delimiters-depth-7-face "#fff") ; white |
| 1138 | + (set-face-foreground 'rainbow-delimiters-depth-8-face "#ccc") ; light gray |
| 1139 | + (set-face-foreground 'rainbow-delimiters-depth-9-face "#999") ; dark gray |
| 1140 | + ``` |
| 1141 | +
|
| 1142 | +
|
1112 | 1143 | Opinion References
|
1113 | 1144 | ------------------
|
1114 | 1145 |
|
@@ -1160,6 +1191,7 @@ Release Checklist
|
1160 | 1191 | - Update version number in .emacs.
|
1161 | 1192 | - Update year in LICENSE.md.
|
1162 | 1193 | - Update CHANGES.md.
|
| 1194 | + - Add new screenshot (120x32) if necessary. |
1163 | 1195 | - Commit changes.
|
1164 | 1196 |
|
1165 | 1197 | git add -p
|
|
0 commit comments