Permalink
Browse files

progn instead of do in evaled forms as do later becomes a cl macro

  • Loading branch information...
1 parent 8670f2c commit b37ce14e6a4ba77e089ef6ac07dda257064de748 @hraberg committed Sep 15, 2012
Showing with 4 additions and 3 deletions.
  1. +0 −1 src/deuce/emacs/eval.clj
  2. +4 −2 src/deuce/emacs_lisp.clj
View
@@ -142,7 +142,6 @@
If FUNCTION is already defined other than as an autoload,
this does nothing and returns nil."
(let [loader (fn [& args]
- (println "AUTOLOAD" function "FROM" file)
(ns-unmap 'deuce.emacs (el/sym function))
((ns-resolve 'deuce.emacs 'load) file nil true)
(eval `(~(el/sym function) ~@args)))]
View
@@ -170,6 +170,8 @@
(nested-first-symbol form)
form))
+(declare progn)
+
(c/defmacro def-helper* [what line name arglist & body]
(c/let [[docstring body] (split-with string? body)
name (sym (if (seq? name) (c/eval name) name))
@@ -195,10 +197,10 @@
`(c/let ~(if rest-arg `[~rest-arg (LinkedList. ~rest-arg)] [])
(if (= '~'defmacro '~(sym what))
(c/let [expansion# (let-helper* false ~(map #(list % %) the-args)
- (eval '(do ~@body)))]
+ (eval '(progn ~@body)))]
(w/prewalk linked-lists-to-seqs expansion#))
(let-helper* false ~(map #(list % %) the-args)
- (eval '(do ~@body)))))
+ (eval '(progn ~@body)))))
`(do ~@body))]
(binding [*ns* (the-ns 'clojure.core)]

0 comments on commit b37ce14

Please sign in to comment.