From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#910: leim-list.el is looked up in too many places at startup Date: Tue, 09 Sep 2008 22:04:05 -0400 Message-ID: References: <200809071125.m87BPSMV028737@sallyv1.ics.uci.edu> Reply-To: Glenn Morris , 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 1221013670 18241 80.91.229.12 (10 Sep 2008 02:27:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Sep 2008 02:27:50 +0000 (UTC) Cc: 910@emacsbugs.donarmstrong.com To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 10 04:28:45 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 1KdFRi-000748-FZ for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Sep 2008 04:28:42 +0200 Original-Received: from localhost ([127.0.0.1]:56208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdFQi-0000XQ-6Y for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Sep 2008 22:27:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KdFQe-0000W6-Jx for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 22:27:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KdFQd-0000Vf-74 for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 22:27:35 -0400 Original-Received: from [199.232.76.173] (port=34325 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdFQc-0000VY-Vk for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 22:27:35 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:45976) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KdFQc-0002Gm-GE for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 22:27:34 -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 m8A2RWtc006558; Tue, 9 Sep 2008 19:27:32 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8A2F4Ji001818; Tue, 9 Sep 2008 19:15:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Glenn Morris Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 10 Sep 2008 02:15: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.122101235631945 (code B ref 910); Wed, 10 Sep 2008 02:15:04 +0000 Original-Received: (at 910) by emacsbugs.donarmstrong.com; 10 Sep 2008 02:05:56 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8A25qaT031939 for <910@emacsbugs.donarmstrong.com>; Tue, 9 Sep 2008 19:05:53 -0700 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KdF3t-0003W6-2e; Tue, 09 Sep 2008 22:04:05 -0400 X-Spook: kilderkin Bin Laden Axis of Evil SAFE Peking Geraldton X-Ran: :,R91qnFy%f/hZ#_|cNXf_rspUjrdt6%AcdOg"6Hn_b/"0YK{jL-Io%f6OxBa2f6mE;O`D X-Hue: red X-Attribution: GM In-Reply-To: <200809071125.m87BPSMV028737@sallyv1.ics.uci.edu> (Dan Nicolaescu's message of "Sun, 07 Sep 2008 04:25:28 -0700") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Tue, 09 Sep 2008 22:27: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:20419 Archived-At: 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: *** 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))) + (condition-case nil + (load leim nil t t) + (error + (display-warning 'initialization + (format "Unable to load LEIM file `%s'" leim) + :error)))) ;; If the PWD environment variable isn't accurate, delete it. (let ((pwd (getenv "PWD"))) (and (stringp pwd)