NEWS.18 62.3 KB
Newer Older
Dave Love's avatar
#  
Dave Love committed
1
GNU Emacs NEWS -- history of user-visible changes.  17-Aug-1988
2

3
Copyright (C) 1988, 2006-2019 Free Software Foundation, Inc.
4 5
See the end of the file for license conditions.

Dave Love's avatar
#  
Dave Love committed
6

7
This file is about changes in Emacs version 18.
8 9


Dave Love's avatar
#  
Dave Love committed
10

11
* Changes in Emacs 18.52.
Dave Love's avatar
#  
Dave Love committed
12

13
** X windows version 10 is supported under system V.
Dave Love's avatar
#  
Dave Love committed
14

15
** Pop-up menus are now supported with the same Lisp interface in
Dave Love's avatar
#  
Dave Love committed
16 17
both version 10 and 11 of X windows.

18
** C-x 4 a is a new command to edit a change-log entry in another window.
Dave Love's avatar
#  
Dave Love committed
19

20
** The emacs client program now allows an option +NNN to specify the
Dave Love's avatar
#  
Dave Love committed
21 22 23 24
line number to go to in the file whose name follows.  Thus,
    emacsclient foo.c +45 bar.c
will find the files `foo.c' and `bar.c', going to line 45 in `bar.c'.

25
** Dired allows empty directories to be deleted like files.
Dave Love's avatar
#  
Dave Love committed
26

27
** When the terminal type is used to find a terminal-specific file to
Dave Love's avatar
#  
Dave Love committed
28 29 30 31 32 33 34 35 36
run, Emacs now tries the entire terminal type first.  If that doesn't
yield a file that exists, the last hyphen and what follows it is
stripped.  If that doesn't yield a file that exists, the previous
hyphen is stripped, and so on until all hyphens are gone.  For
example, if the terminal type is `aaa-48-foo', Emacs will try first
`term/aaa-48-foo.el', then `term/aaa-48.el' and finally `term/aaa.el'.

Underscores now receive the same treatment as hyphens.

37
** Texinfo features: @defun, etc.  texinfo-show-structure.
Dave Love's avatar
#  
Dave Love committed
38 39
New template commands.  texinfo-format-region.

40
** The special "local variable" `eval' is now ignored if you are running
Dave Love's avatar
#  
Dave Love committed
41 42
as root.

43
** New command `c-macro-expand' shows the result of C macro expansion
Dave Love's avatar
#  
Dave Love committed
44 45 46
in the region.  It works using the C preprocessor, so its results
are completely accurate.

47
** Errors in trying to auto save now flash error messages for a few seconds.
Dave Love's avatar
#  
Dave Love committed
48

49
** Killing a buffer now sends SIGHUP to the buffer's process.
Dave Love's avatar
#  
Dave Love committed
50

51
** New hooks.
Dave Love's avatar
#  
Dave Love committed
52

53
*** `spell-region' now allows you to filter the text before spelling-checking.
Dave Love's avatar
#  
Dave Love committed
54 55 56 57
If the value of `spell-filter' is non-nil, it is called, with no arguments,
looking at a temporary buffer containing a copy of the text to be checked.
It can alter the text freely before the spell program sees it.

58
*** The variable `lpr-command' now specifies the command to be used when
Dave Love's avatar
#  
Dave Love committed
59 60
you use the commands to print text (such as M-x print-buffer).

61
*** Posting netnews now calls the value of `news-inews-hook' (if not nil)
Dave Love's avatar
#  
Dave Love committed
62 63
as a function of no arguments before the actual posting.

64
*** Rmail now calls the value of `rmail-show-message-hook' (if not nil)
Dave Love's avatar
#  
Dave Love committed
65 66
as a function of no arguments, each time a new message is selected.

67
*** `kill-emacs' calls the value of `kill-emacs-hook' as a function of no args.
Dave Love's avatar
#  
Dave Love committed
68

69
** New libraries.
Dave Love's avatar
#  
Dave Love committed
70 71
See the source code of each library for more information.

72
*** icon.el: a major mode for editing programs written in Icon.
Dave Love's avatar
#  
Dave Love committed
73

74
*** life.el: a simulator for the cellular automaton "life".  Load the
Dave Love's avatar
#  
Dave Love committed
75 76
library and run M-x life.

77
*** doctex.el: a library for converting the Emacs `etc/DOC' file of
Dave Love's avatar
#  
Dave Love committed
78 79
documentation strings into TeX input.

80
*** saveconf.el: a library which records the arrangement of windows and
Dave Love's avatar
#  
Dave Love committed
81 82 83
buffers when you exit Emacs, and automatically recreates the same
setup the next time you start Emacs.

84
*** uncompress.el: a library that automatically uncompresses files
Dave Love's avatar
#  
Dave Love committed
85 86
when you visit them.

87
*** c-fill.el: a mode for editing filled comments in C.
Dave Love's avatar
#  
Dave Love committed
88

89
*** kermit.el: an extended version of shell-mode designed for running kermit.
Dave Love's avatar
#  
Dave Love committed
90

91
*** spook.el: a library for adding some "distract the NSA" keywords to every
Dave Love's avatar
#  
Dave Love committed
92 93
message you send.

94
*** hideif.el: a library for hiding parts of a C program based on preprocessor
Dave Love's avatar
#  
Dave Love committed
95 96
conditionals.

97
*** autoinsert.el: a library to put in some initial text when you visit
Dave Love's avatar
#  
Dave Love committed
98 99 100
a nonexistent file.  The text used depends on the major mode, and
comes from a directory of files created by you.

101
** New programming features.
Dave Love's avatar
#  
Dave Love committed
102

103
*** The variable `window-system-version' now contains the version number
Dave Love's avatar
#  
Dave Love committed
104 105 106
of the window system you are using (if appropriate).  When using X windows,
its value is either 10 or 11.

107
*** (interactive "N") uses the prefix argument if any; otherwise, it reads
Dave Love's avatar
#  
Dave Love committed
108 109
a number using the minibuffer.

110
*** VMS: there are two new functions `vms-system-info' and `shrink-to-icon'.
Dave Love's avatar
#  
Dave Love committed
111 112 113 114
The former allows you to get many kinds of system status information.
See its self-documentation for full details.
The second is used with the window system: it iconifies the Emacs window.

115
*** VMS: the new function `define-logical-name' allows you to create
Dave Love's avatar
#  
Dave Love committed
116 117
job-wide logical names.  The old function `define-dcl-symbol' has been
removed.
118 119


Dave Love's avatar
#  
Dave Love committed
120

121
* Changes in Emacs 18.50.
Dave Love's avatar
#  
Dave Love committed
122

123
** X windows version 11 is supported.
Dave Love's avatar
#  
Dave Love committed
124 125 126

Define X11 in config.h if you want X version 11 instead of version 10.

127
** The command M-x gdb runs the GDB debugger as an inferior.
Dave Love's avatar
#  
Dave Love committed
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
It asks for the filename of the executable you want to debug.

GDB runs as an inferior with I/O through an Emacs buffer.  All the
facilities of Shell mode are available.  In addition, each time your
program stops, and each time you select a new stack frame, the source
code is displayed in another window with an arrow added to the line
where the program is executing.

Special GDB-mode commands include M-s, M-n, M-i, M-u, M-d, and C-c C-f
which send the GDB commands `step', `next', `stepi', `up', `down'
and `finish'.

In any source file, the commands C-x SPC tells GDB to set a breakpoint
on the current line.

143
** M-x calendar displays a three-month calendar.
Dave Love's avatar
#  
Dave Love committed
144

145
** C-u 0 C-x C-s never makes a backup file.
Dave Love's avatar
#  
Dave Love committed
146 147 148

This is a way you can explicitly request not to make a backup.

149
** `term-setup-hook' is for users only.
Dave Love's avatar
#  
Dave Love committed
150 151 152 153 154

Emacs never uses this variable for internal purposes, so you can freely
set it in your `.emacs' file to make Emacs do something special after
loading any terminal-specific setup file from `lisp/term'.

155
** `copy-keymap' now copies recursive submaps.
Dave Love's avatar
#  
Dave Love committed
156

157
** New overlay-arrow feature.
Dave Love's avatar
#  
Dave Love committed
158 159 160 161 162 163 164

If you set the variable `overlay-arrow-string' to a string
and `overlay-arrow-position' to a marker, that string is displayed on
the screen at the position of that marker, hiding whatever text would
have appeared there.  If that position isn't on the screen, or if
the buffer the marker points into isn't displayed, there is no effect.

165
** -batch mode can read from the terminal.
Dave Love's avatar
#  
Dave Love committed
166 167 168 169

It now works to use `read-char' to do terminal input in a noninteractive
Emacs run.  End of file causes Emacs to exit.

170
** Variables `data-bytes-used' and `data-bytes-free' removed.
Dave Love's avatar
#  
Dave Love committed
171 172 173 174

These variables cannot really work because the 24-bit range of an
integer in (most ports of) GNU Emacs is not large enough to hold their
values on many systems.
175 176


