[slime-devel] Re: *read-default-float-format* with C-c C-k, , load-system, etc.

Dirk Gerrits dirk at dirkgerrits.com
Tue Dec 21 21:32:22 UTC 2004


Dirk Gerrits <dirk at dirkgerrits.com> writes:

> Hi,
>
> I'm not 100% sure this is a SLIME question, an ASDF question, or a
> Common Lisp question, but I'll ask it here anyway.
>
> In my program I'd like to have *read-default-float-format* be long-float
> instead of the default single-float.  To accomplish this, I added 
>   (eval-when (:compile-toplevel :load-toplevel :execute)
>     (setq *read-default-float-format* 'long-float))
> to package.lisp, which should be the first file to be compiled/loaded by
> ASDF.  
>
> Now if I do a ,load-system in the SLIME REPL, everything is fine:
> *read-default-float-format* evaluates to long-float during compilation
> and also does in the REPL.  However, if I open one of my files, and add
> (defun foo () 50.0), do a C-M-x to compile it, and then call (foo) in
> the REPL, I get 50.0f0 instead of 50.0d0.  C-c C-k doesn't help either,
> and C-x C-e on the 50.0 also produces a single-float.  If I then save
> the file and do another ,load-system, then (foo) in the REPL /will/
> return 50.0d0, as expected.
>
> How can I get C-M-x, C-c C-k and C-x C-e to use long-floats too?  Am I
> doing something wrong that causes them to behave differently from
> ,load-system?  I'm using SLIME and Emacs from CVS, and have set
> inferior-lisp-program and slime-multiprocessing to "sbcl" and t,
> respectively.
>
> Kind regards,
>
> Dirk Gerrits

Anyone?  This is really annoying, as it makes C-M-x, C-c C-k and C-x C-e
completely unusable for this project.  (Well unless there just happens
to be no floating point literal in the evaluated code.)

Thanks in advance,

Dirk Gerrits




More information about the slime-devel mailing list