[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How does one find out what file a library has been loaded from?
From: |
Eli Zaretskii |
Subject: |
Re: How does one find out what file a library has been loaded from? |
Date: |
Sun, 24 Jul 2022 18:37:10 +0300 |
> Date: Sun, 24 Jul 2022 15:16:46 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
>
> In general, you can use load-history or symbol-file to know which file
> was loaded. If load-history says it was a .elc file, and the build
> supports native compilation, you need to see if the function was
> natively-compiled, using
>
> (subr-native-elisp-p (symbol-function FUNC))
>
> where FUNC is a function's symbol. If the above returns non-nil, then
> comp-el-to-eln-rel-filename will produce the base name of the .eln
> file corresponding to a .el file.
>
> The above are the building blocks; what's left is to use them in a
> particular case.
Btw, we could extend symbol-file to support a new kind of TYPE arg,
to ask about a natively-compiled symbol, and then we could return the
.eln file instead of the .elc file, when appropriate.
- Re: How does one find out what file a library has been loaded from?, (continued)
- Re: How does one find out what file a library has been loaded from?, Stefan Monnier, 2022/07/21
- Re: How does one find out what file a library has been loaded from?, Alan Mackenzie, 2022/07/21
- Re: How does one find out what file a library has been loaded from?, Stefan Monnier, 2022/07/21
- Re: How does one find out what file a library has been loaded from?, Alan Mackenzie, 2022/07/21
- Re: How does one find out what file a library has been loaded from?, Stefan Monnier, 2022/07/21
- Re: How does one find out what file a library has been loaded from?, Eli Zaretskii, 2022/07/21
- Re: How does one find out what file a library has been loaded from?, Alan Mackenzie, 2022/07/21
- Re: How does one find out what file a library has been loaded from?, Eli Zaretskii, 2022/07/23
- Re: How does one find out what file a library has been loaded from?, Alan Mackenzie, 2022/07/24
- Re: How does one find out what file a library has been loaded from?, Eli Zaretskii, 2022/07/24
- Re: How does one find out what file a library has been loaded from?,
Eli Zaretskii <=
- Re: How does one find out what file a library has been loaded from?, Eli Zaretskii, 2022/07/24
- Re: How does one find out what file a library has been loaded from?, Stefan Monnier, 2022/07/24
- Re: How does one find out what file a library has been loaded from?, T.V Raman, 2022/07/24
- Re: How does one find out what file a library has been loaded from?, Stefan Monnier, 2022/07/24
- Re: How does one find out what file a library has been loaded from?, T.V Raman, 2022/07/24
- Re: How does one find out what file a library has been loaded from?, Stefan Monnier, 2022/07/24
- Re: How does one find out what file a library has been loaded from?, Eli Zaretskii, 2022/07/24
- Re: How does one find out what file a library has been loaded from?, Stefan Monnier, 2022/07/19
- Re: How does one find out what file a library has been loaded from?, Andrea Corallo, 2022/07/20
- Re: How does one find out what file a library has been loaded from?, Eli Zaretskii, 2022/07/21