I'm setting up some site-wide default configuration in the site-lisp directory, and trying to figure out whether emacs is loading the byte-compiled default.elc
or default.el
. I haven't applied any other configuration, such as load-prefer-newer
.
With the following default.el
(defvar foo nil)
and having compiled it so both the .el and .elc files are present, if I run describe-symbol
on foo
I'm shown:
foo is a variable defined in 'default.el'
and the *Messages*
buffer shows the path to default.el
(as if it loaded it to look up the symbol, though I don't know if that's actually what it means).
If I remove the .el file leaving only the .elc file, then start emacs and again describe foo
it shows:
foo is a variable defined in 'default.elc'
and in the *Messages*
buffer I see the path to default.elc
.
I had expected it to load the byte-compiled .elc file when both were present, but can't tell if that's what's happening. How can I check?
load-file-name
indefault.el
, which will give you the name of the file that was actually loaded.