Dave Love's avatar
#  
Dave Love committed
177

178
* Changes in Emacs 18.45, since version 18.41.
Dave Love's avatar
#  
Dave Love committed
179

180
** C indentation parameter `c-continued-brace-offset'.
Dave Love's avatar
#  
Dave Love committed
181 182 183 184 185 186 187 188 189 190

This parameter's value is added to the indentation of any
line that is in a continuation context and starts with an open-brace.
For example, it applies to the open brace shown here:

     if (x)
       {

The default value is zero.

191
** Dabbrev expansion (Meta-/) preserves case.
Dave Love's avatar
#  
Dave Love committed
192 193 194 195 196 197

When you use Meta-/ to search the buffer for an expansion of an
abbreviation, if the expansion found is all lower case except perhaps
for its first letter, then the case pattern of the abbreviation
is carried over to the expansion that replaces it.

198
** TeX-mode syntax.
Dave Love's avatar
#  
Dave Love committed
199 200 201 202 203

\ is no longer given "escape character" syntax in TeX mode.  It now
has the syntax of an ordinary punctuation character.  As a result,
\[...\] and such like are considered to balance each other.

204
** Mail-mode automatic Reply-To field.
Dave Love's avatar
#  
Dave Love committed
205 206

If the variable `mail-default-reply-to' is non-`nil', then each time
207
you start to compose a message, a Reply-To field is inserted with
Dave Love's avatar
#  
Dave Love committed
208 209
its contents taken from the value of `mail-default-reply-to'.

210
** Where is your .emacs file?
Dave Love's avatar
#  
Dave Love committed
211 212 213 214 215 216 217 218 219 220

If you run Emacs under `su', so your real and effective uids are
different, Emacs uses the home directory associated with the real uid
(the name you actually logged in under) to find the .emacs file.

Otherwise, Emacs uses the environment variable HOME to find the .emacs
file.

The .emacs file is not loaded at all if -batch is specified.

221
** Prolog mode is the default for ".pl" files.
Dave Love's avatar
#  
Dave Love committed
222

223
** File names are not case-sensitive on VMS.
Dave Love's avatar
#  
Dave Love committed
224 225 226 227

On VMS systems, all file names that you specify are converted to upper
case.  You can use either upper or lower case indiscriminately.

228
** VMS-only function 'define-dcl-symbol'.
Dave Love's avatar
#  
Dave Love committed
229 230 231

This is a new name for the function formerly called
`define-logical-name'.
232 233


Dave Love's avatar
#  
Dave Love committed
234

235
* Editing Changes in Emacs 18
Dave Love's avatar
#  
Dave Love committed
236

237
** Additional systems and machines are supported.
Dave Love's avatar
#  
Dave Love committed
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258

GNU Emacs now runs on Vax VMS.  However, many facilities that are normally
implemented by running subprocesses do not work yet.  This includes listing
a directory and sending mail.  There are features for running subprocesses
but they are incompatible with those on Unix.  I hope that some of
the VMS users can reimplement these features for VMS (compatibly for
the user, if possible).

VMS wizards are also asked to work on making the subprocess facilities
more upward compatible with those on Unix, and also to rewrite their
internals to use the same Lisp objects that are used on Unix to
represent processes.

In addition, the TI Nu machine running Unix system V, the AT&T 3b, and
the Wicat, Masscomp, Integrated Solutions, Alliant, Amdahl uts, Mips,
Altos 3068 and Gould Unix systems are now supported.  The IBM PC-RT is
supported under 4.2, but not yet under system V.  The GEC 93 is close
to working.  The port for the Elxsi is partly merged.  See the file
MACHINES for full status information and machine-specific installation
advice.

259
** Searching is faster.
Dave Love's avatar
#  
Dave Love committed
260 261 262 263 264

Forward search for a text string, or for a regexp that is equivalent
to a text string, is now several times faster.  Motion by lines and
counting lines is also faster.

265
** Memory usage improvements.
Dave Love's avatar
#  
Dave Love committed
266 267 268 269 270 271 272 273

It is no longer possible to run out of memory during garbage
collection.  As a result, running out of memory is never fatal.  This
is due to a new garbage collection algorithm which compactifies
strings in place rather than copying them.  Another consequence of the
change is a reduction in total memory usage and a slight increase in
garbage collection speed.

274
** Display changes.
Dave Love's avatar
#  
Dave Love committed
275

276
*** Editing above top of screen.
Dave Love's avatar
#  
Dave Love committed
277 278 279 280 281 282

When you delete or kill or alter text that reaches to the top of the
screen or above it, so that display would start in the middle of a
line, Emacs will usually attempt to scroll the text so that display
starts at the beginning of a line again.

283
*** Yanking in the minibuffer.
Dave Love's avatar
#  
Dave Love committed
284 285 286 287 288

The message "Mark Set" is no longer printed when the minibuffer is
active.  This is convenient with many commands, including C-y, that
normally print such a message.

289
*** Cursor appears in last line during y-or-n questions.
Dave Love's avatar
#  
Dave Love committed
290 291 292 293

Questions that want a `y' or `n' answer now move the cursor
to the last line, following the question.

294
** Library loading changes.
Dave Love's avatar
#  
Dave Love committed
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315

`load' now considers all possible suffixes (`.elc', `.el' and none)
for each directory in `load-path' before going on to the next directory.
It now accepts an optional fourth argument which, if non-nil, says to
use no suffixes; then the file name must be given in full.  The search
of the directories in `load-path' goes on as usual in this case, but
it too can be prevented by passing an absolute file name.

The value of `load-path' no longer by default includes nil (meaning to
look in the current default directory).  The idea is that `load' should
be used to search the path only for libraries to be found in the standard
places.  If you want to override system libraries with your own, place
your own libraries in one special directory and add that directory to the
front of `load-path'.

The function `load' is no longer a command; that is to say, `M-x load'
is no longer allowed.  Instead, there are two commands for loading files.
`M-x load-library' is equivalent to the old meaning of `M-x load'.
`M-x load-file' reads a file name with completion and defaulting
and then loads exactly that file, with no searching and no suffixes.

316
** Emulation of other editors.
Dave Love's avatar
#  
Dave Love committed
317

318
*** `edt-emulation-on' starts emulating DEC's EDT editor.
Dave Love's avatar
#  
Dave Love committed
319 320 321

Do `edt-emulation-off' to return Emacs to normal.

322
*** `vi-mode' and `vip-mode' starts emulating vi.
Dave Love's avatar
#  
Dave Love committed
323 324 325 326 327 328 329

These are two different vi emulations provided by GNU Emacs users.
We are interested in feedback as to which emulation is preferable.

See the documentation and source code for these functions
for more information.

330
*** `set-gosmacs-bindings' emulates Gosling Emacs.
Dave Love's avatar
#  
Dave Love committed
331 332 333 334 335

This command changes many global bindings to resemble those of
Gosling Emacs.  The previous bindings are saved and can be restored using
`set-gnu-bindings'.

336
** Emulation of a display terminal.
Dave Love's avatar
#  
Dave Love committed
337 338 339 340 341 342

Within Emacs it is now possible to run programs (such as emacs or
supdup) which expect to do output to a visual display terminal.

See the function `terminal-emulator' for more information.

343
** New support for keypads and function keys.
Dave Love's avatar
#  
Dave Love committed
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371

There is now a first attempt at terminal-independent support for
keypad and function keys.

Emacs now defines a standard set of key-names for function and keypad
keys, and provides standard hooks for defining them.  Most of the
standard key-names have default definitions built into Emacs; you can
override these in a terminal-independent manner.  The default definitions
and the conventions for redefining them are in the file `lisp/keypad.el'.

These keys on the terminal normally work by sending sequences of
characters starting with ESC.  The exact sequences used vary from
terminal to terminal.  Emacs interprets them in two stages:
in the first stage, terminal-dependent sequences are mapped into
the standard key-names; then second stage maps the standard key-names
into their definitions in a terminal-independent fashion.

The terminal-specific file `term/$TERM.el' now is responsible only for
establishing the mapping from the terminal's escape sequences into
standard key-names.  It no longer knows what Emacs commands are
assigned to the standard key-names.

One other change in terminal-specific files: if the value of the TERM
variable contains a hyphen, only the part before the first hyphen is
used in forming the name of the terminal-specific file.  Thus, for
terminal type `aaa-48', the file loaded is now `term/aaa.el' rather
than `term/aaa-48.el'.

372
** New startup command line options.
Dave Love's avatar
#  
Dave Love committed
373 374 375 376 377 378 379 380 381 382 383 384 385

`-i FILE' or `-insert FILE' in the command line to Emacs tells Emacs to
insert the contents of FILE into the current buffer at that point in
command line processing.  This is like using the command M-x insert-file.

`-funcall', `-load', `-user' and `-no-init-file' are new synonyms for
`-f', `-l', `-u' and `-q'.

