2 @c This is part of the GNU Emacs Lisp Reference Manual.
3 @c Copyright (C) 1993 Free Software Foundation, Inc.
4 @c See the file elisp.texi for copying conditions.
5 @node Antinews, Index, Standard Hooks, Top
6 @appendix Emacs 18 Antinews
8 For those users who live backwards in time, here is information about
9 downgrading to Emacs version 18. We hope you will enjoy the greater
10 simplicity that results from the absence of many Emacs 19 features.
12 @section Old Features in the Lisp Language
14 The following functions are missing or different in Emacs version 18.
18 The functions @code{delete}, @code{member}, @code{indirect-function},
19 @code{map-y-or-n-p}, and @code{invocation-name} have been removed.
22 The function @code{read} now skips a terminator character that
23 terminates a symbol when reading from a buffer. Thus, if you use
24 @code{read} on a buffer containing @samp{foo(bar)} following point, it
25 returns @code{foo} and leaves point after the open-parenthesis. This
26 means there's no way you can properly read the list @samp{(bar)}, but
27 that's the way the cookie crumbles.
29 Because of this simplification, it's no longer necessary for an input
30 stream function to accept an optional argument. In Emacs 18, an input
31 stream is always called with no arguments, and should always return
32 the next character of input.
35 The function @code{documentation} takes just one argument;
36 @code{documentation-property} takes just two.
39 @code{random} no longer has the optional argument @var{n}.
42 You can no longer arrange to run a hook if a particular Lisp library is
43 loaded. The variable @code{after-load-alist} and the function
44 @code{eval-after-load} have been removed.
47 The function @code{autoload} no longer supports autoloading a keymap.
50 ``Magic'' comments of the form @samp{;;;###autoload} are now just
51 comments. They don't do anything in particular except look pretty.
52 If you want a function to be autoloaded by default, edit @file{loaddefs.h}
53 by hand. What do you think editors are for?
56 We took out the @samp{%S} from the @code{format} function, and the
57 optional argument @var{noescap} from @code{prin1-to-string}. We removed
58 the @code{print-level} variable.
61 @section Compilation Features
65 Inline functions are nonexistent in Emacs 18. We find they make the
66 calling function unnecessarily large. (Small size is one of the
67 features of Emacs 18.)
70 We eliminated the two special forms, @code{eval-when-compile} and
71 @code{eval-and-compile}, as well as the @code{compile-defun} command.
74 When you load a Lisp file or library, you will no longer receive a
75 warning if the directory contains both a @samp{.elc} file and a new
76 @samp{.el} file that is newer. So be on your toes.
79 We removed the special data type for byte-code functions. Compiled
80 functions now work by means of an interpreted function which calls
81 the function @code{bytecode}. That function runs the byte code
85 @section Floating Point Numbers
87 Emacs 18 doesn't have or need floating point arithmetic built in.
88 It has a handy Lisp program that allows you to emulate floating point.
89 You'll have to write programs specially to use it, though.
91 As a result, certain macros, functions, and predicates no longer handle
92 specifications for floating point numbers.
96 The function @code{string-to-number}, the predicate @code{floatp}, and
97 the variable @code{float-output-format} have all been eliminated.
100 The functions @code{float}, @code{truncate}, @code{floor}, @code{ceil},
101 @code{round}, and @code{logb} do not exist; neither do the functions
102 @code{abs}, @code{cos}, @code{sin}, @code{tan}, @code{acos},
103 @code{asin}, @code{atan}, @code{exp}, @code{expt}, @code{log10},
104 @code{log}, or @code{sqrt}.
107 The @code{format} function no longer handles the specifications
108 @samp{%e}, @samp{%f} and @samp{%g} for printing floating point numbers;
109 likewise for @code{message}.
112 @section Changes in Basic Editing Functions
116 @code{kill-new} and @code{kill-append}, the primitives for putting text
117 in the kill ring, have been eliminated.
118 @c @code{kill-append} seems to exist as a non-documented (no doc string)
119 @c primitive in emacs 18. but news.texi said it was new for 19.
122 The variables @code{interprogram-paste-function} and
123 @code{interprogram-cut-function} have been removed in Emacs 18.
125 In addition, there's no need for @code{mark-active} and
126 @code{deactivate-mark} because there is no Transient Mark mode. We also
127 removed the hooks @code{activate-mark-hook} and
128 @code{deactivate-mark-hook}.
131 The @code{kill-region} function can no longer be used in read-only
132 buffers. The @code{compare-buffer-substrings} and @code{current-kill}
133 functions have been removed.
136 The variable @code{overwrite-mode-binary} has been removed.
139 The function @code{move-to-column} allows just one argument,
143 The search functions now just return @code{t} when successful. This
144 affects the functions @code{search-forward}, @code{search-backward},
145 @code{word-search-forward}, @code{word-search-backward},
146 @code{re-search-forward}, and @code{re-search-backward}.
149 When you do regular expression searching or matching, there is a fixed
150 limit of ten @samp{\(@dots{}\)} pairs that you can get information about
151 with @code{match-beginning} and @code{match-end}. Moreover,
152 @code{save-match-data} does not exist; you must use an explicit
153 @code{unwind-protect} to save the match data.
156 @code{translate-region} is gone.
159 The variables @code{before-change-function},
160 @code{after-change-function}, and @code{first-change-hook} have been
164 The second argument to @code{insert-abbrev-table-description} is no
168 @section Text Properties
170 We eliminated text properties.
172 @section Features for Files
174 Many file-related functions have been eliminated or simplified. Here is
175 a basic listing of these functions.
179 The functions @code{file-accessible-directory-p}, @code{file-truename},
180 @code{make-directory}, @code{delete-directory},
181 @code{set-visited-file-modtime}, @code{directory-abbrev-alist},
182 @code{abbreviate-file-name}, @code{write-region},
183 @code{write-contents-hooks}, @code{after-save-hook},
184 @code{set-default-file-modes}, @code{default-file-modes}, and
185 @code{unix-sync} have been eliminated.
188 We got rid of the ``initial file name'' argument to
189 @code{read-file-name}.
192 Additionally, we removed the 12th element from the list returned by
193 @code{file-attributes}.
196 @code{directory-files} always sorts the list of files. It's not user
197 friendly to process the files in any haphazard order.
200 We eliminated the variables @code{write-contents-hooks} and
201 @code{local-write-file-hooks}.
204 @section Making Certain File Names ``Magic''
206 There are no more magic filenames. Sorry, but all the mana has been
211 There is only one frame in Emacs 18, so all of the frame functions have
214 @section X Window System Features
216 We have simplified the way Emacs and X interact by removing a great deal
217 of creeping featurism.
221 The functions @code{mouse-position} and @code{set-mouse-position}, and
222 the special form @code{track-mouse}, have been eliminated.
225 Likewise, the functions @code{x-set-selection}, @code{x-set-cut-buffer},
226 @code{x-close-current-connection}, and @code{x-open-connection} have all
227 been removed from Emacs Lisp 18.
230 We removed a series of functions that gave information about the X
231 server and the screen you were using; after all, the whole point of X is
232 that all servers are equivalent. The names of the removed functions
233 are: @code{x-display-screens}, @code{x-server-version},
234 @code{x-server-vendor}, @code{x-display-pixel-height},
235 @code{x-display-mm-height}, @code{x-display-pixel-width},
236 @code{x-display-mm-width}, @code{x-display-backing-store},
237 @code{x-display-save-under}, @code{x-display-planes},
238 @code{x-display-visual-class}, @code{x-display-color-p}, and
239 @code{x-display-color-cells}.
242 Additionally, we removed the variable @code{x-no-window-manager} and the
243 functions @code{x-synchronize} and @code{x-get-resource}.
246 We didn't abolish @code{x-display-color-p}, but we renamed it to
247 @code{x-color-display-p}. We did abolish @code{x-color-defined-p}.
250 @code{x-popup-menu} no longer accepts a keymap for its first argument.
253 We removed both the function @code{x-rebind-key} and the related
254 function @code{x-rebind-keys}.
257 We abolished @code{x-parse-geometry}.
260 @section Window Actions that Were No Longer Useful
262 Various behaviors of windows in Emacs 19 were obsolete by the time Emacs
263 18 was due to come out. We have removed them. These changes are listed
268 We removed the functions @code{window-at}, @code{window-minibuffer-p},
269 @code{set-window-dedicated-p}, @code{coordinates-in-window-p},
270 @code{walk-windows}, @code{window-dedicated-p}, and @code{window-end}.
273 We removed the variables @code{pop-up-frames},
274 @code{pop-up-frame-function}, @code{display-buffer-function}, and
275 @code{other-window-scroll-buffer}.
278 The function @code{minibuffer-window} no longer accepts a frame as
279 argument, since frames as objects do not exist in Emacs version 18. It
280 returns the window used for minibuffers.
283 The functions @code{next-window} and @code{previous-window} no longer
284 accept the @var{all-frames} argument since there is just one frame.
287 The functions @code{get-lru-window}, @code{get-largest-window},
288 @code{get-buffer-window}, and @code{get-buffer-window} also no longer
289 take the optional argument @var{all-frames} because there is just one
293 @section Display Features
297 There are no overlays, and no faces.
300 We eliminated the mode line spec @samp{%l} that in later versions used
301 to display the current line number. We removed the variables
302 @code{line-number-mode} and @code{line-number-display-limit}.
305 @code{baud-rate} is now a function rather than a variable.
308 You can no longer call @code{message} with @code{nil} as the only
309 argument; therefore, you can not reliably make the contents of the
313 The variable @code{temp-buffer-show-function} has been renamed
314 @code{temp-buffer-show-hook}.
317 We removed the function @code{force-mode-line-update}. Use
318 the following idiom instead:
321 (set-buffer-modified-p (buffer-modified-p))
325 Display tables no longer exist. We know what the @sc{ASCII} characters
326 should look like, and we made them look that way.
329 @section Working with Input Events
331 The big news about input events is that we got rid of function key
332 and mouse events. Now the only input events are characters.
333 What's more, these characters now have to be in the range of 0 to 127,
334 optionally with a meta bit. This makes for big simplifications.
338 Functions like @code{define-key}, @code{global-set-key},
339 @code{read-key-sequence}, and @code{local-set-key} used to accept
340 strings or vectors in Emacs 19; now they only accept strings.
343 The documentation functions (@code{single-key-description},
344 @code{key-description}, etc.) also no longer accept vectors, but they do
348 We removed the @code{read-event}, @code{event-start},
349 @code{posn-window}, @code{posn-point}, @code{posn-col-row},
350 @code{posn-timestamp}, @code{scroll-bar-scale}, and @code{event-end}
351 functions, since they were useful only for non-character events.
354 We removed the @code{unread-command-events} and @code{last-event-frame}
358 The functions @code{this-command-keys} and @code{recent-keys} now always
359 return a string. Likewise, a keyboard macro's definition can only be a
360 string, not a vector.
363 We eliminated @samp{e} as an interactive specification since it
364 was useful only with non-character events.
367 In Emacs 18, we represent Meta characters as character objects with the
368 same encoding used in strings: 128 plus the corresponding non-Meta
369 @sc{ASCII} character.
376 You can no longer define menus as keymaps; good system design requires
377 crafting a special-purpose interface for each facility, so it can
378 precisely fit the requirements of that facility. We decided that
379 unifying keymaps and menus was simply too much of a strain.
382 In Emacs 18, you can activate menus only with the mouse. Using them
383 with a keyboard was too confusing for too many users.
386 Emacs 18 has no menu bars. All functions and variables related to the
387 menu bar have been eliminated.
390 @section Changes in Minibuffer Features
394 The minibuffer history feature has been eliminated. Thus, we removed
395 the optional argument @var{hist} from the minibuffer input functions
396 @code{read-from-minibuffer} and @code{completing-read}.
399 The @var{initial} argument to @code{read-from-minibuffer} and other
400 minibuffer input functions can no longer be a cons cell
401 @code{(@var{string} . @var{position})}.
404 In the function @code{read-no-blanks-input}, the @var{initial} argument
405 is no longer optional.
408 @section New Features for Defining Commands
412 The special meaning of @samp{@@} in an interactive specification has
416 Emacs 18 does not support use of format-style @samp{%}-sequences in the
417 prompt strings in interactive specifications.
420 The property @code{enable-recursive-minibuffers} no longer has any
424 @section Removed Features for Reading Input
428 We removed the third argument (@var{meta}) from the function
429 @code{set-input-mode}. Consequently, we added the variable
430 @code{meta-flag}; set it to @code{t} to enable use of a Meta key, and
431 to @code{nil} to disable it. (Those are the only two alternatives.)
434 We also removed the variable @code{extra-keyboard-modifiers}.
437 We removed the function @code{keyboard-translate} and the variables
438 @code{num-input-keys} and @code{function-key-map}.
441 @section Removed Syntax Table Features
445 We eliminated the functions @code{skip-syntax-forward},
446 @code{skip-syntax-backward}, @code{forward-comment}.
449 We removed the syntax flag for ``prefix syntax'' and the flag for the
450 alternate comment style. Emacs 18 supports only one style of comment
451 in any given syntax table.
454 We abolished the variable @code{words-include-escapes}.
457 @section The Case Table
461 Case tables do not exist in Emacs 18. Due to this change, we have
462 removed the associated functions @code{set-standard-case-table},
463 @code{standard-case-table}, @code{current-case-table},
464 @code{set-case-table}, and @code{set-case-syntax-pair}.
467 @section Features for Dealing with Buffers
471 We eliminated several functions for dealing with buffers:
472 @code{buffer-modified-tick} and @code{generate-new-buffer-name}.
475 We renamed @code{buffer-disable-undo} to @code{buffer-flush-undo}---a
476 more picturesque name, you will agree.
479 The function @code{other-buffer} takes just one argument in Emacs 18.
482 The function @code{rename-buffer} now requires you to specify precisely
483 the new name you want.
486 We removed the local variable @code{list-buffers-directory}.
489 We got rid of the hook @code{kill-buffer-hook}.
492 @section Local Variables Features
496 The function @code{kill-all-local-variables} always eliminates all
497 buffer-local variables of the current buffer. No more exceptions.
500 Making a variable buffer-local when it is void now sets it to
504 We eliminated the functions @code{default-boundp}, because it is no
505 longer possible for the default binding of a variable to be void.
508 The special forms @code{defconst} and @code{defvar} now set the
509 variable's local value rather than its default value when the variable
510 is local in the current buffer.
513 @section Features for Subprocesses
517 @code{call-process} and @code{call-process-region} no longer indicate
518 the termination status of the subprocess. We call on users to have faith
519 that the subprocess executed properly.
522 The standard asynchronous subprocess features do not work on VMS;
523 instead, special VMS asynchronous subprocess functions have been added.
524 Since they are only for VMS, we can't be bothered documenting them;
525 sorry. Use the source, Luke!
528 The function @code{signal-process} has been removed.
531 We eliminated the transaction queue feature, and the associated
532 functions @code{tq-create}, @code{tq-enqueue}, and @code{tq-close}.
535 @section Dealing with Times And Time Delays
539 We removed the functions @code{current-time}, @code{current-time-zone},
540 @code{run-at-time}, and @code{cancel-timer}.
543 The function @code{current-time-string} no longer accepts any optional
547 The functions @code{sit-for} and @code{sleep-for} no longer allow an
548 optional argument to let you specify the time period in milliseconds;
549 just in seconds. Additionally, we took out the optional third argument
550 @var{nodisp} from @code{sit-for}.
553 We removed the optional second and third arguments from the
554 @code{accept-process-output} function. It accepts just one argument,
560 @section Features not Available for Lisp Debuggers
564 In Emacs 18, you can no longer specify to invoke the Lisp debugger only
565 upon encountering certain types of errors. Any non-@code{nil} value for
566 the variable @code{debug-on-error} says to invoke the debugger for any
570 We removed the variable @code{command-debug-status} and the function
571 @code{backtrace-frame}.
574 @section Memory Allocation Changes
578 We removed the function @code{memory-limit}.
581 The list returned by @code{garbage-collect} no longer contains an
582 element to describe floating point numbers, since there aren't any
583 floating point numbers in Emacs 18.
586 @section Hook Changes
590 We removed the hooks @code{pre-abbrev-expand-hook},
591 @code{pre-command-hook}, @code{post-command-hook}, and
592 @code{auto-save-hook}.
595 We removed the variable
596 @code{revert-buffer-insert-file-contents-function}.
599 We also removed the new function @code{add-hook}; you will have to set
600 your hooks by hand. If you want to get really into the swing of things,
601 set your hook variables the archaic way: store just one function rather
602 than a list of functions. But that is optional.
605 The variable @code{lisp-indent-hook} has been renamed to
606 @code{lisp-indent-function}.
609 The variable @code{auto-fill-function} has been renamed to
610 @code{auto-fill-hook}.
613 The @code{blink-paren-function} has been renamed to
614 @code{blink-paren-hook}.
617 The variable @code{temp-buffer-show-function} has been renamed to
618 @code{temp-buffer-show-hook}.