1
2
3 dmn
4
5
6
7
8
9
10
11
12
13
14
15
16
17 ( use-modules ( lepton rc ) )
18 ( use-modules ( lepton page ) )
19 ( use-modules ( lepton log ) )
20 ( use-modules ( schematic hook ) )
21
22
23 ( define ( load-gschemrc-file page )
24 ( let*
25 (
26 ( dir ( dirname (page-filename page) ) )
27 ( gschemrc (format #f "~a/gschemrc" dir) )
28 )
29
30 ( when ( access? gschemrc R_OK )
31 ( chdir dir )
32 ( parse-rc "lepton-schematic" "gschemrc" )
33 ( log! 'warning "load-gschemrc.scm: Loaded [~a/gschemrc]" gschemrc )
34 ( format #t "load-gschemrc.scm: Loaded [~a/gschemrc]~%" gschemrc )
35 )
36
37 )
38 )
39
40
41 ( define ( install_hooks )
42 ( add-hook! open-page-hook load-gschemrc-file #f )
43 )
44
45
46 ( install_hooks )
47