From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: How to get recursive load level? Date: Sun, 15 Sep 2013 01:27:37 -0400 Message-ID: References: <87wqmj14pi.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1379222867 21931 80.91.229.3 (15 Sep 2013 05:27:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Sep 2013 05:27:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 15 07:27:49 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VL4s8-0006sX-Ii for ged-emacs-devel@m.gmane.org; Sun, 15 Sep 2013 07:27:48 +0200 Original-Received: from localhost ([::1]:55455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VL4s7-0008VT-Jc for ged-emacs-devel@m.gmane.org; Sun, 15 Sep 2013 01:27:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VL4ry-0008VM-Jv for emacs-devel@gnu.org; Sun, 15 Sep 2013 01:27:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VL4rr-0006fK-AV for emacs-devel@gnu.org; Sun, 15 Sep 2013 01:27:38 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:28445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VL4rr-0006fG-5x for emacs-devel@gnu.org; Sun, 15 Sep 2013 01:27:31 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kLodwBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kLodwBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="27851166" Original-Received: from 184-175-16-104.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 15 Sep 2013 01:23:52 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id E2A9FAE29B; Sun, 15 Sep 2013 01:27:37 -0400 (EDT) In-Reply-To: <87wqmj14pi.fsf@web.de> (Michael Heerdegen's message of "Sat, 14 Sep 2013 23:19:37 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163354 Archived-At: > I have a working, but ugly solution: to `after-load-functions' I add a > function like > (lambda (file) > (push (cons load-file-name file) temp-load-hist)) [...] > tree. This is very fragile - can it be done better? Please also That sounds like a reasonable solution. There are other hacks possible, such as advising load, of course, or using backtrace-frame (see code around macroexp--trim-backtrace-frame). Stefan