Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit 055b69c

Browse files
author
Stuart Sierra
committed
Revert "Remove modules that were deprecated in 1.2"
This reverts commit 4e5d98a. Too many build dependencies were broken by this change; deprecated modules should be removed one-at-a-time.
1 parent 4e5d98a commit 055b69c

File tree

16 files changed

+975
-0
lines changed

16 files changed

+975
-0
lines changed

modules/apply-macro/pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http//www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
5+
http://maven.apache.org/maven-v4_0_0.xsd">
6+
<modelVersion>4.0.0</modelVersion>
7+
<parent>
8+
<groupId>org.clojure.contrib</groupId>
9+
<artifactId>parent</artifactId>
10+
<version>1.3.0-SNAPSHOT</version>
11+
<relativePath>../parent</relativePath>
12+
</parent>
13+
<artifactId>apply-macro</artifactId>
14+
<dependencies>
15+
</dependencies>
16+
</project>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
;;; apply_macro.clj: make macros behave like functions
2+
3+
;; by Stuart Sierra, http://stuartsierra.com/
4+
;; January 28, 2009
5+
6+
;; Copyright (c) Stuart Sierra, 2009. All rights reserved. The use
7+
;; and distribution terms for this software are covered by the Eclipse
8+
;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
9+
;; which can be found in the file epl-v10.html at the root of this
10+
;; distribution. By using this software in any fashion, you are
11+
;; agreeing to be bound by the terms of this license. You must not
12+
;; remove this notice, or any other, from this software.
13+
14+
15+
;; Don't use this. I mean it. It's evil. How evil? You can't
16+
;; handle it, that's how evil it is. That's right. I did it so you
17+
;; don't have to, ok? Look but don't touch. Use this lib and you'll
18+
;; go blind.
19+
20+
;; DEPRECATED in 1.2 with no replacement.
21+
22+
(ns ^{:deprecated "1.2"}
23+
clojure.contrib.apply-macro)
24+
25+
;; Copied from clojure.core/spread, which is private.
26+
(defn- spread
27+
"Flatten final argument list as in apply."
28+
[arglist]
29+
(cond
30+
(nil? arglist) nil
31+
(nil? (rest arglist)) (seq (first arglist))
32+
:else (cons (first arglist) (spread (rest arglist)))))
33+
34+
(defmacro apply-macro
35+
"This is evil. Don't ever use it. It makes a macro behave like a
36+
function. Seriously, how messed up is that?
37+
38+
Evaluates all args, then uses them as arguments to the macro as with
39+
apply.
40+
41+
(def things [true true false])
42+
(apply-macro and things)
43+
;; Expands to: (and true true false)"
44+
[macro & args]
45+
(cons macro (spread (map eval args))))

modules/http-agent/pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http//www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
5+
http://maven.apache.org/maven-v4_0_0.xsd">
6+
<modelVersion>4.0.0</modelVersion>
7+
<parent>
8+
<groupId>org.clojure.contrib</groupId>
9+
<artifactId>parent</artifactId>
10+
<version>1.3.0-SNAPSHOT</version>
11+
<relativePath>../parent</relativePath>
12+
</parent>
13+
<artifactId>http-agent</artifactId>
14+
<dependencies>
15+
<dependency>
16+
<groupId>org.clojure.contrib</groupId>
17+
<artifactId>http-connection</artifactId>
18+
<version>1.3.0-SNAPSHOT</version>
19+
</dependency>
20+
<dependency>
21+
<groupId>org.clojure.contrib</groupId>
22+
<artifactId>io</artifactId>
23+
<version>1.3.0-SNAPSHOT</version>
24+
</dependency>
25+
</dependencies>
26+
</project>

0 commit comments

Comments
 (0)