Commit 4ebb358f authored by Kenichi Handa's avatar Kenichi Handa
Browse files

merge trunk

parents 4827f94e e50a24a2
...@@ -203,8 +203,7 @@ hash.texi cyd ...@@ -203,8 +203,7 @@ hash.texi cyd
help.texi cyd help.texi cyd
hooks.texi rgm hooks.texi rgm
index.texi index.texi
internals.texi rgm (I don't know much about this, so it would be internals.texi rgm cyd
good if someone else could at least look at the FIXME? comments.)
intro.texi cyd intro.texi cyd
keymaps.texi cyd keymaps.texi cyd
lists.texi cyd lists.texi cyd
...@@ -217,7 +216,7 @@ modes.texi cyd ...@@ -217,7 +216,7 @@ modes.texi cyd
nonascii.texi cyd nonascii.texi cyd
numbers.texi cyd numbers.texi cyd
objects.texi cyd objects.texi cyd
os.texi os.texi cyd
package.texi rgm package.texi rgm
positions.texi cyd positions.texi cyd
processes.texi processes.texi
......
2012-03-17 Chong Yidong <cyd@gnu.org>
* package.texi (Package Installation): Document use of
package-initialize in init file.
2012-03-16 Glenn Morris <rgm@gnu.org>
* help.texi (Language Help):
* mule.texi (International Chars):
etc/HELLO is for character demonstration.
2012-03-15 Dani Moncayo <dmoncayo@gmail.com> (tiny change)
* dired.texi (Shell Commands in Dired): Fix typo.
2012-03-04 Chong Yidong <cyd@gnu.org> 2012-03-04 Chong Yidong <cyd@gnu.org>
* killing.texi (Clipboard): Document clipboard manager. * killing.texi (Clipboard): Document clipboard manager.
......
...@@ -823,9 +823,9 @@ replaces each occurrence. ...@@ -823,9 +823,9 @@ replaces each occurrence.
@item @item
If the command string contains neither @samp{*} nor @samp{?}, Emacs If the command string contains neither @samp{*} nor @samp{?}, Emacs
runs the shell command once for each file, adding the file name is runs the shell command once for each file, adding the file name at the
added at the end. For example, @kbd{! uudecode @key{RET}} runs end. For example, @kbd{! uudecode @key{RET}} runs @code{uudecode} on
@code{uudecode} on each file. each file.
@end itemize @end itemize
To iterate over the file names in a more complicated fashion, use an To iterate over the file names in a more complicated fashion, use an
......
...@@ -464,7 +464,8 @@ listing the associated character sets, coding systems, and input ...@@ -464,7 +464,8 @@ listing the associated character sets, coding systems, and input
methods, as well as some sample text for that language environment. methods, as well as some sample text for that language environment.
The command @kbd{C-h h} (@code{view-hello-file}) displays the file The command @kbd{C-h h} (@code{view-hello-file}) displays the file
@file{etc/HELLO}, which shows how to say ``hello'' in many languages. @file{etc/HELLO}, which demonstrates various character sets by showing
how to say ``hello'' in many languages.
The command @kbd{C-h I} (@code{describe-input-method}) describes an The command @kbd{C-h I} (@code{describe-input-method}) describes an
input method---either a specified input method, or by default the input method---either a specified input method, or by default the
......
@c This is part of the Emacs manual. @c This is part of the Emacs manual.
@c Copyright (C) 1997, 1999-2012 Free Software Foundation, Inc. @c Copyright (C) 1997, 1999-2012 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions. @c See file emacs.texi for copying conditions.
@node International, Modes, Frames, Top @node International, Modes, Frames, Top
@chapter International Character Set Support @chapter International Character Set Support
...@@ -137,8 +137,8 @@ writing files, and when exchanging data with subprocesses. ...@@ -137,8 +137,8 @@ writing files, and when exchanging data with subprocesses.
@cindex undisplayable characters @cindex undisplayable characters
@cindex @samp{?} in display @cindex @samp{?} in display
The command @kbd{C-h h} (@code{view-hello-file}) displays the file The command @kbd{C-h h} (@code{view-hello-file}) displays the file
@file{etc/HELLO}, which shows how to say ``hello'' in many languages. @file{etc/HELLO}, which illustrates various scripts by showing
This illustrates various scripts. If some characters can't be how to say ``hello'' in many languages. If some characters can't be
displayed on your terminal, they appear as @samp{?} or as hollow boxes displayed on your terminal, they appear as @samp{?} or as hollow boxes
(@pxref{Undisplayable Characters}). (@pxref{Undisplayable Characters}).
......
...@@ -157,25 +157,38 @@ directory name of the package archive. You can alter this list if you ...@@ -157,25 +157,38 @@ directory name of the package archive. You can alter this list if you
wish to use third party package archives---but do so at your own risk, wish to use third party package archives---but do so at your own risk,
and use only third parties that you think you can trust! and use only third parties that you think you can trust!
Once a package is downloaded and installed, it takes effect in the Once a package is downloaded and installed, it is @dfn{loaded} into
current Emacs session. What ``taking effect'' means depends on the the current Emacs session. Loading a package is not quite the same as
package; most packages just make some new commands available, while loading a Lisp library (@pxref{Lisp Libraries}); its effect varies
others have more wide-ranging effects on the Emacs session. For such from package to package. Most packages just make some new commands
information, consult the package's help buffer. available, while others have more wide-ranging effects on the Emacs
session. For such information, consult the package's help buffer.
By default, Emacs also automatically loads all installed packages
(causing them to ``take effect'') in subsequent Emacs sessions. This By default, Emacs also automatically loads all installed packages in
happens at startup, after processing the init file (@pxref{Init subsequent Emacs sessions. This happens at startup, after processing
File}). As an exception, Emacs does not load packages at startup if the init file (@pxref{Init File}). As an exception, Emacs does not
invoked with the @samp{-q} or @samp{--no-init-file} options load packages at startup if invoked with the @samp{-q} or
(@pxref{Initial Options}). @samp{--no-init-file} options (@pxref{Initial Options}).
@vindex package-enable-at-startup @vindex package-enable-at-startup
@findex package-initialize
To disable automatic package loading, change the variable To disable automatic package loading, change the variable
@code{package-enable-at-startup} to @code{nil}. If you do this, you @code{package-enable-at-startup} to @code{nil}.
can use the command @kbd{M-x package-initialize} to load your
packages. @findex package-initialize
The reason automatic package loading occurs after loading the init
file is that user options only receive their customized values after
loading the init file, including user options which affect the
packaging system. In some circumstances, you may want to load
packages explicitly in your init file (usually because some other code
in your init file depends on a package). In that case, your init file
should call the function @code{package-initialize}. It is up to you
to ensure that relevant user options, such as @code{package-load-list}
(see below), are set up prior to the @code{package-initialize} call.
You should also set @code{package-enable-at-startup} to @code{nil}, to
avoid loading the packages again after processing the init file.
Alternatively, you may choose to completely inhibit package loading at
startup, and invoke the command @kbd{M-x package-initialize} to load
your packages manually.
@vindex package-load-list @vindex package-load-list
For finer control over package loading, you can use the variable For finer control over package loading, you can use the variable
......
2012-03-18 Chong Yidong <cyd@gnu.org>
* internals.texi (Building Emacs, Garbage Collection): Copyedits.
(Writing Emacs Primitives): Re-organize discussion of functions
with variable Lisp arguments are handled. Delete an obsolete
remark, previously tagged as FIXME.
* os.texi (Idle Timers): Minor clarification.
(Idle Timers): Link to Time of Day for description of time list.
2012-03-18 Glenn Morris <rgm@gnu.org>
* os.texi (System Interface): Flow control was removed.
(Startup Summary): General update.
(Init File): Don't mention compiling it.
2012-03-17 Chong Yidong <cyd@gnu.org>
* os.texi (Startup Summary): Mention package loading.
(Init File): Don't refer to .emacs in section title. Copyedits.
(Terminal-Specific): Give a realistic example.
(Command-Line Arguments): Reference Entering Emacs instead of
repeating the spiel about not restarting Emacs.
(Time of Day): Discuss time representation at beginning of node.
(Sound Output): Copyedits.
* package.texi (Packaging Basics): Document package-initialize.
2012-03-17 Eli Zaretskii <eliz@gnu.org>
* frames.texi (Initial Parameters): Add an index entry for
minibuffer-only frame.
2012-03-16 Glenn Morris <rgm@gnu.org>
* modes.texi (Major Mode Conventions): Mention the strange
relationship between View mode and special modes. (Bug#10650)
2012-03-11 Chong Yidong <cyd@gnu.org> 2012-03-11 Chong Yidong <cyd@gnu.org>
* windows.texi (Window Configurations): save-window-excursion is * windows.texi (Window Configurations): save-window-excursion is
......
...@@ -420,10 +420,11 @@ the initial frame, specify the same parameters in ...@@ -420,10 +420,11 @@ the initial frame, specify the same parameters in
@code{initial-frame-alist} with values that match the X resources. @code{initial-frame-alist} with values that match the X resources.
@end defopt @end defopt
If these parameters specify a separate minibuffer-only frame with If these parameters specify a separate @dfn{minibuffer-only frame} with
@code{(minibuffer . nil)}, and you have not created one, Emacs creates @code{(minibuffer . nil)}, and you have not created one, Emacs creates
one for you. one for you.
@cindex minibuffer-only frame
@defopt minibuffer-frame-alist @defopt minibuffer-frame-alist
This variable's value is an alist of parameter values used when This variable's value is an alist of parameter values used when
creating an initial minibuffer-only frame. This is the creating an initial minibuffer-only frame. This is the
......
...@@ -28,42 +28,39 @@ internal aspects of GNU Emacs that may be of interest to C programmers. ...@@ -28,42 +28,39 @@ internal aspects of GNU Emacs that may be of interest to C programmers.
This section explains the steps involved in building the Emacs This section explains the steps involved in building the Emacs
executable. You don't have to know this material to build and install executable. You don't have to know this material to build and install
Emacs, since the makefiles do all these things automatically. This Emacs, since the makefiles do all these things automatically. This
information is pertinent to Emacs maintenance. information is pertinent to Emacs developers.
Compilation of the C source files in the @file{src} directory Compilation of the C source files in the @file{src} directory
produces an executable file called @file{temacs}, also called a produces an executable file called @file{temacs}, also called a
@dfn{bare impure Emacs}. It contains the Emacs Lisp interpreter and I/O @dfn{bare impure Emacs}. It contains the Emacs Lisp interpreter and
routines, but not the editing commands. I/O routines, but not the editing commands.
@cindex @file{loadup.el} @cindex @file{loadup.el}
The command @w{@samp{temacs -l loadup}} uses @file{temacs} to create The command @w{@command{temacs -l loadup}} would run @file{temacs}
the real runnable Emacs executable. These arguments direct and direct it to load @file{loadup.el}. The @code{loadup} library
@file{temacs} to evaluate the Lisp files specified in the file loads additional Lisp libraries, which set up the normal Emacs editing
@file{loadup.el}. These files set up the normal Emacs editing environment. After this step, the Emacs executable is no longer
environment, resulting in an Emacs that is still impure but no longer @dfn{bare}.
bare.
@cindex dumping Emacs @cindex dumping Emacs
It takes some time to load the standard Lisp files. Luckily, Because it takes some time to load the standard Lisp files, the
you don't have to do this each time you run Emacs; @file{temacs} can @file{temacs} executable usually isn't run directly by users.
dump out an executable program called @file{emacs} that has these files Instead, as one of the last steps of building Emacs, the command
preloaded. @file{emacs} starts more quickly because it does not need to @samp{temacs -batch -l loadup dump} is run. The special @samp{dump}
load the files. This is the Emacs executable that is normally argument causes @command{temacs} to dump out an executable program,
installed. called @file{emacs}, which has all the standard Lisp files preloaded.
(The @samp{-batch} argument prevents @file{temacs} from trying to
initialize any of its data on the terminal, so that the tables of
terminal information are empty in the dumped Emacs.)
@cindex preloaded Lisp files
@vindex preloaded-file-list @vindex preloaded-file-list
@cindex dumped Lisp files The dumped @file{emacs} executable (also called a @dfn{pure} Emacs)
To create @file{emacs}, use the command @samp{temacs -batch -l loadup is the one which is installed. The variable
dump}. The purpose of @samp{-batch} here is to prevent @file{temacs} @code{preloaded-file-list} stores a list of the Lisp files preloaded
from trying to initialize any of its data on the terminal; this ensures into the dumped Emacs. If you port Emacs to a new operating system,
that the tables of terminal information are empty in the dumped Emacs. and are not able to implement dumping, then Emacs must load
The argument @samp{dump} tells @file{loadup.el} to dump a new executable @file{loadup.el} each time it starts.
named @file{emacs}. The variable @code{preloaded-file-list} stores a
list of the Lisp files that were dumped with the @file{emacs} executable.
If you port Emacs to a new operating system, and are not able to
implement dumping, then Emacs must load @file{loadup.el} each time it
starts.
@cindex @file{site-load.el} @cindex @file{site-load.el}
You can specify additional files to preload by writing a library named You can specify additional files to preload by writing a library named
...@@ -134,7 +131,7 @@ in a different location since it was dumped. ...@@ -134,7 +131,7 @@ in a different location since it was dumped.
This function delays the initialization of @var{symbol} to the next This function delays the initialization of @var{symbol} to the next
Emacs start. You normally use this function by specifying it as the Emacs start. You normally use this function by specifying it as the
@code{:initialize} property of a customizable variable. (The argument @code{:initialize} property of a customizable variable. (The argument
@var{value} is unused, and is provided only for compatiblity with the @var{value} is unused, and is provided only for compatibility with the
form Custom expects.) form Custom expects.)
@end defun @end defun
...@@ -163,7 +160,7 @@ all the new data created during an Emacs session are kept ...@@ -163,7 +160,7 @@ all the new data created during an Emacs session are kept
in the preloaded standard Lisp files---data that should never change in the preloaded standard Lisp files---data that should never change
during actual use of Emacs. during actual use of Emacs.
Pure storage is allocated only while @file{temacs} is loading the Pure storage is allocated only while @command{temacs} is loading the
standard preloaded Lisp libraries. In the file @file{emacs}, it is standard preloaded Lisp libraries. In the file @file{emacs}, it is
marked as read-only (on operating systems that permit this), so that marked as read-only (on operating systems that permit this), so that
the memory space can be shared by all the Emacs jobs running on the the memory space can be shared by all the Emacs jobs running on the
...@@ -214,31 +211,27 @@ You should not change this flag in a running Emacs. ...@@ -214,31 +211,27 @@ You should not change this flag in a running Emacs.
@node Garbage Collection @node Garbage Collection
@section Garbage Collection @section Garbage Collection
@cindex garbage collection
@cindex memory allocation @cindex memory allocation
When a program creates a list or the user defines a new function (such When a program creates a list or the user defines a new function
as by loading a library), that data is placed in normal storage. If (such as by loading a library), that data is placed in normal storage.
normal storage runs low, then Emacs asks the operating system to If normal storage runs low, then Emacs asks the operating system to
allocate more memory in blocks of 1k bytes. Each block is used for one allocate more memory. Different types of Lisp objects, such as
type of Lisp object, so symbols, cons cells, markers, etc., are symbols, cons cells, markers, etc., are segregated in distinct blocks
segregated in distinct blocks in memory. (Vectors, long strings, in memory. (Vectors, long strings, buffers and certain other editing
buffers and certain other editing types, which are fairly large, are types, which are fairly large, are allocated in individual blocks, one
allocated in individual blocks, one per object, while small strings are per object, while small strings are packed into blocks of 8k bytes.)
packed into blocks of 8k bytes.)
It is quite common to use some storage for a while, then release it by
(for example) killing a buffer or deleting the last pointer to an
object. Emacs provides a @dfn{garbage collector} to reclaim this
abandoned storage. (This name is traditional, but ``garbage recycler''
might be a more intuitive metaphor for this facility.)
The garbage collector operates by finding and marking all Lisp objects @cindex garbage collection
that are still accessible to Lisp programs. To begin with, it assumes It is quite common to use some storage for a while, then release it
all the symbols, their values and associated function definitions, and by (for example) killing a buffer or deleting the last pointer to an
any data presently on the stack, are accessible. Any objects that can object. Emacs provides a @dfn{garbage collector} to reclaim this
be reached indirectly through other accessible objects are also abandoned storage. The garbage collector operates by finding and
accessible. marking all Lisp objects that are still accessible to Lisp programs.
To begin with, it assumes all the symbols, their values and associated
function definitions, and any data presently on the stack, are
accessible. Any objects that can be reached indirectly through other
accessible objects are also accessible.
When marking is finished, all objects still unmarked are garbage. No When marking is finished, all objects still unmarked are garbage. No
matter what the Lisp program or the user does, it is impossible to refer matter what the Lisp program or the user does, it is impossible to refer
...@@ -336,11 +329,9 @@ The total size of all strings, in characters. ...@@ -336,11 +329,9 @@ The total size of all strings, in characters.
The total number of elements of existing vectors. The total number of elements of existing vectors.
@item used-floats @item used-floats
@c Emacs 19 feature
The number of floats in use. The number of floats in use.
@item free-floats @item free-floats
@c Emacs 19 feature
The number of floats for which space has been obtained from the The number of floats for which space has been obtained from the
operating system, but that are not currently being used. operating system, but that are not currently being used.
...@@ -417,7 +408,6 @@ memory used by Lisp data, broken down by data type. By contrast, the ...@@ -417,7 +408,6 @@ memory used by Lisp data, broken down by data type. By contrast, the
function @code{memory-limit} provides information on the total amount of function @code{memory-limit} provides information on the total amount of
memory Emacs is currently using. memory Emacs is currently using.
@c Emacs 19 feature
@defun memory-limit @defun memory-limit
This function returns the address of the last byte Emacs has allocated, This function returns the address of the last byte Emacs has allocated,
divided by 1024. We divide the value by 1024 to make sure it fits in a divided by 1024. We divide the value by 1024 to make sure it fits in a
...@@ -428,7 +418,7 @@ memory usage. ...@@ -428,7 +418,7 @@ memory usage.
@end defun @end defun
@defvar memory-full @defvar memory-full
This variable is @code{t} if Emacs is close to out of memory for Lisp This variable is @code{t} if Emacs is nearly out of memory for Lisp
objects, and @code{nil} otherwise. objects, and @code{nil} otherwise.
@end defvar @end defvar
...@@ -519,8 +509,9 @@ appearance.) ...@@ -519,8 +509,9 @@ appearance.)
@smallexample @smallexample
@group @group
DEFUN ("or", For, Sor, 0, UNEVALLED, 0, DEFUN ("or", For, Sor, 0, UNEVALLED, 0,
doc: /* Eval args until one of them yields non-nil, then return that doc: /* Eval args until one of them yields non-nil, then return
value. The remaining args are not evalled at all. that value.
The remaining args are not evalled at all.
If all args return nil, return nil. If all args return nil, return nil.
@end group @end group
@group @group
...@@ -566,14 +557,11 @@ This is the name of the Lisp symbol to define as the function name; in ...@@ -566,14 +557,11 @@ This is the name of the Lisp symbol to define as the function name; in
the example above, it is @code{or}. the example above, it is @code{or}.
@item fname @item fname
This is the C function name for this function. This is This is the C function name for this function. This is the name that
the name that is used in C code for calling the function. The name is, is used in C code for calling the function. The name is, by
by convention, @samp{F} prepended to the Lisp name, with all dashes convention, @samp{F} prepended to the Lisp name, with all dashes
(@samp{-}) in the Lisp name changed to underscores. Thus, to call this (@samp{-}) in the Lisp name changed to underscores. Thus, to call
function from C code, call @code{For}. Remember that the arguments must this function from C code, call @code{For}.
be of type @code{Lisp_Object}; various macros and functions for creating
values of type @code{Lisp_Object} are declared in the file
@file{lisp.h}.
@item sname @item sname
This is a C variable name to use for a structure that holds the data for This is a C variable name to use for a structure that holds the data for
...@@ -627,38 +615,35 @@ too. ...@@ -627,38 +615,35 @@ too.
@end table @end table
After the call to the @code{DEFUN} macro, you must write the After the call to the @code{DEFUN} macro, you must write the
argument list that every C function must have, including the types for argument list for the C function, including the types for the
the arguments. For a function with a fixed maximum number of arguments. If the primitive accepts a fixed maximum number of Lisp
arguments, declare a C argument for each Lisp argument, and give them arguments, there must be one C argument for each Lisp argument, and
all type @code{Lisp_Object}. When a Lisp function has no upper limit each argument must be of type @code{Lisp_Object}. (Various macros and
on the number of arguments, its implementation in C actually receives functions for creating values of type @code{Lisp_Object} are declared
exactly two arguments: the first is the number of Lisp arguments, and in the file @file{lisp.h}.) If the primitive has no upper limit on
the second is the address of a block containing their values. They the number of Lisp arguments, it must have exactly two C arguments:
have types @code{int} and @w{@code{Lisp_Object *}}. the first is the number of Lisp arguments, and the second is the
address of a block containing their values. These have types
@code{int} and @w{@code{Lisp_Object *}} respectively.
@cindex @code{GCPRO} and @code{UNGCPRO} @cindex @code{GCPRO} and @code{UNGCPRO}
@cindex protect C variables from garbage collection @cindex protect C variables from garbage collection
Within the function @code{For} itself, note the use of the macros Within the function @code{For} itself, note the use of the macros
@code{GCPRO1} and @code{UNGCPRO}. @code{GCPRO1} is used to @code{GCPRO1} and @code{UNGCPRO}. These macros are defined for the
``protect'' a variable from garbage collection---to inform the garbage sake of the few platforms which do not use Emacs' default
collector that it must look in that variable and regard its contents stack-marking garbage collector. The @code{GCPRO1} macro ``protects''
as an accessible object. GC protection is necessary whenever you call a variable from garbage collection, explicitly informing the garbage
@code{eval_sub} (or @code{Feval}) either directly or indirectly. collector that that variable and all its contents must be as
At such a time, any Lisp object that this function may refer to again accessible. GC protection is necessary in any function which can
must be protected somehow. perform Lisp evaluation by calling @code{eval_sub} or @code{Feval} as
a subroutine, either directly or indirectly.
It suffices to ensure that at least one pointer to each object is It suffices to ensure that at least one pointer to each object is
GC-protected; that way, the object cannot be recycled, so all pointers GC-protected. Thus, a particular local variable can do without
to it remain valid. Thus, a particular local variable can do without
protection if it is certain that the object it points to will be protection if it is certain that the object it points to will be
preserved by some other pointer (such as another local variable that preserved by some other pointer (such as another local variable that
has a @code{GCPRO}). has a @code{GCPRO}). Otherwise, the local variable needs a
@ignore @code{GCPRO}.
@footnote{Formerly, strings were a special exception; in older Emacs
versions, every local variable that might point to a string needed a
@code{GCPRO}.}.
@end ignore
Otherwise, the local variable needs a @code{GCPRO}.
The macro @code{GCPRO1} protects just one local variable. If you The macro @code{GCPRO1} protects just one local variable. If you
want to protect two variables, use @code{GCPRO2} instead; repeating want to protect two variables, use @code{GCPRO2} instead; repeating
...@@ -667,34 +652,17 @@ want to protect two variables, use @code{GCPRO2} instead; repeating ...@@ -667,34 +652,17 @@ want to protect two variables, use @code{GCPRO2} instead; repeating
implicitly use local variables such as @code{gcpro1}; you must declare implicitly use local variables such as @code{gcpro1}; you must declare
these explicitly, with type @code{struct gcpro}. Thus, if you use these explicitly, with type @code{struct gcpro}. Thus, if you use
@code{GCPRO2}, you must declare @code{gcpro1} and @code{gcpro2}. @code{GCPRO2}, you must declare @code{gcpro1} and @code{gcpro2}.
Alas, we can't explain all the tricky details here.
@code{UNGCPRO} cancels the protection of the variables that are @code{UNGCPRO} cancels the protection of the variables that are
protected in the current function. It is necessary to do this protected in the current function. It is necessary to do this
explicitly. explicitly.
Built-in functions that take a variable number of arguments actually
accept two arguments at the C level: the number of Lisp arguments, and
a @code{Lisp_Object *} pointer to a C vector containing those Lisp
arguments. This C vector may be part of a Lisp vector, but it need
not be. The responsibility for using @code{GCPRO} to protect the Lisp
arguments from GC if necessary rests with the caller in this case,
since the caller allocated or found the storage for them.
You must not use C initializers for static or global variables unless You must not use C initializers for static or global variables unless
the variables are never written once Emacs is dumped. These variables the variables are never written once Emacs is dumped. These variables
with initializers are allocated in an area of memory that becomes with initializers are allocated in an area of memory that becomes
read-only (on certain operating systems) as a result of dumping Emacs. read-only (on certain operating systems) as a result of dumping Emacs.
@xref{Pure Storage}. @xref{Pure Storage}.
@c FIXME is this still true? I don't think so...
Do not use static variables within functions---place all static
variables at top level in the file. This is necessary because Emacs on
some operating systems defines the keyword @code{static} as a null
macro. (This definition is used because those systems put all variables
declared static in a place that becomes read-only after dumping, whether
they have initializers or not.)
@cindex @code{defsubr}, Lisp symbol for a primitive @cindex @code{defsubr}, Lisp symbol for a primitive
Defining the C function is not enough to make a Lisp 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 available; you must also create the Lisp symbol for the primitive and
......
...@@ -525,6 +525,10 @@ mode when creating new buffers (@pxref{Auto Major Mode}), but with such ...@@ -525,6 +525,10 @@ mode when creating new buffers (@pxref{Auto Major Mode}), but with such
@code{special} modes, Fundamental mode is used instead. Modes such as @code{special} modes, Fundamental mode is used instead. Modes such as
Dired, Rmail, and Buffer List use this feature. Dired, Rmail, and Buffer List use this feature.
The function @code{view-buffer} does not enable View mode in buffers
whose mode-class is special, because such modes usually provide their
own View-like bindings.
The @code{define-derived-mode} macro automatically marks the derived The @code{define-derived-mode} macro automatically marks the derived
mode as special if the parent mode is special. Special mode is a mode as special if the parent mode is special. Special mode is a
convenient parent for such modes to inherit from; @xref{Basic Major convenient parent for such modes to inherit from; @xref{Basic Major
......
This diff is collapsed.
...@@ -15,6 +15,8 @@ install, uninstall, and upgrade it. ...@@ -15,6 +15,8 @@ install, uninstall, and upgrade it.
The following sections describe how to create a package, and how to The following sections describe how to create a package, and how to
put it in a @dfn{package archive} for others to download. put it in a @dfn{package archive} for others to download.
@xref{Packages,,, emacs, The GNU Emacs Manual}, for a description of
user-level features of the packaging system.
@menu @menu
* Packaging Basics:: The basic concepts of Emacs Lisp packages. * Packaging Basics:: The basic concepts of Emacs Lisp packages.
...@@ -91,17 +93,34 @@ definitions are saved to a file named @file{@var{name}-autoloads.el} ...@@ -91,17 +93,34 @@ definitions are saved to a file named @file{@var{name}-autoloads.el}
in the content directory. They are typically used to autoload the in the content directory. They are typically used to autoload the
principal user commands defined in the package, but they can also principal user commands defined in the package, but they can also
perform other tasks, such as adding an element to perform other tasks, such as adding an element to
@code{auto-mode-alist} (@pxref{Auto Major Mode}). During this time, @code{auto-mode-alist} (@pxref{Auto Major Mode}). Note that a package
Emacs will also byte-compile the Lisp files. typically does @emph{not} autoload every function and variable defined