`-nw' means don't use a window system.  If you are using a terminal
emulator on the X window system and you want to run Emacs to work through
the terminal emulator instead of working directly with the window system,
use this switch.

386
** Buffer-sorting commands.
Dave Love's avatar
#  
Dave Love committed
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406

Various M-x commands whose names start with `sort-' sort parts of
the region:

sort-lines	divides the region into lines and sorts them alphabetically.
sort-pages	divides into pages and sorts them alphabetically.
sort-paragraphs	divides into paragraphs and sorts them alphabetically.
sort-fields	divides into lines and sorts them alphabetically
		according to one field in the line.
		The numeric argument specifies which field (counting
		from field 1 at the beginning of the line).  Fields in a line
		are separated by whitespace.
sort-numeric-fields
		is similar but converts the specified fields to numbers
		and sorts them numerically.
sort-columns	divides into lines and sorts them according to the contents
		of a specified range of columns.

Refer to the self-documentation of these commands for full usage information.

407
** Changes in various commands.
Dave Love's avatar
#  
Dave Love committed
408

409
*** `tags-query-replace' and `tags-search' change.
Dave Love's avatar
#  
Dave Love committed
410 411 412

These functions now display the name of the file being searched at the moment.

413
*** `occur' output now serves as a menu.  `occur-menu' command deleted.
Dave Love's avatar
#  
Dave Love committed
414 415 416 417 418 419 420 421 422 423 424 425

`M-x occur' now allows you to move quickly to any of the occurrences
listed.  Select the `*Occur*' buffer that contains the output of `occur',
move point to the occurrence you want, and type C-c C-c.
This will move point to the same occurrence in the buffer that the
occurrences were found in.

The command `occur-menu' is thus obsolete, and has been deleted.

One way to get a list of matching lines without line numbers is to
copy the text to another buffer and use the command `keep-lines'.

426
*** Incremental search changes.
Dave Love's avatar
#  
Dave Love committed
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460

Ordinary and regexp incremental searches now have distinct default
search strings.  Thus, regexp searches recall only previous regexp
searches.

If you exit an incremental search when the search string is empty,
the old default search string is kept.  The default does not become
empty.

Reversing the direction of an incremental search with C-s or C-r
when the search string is empty now does not get the default search
string.  It leaves the search string empty.  A second C-s or C-r
will get the default search string.  As a result, you can do a reverse
incremental regexp search with C-M-s C-r.

If you add a `*', `?' or `\|' to an incremental search regexp,
point will back up if that is appropriate.  For example, if
you have searched for `ab' and add a `*', point moves to the
first match for `ab*', which may be before the match for `ab'
that was previously found.

If an incremental search is failing and you ask to repeat it,
it will start again from the beginning of the buffer (or the end,
if it is a backward search).

The search-controlling parameters `isearch-slow-speed' and
`isearch-slow-window-lines' have now been renamed to start with
`search' instead of `isearch'.  Now all the parameters' names start
with `search'.

If `search-slow-window-lines' is negative, the slow search window
is put at the top of the screen, and the absolute value or the
negative number specifies the height of it.

461
*** Undo changes
Dave Love's avatar
#  
Dave Love committed
462 463 464 465

The undo command now will mark the buffer as unmodified only when it is
identical to the contents of the visited file.

466
*** C-M-v in minibuffer.
Dave Love's avatar
#  
Dave Love committed
467 468 469 470 471 472 473 474

If while in the minibuffer you request help in a way that uses a
window to display something, then until you exit the minibuffer C-M-v
in the minibuffer window scrolls the window of help.

For example, if you request a list of possible completions, C-M-v can
be used reliably to scroll the completion list.

475
*** M-TAB command.
Dave Love's avatar
#  
Dave Love committed
476 477 478 479 480 481 482 483 484 485

Meta-TAB performs completion on the Emacs Lisp symbol names.  The sexp
in the buffer before point is compared against all existing nontrivial
Lisp symbols and completed as far as is uniquely determined by them.
Nontrivial symbols are those with either function definitions, values
or properties.

If there are multiple possibilities for the very next character, a
list of possible completions is displayed.

486
*** Dynamic abbreviation package.
Dave Love's avatar
#  
Dave Love committed
487 488 489 490

The new command Meta-/ expands an abbreviation in the buffer before point
by searching the buffer for words that start with the abbreviation.

491
*** Changes in saving kbd macros.
Dave Love's avatar
#  
Dave Love committed
492 493 494 495 496 497 498 499 500

The commands `write-kbd-macro' and `append-kbd-macro' have been
deleted.  The way to save a keyboard macro is to use the new command
`insert-kbd-macro', which inserts Lisp code to define the macro as
it is currently defined into the buffer before point.  Visit a Lisp
file such as your Emacs init file `~/.emacs', insert the macro
definition (perhaps deleting an old definition for the same macro)
and then save the file.

501
*** C-x ' command.
Dave Love's avatar
#  
Dave Love committed
502 503 504 505

The new command C-x ' (expand-abbrev) expands the word before point as
an abbrev, even if abbrev-mode is not turned on.

506
*** Sending to inferior Lisp.
Dave Love's avatar
#  
Dave Love committed
507 508 509 510 511 512 513 514 515 516 517 518 519

The command C-M-x in Lisp mode, which sends the current defun to
an inferior Lisp process, now works by writing the text into a temporary
file and actually sending only a `load'-form to load the file.
As a result, it avoids the Unix bugs that used to strike when the
text was above a certain length.

With a prefix argument, this command now makes the inferior Lisp buffer
appear on the screen and scrolls it so that the bottom is showing.

Two variables `inferior-lisp-load-command' and `inferior-lisp-prompt',
exist to customize these feature for different Lisp implementations.

520
*** C-x p now disabled.
Dave Love's avatar
#  
Dave Love committed
521

Paul Eggert's avatar
Paul Eggert committed
522
The command C-x p, a nonrecommended command which narrows to the current
Dave Love's avatar
#  
Dave Love committed
523 524
page, is now initially disabled like C-x n.

525
** Dealing with files.
Dave Love's avatar
#  
Dave Love committed
526

527
*** C-x C-v generalized
Dave Love's avatar
#  
Dave Love committed
528 529 530 531 532

This command is now allowed even if the current buffer is not visiting
a file.  As usual, it kills the current buffer and replaces it with a
newly found file.

533
*** M-x recover-file improved; auto save file names changed.
Dave Love's avatar
#  
Dave Love committed
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557

M-x recover-file now checks whether the last auto-save file is more
recent than the real visited file before offering to read in the
auto-save file.  If the auto-save file is newer, a directory listing
containing the two files is displayed while you are asked whether you
want the auto save file.

Visiting a file also makes this check.  If the auto-save file is more recent,
a message is printed suggesting that you consider using M-x recover file.

Auto save file names now by default have a `#' at the end as well
as at the beginning.  This is so that `*.c' in a shell command
will never match auto save files.

On VMS, auto save file names are made by appending `_$' at the front
and `$' at the end.

When you change the visited file name of a buffer, the auto save file
is now renamed to belong to the new visited file name.

You can customize the way auto save file names are made by redefining
the two functions `make-auto-save-file-name' and `auto-save-file-name-p',
both of which are defined in `files.el'.

558
*** Modifying a buffer whose file is changed on disk is detected instantly.
Dave Love's avatar
#  
Dave Love committed
559 560 561 562 563 564

On systems where clash detection (locking of files being edited) is
implemented, Emacs also checks the first time you modify a buffer
whether the file has changed on disk since it was last visited or saved.
If it has, you are asked to confirm that you want to change the buffer.

565
*** Exiting Emacs offers to save `*mail*'.
Dave Love's avatar
#  
Dave Love committed
566 567 568 569 570 571

Emacs can now know about buffers that it should offer to save on exit
even though they are not visiting files.  This is done for any buffer
which has a non-nil local value of `buffer-offer-save'.  By default,
Mail mode provides such a local value.

572
*** Backup file changes.
Dave Love's avatar
#  
Dave Love committed
573 574 575 576 577 578 579 580 581

If a backup file cannot be written in the directory of the visited file
due to fascist file protection, a backup file is now written in your home
directory as `~/%backup%~'.  Only one such file is made, ever, so only
the most recently made such backup is available.

When backup files are made by copying, the last-modification time of the
original file is now preserved in the backup copy.

582
*** Visiting remote files.
Dave Love's avatar
#  
Dave Love committed
583 584 585 586 587 588 589 590 591 592 593 594

On an internet host, you can now visit and save files on any other
internet host directly from Emacs with the commands M-x ftp-find-file
and M-x ftp-write-file.  Specify an argument of the form HOST:FILENAME.
Since standard internet FTP is used, the other host may be any kind
of machine and is not required to have any special facilities.

The first time any one remote host is accessed, you will be asked to
give the user name and password for use on that host.  FTP is reinvoked
each time you ask to use it, but previously specified user names and
passwords are remembered automatically.

