-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdemo.el
50 lines (41 loc) · 1.03 KB
/
demo.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
(package-demo-define-demo my-package-demo-demo
(M-x apropos :speed 5)
(pause 1)
(kbd "RET"))
(my-package-demo-demo)
(package-demo--run-demo
'((M-x apropos :speed 5)
(pause 1)
(kbd "RET")))
(package-demo-define-demo demo-magit-commit
(M-x magit-status
:callback
((pause 1)
(kbd "c")
(pause 1)
(kbd "c")
(pause 1 :callback
((typewriter "Initial commit")
(kbd "C-c C-c"))))))
(package-demo-do
'M-x
'magit-status
:callback
'((pause 1)
(kbd "c")
(pause 1)
(kbd "c")
(pause 1 :callback
((typewriter "Initial commit")
(pause 1 :callback ((kbd "C-c C-c")))))))
(package-demo-do 'pause 1)
;;; syntax like this would be nice:
(run ["C-x" 0.5 "b"] ; vectors introduce keystrokes
1 ; bare numbers always pause
"typewriter text\n" ; bare strings insert with a typerwriter effect
1
(:typerwriter-chars-per-second 20 "this text is inserted much faster\n")
3
["M-x"]
"save-buffer"
["RET"])