Source

emacs / lispref / anti.texi

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
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
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
@c Copyright (C) 1993 Free Software Foundation, Inc. 
@c See the file elisp.texi for copying conditions.
@node Antinews, Index, Standard Hooks, Top
@appendix Emacs 18 Antinews

For those users who live backwards in time, here is information about
downgrading to Emacs version 18.  We hope you will enjoy the greater
simplicity that results from the absence of many Emacs 19 features.

@section Old Features in the Lisp Language

The following functions are missing or different in Emacs version 18.

@itemize @bullet
@item
The functions @code{delete}, @code{member}, @code{indirect-function},
@code{map-y-or-n-p}, and @code{invocation-name} have been removed.

@item
The function @code{read} now skips a terminator character that
terminates a symbol when reading from a buffer.  Thus, if you use
@code{read} on a buffer containing @samp{foo(bar)} following point, it
returns @code{foo} and leaves point after the open-parenthesis.  This
means there's no way you can properly read the list @samp{(bar)}, but
that's the way the cookie crumbles.

Because of this simplification, it's no longer necessary for an input
stream function to accept an optional argument.  In Emacs 18, an input
stream is always called with no arguments, and should always return
the next character of input.

@item
The function @code{documentation} takes just one argument;
@code{documentation-property} takes just two.

@item
@code{random} no longer has the optional argument @var{n}.

@item 
You can no longer arrange to run a hook if a particular Lisp library is
loaded.  The variable @code{after-load-alist} and the function
@code{eval-after-load} have been removed.

@item
The function @code{autoload} no longer supports autoloading a keymap.

