I see Emacs use #$
in autoload files, but I don't known if there are any difference between #$
and load-file-name
. When I use them in a file, they looks like the same and when I print them by M-:
they are both nil
. So I did some test but only get more confused. Does #$
behave more like __FILE__
in Python?
Asked
Active
Viewed 217 times
4

Scott Weldon
- 2,695
- 1
- 18
- 31

littleqz
- 117
- 3
1 Answers
6
Ask Emacs.
M-x elisp-index-search RET #$ RET
Internally, the dynamic loading of documentation strings is accomplished by writing compiled files with a special Lisp reader construct, ‘#@COUNT’. This construct skips the next COUNT characters. It also uses the ‘#$’ construct, which stands for “the name of this file, as a string”. Do not use these constructs in Lisp source files; they are not designed to be clear to humans reading the file.

phils
- 50,977
- 3
- 79
- 122
C-s
, entering the term and hittingC-s
repeatedly. – wasamasa May 01 '16 at 12:40