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.
154154For example:
155155
156156~~~ 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>
158160~~~
159161
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.
161168
162169Here we create an overlay at the line end with some text to display:
163170
164171``` lisp
165172(make-line-endings-overlay (current-point) (current-point) 'syntax-warning-attribute :text "hello")
166173```
167174
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 .
169176
170177Learn about attributes below.
171178
172179#### How to delete overlays
173180
174181To delete a given overlay, use ` delete-overlay ` with your overlay object as argument.
175182
183+ ``` lisp
184+ LEM> (delete-overlay myoverlay)
185+ ```
186+
176187To delete all the current buffer overlays, use ` (clear-overlays) ` (you
177188can also call this with ` M-: ` ).
178189
You can’t perform that action at this time.
0 commit comments