Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 110 lines (60 sloc) 2.828 kB
a47685b @fogus Changed README to conform to standard
fogus authored
1 clojure.tools.macro
2 ========================================
df12308 initial commit
Stuart Halloway authored
3
a47685b @fogus Changed README to conform to standard
fogus authored
4 Tools for writing macros.
5
6
7
8 Releases and Dependency Information
9 ========================================
10
f221c4d @khinsen Updated README for release 0.1.2
khinsen authored
11 Latest stable release: 0.1.2
a47685b @fogus Changed README to conform to standard
fogus authored
12
13 * [All Released Versions](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22tools.macro%22)
14
15 * [Development Snapshot Versions](https://oss.sonatype.org/index.html#nexus-search;gav~org.clojure~tools.macro~~~)
16
17 [Leiningen](https://github.com/technomancy/leiningen) dependency information:
18
f221c4d @khinsen Updated README for release 0.1.2
khinsen authored
19 [org.clojure/tools.macro "0.1.2"]
a47685b @fogus Changed README to conform to standard
fogus authored
20
21 [Maven](http://maven.apache.org/) dependency information:
22
23 <dependency>
24 <groupId>org.clojure</groupId>
25 <artifactId>tools.macro</artifactId>
f221c4d @khinsen Updated README for release 0.1.2
khinsen authored
26 <version>0.1.2</version>
a47685b @fogus Changed README to conform to standard
fogus authored
27 </dependency>
28
29
30
31 Example Usages
32 ========================================
8a5dfb6 @khinsen Add summary to README
khinsen authored
33
34 #### macrolet: local macro definitions ####
35
36 Example:
37
38 (macrolet [(foo [form] `(~form ~form))]
39 (foo x))
40
41 expands to `(x x)`
42
43 #### symbol-macrolet: local symbol macro definitions ####
44
45 Example:
46
47 (symbol-macrolet [def foo]
48 (def def def))
49
50 expands to `(def def foo)`
51
52 #### defsymbolmacro, with-symbol-macros: global symbol macro definitions ####
53
54 Example:
55
56 (defsymbolmacro sum-2-3 (plus 2 3))
57 (with-symbol-macros
58 (+ 1 sum-2-3))
59
60 expands to `(+ 1 (plus 2 3))`
61
62 #### mexpand-1 ####
63
64 like clojure.core/macroexpand-1, but handles symbol macros
65
66 #### mexpand ####
67
68 like clojure.core/macroexpand, but handles symbol macros
69
70 #### mexpand-all ####
71
72 full recursive macro expansion
73
74 #### name-with-attributes ####
75
76 For writing def-like macros. Handles optional docstrings and attribute
77 maps for a name to be defined in a list of macro arguments.
df12308 initial commit
Stuart Halloway authored
78
79
80
a47685b @fogus Changed README to conform to standard
fogus authored
81 Developer Information
82 ========================================
83
84 * [GitHub project](https://github.com/clojure/tools.macro)
85
86 * [Bug Tracker](http://dev.clojure.org/jira/browse/TMACRO)
87
88 * [Continuous Integration](http://build.clojure.org/job/tools.macro/)
89
90 * [Compatibility Test Matrix](http://build.clojure.org/job/tools.macro-test-matrix/)
91
92
93
94 Change Log
95 ====================
96
f221c4d @khinsen Updated README for release 0.1.2
khinsen authored
97 * Release 0.1.2 on 2012.02.18
98 * Protect symbols bound by let and letfn against macroexpansion from an outer scope
a47685b @fogus Changed README to conform to standard
fogus authored
99 * Release 0.1.1 on 2011.05.26
100 * Added `name-with-attributes`
101 * Release 0.1.0 on 2011.05.04
102 * Version imported from old contrib
103
104
105
106 Copyright and License
107 ========================================
108
109 Copyright (c) 2011 Rich Hickey. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound bythe terms of this license. You must not remove this notice, or any other, from this software.
Something went wrong with that request. Please try again.