From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#910: leim-list.el is looked up in too many places at startup Date: Tue, 09 Sep 2008 19:19:05 -0700 Message-ID: <200809100219.m8A2J5Cl011266@sallyv1.ics.uci.edu> References: <200809071125.m87BPSMV028737@sallyv1.ics.uci.edu> Reply-To: Dan Nicolaescu , 910@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221014888 21105 80.91.229.12 (10 Sep 2008 02:48:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Sep 2008 02:48:08 +0000 (UTC) Cc: 910@emacsbugs.donarmstrong.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 10 04:49:03 2008 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 1KdFl4-00023y-Qs for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Sep 2008 04:48:43 +0200 Original-Received: from localhost ([127.0.0.1]:46325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdFk4-00015e-Iv for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Sep 2008 22:47:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KdFk0-00013t-7y for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 22:47:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KdFjz-00013b-Pk for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 22:47:35 -0400 Original-Received: from [199.232.76.173] (port=43383 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdFjz-00013X-HI for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 22:47:35 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39447) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KdFjy-0004Np-VI for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 22:47:35 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8A2lWJ5013371; Tue, 9 Sep 2008 19:47:33 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8A2U4du006949; Tue, 9 Sep 2008 19:30:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Dan Nicolaescu Original-Sender: dann@ics.uci.edu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 10 Sep 2008 02:30:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 910 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 910-submit@emacsbugs.donarmstrong.com id=B910.12210133264825 (code B ref 910); Wed, 10 Sep 2008 02:30:04 +0000 Original-Received: (at 910) by emacsbugs.donarmstrong.com; 10 Sep 2008 02:22:06 +0000 Original-Received: from sallyv1.ics.uci.edu (sallyv1.ics.uci.edu [128.195.1.109]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8A2M3sH004712 for <910@emacsbugs.donarmstrong.com>; Tue, 9 Sep 2008 19:22:04 -0700 X-ICS-MailScanner-Watermark: 1221617948.66331@7pYlSMhVfd8wl4mTrngoWQ Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m8A2J5Cl011266; Tue, 9 Sep 2008 19:19:05 -0700 (PDT) In-Reply-To: (Glenn Morris's message of "Tue, 09 Sep 2008 22:04:05 -0400") Original-Lines: 60 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Tue, 09 Sep 2008 22:47:35 -0400 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:20421 Archived-At: Glenn Morris writes: > Dan Nicolaescu wrote: > > > strace emacs -Q > > > > shows that leim-list.el is looked up in 32 locations at startup. We > > only have it in a single place. Is this a leftover from the time > > when leim was distributed separately from emacs? > > > > It would be good if this redundant work would be avoided. > > > It does seem superfluous. This works for me: Thanks! > *** startup.el 23 Aug 2008 16:59:19 -0000 1.503 > --- startup.el 10 Sep 2008 02:03:52 -0000 > *************** > *** 478,496 **** > ;; Look in each dir in load-path for a subdirs.el file. > ;; If we find one, load it, which will add the appropriate subdirs > ;; of that dir into load-path, > - ;; Look for a leim-list.el file too. Loading it will register > - ;; available input methods. > (let ((tail load-path) dir) > (while tail > (setq dir (car tail)) > (let ((default-directory dir)) > (load (expand-file-name "subdirs.el") t t t)) > - (let ((default-directory dir)) > - (load (expand-file-name "leim-list.el") t t t)) > ;; We don't use a dolist loop and we put this "setq-cdr" command at > ;; the end, because the subdirs.el files may add elements to the end > ;; of load-path and we want to take it into account. > (setq tail (cdr tail)))) > ;; If the PWD environment variable isn't accurate, delete it. > (let ((pwd (getenv "PWD"))) > (and (stringp pwd) > --- 478,501 ---- > ;; Look in each dir in load-path for a subdirs.el file. > ;; If we find one, load it, which will add the appropriate subdirs > ;; of that dir into load-path, > (let ((tail load-path) dir) > (while tail > (setq dir (car tail)) > (let ((default-directory dir)) > (load (expand-file-name "subdirs.el") t t t)) > ;; We don't use a dolist loop and we put this "setq-cdr" command at > ;; the end, because the subdirs.el files may add elements to the end > ;; of load-path and we want to take it into account. > (setq tail (cdr tail)))) > + ;; Look for a leim-list.el file. Loading it will register > + ;; available input methods. > + (let ((leim (expand-file-name "../leim/leim-list.el" data-directory))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This won't work when building in a separate directory: leim-list.el is generated in the build tree, not the source tree (unlike what happens for .elc files...)