On Wed, Jan 7, 2009 at 11:49 PM, Zak Wilson <zak.wil...@gmail.com> wrote:
>
>> First, compile the buffer with C-c
>> C-k. Then, evaluate new definitions in the same source file and they
>> will be evaluated in the correct namespace (regardless of what
>> namespace is active in the repl).
>
> That's what I expected, but it doesn't work; new definitions are
> evaluated in user. It shows user/foo when I evaluate (def foo 'bar).
> It shows #<Namespace user> when I evaluate *ns*.
>
> I would think this is a bug, but it seems to work for everyone else,
> so it's probably some sort of misconfiguration. Aside from the REPL
> fix, my configuration is straight out of the readme. I'm not sure what
> could be wrong.

Try adding the following code to your .emacs file and let me know if
this fixes the problem for you:

(setq slime-find-buffer-package-function 'slime-clojure-search-buffer-package)

(defun slime-clojure-search-buffer-package ()
  (let ((case-fold-search t)
        (regexp1 (concat "^(\\(clojure.core/\\)?in-ns\\>[ \t']*"
                        "\\([^)]+\\)[ \t]*)"))
        (regexp2 (concat "^(\\(clojure.core/\\)?ns\\>[ \t']*"
                        "\\([^)]+\\)[ \t]*)")))
    (save-excursion
      (when (or (re-search-backward regexp1 nil t)
                (re-search-forward regexp1 nil t)
                (re-search-backward regexp2 nil t)
                (re-search-forward regexp2 nil t))
        (match-string-no-properties 2)))))

--
Bill Clementson

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to