There are no other files named ledit.info in the archive.
This file documents the LEDIT package.
File: LEDIT Node: Top Up: (DIR) Next: Basics
LEDIT is a MacLisp/EMACS interface package with the EMACS half of the
system written as a library. Using LEDIT, you do all your editing in
EMACS on your source files, and the changes you make are transmitted
("zapped") to your Lisp environment automatically by LEDIT. You can
easily transfer control from Lisp to EMACS, edit a function, then
return to Lisp automatically saving the source file and redefining the
function in Lisp.
In addition, LEDIT is designed to be used with the TAGS package
and the EXPR-HASH feature of Lisp.
To load LEDIT, load the file LEDIT.FASL, which is supplied with EMACS
and with MACLISP.
Once LEDIT is loaded, evaluate (LEDIT) to switch to EMACS.
An EMACS fork will be started as an inferior to the Lisp. Your
init file will be read in if it exists. You should then load the
library LEDIT, which will have the following observable effects:
(i) You are in Lisp mode.
(ii) The mode line has the extra word "LEDIT" after EMACS.
(iii) There is an empty buffer called *LEDIT* which will be used
to accumulate code to be returned to the Lisp.
Do your editing. You may treat this as a regular EMACS. You may do
editing in it which has no relation to whatever you are doing in the
superior Lisp. If you type an ordinary exit command such as C-Z C-Z
or C-X C-Z, you return to Lisp, in which nothing has changed.
If you perform editing which changes the programs you are running in
the Lisp, LEDIT provides a mechanism for transmitting these changes to
the Lisp environment. This is done in two steps: first, marking the
functions which you change; and second, passing these changed
functions to Lisp when you exit from EMACS. The assumption behind
LEDIT's transmission mechanism is that the original version of the
source file, or a compilation of it, has already been read into the
Lisp before you transmit the changes.
The command to identify a changed function is M-Z. M-Z tells LEDIT
that the current defun has been changed and needs to be transmitted to
Lisp. LEDIT arranges to do this, later, by copying the text of the
defun into the buffer *LEDIT*. The actual transmission does not
happen until you return to Lisp. The M-Z need not be the last thing
before you return; you can edit one function, M-Z it, edit another
function, and M-Z it. The TAGS package is useful for finding the
function you want to edit; *Note TAGS: TAGS.
If you give a numeric argument (e.g. ctl-U) to M-Z, The *LEDIT*
buffer is selected after the code is moved. This is useful for making
temporary editing changes, such as inserting breakpoints. First copy
the code in question to the *LEDIT* buffer, and then add the breakpoints
in the *LEDIT* buffer. This will guarantee that the breakpoints will never
be written into the original source file.
To transmit the accumulated changed functions to Lisp, use the C-X Z
command. This writes the contents of the *LEDIT* buffer into a
temporary file and then returns to Lisp, which reads the file. The
ordinary exit commands, C-Z C-Z and C-X C-Z, do not transmit the
accumulated changed functions to Lisp. If you use one of them and
then return to EMACS, the changes are still in the *LEDIT* buffer.
C-X Z also saves the selected buffer and offers to save the others.
This can be inhibited on one occasion by giving it an argument, or
permanently by setting the variable LEDIT Save All Files Query. If
you wish no saving by default, set LEDIT Save All Files Query to 0 in
your EMACS init; if you wish querying for all files included the
current one to be the default, set it to 1.
A numeric argument of zero to C-X Z inhibits all actions other than
clearing of the *LEDIT* buffer and return to Lisp.
The EMACS variable LEDIT Setup Hook may be used to cause
different assignment of the LEDIT Library functions to keys.
If you create this variable, its value should be a TECO program to
make the connections you want. They will be done instead of the
default assignments (M-Z and C-X Z).
There is a function ^R LEDIT Zap DEFUN to Lisp which is currently
assigned to no key. It transmits the current defun to Lisp right away
and leaves you in Lisp. It is equivalent to M-Z C-X Z.
Another function, ^R LEDIT Save Region, is like M-Z but operates on
the text from point to mark rather than on the current defun. This
function is not placed on any character on Twenex because its normal
place on ITS, C-M-Z, is used on Twenex for an exit command.