File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -154,25 +154,36 @@ list of overlays, and is displayed.
154
154
For example:
155
155
156
156
~~~ lisp
157
- (make-overlay (current-point) (current-point) 'syntax-warning-attribute)
157
+ LEM> (defparameter myoverlay (make-overlay (current-point) (current-point) 'syntax-warning-attribute))
158
+ ;; => #<LEM-CORE::OVERLAY {1206A500A3}>
159
+ LEM>
158
160
~~~
159
161
160
- buuut… it might be difficult to see.
162
+ To best see this snippet's effect, run this in the REPL, in the ` lem `
163
+ package. You will see the REPL output and the last REPL prompt printed
164
+ in red. This is because the overlay is taking effect. Continue typing,
165
+ it still has effect.
166
+
167
+ You can try with another attribute, for example ` 'region ` will give you a light grey background.
161
168
162
169
Here we create an overlay at the line end with some text to display:
163
170
164
171
``` lisp
165
172
(make-line-endings-overlay (current-point) (current-point) 'syntax-warning-attribute :text "hello")
166
173
```
167
174
168
- This creates an overlay at the end of the line, showing "hello" in red (the color of our attribute).
175
+ This shows "hello" in red (the color of our attribute) at the end of the current line .
169
176
170
177
Learn about attributes below.
171
178
172
179
#### How to delete overlays
173
180
174
181
To delete a given overlay, use ` delete-overlay ` with your overlay object as argument.
175
182
183
+ ``` lisp
184
+ LEM> (delete-overlay myoverlay)
185
+ ```
186
+
176
187
To delete all the current buffer overlays, use ` (clear-overlays) ` (you
177
188
can also call this with ` M-: ` ).
178
189
You can’t perform that action at this time.
0 commit comments