@item
``Magic'' comments of the form @samp{;;;###autoload} are now just
comments.  They don't do anything in particular except look pretty.
If you want a function to be autoloaded by default, edit @file{loaddefs.h}
by hand.  What do you think editors are for? 

@item
We took out the @samp{%S} from the @code{format} function, and the
optional argument @var{noescap} from @code{prin1-to-string}.  We removed
the @code{print-level} variable.
@end itemize

@section Compilation Features

@itemize @bullet
@item
Inline functions are nonexistent in Emacs 18.  We find they make the
calling function unnecessarily large.  (Small size is one of the 
features of Emacs 18.)

@item
We eliminated the two special forms, @code{eval-when-compile} and
@code{eval-and-compile}, as well as the @code{compile-defun} command.

@item
When you load a Lisp file or library, you will no longer receive a
warning if the directory contains both a @samp{.elc} file and a new
@samp{.el} file that is newer.  So be on your toes.

@item
We removed the special data type for byte-code functions.  Compiled
functions now work by means of an interpreted function which calls
the function @code{bytecode}.  That function runs the byte code
interpreter.
@end itemize

@section Floating Point Numbers

Emacs 18 doesn't have or need floating point arithmetic built in.
It has a handy Lisp program that allows you to emulate floating point.
You'll have to write programs specially to use it, though.

As a result, certain macros, functions, and predicates no longer handle
specifications for floating point numbers.

@itemize @bullet
@item
The function @code{string-to-number}, the predicate @code{floatp}, and
the variable @code{float-output-format} have all been eliminated.

@item
The functions @code{float}, @code{truncate}, @code{floor}, @code{ceil},
@code{round}, and @code{logb} do not exist; neither do the functions
@code{abs}, @code{cos}, @code{sin}, @code{tan}, @code{acos},
@code{asin}, @code{atan}, @code{exp}, @code{expt}, @code{log10},
@code{log}, or @code{sqrt}.

@item
The @code{format} function no longer handles the specifications
@samp{%e}, @samp{%f} and @samp{%g} for printing floating point numbers;
likewise for @code{message}.
@end itemize

@section Changes in Basic Editing Functions

@itemize @bullet
@item
@code{kill-new} and @code{kill-append}, the primitives for putting text
in the kill ring, have been eliminated.
@c @code{kill-append} seems to exist as a non-documented (no doc string)
@c primitive in emacs 18.  but news.texi said it was new for 19.

@item
The variables @code{interprogram-paste-function} and
@code{interprogram-cut-function} have been removed in Emacs 18.

In addition, there's no need for @code{mark-active} and
@code{deactivate-mark} because there is no Transient Mark mode.  We also
removed the hooks @code{activate-mark-hook} and
@code{deactivate-mark-hook}.

@item
The @code{kill-region} function can no longer be used in read-only
buffers.  The @code{compare-buffer-substrings} and @code{current-kill}
functions have been removed.

@item
The variable @code{overwrite-mode-binary} has been removed.

@item
The function @code{move-to-column} allows just one argument,
@var{column}. 

@item 
The search functions now just return @code{t} when successful.  This
affects the functions @code{search-forward}, @code{search-backward},
@code{word-search-forward}, @code{word-search-backward},
@code{re-search-forward}, and @code{re-search-backward}.

@item
When you do regular expression searching or matching, there is a fixed
limit of ten @samp{\(@dots{}\)} pairs that you can get information about
with @code{match-beginning} and @code{match-end}.  Moreover,
@code{save-match-data} does not exist; you must use an explicit
@code{unwind-protect} to save the match data.

@item
@code{translate-region} is gone.

@item
The variables @code{before-change-function},
@code{after-change-function}, and @code{first-change-hook} have been
eliminated.

@item
The second argument to @code{insert-abbrev-table-description} is no
longer optional.
@end itemize

@section Text Properties

We eliminated text properties.

@section Features for Files
 
Many file-related functions have been eliminated or simplified.  Here is
a basic listing of these functions.

@itemize @bullet
@item
The functions @code{file-accessible-directory-p}, @code{file-truename},
@code{make-directory}, @code{delete-directory},
@code{set-visited-file-modtime}, @code{directory-abbrev-alist},
@code{abbreviate-file-name}, @code{write-region},
@code{write-contents-hooks}, @code{after-save-hook},
@code{set-default-file-modes}, @code{default-file-modes}, and
@code{unix-sync} have been eliminated.

@item
We got rid of the ``initial file name'' argument to
@code{read-file-name}.

@item
Additionally, we removed the 12th element from the list returned by
@code{file-attributes}.

@item
@code{directory-files} always sorts the list of files.  It's not user
friendly to process the files in any haphazard order.

@item
We eliminated the variables @code{write-contents-hooks} and
@code{local-write-file-hooks}.
@end itemize

@section Making Certain File Names ``Magic''

There are no more magic filenames.  Sorry, but all the mana has been
used up.

@section Frames

There is only one frame in Emacs 18, so all of the frame functions have
been eliminated.

@section X Window System Features

We have simplified the way Emacs and X interact by removing a great deal
of creeping featurism.

@itemize @bullet
@item
The functions @code{mouse-position} and @code{set-mouse-position}, and
the special form @code{track-mouse}, have been eliminated.

@item
Likewise, the functions @code{x-set-selection}, @code{x-set-cut-buffer},
@code{x-close-current-connection}, and @code{x-open-connection} have all
been removed from Emacs Lisp 18.

@item
We removed a series of functions that gave information about the X
server and the screen you were using; after all, the whole point of X is
that all servers are equivalent.  The names of the removed functions
are: @code{x-display-screens}, @code{x-server-version},
@code{x-server-vendor}, @code{x-display-pixel-height},
@code{x-display-mm-height}, @code{x-display-pixel-width},
@code{x-display-mm-width}, @code{x-display-backing-store},
@code{x-display-save-under}, @code{x-display-planes},
@code{x-display-visual-class}, @code{x-display-color-p}, and
@code{x-display-color-cells}.

@item
Additionally, we removed the variable @code{x-no-window-manager} and the
functions @code{x-synchronize} and @code{x-get-resource}.

@item
We didn't abolish @code{x-display-color-p}, but we renamed it to
@code{x-color-display-p}.  We did abolish @code{x-color-defined-p}.

@item
@code{x-popup-menu} no longer accepts a keymap for its first argument.

@item
We removed both the function @code{x-rebind-key} and the related
function @code{x-rebind-keys}.

@item 
We abolished @code{x-parse-geometry}.
@end itemize

@section Window Actions that Were No Longer Useful

Various behaviors of windows in Emacs 19 were obsolete by the time Emacs
18 was due to come out.  We have removed them.  These changes are listed
below. 

@itemize @bullet
@item
We removed the functions @code{window-at}, @code{window-minibuffer-p},
@code{set-window-dedicated-p}, @code{coordinates-in-window-p},
@code{walk-windows}, @code{window-dedicated-p}, and @code{window-end}.

@item
We removed the variables @code{pop-up-frames},
@code{pop-up-frame-function}, @code{display-buffer-function}, and
@code{other-window-scroll-buffer}.

@item
The function @code{minibuffer-window} no longer accepts a frame as
argument, since frames as objects do not exist in Emacs version 18.  It
returns the window used for minibuffers.

@item
The functions @code{next-window} and @code{previous-window} no longer
accept the @var{all-frames} argument since there is just one frame.

@item
The functions @code{get-lru-window}, @code{get-largest-window},
@code{get-buffer-window}, and @code{get-buffer-window} also no longer
take the optional argument @var{all-frames} because there is just one
frame to search.
@end itemize

@section Display Features

@itemize @bullet
@item
There are no overlays, and no faces.

@item
We eliminated the mode line spec @samp{%l} that in later versions used
to display the current line number.  We removed the variables
@code{line-number-mode} and @code{line-number-display-limit}.

@item
@code{baud-rate} is now a function rather than a variable.

@item
You can no longer call @code{message} with @code{nil} as the only
argument; therefore, you can not reliably make the contents of the
minibuffer visible.

@item
The variable @code{temp-buffer-show-function} has been renamed
@code{temp-buffer-show-hook}.

@item
We removed the function @code{force-mode-line-update}.  Use
the following idiom instead:

@example
(set-buffer-modified-p (buffer-modified-p))
@end example

@item
Display tables no longer exist.  We know what the @sc{ASCII} characters
should look like, and we made them look that way.
@end itemize

@section Working with Input Events

The big news about input events is that we got rid of function key
and mouse events.  Now the only input events are characters.
What's more, these characters now have to be in the range of 0 to 127,
optionally with a meta bit.  This makes for big simplifications.

@itemize @bullet
@item
Functions like @code{define-key}, @code{global-set-key},
@code{read-key-sequence}, and @code{local-set-key} used to accept
strings or vectors in Emacs 19; now they only accept strings.

@item
The documentation functions (@code{single-key-description},
@code{key-description}, etc.) also no longer accept vectors, but they do
accept strings.

@item
We removed the @code{read-event}, @code{event-start},
@code{posn-window}, @code{posn-point}, @code{posn-col-row},
@code{posn-timestamp}, @code{scroll-bar-scale}, and @code{event-end}
functions, since they were useful only for non-character events.

@item
We removed the @code{unread-command-events} and @code{last-event-frame}
variables.

@item
The functions @code{this-command-keys} and @code{recent-keys} now always
return a string.  Likewise, a keyboard macro's definition can only be a
string, not a vector.

@item
We eliminated @samp{e} as an interactive specification since it
was useful only with non-character events.

@item
In Emacs 18, we represent Meta characters as character objects with the
same encoding used in strings: 128 plus the corresponding non-Meta
@sc{ASCII} character.
@end itemize

@section Menus

@itemize @bullet
@item
You can no longer define menus as keymaps; good system design requires
crafting a special-purpose interface for each facility, so it can
precisely fit the requirements of that facility.  We decided that
unifying keymaps and menus was simply too much of a strain.

@item
In Emacs 18, you can activate menus only with the mouse.  Using them
with a keyboard was too confusing for too many users.

@item
Emacs 18 has no menu bars.  All functions and variables related to the
menu bar have been eliminated.
@end itemize

@section Changes in Minibuffer Features

@itemize @bullet
@item
The minibuffer history feature has been eliminated.  Thus, we removed
the optional argument @var{hist} from the minibuffer input functions
@code{read-from-minibuffer} and @code{completing-read}.

@item
The @var{initial} argument to @code{read-from-minibuffer} and other
minibuffer input functions can no longer be a cons cell
@code{(@var{string} . @var{position})}.

@item
In the function @code{read-no-blanks-input}, the @var{initial} argument
is no longer optional.
@end itemize

@section New Features for Defining Commands

@itemize @bullet
@item
The special meaning of @samp{@@} in an interactive specification has
been eliminated.

@item
Emacs 18 does not support use of format-style @samp{%}-sequences in the
prompt strings in interactive specifications.

@item
The property @code{enable-recursive-minibuffers} no longer has any
special meaning.
@end itemize

@section Removed Features for Reading Input

@itemize @bullet
@item
We removed the third argument (@var{meta}) from the function
@code{set-input-mode}.  Consequently, we added the variable
@code{meta-flag}; set it to @code{t} to enable use of a Meta key, and
to @code{nil} to disable it.  (Those are the only two alternatives.)

@item
We also removed the variable @code{extra-keyboard-modifiers}.

@item
We removed the function @code{keyboard-translate} and the variables
@code{num-input-keys} and @code{function-key-map}.
@end itemize

@section Removed Syntax Table Features

@itemize @bullet
@item
We eliminated the functions @code{skip-syntax-forward},
@code{skip-syntax-backward}, @code{forward-comment}.

@item
We removed the syntax flag for ``prefix syntax'' and the flag for the
alternate comment style.  Emacs 18 supports only one style of comment
in any given syntax table.

@item
We abolished the variable @code{words-include-escapes}.
@end itemize

@section The Case Table

@itemize @bullet
@item
Case tables do not exist in Emacs 18.  Due to this change, we have
removed the associated functions @code{set-standard-case-table},
@code{standard-case-table}, @code{current-case-table},
@code{set-case-table}, and @code{set-case-syntax-pair}.
@end itemize

@section Features for Dealing with Buffers

@itemize @bullet
@item
We eliminated several functions for dealing with buffers:
@code{buffer-modified-tick} and @code{generate-new-buffer-name}.

@item
We renamed @code{buffer-disable-undo} to @code{buffer-flush-undo}---a
more picturesque name, you will agree.

@item
The function @code{other-buffer} takes just one argument in Emacs 18.

@item
The function @code{rename-buffer} now requires you to specify precisely
the new name you want.

@item
We removed the local variable @code{list-buffers-directory}.

@item
We got rid of the hook @code{kill-buffer-hook}.
@end itemize

@section Local Variables Features

@itemize @bullet
@item
The function @code{kill-all-local-variables} always eliminates all
buffer-local variables of the current buffer.  No more exceptions.

@item
Making a variable buffer-local when it is void now sets it to
@code{nil}.

@item
We eliminated the functions @code{default-boundp}, because it is no
longer possible for the default binding of a variable to be void.

@item
The special forms @code{defconst} and @code{defvar} now set the
variable's local value rather than its default value when the variable
is local in the current buffer.
@end itemize

@section Features for Subprocesses

@itemize @bullet
@item
@code{call-process} and @code{call-process-region} no longer indicate
the termination status of the subprocess.  We call on users to have faith
that the subprocess executed properly.

@item
The standard asynchronous subprocess features do not work on VMS;
instead, special VMS asynchronous subprocess functions have been added.
Since they are only for VMS, we can't be bothered documenting them;
sorry.  Use the source, Luke!

@item
The function @code{signal-process} has been removed.

@item
We eliminated the transaction queue feature, and the associated
functions @code{tq-create}, @code{tq-enqueue}, and @code{tq-close}.
@end itemize

@section Dealing with Times And Time Delays

@itemize @bullet
@item
We removed the functions @code{current-time}, @code{current-time-zone},
@code{run-at-time}, and @code{cancel-timer}. 

@item
The function @code{current-time-string} no longer accepts any optional
arguments.

@item
The functions @code{sit-for} and @code{sleep-for} no longer allow an
optional argument to let you specify the time period in milliseconds;
just in seconds.  Additionally, we took out the optional third argument
@var{nodisp} from @code{sit-for}.

@item
We removed the optional second and third arguments from the
@code{accept-process-output} function.  It accepts just one argument,
the process.
@end itemize

@need 3000

@section Features not Available for Lisp Debuggers

@itemize @bullet
@item
In Emacs 18, you can no longer specify to invoke the Lisp debugger only
upon encountering certain types of errors.  Any non-@code{nil} value for
the variable @code{debug-on-error} says to invoke the debugger for any
error whatever.

@item
We removed the variable @code{command-debug-status} and the function
@code{backtrace-frame}. 
@end itemize

@section Memory Allocation Changes

@itemize @bullet
@item
We removed the function @code{memory-limit}.

@item
The list returned by @code{garbage-collect} no longer contains an
element to describe floating point numbers, since there aren't any
floating point numbers in Emacs 18.
@end itemize

@section Hook Changes

@itemize @bullet
@item
We removed the hooks @code{pre-abbrev-expand-hook},
@code{pre-command-hook}, @code{post-command-hook}, and
@code{auto-save-hook}.

@item
We removed the variable
@code{revert-buffer-insert-file-contents-function}.

@item
We also removed the new function @code{add-hook}; you will have to set
your hooks by hand.  If you want to get really into the swing of things,
set your hook variables the archaic way: store just one function rather
than a list of functions.  But that is optional.

@item
The variable @code{lisp-indent-hook} has been renamed to
@code{lisp-indent-function}.

@item
The variable @code{auto-fill-function} has been renamed to
@code{auto-fill-hook}.

@item
The @code{blink-paren-function} has been renamed to
@code{blink-paren-hook}.

@item
The variable @code{temp-buffer-show-function} has been renamed to
@code{temp-buffer-show-hook}.
@end itemize
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.