[slime-devel] broken clojure REPL
Stefan Kamphausen
skampi at gmx.net
Tue Nov 17 20:33:12 UTC 2009
Hi Tobias,
-------- Original-Nachricht --------
> Datum: Tue, 17 Nov 2009 21:04:21 +0100
> Von: "Tobias C. Rittweiler" <tcr at freebits.de>
> An: slime-devel at common-lisp.net
> Betreff: Re: [slime-devel] broken clojure REPL
> "Stefan Kamphausen" <skampi at gmx.net> writes:
[...]
> > While I understand that it would be nice to have a real symbol
> > denoting the current cursor position, it feels rather hackish to me
> > (and it /kills/ the swank-threads in Clojure). Would you mind replacing
> > it with a not-so-special string? As far as I can tell, the code
> > wouldn't need to change too much (cases of eq would probably become
> > string= or something like that in a few places, but I may be wrong).
>
> Using true symbols feels hackish to you but using strings which may
> legitimately appear as buffer forms does not? Uhm. :-)
Of course your are right. Having something definitive like a symbol is way better than a not-so-special string like "*HERE*" or something. The thing that feels strange to me is to create a symbol in elisp which uses the naming rules from common-lisp. Maybe another symbol name would be possible, hard for me to say, especially when dealing with packages/namespaces. A string is just a quick and easy solution, without being as robust as a symbol.
> Clojure seems to conflate how symbols are named, and how they're read
> in. Is there no way to escape symbol names?
>
>
> > What remains then is an error message from eldoc, e.g.
> >
> > eldoc error: (wrong-type-argument listp [string file line))
> >
> > I still have to find the piece of code that throws this, but it seems
> > to be related to braces and brackets, some code seems to rely on
> > parens being the only kind of parenthesis.
>
> Backtrace?
I can't get one, debug-on-error doesn't give it and the function debug-on-signal, which I seem to remember from Emacs 22.x seems to have gone in my 23.1 version. Uch, another focus.
You have to make sure that ?\[ has a syntax-type "(", and ?\]
> a syntax-type ")" by using `modify-syntax-entry'.
Clojure-mode looks save here:
(defvar clojure-mode-syntax-table
(let ((table (copy-syntax-table emacs-lisp-mode-syntax-table)))
(modify-syntax-entry ?~ "' " table)
(modify-syntax-entry ?, " " table)
(modify-syntax-entry ?\{ "(}" table)
(modify-syntax-entry ?\} "){" table)
(modify-syntax-entry ?\[ "(]" table)
(modify-syntax-entry ?\] ")[" table)
(modify-syntax-entry ?^ "'" table)
table))
Thank your for taking your time to help with this, although it's not your backend that's in trouble.
Best,
Stefan
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
More information about the slime-devel
mailing list