Path: utzoo!attcan!uunet!husc6!bbn!gateway!odi.COM!benson From: benson@odi.COM ("Benson I. Margulies") Newsgroups: comp.emacs Subject: Re: runtime hook Message-ID: <8905181131.AA28122@indirect.odi.com> Date: 18 May 89 11:31:51 GMT References: <8905171912.AA06544@dsys.icst.nbs.gov> Sender: news@bbn.COM Organization: BBN news/mail gateway Lines: 24 ? From: odi!benson@uunet.uu.net (Benson Margulies) ? Is there a hook (18.53-wise) that can be set in site-init.el to cause a function ? to run when emacs is started up? Yes. It's called `load'. Let me explain. When you build emacs, you compile all the .c files and link them all together to build `temacs'. The Makefile then executes `temacs -l loadup.el dump'. Scanning the source of lisp/loadup.el reveals that it loads several packages, including site-init.el. When loading a file, all the lisp forms are executed as if they were typed (more or less). Say you wanted to preload dired.el into your dumped emacs. You can just put the form `(load "dired")' into site-init.el in the lisp directory. There is also a `site-load.el' that gets loaded in a different place; I am not quite sure what the real distinction is. There is also a convention on how the doc strings are loaded; see loadup or loaddefs for details. OK, this part I get. However, we want to keep everyone's emacs up to date without the need to rebuild the emacs each time some package changes. So I wanted a hook to run at individual emacs start-up time to load up any patches that are defined to hold the fort until the next build. --benson