-
Notifications
You must be signed in to change notification settings - Fork 280
/
Eask
55 lines (45 loc) · 1.55 KB
/
Eask
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
51
52
53
54
55
(package "evil"
"1.15.0"
"Extensible vi layer")
(website-url "https://github.com/emacs-evil/evil")
(keywords "emulations")
(package-file "evil.el")
(files "evil-*.el" '(:exclude "*-tests.el" "*-pkg.el"))
(script "test" "echo \"Error: no test specified\" && exit 1")
(source 'gnu)
(source 'melpa)
(depends-on "emacs" "24.1")
(depends-on "cl-lib")
(depends-on "goto-chg")
(depends-on "nadvice")
(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432
(eask-defcommand test
"Basic tests."
(require 'evil-tests)
(evil-tests-initialize nil nil))
(eask-defcommand terminal
"Load Evil in a terminal Emacs and run all tests."
(require 'evil-tests)
(evil-tests-initialize nil nil t))
(eask-defcommand profiler
"Run all tests with profiler."
(require 'evil-tests)
(evil-mode 1)
(evil-tests-initialize nil t))
(eask-defcommand indent
"Re-indent all Evil code."
(setq vc-handled-backends nil)
(dolist (file (eask-package-el-files)) (load file))
(dolist (buffer (reverse (buffer-list)))
(when (buffer-file-name buffer)
(set-buffer buffer)
(message "Indenting %s" (current-buffer))
(setq-default indent-tabs-mode nil)
(untabify (point-min) (point-max))
(indent-region (point-min) (point-max))
(delete-trailing-whitespace)
(untabify (point-min) (point-max))
(goto-char (point-min))
(while (re-search-forward "\\n\\\\{3,\\\\}" nil t)
(replace-match "\\n\\n"))
(when (buffer-modified-p) (save-buffer 0)))))