emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: relative load-file


From: Stefan Monnier
Subject: Re: relative load-file
Date: Fri, 13 Nov 2009 09:26:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

> In fact I'd be curious to learn the differences between it
> and *load-file-name.*

The difference is the time at which the expansion takes place (either
read-time or eval-time).
E.g. try

    (defun foo () (interactive) (message "%s" #$))
and
    (defun foo () (interactive) (message "%s" load-file-name))

if you load a file containing one of the above lines and then you do
M-x foo RET you should see that the first returns the file name
(i.e. the value of load-file-name at the time the file was read) whereas
the other returns nil (the value of load-file-name at the time you
called `foo').


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]