Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!gateway!dsys.icst.nbs.GOV!rbj From: rbj@dsys.icst.nbs.GOV (Root Boy Jim) Newsgroups: comp.emacs Subject: runtime hook Message-ID: <8905171912.AA06544@dsys.icst.nbs.gov> Date: 17 May 89 19:12:00 GMT Sender: news@bbn.COM Organization: National Institute of Standards and Technology formerly National Bureau of Standards Lines: 27 ? 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. Doing the above will preload emacs for everyone. If you only want to do this for yourself, a better solution is to put the `(load "dired")' in your private .emacs file. In either case, you may add other forms besides (load ...) in either file, to set variables, remap keys, etc. Around here, we use site-init.el to remap ^Q & ^S to ^^ and ^\. Good luck! ? Benson I. Margulies odi!benson@talcott.harvard.edu Root Boy Jim is what I am Are you what you are or what?