-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.init.el
51 lines (42 loc) · 1.5 KB
/
.init.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
51
(progn
(setq *default-directory* "~/programowanko/science-cup-2023")
(defun conf/run-in-default-dir (s async)
(cd *default-directory*)
(if async
(async-shell-command s)
(shell-command s)))
(defun conf/prepare ()
(setq default-directory *default-directory*)
(mapcar #'find-file-noselect (file-expand-wildcards "rc.scm"))
(mapcar #'find-file-noselect (file-expand-wildcards "scm/*.scm"))
(mapcar #'find-file-noselect (file-expand-wildcards "src/*.[ch]"))
(setq buffer-menu #'switch-to-buffer) ; TODO: przeniose to do .emacs
(setq list-buffers #'switch-to-buffer) ; TODO: przeniose to do .emacs
(setq conf/make "make")
(if (string= (system-name) "openchad") (setq conf/make "gmake"))
(global-set-key
(kbd "C-c C-t")
(lambda ()
(interactive)
(conf/run-in-default-dir "etags scm/*.scm src/*.[ch] tinyscheme/*.[ch]" nil)
(setq tags-file-name (concat default-directory "/TAGS"))))
(global-set-key
(kbd "C-c C-c C-c")
(lambda ()
(interactive)
(conf/run-in-default-dir (concat conf/make " clean") nil)))
(global-set-key
(kbd "C-c C-p")
(lambda ()
(interactive)
(conf/run-in-default-dir (concat conf/make " pubcpy") t)))
(global-set-key
(kbd "C-c C-r")
(lambda ()
(interactive)
(switch-to-buffer "rc.scm")))
(setq compile-command
(concat
"cd ~/programowanko/science-cup-2023/ ; "
conf/make " && ./main")))
(conf/prepare))