Lau B. Jensen <lau.jensen <at> bestinclass.dk>
2008-06-01 17:13:36 GMT
Hey,
Very nice of you to write back Mike. I'm sorry though, because I dont
think I made myself clear. (+ 2 2) was just an example, it does not
matter WHAT I write in REPL, whenever I hit space, it fires an error.
Im not sure how I got in this situation, but I'm thinking its somehow
related to the fact that normally I use emacs with SBCL instead of
Clojure.
The command (clojure/refer 'clojure) returned "nil" and did not fix the
issue. This is how I started clojure:
(defun clojure-boot ()
(interactive)
(require 'slime)
(setq slime-net-coding-system 'utf-8-unix)
(slime-setup)
(define-key slime-mode-map [f5] 'switch-to-buffer)
(define-key slime-repl-mode-map [f5] 'switch-to-buffer)
(define-key slime-mode-map [f8] 'slime-eval-buffer)
(define-key slime-mode-map [f9] 'slime-eval-defun)
(define-key slime-repl-mode-map [f9]
'slime-eval-last-expression-display-output)
(define-key slime-mode-map [C-return] 'slime-close-all-sexp)
(add-to-list 'load-path
"/home/jacksmack/programming/lisp/clojure/emacs/clojure-mode")
(require 'clojure-mode)
(setq auto-mode-alist (cons '("\\.clj" . clojure-mode)
auto-mode-alist))
(setq slime-lisp-implementations '((clojure
("~/programming/lisp/clojure/start.sh") :init clojure-init)))
(add-to-list 'load-path "~/programming/lisp/swank-clojure")
(require 'swank-clojure)
(setq inferior-lisp-program "~/programming/lisp/clojure/start.sh")
(setq slime-net-coding-system 'utf-8-unix)
(require 'slime-autoloads)
(require 'slime)
(cua-mode t)
(slime))
Any pointers would be great, because the REPL is almost useless as is.
/Lau
Michael Reid wrote:
Hi,
that whenever I press space, as in (+<SPACE>2<SPACE>2), Emacs will pop-
up an error saying
"Unable to resolve symbol: user in this context"
[Thrown class.java.lang.Exception].
Not sure how you ended up in this situation but it sounds like the
'user' namespace has not been referred to the clojure namespace (where
+ is defined). Normally when starting clojure.lang.Repl this is done
automatically upon entering the REPL, so I'm not sure how you are
launching this.
But entering the following form at the REPL should bring it into scope:
(clojure/refer 'clojure)
Cheers,
/mike.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Clojure" group.
To post to this group, send email to clojure <at> googlegroups.com
To unsubscribe from this group, send email to clojure-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---