From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: How to Reduce Emacs Load Time Date: Sun, 31 Aug 2008 14:35:40 +0200 Message-ID: References: <18aba2b0-4fc7-4588-b69f-d9f46b264b03@q26g2000prq.googlegroups.com> <8763phh6bv.fsf@kanis.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1220186175 31291 80.91.229.12 (31 Aug 2008 12:36:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 31 Aug 2008 12:36:15 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Ivan Kanis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 31 14:37:09 2008 Return-path: Envelope-to: geh-help-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 1KZmB3-0008Sf-4v for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Aug 2008 14:37:09 +0200 Original-Received: from localhost ([127.0.0.1]:38048 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZmA4-0007zc-AX for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Aug 2008 08:36:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZm9f-0007zP-5x for help-gnu-emacs@gnu.org; Sun, 31 Aug 2008 08:35:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZm9e-0007ye-9A for help-gnu-emacs@gnu.org; Sun, 31 Aug 2008 08:35:42 -0400 Original-Received: from [199.232.76.173] (port=52013 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZm9e-0007yV-6Q for help-gnu-emacs@gnu.org; Sun, 31 Aug 2008 08:35:42 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:55077) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KZm9d-0006HI-PS for help-gnu-emacs@gnu.org; Sun, 31 Aug 2008 08:35:41 -0400 Original-Received: from arwen.uni-trier.de (kobz-590f11bc.pool.einsundeins.de [89.15.17.188]) by dd18200.kasserver.com (Postfix) with ESMTP id 647F9180291AF; Sun, 31 Aug 2008 14:35:44 +0200 (CEST) In-Reply-To: <8763phh6bv.fsf@kanis.fr> (Ivan Kanis's message of "Sun\, 31 Aug 2008 11\:39\:00 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57147 Archived-At: Ivan Kanis wrote: > I use late binding, I load the package when I start using it. For > example for ido mode: > > (defun ivan-ido-file () > "Find file, late bind ido." > (interactive) > (ivan-ido-late-bind) > (ido-find-file)) > > (defun ivan-ido-late-bind () > (unless ido-mode > (require 'uniquify) > (ido-mode 'both))) > > I then bind C-x C-f to ivan-ido-file, it will load ido the first time > I need it. This makes my emacs faster to start. Emacs already provides a mechanism for that. I think you can get rid of most of these custom commands simply with these lines: (eval-after-load "ido" '(progn (unless ido-mode (require 'uniquify) (ido-mode 'both)))) regards, Nikolaj Schumacher