595
*** Dired `g' command.
Dave Love's avatar
#  
Dave Love committed
596 597 598 599

`g' in Dired mode is equivalent to M-x revert-buffer; it causes the
current contents of the same directory to be read in.

600
** Changes in major modes.
Dave Love's avatar
#  
Dave Love committed
601

602
*** C mode indentation change.
Dave Love's avatar
#  
Dave Love committed
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620

The binding of Linefeed is no longer changed by C mode.  It once again
has its normal meaning, which is to insert a newline and then indent
afterward.

The old definition did one additional thing: it reindented the line
before the new newline.  This has been removed because it made the
command twice as slow.  The only time it was really useful was after the
insertion of an `else', since the fact of starting with `else' may change
the way that line is indented.  Now you will have to type TAB again
yourself to reindent the `else' properly.

If the variable `c-tab-always-indent' is set to `nil', the TAB command
in C mode, with no argument, will just insert a tab character if there
is non-whitespace preceding point on the current line.  Giving it a
prefix argument will force reindentation of the line (as well as
of the compound statement that begins after point, if any).

621
*** Fortran mode now exists.
Dave Love's avatar
#  
Dave Love committed
622 623 624 625 626

This mode provides commands for motion and indentation of Fortran code,
plus built-in abbrevs for Fortran keywords.  For details, see the manual
or the on-line documentation of the command `fortran-mode'.

627
*** Scribe mode now exists.
Dave Love's avatar
#  
Dave Love committed
628 629 630 631

This mode does something useful for editing files of Scribe input.
It is used automatically for files with names ending in ".mss".

632
*** Modula2 and Prolog modes now exist.
Dave Love's avatar
#  
Dave Love committed
633 634 635 636

These modes are for editing programs in the languages of the same names.
They can be selected with M-x modula-2-mode and M-x prolog-mode.

637
*** Telnet mode changes.
Dave Love's avatar
#  
Dave Love committed
638 639 640 641

The telnet mode special commands have now been assigned to C-c keys.
Most of them are the same as in Shell mode.

642
*** Picture mode changes.
Dave Love's avatar
#  
Dave Love committed
643 644 645 646 647 648 649

The special picture-mode commands to specify the direction of cursor
motion after insertion have been moved to C-c keys.  The commands to
specify diagonal motion were already C-c keys; they are unchanged.
The keys to specify horizontal or vertical motion are now
C-c < (left), C-c > (right), C-c ^ (up) and C-c . (down).

650
*** Nroff mode comments.
Dave Love's avatar
#  
Dave Love committed
651 652 653 654 655

Comments are now supported in Nroff mode.  The standard comment commands
such as M-; and C-x ; know how to insert, align and delete comments
that start with backslash-doublequote.

656
*** LaTeX mode.
Dave Love's avatar
#  
Dave Love committed
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679

LaTeX mode now exists.  Use M-x latex-mode to select this mode, and
M-x plain-tex-mode to select the previously existing mode for Plain
TeX.  M-x tex-mode attempts to examine the contents of the buffer and
choose between latex-mode and plain-tex-mode accordingly; if the
buffer is empty or it cannot tell, the variable `TeX-default-mode'
controls the choice.  Its value should be the symbol for the mode to
be used.

The facilities for running TeX on all or part of the buffer
work with LaTeX as well.

Some new commands available in both modes:

C-c C-l		recenter the window showing the TeX output buffer
		 so most recent line of output can be seen.
C-c C-k		kill the TeX subprocess.
C-c C-q		show the printer queue.
C-c C-f		close a block (appropriate for LaTeX only).
		 If the current line contains a \begin{...},
		 this inserts an \end{...} on the following line
		 and puts point on a blank line between them.

680
*** Outline mode changes.
Dave Love's avatar
#  
Dave Love committed
681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703

Invisible lines in outline mode are now indicated by `...' at the
end of the previous visible line.

The special outline heading motion commands are now all on C-c keys.
A few new ones have been added.  Here is a full list:

C-c C-n   Move to next visible heading (formerly M-})
C-c C-p   Move to previous visible heading (formerly M-{)
C-c C-f   Move to next visible heading at the same level.
	   Thus, if point is on a level-2 heading line,
	   this command moves to the next visible level-2 heading.
C-c C-b   Move to previous visible heading at the same level.
C-c C-u   Move up to previous visible heading at a higher level.

The variable `outline-regexp' now controls recognition of heading lines.
Any line whose beginning matches this regexp is a heading line.
The depth in outline structure is determined by the length of
the string that matches.

A line starting with a ^L (formfeed) is now by default considered
a header line.

704
** Mail reading and sending.
Dave Love's avatar
#  
Dave Love committed
705

706
*** MH-E changes.
Dave Love's avatar
#  
Dave Love committed
707 708 709 710 711 712 713 714 715 716 717

MH-E has been extensively modified and improved since the v17 release.
It contains many new features, including commands to: extracted failed
messages, kill a draft message, undo changes to a mail folder, monitor
delivery of a letter, print multiple messages, page digests backwards,
insert signatures, and burst digests.  Also, many commands have been
made to able to deal with named sequences of messages, instead of
single messages.  MH-E also has had numerous bugs fixed and commands
made to run faster.  Furthermore, its keybindings have been changed to
be compatible with Rmail and the rest of GNU Emacs.

718
*** Mail mode changes.
Dave Love's avatar
#  
Dave Love committed
719 720 721 722 723 724 725 726 727 728 729

The C-c commands of mail mode have been rearranged:

C-c s, C-c c, C-c t and C-c b (move point to various header fields)
have been reassigned as C-c C-f C-s, C-c C-f C-c, C-c C-f C-t and C-c
C-f C-b.  C-c C-f is for "field".

C-c y, C-c w and C-c q have been changed to C-c C-y, C-c C-w and C-c C-q.

Thus, C-c LETTER is always unassigned.

730
*** Rmail C-r command changed to w.
Dave Love's avatar
#  
Dave Love committed
731 732 733 734 735

The Rmail command to edit the current message is now `w'.  This change
has been made because people frequently type C-r while in Rmail hoping
to do a reverse incremental search.  That now works.

736
** Rnews changes.
Dave Love's avatar
#  
Dave Love committed
737

738
*** Caesar rotation added.
Dave Love's avatar
#  
Dave Love committed
739 740 741 742 743 744

The function news-caesar-buffer-body performs encryption and
decryption of the body of a news message.  It defaults to the USENET
standard of 13, and accepts any numeric arg between 1 to 25 and -25 to -1.
The function is bound to C-c C-r in both news-mode and news-reply-mode.

745
*** rmail-output command added.
Dave Love's avatar
#  
Dave Love committed
746 747 748 749 750

The C-o command has been bound to rmail-output in news-mode.
This allows one to append an article to a file which is in either Unix
mail or RMAIL format.

751
*** news-reply-mode changes.
Dave Love's avatar
#  
Dave Love committed
752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775

The C-c commands of news reply mode have been rearranged and changed,
so that C-c LETTER is always unassigned:

C-c y, C-c w and C-c q have been changed to C-c C-y, C-c C-w and C-c C-q.

C-c c, C-c t, and C-c b (move to various mail header fields) have been
deleted (they make no sense for posting and replying to USENET).

C-c s (move to Subject: header field) has been reassigned as C-c C-f
C-s.  C-c C-f is for "field".  Several additional move to news header
field commands have been added.

The local news-reply-mode bindings now look like this:

C-c C-s  news-inews (post the message)    C-c C-c  news-inews
C-c C-f	 move to a header field (and create it if there isn't):
	 C-c C-f C-n  move to Newsgroups:	C-c C-f C-s  move to Subj:
	 C-c C-f C-f  move to Followup-To:      C-c C-f C-k  move to Keywords:
	 C-c C-f C-d  move to Distribution:	C-c C-f C-a  move to Summary:
C-c C-y  news-reply-yank-original (insert current message, in NEWS).
C-c C-q  mail-fill-yanked-message (fill what was yanked).
C-c C-r  caesar rotate all letters by 13 places in the article's body (rot13).

776
** Existing Emacs usable as a server.
Dave Love's avatar
#  
Dave Love committed
777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810

Programs such as mailers that invoke "the editor" as an inferior
to edit some text can now be told to use an existing Emacs process
instead of creating a new editor.

To do this, you must have an Emacs process running and capable of
doing terminal I/O at the time you want to invoke it.  This means that
either you are using a window system and give Emacs a separate window
or you run the other programs as inferiors of Emacs (such as, using
M-x shell).

First prepare the existing Emacs process by loading the `server'
library and executing M-x server-start.  (Your .emacs can do this
automatically.)

Now tell the other programs to use, as "the editor", the Emacs client
program (etc/emacsclient, located in the same directory as this file).
This can be done by setting the environment variable EDITOR.

When another program invokes the emacsclient as "the editor", the
client actually transfers the file names to be edited to the existing
Emacs, which automatically visits the files.

When you are done editing a buffer for a client, do C-x # (server-edit).
This marks that buffer as done, and selects the next buffer that the client
asked for.  When all the buffers requested by a client are marked in this
way, Emacs tells the client program to exit, so that the program that
invoked "the editor" will resume execution.

