(Minor Mode Conventions): Use custom-set-minor-mode.
[bpt/emacs.git] / lispref / internals.texi
index 61b643b..8c367f6 100644 (file)
@@ -1,7 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1998, 1999, 2005
-@c   Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1998, 1999, 2002, 2003, 2004,
+@c   2005 Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/internals
 @node GNU Emacs Internals, Standard Errors, Tips, Top
@@ -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}:
+
+@defmac 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 defmac
+
 @defun dump-emacs to-file from-file
 @cindex unexec
 This function dumps the current state of Emacs into an executable file
@@ -369,15 +381,14 @@ until the subsequent garbage collection, at which time
 @end defopt
 
 @defopt gc-cons-percentage
-The value of this variable is the minimum portion of the heap that
-should be allocated before a garbage collection takes place.  It is
-used only if the specified size is larger than
-@code{gc-cons-threshold}.
+The value of this variable specifies the amount of consing before a
+garbage collection occurs, as a fraction of the current heap size.
+This criterion and @code{gc-cons-threshold} apply in parallel, and
+garbage collection occurs only when both criteria are satisfied.
 
 As the heap size increases, the time to perform a garbage collection
-increases, so in order to compensate, this variable tries to
-correspondingly reduce the frequency of collection by letting Emacs
-allocate more memory between each collection.
+increases.  Thus, it can be desirable to do them less frequently in
+proportion.
 @end defopt
 
   The value returned by @code{garbage-collect} describes the amount of
@@ -395,6 +406,11 @@ You can use this to get a general idea of how your actions affect the
 memory usage.
 @end defun
 
+@defvar memory-full
+This variable is @code{t} if Emacs is close to out of memory for Lisp
+objects, and @code{nil} otherwise.
+@end defvar
+
 @defun memory-use-counts
 This returns a list of numbers that count the number of objects
 created in this Emacs session.  Each of these counters increments for