From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.bugs Subject: Re: eval-after-load weirdness Date: Wed, 23 May 2007 07:59:22 +0900 Message-ID: <87bqgccvn9.fsf@catnip.gol.com> References: <20070519035956.GA9040@baal.lan> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1179874780 3904 80.91.229.12 (22 May 2007 22:59:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 22 May 2007 22:59:40 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Trent Buck Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 23 00:59:37 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HqdKC-0000lG-Hg for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 May 2007 00:59:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HqdKD-00039R-Pr for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 May 2007 18:59:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HqdKC-00039B-6r for bug-gnu-emacs@gnu.org; Tue, 22 May 2007 18:59:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HqdKA-00038z-Ae for bug-gnu-emacs@gnu.org; Tue, 22 May 2007 18:59:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HqdKA-00038w-4R for bug-gnu-emacs@gnu.org; Tue, 22 May 2007 18:59:26 -0400 Original-Received: from smtp02.dentaku.gol.com ([203.216.5.72]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HqdK8-000311-RP; Tue, 22 May 2007 18:59:25 -0400 Original-Received: from 203-216-100-071.dsl.gol.ne.jp ([203.216.100.71] helo=catnip.gol.com) by smtp02.dentaku.gol.com with esmtpa (Dentaku) id 1HqdK6-0004Si-DP; Wed, 23 May 2007 07:59:22 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 5EB2F2FE2; Wed, 23 May 2007 07:59:22 +0900 (JST) System-Type: i686-pc-linux-gnu In-Reply-To: (Trent Buck's message of "Mon\, 21 May 2007 09\:27\:00 +1000") Original-Lines: 31 X-Abuse-Complaints: abuse@gol.com X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15734 Archived-At: Trent Buck writes: > because my modular .emacs setup has each configuration module named > after the library it configures (e.g. ~/.emacs-prefs/vc.el for the vc > library), eval-after-load thinks "vc" has already been loaded. ... > Some solutions suggested on #emacs: > - stuff everything back into a single .emacs; > - prefix filenames with digits (e.g. 20vc.el), like system V init > scripts; and > - instead of LOADing each config module, FIND-FILE it and then > EVAL-BUFFER it. You could also just remove the init files from `load-history' after the fact. E.g. (at the end of your .emacs): (let ((remove-regexp (concat "\\`" (regexp-quote (file-truename "~/.emacs-prefs/")))) (new-load-hist nil)) (dolist (entry load-history) (unless (string-match remove-regexp (car entry)) (push entry new-load-hist))) (setq load-history (nreverse new-load-hist))) -miles -- (\(\ (^.^) (")") *This is the cute bunny virus, please copy this into your sig so it can spread.