GNU bug report logs - #910
leim-list.el is looked up in too many places at startup

Previous Next

Package: emacs;

Reported by: Dan Nicolaescu <dann <at> ics.uci.edu>

Date: Sun, 7 Sep 2008 11:35:04 UTC

Severity: wishlist

Tags: notabug

Merged with 4789, 4881

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 910 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 910 <at> debbugs.gnu.org
Cc: Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#910: leim-list.el is looked up in too many places at startup
Date: Wed, 10 Sep 2008 02:50:46 -0400
The original was also binding default-directory for some reason, so
here is a revised patch in case that matters.

Without having thought about it much, if leim-list is always loaded,
why isn't it dumped?

*** startup.el	23 Aug 2008 16:59:19 -0000	1.503
--- startup.el	10 Sep 2008 06:49:37 -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,505 ----
      ;; 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))))
+     ;; Load leim-list.el to register available input methods.
+     ;; Bug#910.  We used to look for it in each directory in load-path.
+     ;; This is no longer necessary since leim is distributed with Emacs.
+     ;; doc-directory is used rather than data-directory for
+     ;; non-source-directory builds running uninstalled.
+     (let* ((leim (expand-file-name "../leim/leim-list.el" doc-directory))
+ 	   (default-directory (file-name-directory leim)))
+       (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)




This bug report was last modified 11 years and 177 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.