You can only have one server Emacs at a time, but multiple client programs
can put in requests at the same time.

The client/server work only on Berkeley Unix, since they use the Berkeley
sockets mechanism for their communication.
811

Dave Love's avatar
#  
Dave Love committed
812

813
* Changes in Lisp programming in Emacs 18
Dave Love's avatar
#  
Dave Love committed
814

815
** Init file changes.
Dave Love's avatar
#  
Dave Love committed
816

817
*** Suffixes no longer accepted on `.emacs'.
Dave Love's avatar
#  
Dave Love committed
818 819 820 821 822 823 824

Emacs will no longer load a file named `.emacs.el' or `emacs.elc'
in place of `.emacs'.  This is so that it will take less time to
find `.emacs'.  If you want to compile your init file, give it another
name and make `.emacs' a link to the `.elc' file, or make it contain
a call to `load' to load the `.elc' file.

825
*** `default-profile' renamed to `default', and loaded after `.emacs'.
Dave Love's avatar
#  
Dave Love committed
826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841

It used to be the case that the file `default-profile' was loaded if
and only if `.emacs' was not found.

Now the name `default-profile' is not used at all.  Instead, a library
named `default' is loaded after the `.emacs' file.  `default' is loaded
whether the `.emacs' file exists or not.  However, loading of `default'
can be prevented if the `.emacs' file sets `inhibit-default-init' to non-nil.

In fact, you would call the default file `default.el' and probably would
byte-compile it to speed execution.

Note that for most purposes you are better off using a `site-init' library
since that will be loaded before the runnable Emacs is dumped.  By using
a `site-init' library, you avoid taking up time each time Emacs is started.

842
*** inhibit-command-line has been eliminated.
Dave Love's avatar
#  
Dave Love committed
843 844 845 846 847

This variable used to exist for .emacs files to set.  It has been
eliminated because you can get the same effect by setting
command-line-args to nil and setting inhibit-startup-message to t.

848
** `apply' is more general.
Dave Love's avatar
#  
Dave Love committed
849 850 851 852 853 854 855 856

`apply' now accepts any number of arguments.  The first one is a function;
the rest are individual arguments to pass to that function, except for the
last, which is a list of arguments to pass.

Previously, `apply' required exactly two arguments.  Its old behavior
follows as a special case of the new definition.

857
** New code-letter for `interactive'.
Dave Love's avatar
#  
Dave Love committed
858 859 860 861 862 863 864 865

(interactive "NFoo: ") is like (interactive "nFoo: ") in reading
a number using the minibuffer to serve as the argument; however,
if a prefix argument was specified, it uses the prefix argument
value as the argument, and does not use the minibuffer at all.

This is used by the `goto-line' and `goto-char' commands.

866
** Semantics of variables.
Dave Love's avatar
#  
Dave Love committed
867

868
*** Built-in per-buffer variables improved.
Dave Love's avatar
#  
Dave Love committed
869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889

Several built-in variables which in the past had a different value in
each buffer now behave exactly as if `make-variable-buffer-local' had
been done to them.

These variables are `tab-width', `ctl-arrow', `truncate-lines',
`fill-column', `left-margin', `mode-line-format', `abbrev-mode',
`overwrite-mode', `case-fold-search', `auto-fill-hook',
`selective-display', `selective-display-ellipses'.

To be precise, each variable has a default value which shows through
in most buffers and can be accessed with `default-value' and set with
`set-default'.  Setting the variable with `setq' makes the variable
local to the current buffer.  Changing the default value has retroactive
effect on all buffers in which the variable is not local.

The variables `default-case-fold-search', etc., are now obsolete.
They now refer to the default value of the variable, which is not
quite the same behavior as before, but it should enable old init files
to continue to work.

890
*** New per-buffer variables.
Dave Love's avatar
#  
Dave Love committed
891 892 893 894

The variables `fill-prefix', `comment-column' and `indent-tabs-mode'
are now per-buffer.  They work just like `fill-column', etc.

895
*** New function `setq-default'.
Dave Love's avatar
#  
Dave Love committed
896 897 898 899 900 901 902 903

`setq-default' sets the default value of a variable, and uses the
same syntax that `setq' accepts: the variable name is not evaluated
and need not be quoted.

`(setq-default case-fold-search nil)' would make searches case-sensitive
in all buffers that do not have local values for `case-fold-search'.

904
*** Functions `global-set' and `global-value' deleted.
Dave Love's avatar
#  
Dave Love committed
905 906 907 908

These functions were never used except by mistake by users expecting
the functionality of `set-default' and `default-value'.

909
** Changes in defaulting of major modes.
Dave Love's avatar
#  
Dave Love committed
910 911 912 913 914 915 916 917 918 919

When `default-major-mode' is `nil', new buffers are supposed to
get their major mode from the buffer that is current.  However,
certain major modes (such as Dired mode, Rmail mode, Rmail Summary mode,
and others) are not reasonable to use in this way.

Now such modes' names have been given non-`nil' `mode-class' properties.
If the current buffer's mode has such a property, Fundamental mode is
used as the default for newly created buffers.

920
** `where-is-internal' requires additional arguments.
Dave Love's avatar
#  
Dave Love committed
921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940

This function now accepts three arguments, two of them required:
DEFINITION, the definition to search for; LOCAL-KEYMAP, the keymap
to use as the local map when doing the searching, and FIRST-ONLY,
which is nonzero to return only the first key found.

This function returns a list of keys (strings) whose definitions
(in the LOCAL-KEYMAP or the current global map) are DEFINITION.

If FIRST-ONLY is non-nil, it returns a single key (string).

This function has changed incompatibly in that now two arguments
are required when previously only one argument was allowed.  To get
the old behavior of this function, write `(current-local-map)' as
the expression for the second argument.

The incompatibility is sad, but `nil' is a legitimate value for the
second argument (it means there is no local keymap), so it cannot also
serve as a default meaning to use the current local keymap.

941
** Abbrevs with hooks.
Dave Love's avatar
#  
Dave Love committed
942 943 944 945 946 947

When an abbrev defined with a hook is expanded, it now performs the
usual replacement of the abbrev with the expansion before running the
hook.  Previously the abbrev itself was deleted but the expansion was
not inserted.

948
** Function `scan-buffer' deleted.
Dave Love's avatar
#  
Dave Love committed
949 950 951 952

Use `search-forward' or `search-backward' in place of `scan-buffer'.
You will have to rearrange the arguments.

953
** X window interface improvements.
Dave Love's avatar
#  
Dave Love committed
954

955
*** Detect release of mouse buttons.
Dave Love's avatar
#  
Dave Love committed
956 957 958 959

Button-up events can now be detected.  See the file `lisp/x-mouse.el'
for details.

960
*** New pop-up menu facility.
Dave Love's avatar
#  
Dave Love committed
961 962 963 964 965

The new function `x-popup-menu' pops up a menu (in a X window)
and returns an indication of which selection the user made.
For more information, see its self-documentation.

966
** M-x disassemble.
Dave Love's avatar
#  
Dave Love committed
967 968 969 970 971

This command prints the disassembly of a byte-compiled Emacs Lisp function.

Would anyone like to interface this to the debugger?

972
** `insert-buffer-substring' can insert part of the current buffer.
Dave Love's avatar
#  
Dave Love committed
973 974 975 976 977 978 979

The old restriction that the text being inserted had to come from
a different buffer is now lifted.

When inserting text from the current buffer, the text to be inserted
is determined from the specified bounds before any copying takes place.

980
** New function `substitute-key-definition'.
Dave Love's avatar
#  
Dave Love committed
981 982 983 984 985 986 987 988

This is a new way to replace one command with another command as the
binding of whatever keys may happen to refer to it.

(substitute-key-definition OLDDEF NEWDEF KEYMAP) looks through KEYMAP
for keys defined to run OLDDEF, and rebinds those keys to run NEWDEF
instead.

989
** New function `insert-char'.
Dave Love's avatar
#  
Dave Love committed
990 991 992

Insert a specified character, a specified number of times.

993
** `mark-marker' changed.
Dave Love's avatar
#  
Dave Love committed
994 995 996 997

When there is no mark, this now returns a marker that points
nowhere, rather than `nil'.

998
** `ding' accepts argument.
Dave Love's avatar
#  
Dave Love committed
999 1000 1001 1002 1003

When given an argument, the function `ding' does not terminate
execution of a keyboard macro.  Normally, `ding' does terminate
all macros that are currently executing.

1004
** New function `minibuffer-depth'.
Dave Love's avatar
#  
Dave Love committed
1005 1006 1007 1008 1009 1010

This function returns the current depth in minibuffer activations.
The value is zero when the minibuffer is not in use.
Values greater than one are possible if the user has entered the
minibuffer recursively.

