[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lispref/internals.texi,v
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/lispref/internals.texi,v |
Date: |
Sat, 16 Dec 2006 19:16:06 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 06/12/16 19:16:05
Index: internals.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/lispref/internals.texi,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- internals.texi 18 Jul 2006 00:01:46 -0000 1.52
+++ internals.texi 16 Dec 2006 19:16:05 -0000 1.53
@@ -44,6 +44,7 @@
environment, resulting in an Emacs that is still impure but no longer
bare.
address@hidden dumping Emacs
It takes a substantial time to load the standard Lisp files. Luckily,
you don't have to do this each time you run Emacs; @file{temacs} can
dump out an executable program called @file{emacs} that has these files
@@ -86,6 +87,7 @@
Snarf-documentation,, Accessing Documentation}).
@cindex @file{site-init.el}
address@hidden preloading additional functions and variables
You can specify other Lisp expressions to execute just before dumping
by putting them in a library named @file{site-init.el}. This file is
executed after the documentation strings are found.
@@ -491,6 +493,7 @@
@node Writing Emacs Primitives
@appendixsec Writing Emacs Primitives
@cindex primitive function internals
address@hidden writing Emacs primitives
Lisp primitives are Lisp functions implemented in C. The details of
interfacing the C function so that Lisp can call it are handled by a few
@@ -539,6 +542,7 @@
@end group
@end smallexample
address@hidden @code{DEFUN}, C macro to define Lisp primitives
Let's start with a precise explanation of the arguments to the
@code{DEFUN} macro. Here is a template for them:
@@ -619,6 +623,8 @@
arguments, and the second is the address of a block containing their
values. They have types @code{int} and @address@hidden *}}.
address@hidden @code{GCPRO} and @code{UNGCPRO}
address@hidden protect C variables from garbage collection
Within the function @code{For} itself, note the use of the macros
@code{GCPRO1} and @code{UNGCPRO}. @code{GCPRO1} is used to
``protect'' a variable from garbage collection---to inform the garbage
@@ -672,6 +678,7 @@
declared static in a place that becomes read-only after dumping, whether
they have initializers or not.)
address@hidden @code{defsubr}, Lisp symbol for a primitive
Defining the C function is not enough to make a Lisp primitive
available; you must also create the Lisp symbol for the primitive and
store a suitable subr object in its function cell. The code looks like
@@ -696,6 +703,8 @@
@anchor{Defining Lisp variables in C}
@vindex byte-boolean-vars
address@hidden defining Lisp variables in C
address@hidden @code{DEFVAR_INT}, @code{DEFVAR_LISP}, @code{DEFVAR_BOOL}
The function @address@hidden is also the place to define
any C variables that are to be visible as Lisp variables.
@code{DEFVAR_LISP} makes a C variable of type @code{Lisp_Object} visible
@@ -706,6 +715,7 @@
defined with @code{DEFVAR_BOOL} are automatically added to the list
@code{byte-boolean-vars} used by the byte compiler.
address@hidden @code{staticpro}, protect file-scope variables from GC
If you define a file-scope C variable of type @code{Lisp_Object},
you must protect it from garbage-collection by calling @code{staticpro}
in @address@hidden, like this:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lispref/internals.texi,v,
Eli Zaretskii <=