[net.emacs] Release of CCA EMACS Version 162.42z

z@cca.UUCP (Steve Zimmerman) (12/15/83)

Version 162.42z of CCA EMACS has now been released.  This version
contains several additional features since the last release; the
documentation for these features follows.

Ada Mode

Ada mode is useful for programs written in the Ada language.  The
following commands are specific to Ada mode:

	Tab	    Indent appropriately for the current line.
	C-M-\	    Indent a section of Ada code.
	C-C C-A	    Adjust the case of the current line.
	C-C -	    Unindent one tab stop.

One of the primary functions of Ada mode is to assist the programmer in
indenting Ada code properly.  For this purpose, the function ^R Indent
for Ada is bound to Tab in Ada mode.  A Tab given at the beginning of a
line will indent the line to be lined up with the previous line of code.
If the previous line of code begins with one of the Ada reserved words
which requires additional indentation, then Tab will indent one level
further.  A Tab given anywhere else in the line will indent one
indentation level.  The number of spaces in an indentation level is
specified by the variable Ada Indent; by default it is three.  Since
Linefeed is always defined to be a Return followed by a Tab, typing
Linefeed at the end of a line of Ada code is a good way of automatically
indenting the next line.  It is possible to unindent a level of Ada code
by using the command C-C - (^R Unindent for Ada); this command may be
given an argument in order to unindent multiple levels.  If an entire
section of Ada code needs to be indented properly, this can be done with
the command C-M-\ (^R Indent Region).

The second primary function of Ada mode is to set Ada code automatically
to its proper case.  By convention, Ada reserved words are used in lower
case and user variables are in upper case.  In Ada mode, whenever a
Return or Linefeed is typed, all words in the current line are set
automatically to upper case, with the exception of reserved words,
string literals, and comments.  When a line is modified, its case may be
readjusted in this fashion by using the command C-C C-A (Set Case for
Ada).  Comments in Ada mode are defined to start with two dashes, and
the comment commands work accordingly.  (*Note Comments:  Comments.)

Files which end with the extension ".ada" automatically cause the buffer
to be set to Ada mode when they are read in; this can be changed by
modifying the value of the variable Ada Extension 1.  If a second
extension is also used to denote Ada files, this string can be specified
in the variable Ada Extension 2.

----------

Line Buffering

When displaying large amounts of text, EMACS normally writes characters
to the screen in one kilobyte blocks, which is very efficient and uses a
minimum of machine resources.  However, there are two drawbacks to this
approach.  When a command that causes a large amount of redisplay is
typed, such as C-V (^R Next Screen), there is a short delay before text
begins to be refreshed on the screen.  What is happening is that EMACS
is first filling up its one kilobyte buffer with text to be displayed,
and until this buffer is full nothing is sent to the screen.  Also, once
redisplay is underway, EMACS cannot interrupt it to start redisplaying
something else until the current one kilobyte block has been completely
output.  This is most noticeable on terminals running at low baud rates,
where typing C-V in the middle of a screen refresh usually does not take
effect until many lines later.

The variable Line Buffering exists to address these problems.  When Line
Buffering is set, text is written to the screen after every line, rather
than after every one kilobyte block.  Response to an initial C-V command
is immediate, and C-V commands that are given in the middle of screen
redisplay take effect within three or four lines at most.  (This minimal
delay is due to operating system buffering, and is not easily overcome.)
When the variable Line Buffering is set to 1, it takes effect on
terminals running at 2400 baud or less; when it is set to 2, it takes
effect on all terminals.

There are unfortunately drawbacks to this method as well, which is why
it is not the default.  On very heavily loaded systems, redisplaying a
page of text using line buffering may take up to 80% longer than
redisplaying using block buffering.  On the other hand, on lightly
loaded systems line buffering may actually result in redisplay that is
faster than block buffering by up to 25%, with the increased speed being
due to the increased overlap between the EMACS user-level program and
system I/O.  Because of these performance tradeoffs, users in different
environments will prefer different settings for this variable.

----------

There is now a new command Meta-Space (^R Just One Space), which deletes
all the whitespace around the cursor and replaces it with a single
space.  This command is similar to typing M-\ (^R Delete Horizontal
Space) followed by a space, except that it is easier to type.  Giving a
numeric argument to Meta-Space causes it to insert that many spaces
instead of just one.  This command is an old favorite among many MIT
EMACS users.

The command M-X Create Local Variable now accepts a zero argument, which
is interpreted to mean that an existing local variable should be made
global once again.  The current local value of the variable is replaced
with the global value.