1011
** New function `documentation-property'.
Dave Love's avatar
#  
Dave Love committed
1012 1013 1014 1015 1016 1017 1018 1019 1020

(documentation-property SYMBOL PROPNAME) is like (get SYMBOL PROPNAME),
except that if the property value is a number `documentation-property'
will take that number (or its absolute value) as a character position
in the DOC file and return the string found there.

(documentation-property VAR 'variable-documentation) is the proper
way for a Lisp program to get the documentation of variable VAR.

1021
** New documentation-string expansion feature.
Dave Love's avatar
#  
Dave Love committed
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047

If a documentation string (for a variable or function) contains text
of the form `\<FOO>', it means that all command names specified in
`\[COMMAND]' construct from that point on should be turned into keys
using the value of the variable FOO as the local keymap.  Thus, for example,

  `\<emacs-lisp-mode-map>\[eval-defun] evaluates the defun containing point.'

will expand into

  "ESC C-x evaluates the defun containing point."

regardless of the current major mode, because ESC C-x is defined to
run `eval-defun' in the keymap `emacs-lisp-mode-map'.  The effect is
to show the key for `eval-defun' in Emacs Lisp mode regardless of the
current major mode.

The `\<...>' construct applies to all `\[...]' constructs that follow it,
up to the end of the documentation string or the next `\<...>'.

Without `\<...>', the keys for commands specified in `\[...]' are found
in the current buffer's local map.

The current global keymap is always searched second, whether `\<...>'
has been used or not.

1048
** Multiple hooks allowed in certain contexts.
Dave Love's avatar
#  
Dave Love committed
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074

The old hook variables `find-file-hook', `find-file-not-found-hook' and
`write-file-hook' have been replaced.

The replacements are `find-file-hooks', `find-file-not-found-hooks'
and `write-file-hooks'.  Each holds a list of functions to be called;
by default, `nil', for no functions.  The functions are called in
order of appearance in the list.

In the case of `find-file-hooks', all the functions are executed.

In the case of `find-file-not-found-hooks', if any of the functions
returns non-`nil', the rest of the functions are not called.

In the case of `write-file-hooks', if any of the functions returns
non-`nil', the rest of the functions are not called, and the file is
considered to have been written already; so actual writing in the
usual way is not done.  If `write-file-hooks' is local to a buffer,
it is set to its global value if `set-visited-file-name' is called
(and thus by C-x C-w as well).

`find-file-not-found-hooks' and `write-file-hooks' can be used
together to implement editing of files that are not stored as Unix
files: stored in archives, or inside version control systems, or on
other machines running other operating systems and accessible via ftp.

1075
** New hooks for suspending Emacs.
Dave Love's avatar
#  
Dave Love committed
1076 1077 1078 1079 1080 1081 1082 1083 1084

Suspending Emacs runs the hook `suspend-hook' before suspending
and the hook `suspend-resume-hook' if the suspended Emacs is resumed.
Running a hook is done by applying the variable's value to no arguments
if the variable has a non-`nil' value.  If `suspend-hook' returns
non-`nil', then suspending is inhibited and so is running the
`suspend-resume-hook'.  The non-`nil' value means that the `suspend-hook'
has done whatever suspending is required.

1085
** Disabling commands can print a special message.
Dave Love's avatar
#  
Dave Love committed
1086 1087 1088 1089 1090

A command is disabled by giving it a non-`nil' `disabled' property.
Now, if this property is a string, it is included in the message
printed when the user tries to run the command.

1091
** Emacs can open TCP connections.
Dave Love's avatar
#  
Dave Love committed
1092 1093 1094 1095 1096 1097

The function `open-network-stream' opens a TCP connection to
a specified host and service.  Its value is a Lisp object that represents
the connection.  The object is a kind of "subprocess", and I/O are
done like I/O to subprocesses.

1098
** Display-related changes.
Dave Love's avatar
#  
Dave Love committed
1099

1100
*** New mode-line control features.
Dave Love's avatar
#  
Dave Love committed
1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122

The display of the mode line used to be controlled by a format-string
that was the value of the variable `mode-line-format'.

This variable still exists, but it now allows more general values,
not just strings.  Lists, cons cells and symbols are also meaningful.

The mode line contents are created by outputting various mode elements
one after the other.  Here are the kinds of objects that can be
used as mode elements, and what they do in the display:

  string        the contents of the string are output to the mode line,
		and %-constructs are replaced by other text.

  t or nil	ignored; no output results.

  symbol	the symbol's value is used.  If the value is a string,
		the string is output verbatim to the mode line
		(so %-constructs are not interpreted).  Otherwise,
		the symbol's value is processed as a mode element.

  list (whose first element is a string or list or cons cell)
1123
		the elements of the list are treated as mode elements,
Dave Love's avatar
#  
Dave Love committed
1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190
		so that the output they generate is concatenated,

  list (whose car is a symbol)
		if the symbol's value is non-nil, the second element of the
		list is treated as a mode element.  Otherwise, the third
		element (if any) of the list is treated as a mode element.

  cons (whose car is a positive integer)
		the cdr of the cons is used as a mode element, but
		the text it produces is padded, if necessary, to have
		at least the width specified by the integer.

  cons (whose car is a negative integer)
		the cdr of the cons is used as a mode element, but
		the text it produces is truncated, if necessary, to have
		at most the width specified by the integer.

There is always one mode element to start with, that being the value of
`mode-line-format', but if this value is a list then it leads to several
more mode elements, which can lead to more, and so on.

There is one new %-construct for mode elements that are strings:
`%n' displays ` Narrow' for a buffer that is narrowed.

The default value of `mode-line-format' refers to several other variables.
These variables are `mode-name', `mode-line-buffer-identification',
`mode-line-process', `mode-line-modified', `global-mode-string' and
`minor-mode-alist'.  The first four are local in every buffer in which they
are changed from the default.

mode-name	Name of buffer's major mode.  Local in every buffer.

mode-line-buffer-identification
		Normally the list ("Emacs: %17b"), it is responsible
		for displaying text to indicate what buffer is being shown
		and what kind of editing it is doing.  `Emacs' means
		that a file of characters is being edited.  Major modes
		such as Info and Dired which edit or view other kinds
		of data often change this value.  This variables becomes
		local to the current buffer if it is setq'd.

mode-line-process
		Normally nil, this variable is responsible for displaying
		information about the process running in the current buffer.
		M-x shell-mode and M-x compile alter this variable.

mode-line-modified
		This variable is responsible for displaying the indication
		of whether the current buffer is modified or read-only.
		By default its value is `("--%*%*-")'.

minor-mode-alist
		This variable is responsible for displaying text for those
		minor modes that are currently enabled.  Its value
		is a list of elements of the form (VARIABLE STRING),
		where STRING is to be displayed if VARIABLE's value
		(in the buffer whose mode line is being displayed)
		is non-nil.  This variable is not made local to particular
		buffers, but loading some libraries may add elements to it.

global-mode-string
		This variable is used to display the time, if you ask
		for that.

The idea of these variables is to eliminate the need for major modes
to alter mode-line-format itself.

1191
*** `window-point' valid for selected window.
Dave Love's avatar
#  
Dave Love committed
1192 1193 1194 1195

The value returned by `window-point' used to be incorrect when its
argument was the selected window.  Now the value is correct.

1196
*** Window configurations may be saved as Lisp objects.
Dave Love's avatar
#  
Dave Love committed
1197 1198 1199 1200 1201 1202 1203 1204 1205

The function `current-window-configuration' returns a special type of
Lisp object that represents the current layout of windows: the
sizes and positions of windows, which buffers appear in them, and
which parts of the buffers appear on the screen.

The function `set-window-configuration' takes one argument, which must
be a window configuration object, and restores that configuration.

1206
*** New hook `temp-output-buffer-show-hook'.
Dave Love's avatar
#  
Dave Love committed
1207 1208 1209 1210 1211 1212 1213 1214 1215

This hook allows you to control how help buffers are displayed.
Whenever `with-output-to-temp-buffer' has executed its body and wants
to display the temp buffer, if this variable is bound and non-`nil'
then its value is called with one argument, the temp buffer.
The hook function is solely responsible for displaying the buffer.
The standard manner of display--making the buffer appear in a window--is
used only if there is no hook function.

1216
*** New function `minibuffer-window'.
Dave Love's avatar
#  
Dave Love committed
1217 1218 1219 1220

This function returns the window used (sometimes) for displaying
the minibuffer.  It can be used even when the minibuffer is not active.

1221
*** New feature to `next-window'.
Dave Love's avatar
#  
Dave Love committed
1222 1223 1224 1225 1226 1227

If the optional second argument is neither `nil' nor `t', the minibuffer
window is omitted from consideration even when active; if the starting
window was the last non-minibuffer window, the value will be the first
non-minibuffer window.

1228
*** New variable `minibuffer-scroll-window'.
Dave Love's avatar
#  
Dave Love committed
1229 1230 1231 1232 1233

When this variable is non-`nil', the command `scroll-other-window'
uses it as the window to be scrolled.  Displays of completion-lists
set this variable to the window containing the display.

1234
*** New argument to `sit-for'.
Dave Love's avatar
#  
Dave Love committed
1235 1236 1237 1238

A non-nil second argument to `sit-for' means do not redisplay;
just wait for the specified time or until input is available.

1239
*** Deleted function `set-minor-mode'; minor modes must be changed.
Dave Love's avatar
#  
Dave Love committed
1240 1241 1242 1243 1244 1245 1246 1247

The function `set-minor-mode' has been eliminated.  The display
of minor mode names in the mode line is now controlled by the
variable `minor-mode-alist'.  To specify display of a new minor
mode, it is sufficient to add an element to this list.  Once that
is done, you can turn the mode on and off just by setting a variable,
and the display will show its status automatically.

1248
*** New variable `cursor-in-echo-area'.
Dave Love's avatar
#  
Dave Love committed
1249 1250 1251 1252 1253 1254 1255

If this variable is non-nil, the screen cursor appears on the
last line of the screen, at the end of the text displayed there.

Binding this variable to t is useful at times when reading single
characters of input with `read-char'.

1256
*** New per-buffer variable `selective-display-ellipses'.
Dave Love's avatar
#  
Dave Love committed
1257 1258 1259 1260 1261 1262 1263 1264 1265 1266

If this variable is non-nil, an ellipsis (`...') appears on the screen
at the end of each text line that is followed by invisible text.

If this variable is nil, no ellipses appear.  Then there is no sign
on the screen that invisible text is present.

Text is made invisible under the control of the variable
`selective-display'; this is how Outline mode and C-x $ work.

1267
*** New variable `no-redraw-on-reenter'.
Dave Love's avatar
#  
Dave Love committed
1268 1269 1270 1271 1272 1273

If you set this variable non-nil, Emacs will not clear the screen when
you resume it after suspending it.  This is for the sake of terminals
with multiple screens of memory, where the termcap entry has been set
up to switch between screens when Emacs is suspended and resumed.

1274
*** New argument to `set-screen-height' or `set-screen-width'.
Dave Love's avatar
#  
Dave Love committed
1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295

These functions now take an optional second argument which says
what significance the newly specified height or width has.

If the argument is nil, or absent, it means that Emacs should
believe that the terminal height or width really is as just specified.

If the argument is t, it means Emacs should not believe that the
terminal really is this high or wide, but it should use the
specific height or width as the number of lines or columns to display.
Thus, you could display only 24 lines on a screen known to have 48 lines.

What practical difference is there between using only 24 lines for display
and really believing that the terminal has 24 lines?

1. The ``real'' height of the terminal says what the terminal command
to move the cursor to the last line will do.

2. The ``real'' height of the terminal determines how much padding is
needed.

1296
** File-related changes.
Dave Love's avatar
#  
Dave Love committed
1297

1298
*** New parameter `backup-by-copying-when-mismatch'.
Dave Love's avatar
#  
Dave Love committed
1299 1300 1301 1302 1303 1304 1305

If this variable is non-`nil', then when Emacs is about to save a
file, it will create the backup file by copying if that would avoid
changing the file's uid or gid.

The default value of this variable is `nil', because usually it is
useful to have the uid of a file change according to who edited it
Paul Eggert's avatar
Paul Eggert committed
1306
last.  I recommend that this variable be left normally `nil' and
Dave Love's avatar
#  
Dave Love committed
1307 1308 1309
changed with a local variables list in those particular files where
the uid needs to be preserved.

1310
*** New parameter `file-precious-flag'.
Dave Love's avatar
#  
Dave Love committed
1311 1312 1313 1314 1315 1316 1317 1318 1319

If this variable is non-`nil', saving the buffer tries to avoid
leaving an incomplete file due to disk full or other I/O errors.
It renames the old file before saving.  If saving is successful,
the renamed file is deleted; if saving gets an error, the renamed
file is renamed back to the name you visited.

Backups are always made by copying for such files.

1320
*** New variable `buffer-offer-save'.
Dave Love's avatar
#  
Dave Love committed
1321 1322 1323 1324 1325 1326

If the value of this variable is non-`nil' in a buffer then exiting
Emacs will offer to save the buffer (if it is modified and nonempty)
even if the buffer is not visiting a file.  This variable is
automatically made local to the current buffer whenever it is set.

1327
*** `rename-file', `copy-file', `add-name-to-file' and `make-symbolic-link'.
Dave Love's avatar
#  
Dave Love committed
1328 1329 1330 1331 1332 1333 1334 1335

The third argument to these functions used to be `t' or `nil'; `t'
meaning go ahead even if the specified new file name already has a file,
and `nil' meaning to get an error.

Now if the third argument is a number it means to ask the user for
confirmation in this case.

1336
*** New optional argument to `copy-file'.
Dave Love's avatar
#  
Dave Love committed
1337 1338 1339 1340 1341

If `copy-file' receives a non-nil fourth argument, it attempts
to give the new copy the same time-of-last-modification that the
original file has.

1342
*** New function `file-newer-than-file-p'.
Dave Love's avatar
#  
Dave Love committed
1343 1344 1345 1346 1347 1348 1349

(file-newer-than-file-p FILE1 FILE2) returns non-nil if FILE1 has been
modified more recently than FILE2.  If FILE1 does not exist, the value
is always nil; otherwise, if FILE2 does not exist, the value is t.
This is meant for use when FILE2 depends on FILE1, to see if changes
in FILE1 make it necessary to recompute FILE2 from it.

1350
*** Changed function `file-exists-p'.
Dave Love's avatar
#  
Dave Love committed
1351 1352 1353 1354 1355

This function is no longer the same as `file-readable-p'.
`file-exists-p' can now return t for a file that exists but which
the fascists won't allow you to read.

1356
*** New function `file-locked-p'.
Dave Love's avatar
#  
Dave Love committed
1357 1358 1359 1360 1361

This function receives a file name as argument and returns `nil'
if the file is not locked, `t' if locked by this Emacs, or a
string giving the name of the user who has locked it.

1362
*** New function `file-name-sans-versions'.
Dave Love's avatar
#  
Dave Love committed
1363 1364 1365 1366

(file-name-sans-versions NAME) returns a substring of NAME, with any
version numbers or other backup suffixes deleted from the end.

1367
*** New functions for directory names.
Dave Love's avatar
#  
Dave Love committed
1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392

Although a directory is really a kind of file, specifying a directory
uses a somewhat different syntax from specifying a file.
In Emacs, a directory name is used as part of a file name.

On Unix, the difference is small: a directory name ends in a slash,
while a file name does not: thus, `/usr/rms/' to name a directory,
while `/usr/rms' names the file which holds that directory.

On VMS, the difference is considerable: `du:[rms.foo]' specifies a
directory, but the name of the file that holds that directory is
`du:[rms]foo.dir'.

There are two new functions for converting between directory names
and file names.  `directory-file-name' takes a directory name and
returns the name of the file in which that directory's data is stored.
`file-name-as-directory' takes the name of a file and returns
the corresponding directory name.  These always understand Unix file name
syntax; on VMS, they understand VMS syntax as well.

For example, (file-name-as-directory "/usr/rms") returns "/usr/rms/"
and (directory-file-name "/usr/rms/") returns "/usr/rms".
On VMS, (file-name-as-directory "du:[rms]foo.dir") returns "du:[rms.foo]"
and (directory-file-name "du:[rms.foo]") returns "du:[rms]foo.dir".

1393
*** Value of `file-attributes' changed.
Dave Love's avatar
#  
Dave Love committed
1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405

The function file-attributes returns a list containing many kinds of
information about a file.  Now the list has eleven elements.

The tenth element is `t' if deleting the file and creating another
file of the same name would result in a change in the file's group;
`nil' if there would be no change.  You can also think of this as
comparing the file's group with the default group for files created in
the same directory by you.

The eleventh element is the inode number of the file.

1406
*** VMS-only function `file-name-all-versions'.
Dave Love's avatar
#  
Dave Love committed
1407 1408 1409 1410 1411 1412

This function returns a list of all the completions, including version
number, of a specified version-number-less file name.  This is like
`file-name-all-completions', except that the latter returns values
that do not include version numbers.

1413
*** VMS-only variable `vms-stmlf-recfm'.
Dave Love's avatar
#  
Dave Love committed
1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425

On a VMS system, if this variable is non-nil, Emacs will give newly
created files the record format `stmlf'.  This is necessary for files
that must contain lines of arbitrary length, such as compiled Emacs
Lisp.

When writing a new version of an existing file, Emacs always keeps
the same record format as the previous version; so this variable has
no effect.

This variable has no effect on Unix systems.

1426
*** `insert-file-contents' on an empty file.
Dave Love's avatar
#  
Dave Love committed
1427 1428 1429

This no longer sets the buffer's "modified" flag.

1430
*** New function (VMS only) `define-logical-name':
Dave Love's avatar
#  
Dave Love committed
1431 1432 1433 1434 1435

(define-logical-name LOGICAL TRANSLATION) defines a VMS logical name
LOGICAL whose translation is TRANSLATION.  The new name applies to
the current process only.

1436
*** Deleted variable `ask-about-buffer-names'.
Dave Love's avatar
#  
Dave Love committed
1437 1438 1439 1440

If you want buffer names for files to be generated in a special way,
you must redefine `create-file-buffer'.

1441
** Subprocess-related changes.
Dave Love's avatar
#  
Dave Love committed
1442

1443
*** New function `process-list'.
Dave Love's avatar
#  
Dave Love committed
1444 1445 1446 1447

This function takes no arguments and returns a list of all
of Emacs's asynchronous subprocesses.

1448
*** New function `process-exit-status'.
Dave Love's avatar
#  
Dave Love committed
1449 1450 1451 1452 1453

This function, given a process, process name or buffer as argument,
returns the exit status code or signal number of the process.
If the process has not yet exited or died, this function returns 0.

1454
*** Process output ignores `buffer-read-only'.
Dave Love's avatar
#  
Dave Love committed
1455 1456 1457 1458

Output from a process will go into the process's buffer even if the
buffer is read only.

1459
*** Switching buffers in filter functions and sentinels.
Dave Love's avatar
#  
Dave Love committed
1460 1461 1462 1463 1464

Emacs no longer saves and restore the current buffer around calling
the filter and sentinel functions, so these functions can now
permanently alter the selected buffer in a straightforward manner.

1465
*** Specifying environment variables for subprocesses.
Dave Love's avatar
#  
Dave Love committed
1466 1467 1468 1469 1470 1471 1472 1473 1474

When a subprocess is started with `start-process' or `call-process',
the value of the variable `process-environment' is taken to
specify the environment variables to give the subprocess.  The
value should be a list of strings, each of the form "VAR=VALUE".

`process-environment' is initialized when Emacs starts up
based on Emacs's environment.

1475
*** New variable `process-connection-type'.
Dave Love's avatar
#  
Dave Love committed
1476 1477 1478 1479 1480 1481

If this variable is `nil', when a subprocess is created, Emacs uses
a pipe rather than a pty to communicate with it.  Normally this
variable is `t', telling Emacs to use a pty if ptys are supported
and one is available.

1482
*** New function `waiting-for-user-input-p'.
Dave Love's avatar
#  
Dave Love committed
1483 1484 1485 1486 1487

This function, given a subprocess as argument, returns `t' if that
subprocess appears to be waiting for input sent from Emacs,
or `nil' otherwise.

1488
*** New hook `shell-set-directory-error-hook'.
Dave Love's avatar
#  
Dave Love committed
1489 1490 1491 1492 1493

The value of this variable is called, with no arguments, whenever
Shell mode gets an error trying to keep track of directory-setting
commands (such as `cd' and `pushd') used in the shell buffer.

1494
** New functions `user-uid' and `user-real-uid'.
Dave Love's avatar
#  
Dave Love committed
1495 1496 1497 1498 1499

These functions take no arguments and return, respectively,
the effective uid and the real uid of the Emacs process.
The value in each case is an integer.

1500
** New variable `print-escape-newlines' controls string printing.
Dave Love's avatar
#  
Dave Love committed
1501 1502 1503 1504 1505

If this variable is non-`nil', then when a Lisp string is printed
by the Lisp printing function `prin1' or `print', newline characters
are printed as `\n' rather than as a literal newline.

1506
** New function `sysnetunam' on HPUX.
Dave Love's avatar
#  
Dave Love committed
1507 1508 1509 1510 1511 1512 1513

This function takes two arguments, a network address PATH and a
login string LOGIN, and executes the system call `netunam'.
It returns `t' if the call succeeds, otherwise `nil'.

News regarding installation:

1514
** Many `s-...' file names changed.
Dave Love's avatar
#  
Dave Love committed
1515 1516 1517 1518 1519 1520 1521

Many `s-...' files have been renamed.  All periods in such names,
except the ones just before the final `h', have been changed to
hyphens.  Thus, `s-bsd4.2.h' has been renamed to `s-bsd4-2.h'.

This is so a Unix distribution can be moved mechanically to VMS.

1522
** `DOCSTR...' file now called `DOC-...'.
Dave Love's avatar
#  
Dave Love committed
1523 1524 1525 1526 1527 1528 1529 1530 1531

The file of on-line documentation strings, that used to be
`DOCSTR.mm.nn.oo' in this directory, is now called `DOC-mm.nn.oo'.
This is so that it can port to VMS using the standard conventions
for translating filenames for VMS.

This file also now contains the doc strings for variables as
well as functions.

1532
** Emacs no longer uses floating point arithmetic.
Dave Love's avatar
#  
Dave Love committed
1533 1534 1535

This may make it easier to port to some machines.

1536
** Macros `XPNTR' and `XSETPNTR'; flag `DATA_SEG_BITS'.
Dave Love's avatar
#  
Dave Love committed
1537 1538 1539 1540 1541 1542 1543 1544 1545

These macros exclusively are used to unpack a pointer from a Lisp_Object
and to insert a pointer into a Lisp_Object.  Redefining them may help
port Emacs to machines in which all pointers to data objects have
certain high bits set.

If `DATA_SEG_BITS' is defined, it should be a number which contains
the high bits to be inclusive or'ed with pointers that are unpacked.

1546
** New flag `HAVE_X_MENU'.
Dave Love's avatar
#  
Dave Love committed
1547 1548 1549 1550 1551 1552 1553

Define this flag in `config.h' in addition to `HAVE_X_WINDOWS'
to enable use of the Emacs interface to X Menus.  On some operating
systems, the rest of the X interface works properly but X Menus
do not work; hence this separate flag.  See the file `src/xmenu.c'
for more information.

1554
** Macros `ARRAY_MARK_FLAG' and `DONT_COPY_FLAG'.
Dave Love's avatar
#  
Dave Love committed
1555

1556
** `HAVE_ALLOCA' prevents assembly of `alloca.s'.
Dave Love's avatar
#  
Dave Love committed
1557

1558
** `SYSTEM_MALLOC' prevents use of GNU `malloc.c'.
Dave Love's avatar
#  
Dave Love committed
1559 1560 1561 1562 1563 1564 1565

SYSTEM_MALLOC, if defined, means use the system's own `malloc' routines
rather than those that come with Emacs.

Use this only if absolutely necessary, because if it is used you do
not get warnings when space is getting low.

1566
** New flags to control unexec.
Dave Love's avatar
#  
Dave Love committed
1567 1568 1569 1570

See the file `unexec.c' for a long comment on the compilation
switches that suffice to make it work on many machines.

1571
** `PNTR_COMPARISON_TYPE'
Dave Love's avatar
#  
Dave Love committed
1572 1573 1574 1575

Pointers that need to be compared for ordering are converted to this type
first.  Normally this is `unsigned int'.

1576
** `HAVE_VFORK', `HAVE_DUP2' and `HAVE_GETTIMEOFDAY'.
Dave Love's avatar
#  
Dave Love committed
1577 1578 1579

These flags just say whether certain system calls are available.

1580
** New macros control compiler switches, linker switches and libraries.
Dave Love's avatar
#  
Dave Love committed
1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600

The m- and s- files can now control in a modular fashion the precise
arguments passed to `cc' and `ld'.

LIBS_STANDARD defines the standard C libraries.  Default is `-lc'.
LIBS_DEBUG defines the extra libraries to use when debugging.  Default `-lg'.
LIBS_SYSTEM can be defined by the s- file to specify extra libraries.
LIBS_MACHINE can be defined by the m- file to specify extra libraries.
LIBS_TERMCAP defines the libraries for Termcap or Terminfo.
  It is defined by default in a complicated fashion but the m- or s- file
  can override it.

LD_SWITCH_SYSTEM can be defined by the s- file to specify extra `ld' switches.
  The default is `-X' on BSD systems except those few that use COFF object files.
LD_SWITCH_MACHINE can be defined by the m- file to specify extra `ld' switches.

C_DEBUG_SWITCH defines the switches to give `cc' when debugging.  Default `-g'.
C_OPTIMIZE_SWITCH defines the switches to give `cc' to optimize.  Default `-O'.
C_SWITCH_MACHINE can be defined by the m- file to specify extra `cc' switches.

1601 1602


Dave Love's avatar
#  
Dave Love committed
1603
----------------------------------------------------------------------
1604
This file is part of GNU Emacs.
Dave Love's avatar
#  
Dave Love committed
1605

1606
GNU Emacs is free software: you can redistribute it and/or modify
1607
it under the terms of the GNU General Public License as published by
1608 1609
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
1610 1611 1612 1613 1614

GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
Dave Love's avatar
#  
Dave Love committed
1615

1616
You should have received a copy of the GNU General Public License
1617
along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
Dave Love's avatar
#  
Dave Love committed
1618 1619 1620


Local variables:
1621
mode: outline
Dave Love's avatar
#  
Dave Love committed
1622
end: