Re: Getting the source file pathname

Luís Oliveira <[email protected]> Sat, 9 Dec 2017 20:05:09 +0000
Newsgroups gmane.lisp.slime.devel
Message-ID <CAB-HnLRod-RK1Et2hsNO8tEfFHBxTMnSGj4vw7rGZbGeBtw6tQ@mail.gmail.com>
On Sat, Dec 9, 2017 at 7:04 PM, Chaitanya Gupta <[email protected]> wrote:
> However it fails when I use slime-compile-defun, slime-eval-defun or
> slime-eval-last-expression. Shouldn't slime bind
> *compile-file-pathname*, *load-pathname*, etc. when these functions
> are run?

Regarding slime-compile-defun, maybe. However, it's not
straightforward because we call COMPILE-FILE and LOAD and it's those
two functions take care of binding these special variables.

For the eval functions, maybe not. They're more akin to calling EVAL
on the expression (or typing it out at the REPL). (Try for instance
slime-eval-last-expression with this expression: (eval-when
(:load-toplevel) (print 'hello)).)

Cheers,

-- 
Luís Oliveira
http://kerno.org/~luis/