From 55f77e1ce3460637b96ff9f376120fe6735086e6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 22 Oct 2005 15:15:56 +0000 Subject: [PATCH] (Building Emacs): Document eval-at-startup. --- lispref/internals.texi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lispref/internals.texi b/lispref/internals.texi index e032f5a7ddf..2bc91a64e92 100644 --- a/lispref/internals.texi +++ b/lispref/internals.texi @@ -117,6 +117,18 @@ expect in an ordinary unmodified Emacs. If you feel you must override normal features for your site, do it with @file{default.el}, so that users can override your changes if they wish. @xref{Startup Summary}. + In a package that can be preloaded, it is sometimes useful to +specify a computation to be done when Emacs subsequently starts up. +For this, use @code{eval-at-startup}: + +@defmacro eval-at-startup body@dots{} +This evaluates the @var{body} forms, either immediately if running in +an Emacs that has already started up, or later when Emacs does start +up. Since the value of the @var{body} forms is not necessarily +available when the @code{eval-at-startup} form is run, that form +always returns @code{nil}. +@end defmacro + @defun dump-emacs to-file from-file @cindex unexec This function dumps the current state of Emacs into an executable file -- 2.39.2