From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How does one find out what file a library has been loaded from? Date: Sun, 24 Jul 2022 19:07:26 +0300 Message-ID: <83ilnmfq9t.fsf@gnu.org> References: <83bktlnuog.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7601"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 24 18:09:47 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFeAs-0001pS-EZ for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Jul 2022 18:09:46 +0200 Original-Received: from localhost ([::1]:34330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFeAq-0000Mr-Tp for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Jul 2022 12:09:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFe8f-00079k-5v for emacs-devel@gnu.org; Sun, 24 Jul 2022 12:07:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFe8e-0006Jf-AC; Sun, 24 Jul 2022 12:07:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=zdDSjDeatXH7j4PH9t7MGJEkDNrENX+PJGafSx5x24c=; b=Hgb48rs7TOw6 28Raj8udYZ/WTIuEXUJGE/wRx9fY5mVc/ViYXUYtOMMW6PsNKEkoN/Vc030eNmnZ9dpPGqkbGHELx ezijo7Ahc0GFu9ufNXEiYbiOOK+fNhvN/NbFRRmWKDNq1F4IFCMnVK1kYoqoEBxhaxXmTRHYVrEXS VCgPZ9rTGzPBHDhWCW76iHx/SIe/20hDF/Mx/Y5AQVoJPIikP3zrOsxttWP07iq6934M0kbZCKc2/ QxaN3b9UmGrgLaWMNFpyxo0bPga3CZfb9FKslirbc2XwYst3v6ZMB5EJKt7lBK3X9ArjFkE7E2n6V wehGA1IvxBXSQeJcvDP7PQ==; Original-Received: from [87.69.77.57] (port=1262 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFe8c-00060O-T1; Sun, 24 Jul 2022 12:07:28 -0400 In-Reply-To: (message from Andrea Corallo on Tue, 19 Jul 2022 15:32:40 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:292599 Archived-At: > From: Andrea Corallo > Cc: Eli Zaretskii , emacs-devel@gnu.org > Date: Tue, 19 Jul 2022 15:32:40 +0000 > > If you have a native compiled function (say `find-file') to get the eln > file containing it one can use. > > (native-comp-unit-file (subr-native-comp-unit (symbol-function #'find-file))) Andrea, does anything similar to subr-native-comp-unit exists for other types of symbols accepted by symbol-file: defvar and defface? If not, then the only way to produce the same information for them would be to generate the base name of the .eln file with comp-el-to-eln-rel-filename, and then look for that file along native-comp-eln-load-path, right?