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: user-controlled load-path extension: load-dir Date: Thu, 17 Mar 2011 22:21:33 -0400 Message-ID: References: <87lj0eyq1x.fsf@lifelogs.com> <87lj0dtqaj.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1300414906 11512 80.91.229.12 (18 Mar 2011 02:21:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2011 02:21:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 18 03:21:42 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0PJt-0000ON-Hw for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2011 03:21:41 +0100 Original-Received: from localhost ([127.0.0.1]:60941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0PJs-0006Yu-T5 for ged-emacs-devel@m.gmane.org; Thu, 17 Mar 2011 22:21:40 -0400 Original-Received: from [140.186.70.92] (port=59157 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0PJo-0006Um-Dw for emacs-devel@gnu.org; Thu, 17 Mar 2011 22:21:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0PJn-00059b-4S for emacs-devel@gnu.org; Thu, 17 Mar 2011 22:21:36 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:39392 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0PJn-00059V-1p for emacs-devel@gnu.org; Thu, 17 Mar 2011 22:21:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAONegk1MCqJN/2dsb2JhbAClWniITblrhWMElWA X-IronPort-AV: E=Sophos;i="4.63,203,1299474000"; d="scan'208";a="97041619" Original-Received: from 76-10-162-77.dsl.teksavvy.com (HELO ceviche.home) ([76.10.162.77]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 17 Mar 2011 22:21:33 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 9D0ED660B1; Thu, 17 Mar 2011 22:21:33 -0400 (EDT) In-Reply-To: <87lj0dtqaj.fsf@lifelogs.com> (Ted Zlatanov's message of "Thu, 17 Mar 2011 16:01:24 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:137384 Archived-At: > OK. I've attached the library (now called load-dir.el, which I think is > much better than user-load-*, especially since the function names are The mapcar call should be replaced by mapc or dolist. As mentioned, you may want to add an autoload cookie on the `loadirs' function. Also you'll want to replace `ignore-errors' with `with-demoted-errors'. More importantly, if it's an ELPA package, it can hook itself via autoload cookies so the user doesn't even need to call load-dirs and can just set load-dirs instead. E.g. ;;;###autoload (add-hook 'after-init-hook 'load-dirs) Stefan