all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Richard M. Stallman" <rms@gnu.org>
Cc: eliz@gnu.org, emacs-devel@gnu.org
Subject: Re: emacs trying to load too many files at startup
Date: Sun, 20 Nov 2005 18:23:15 -0500	[thread overview]
Message-ID: <E1EdyWh-0001tc-8F@fencepost.gnu.org> (raw)
In-Reply-To: <200511192017.jAJKHbTp000578@scanner2.ics.uci.edu> (message from Dan Nicolaescu on Sat, 19 Nov 2005 12:17:35 -0800)

The reason I designed this code this way

   ;; Convert preloaded file names to absolute.
   (setq load-history
 	(mapcar (lambda (elt)
 		  (if (and (stringp (car elt))
 			   (not (file-name-absolute-p (car elt))))
 		      (cons (locate-file (car elt) load-path
 					 load-suffixes)
 			    (cdr elt))
 		    elt))
 		load-history))

rather than recording the absolute file names right away is because
the files usually move between building and execution.  (For instance,
`make install' moves them.)  But there are surely faster ways to
do this job.  How about this?

*** startup.el	19 Nov 2005 18:34:55 -0500	1.389
--- startup.el	20 Nov 2005 13:24:18 -0500	
***************
*** 642,656 ****
    (set-locale-environment nil)
  
    ;; Convert preloaded file names to absolute.
!   (setq load-history
! 	(mapcar (lambda (elt)
! 		  (if (and (stringp (car elt))
! 			   (not (file-name-absolute-p (car elt))))
! 		      (cons (locate-file (car elt) load-path
! 					 load-suffixes)
! 			    (cdr elt))
! 		    elt))
! 		load-history))
  
    ;; Convert the arguments to Emacs internal representation.
    (let ((args (cdr command-line-args)))
--- 642,663 ----
    (set-locale-environment nil)
  
    ;; Convert preloaded file names to absolute.
!   (let ((lisp-dir
! 	 (file-name-directory
! 	  (locate-file "simple" load-path
! 		       load-suffixes))))
! 
!     (setq load-history
! 	  (mapcar (lambda (elt)
! 		    (if (and (stringp (car elt))
! 			     (not (file-name-absolute-p (car elt))))
! 			(cons (concat lisp-dir
! 				      (car elt)
! 				      (if (string-match "[.]el$" (car elt))
! 					  "" ".elc"))
! 			      (cdr elt))
! 		      elt))
! 		  load-history)))
  
    ;; Convert the arguments to Emacs internal representation.
    (let ((args (cdr command-line-args)))

  reply	other threads:[~2005-11-20 23:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-19 18:31 emacs trying to load too many files at startup Dan Nicolaescu
2005-11-19 19:09 ` Eli Zaretskii
2005-11-19 19:49   ` Dan Nicolaescu
2005-11-19 20:07     ` Eli Zaretskii
2005-11-19 20:17       ` Dan Nicolaescu
2005-11-20 23:23         ` Richard M. Stallman [this message]
2005-11-19 20:16 ` Luc Teirlinck
2005-11-19 20:19   ` Dan Nicolaescu
2005-11-20 17:12 ` Stefan Monnier
2005-11-21  8:09   ` Richard M. Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1EdyWh-0001tc-8F@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.