-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathconfig-macros.scm
More file actions
27 lines (27 loc) · 894 Bytes
/
config-macros.scm
File metadata and controls
27 lines (27 loc) · 894 Bytes
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
;;;
;;; Macro used to exporting edwin-specific bindings.
;;;
;;; (edwin:export (variable a)
;;; (command b)
;;; (mode c))
;;; This is equivalent to
;;;
;;; (export edwin-variable$a
;;; edwin-command$b
;;; edwin-mode$c)
;;;
(define-syntax edwin:export
(lambda (form rename compare)
`(,(rename 'export)
,@(apply append
(map (lambda (specifier)
(let ((category (car specifier))
(names (cdr specifier)))
(map (lambda (name)
(string->symbol
(apply string-append
(map symbol->string
`(edwin - ,category $ ,name)))))
names)))
(cdr form)))))
(export))