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.
94 The function @code{string-to-number}, the predicate @code{floatp}, and
95 the variable @code{float-output-format} have all been eliminated.
97 The functions @code{float}, @code{truncate}, @code{floor}, @code{ceil},
98 @code{round}, and @code{logb} do not exist; neither do the functions
99 @code{abs}, @code{cos}, @code{sin}, @code{tan}, @code{acos},
100 @code{asin}, @code{atan}, @code{exp}, @code{expt}, @code{log10},
101 @code{log}, or @code{sqrt}.
103 The @code{format} function no longer handles the specifications
104 @samp{%e}, @samp{%f} and @samp{%g} for printing floating point numbers;
105 likewise for @code{message}.
107 @section Changes in Basic Editing Functions
111 @code{kill-new} and @code{kill-append}, the primitives for putting text
112 in the kill ring, have been eliminated.
113 @c @code{kill-append} seems to exist as a non-documented (no doc string)
114 @c primitive in emacs 18. but news.texi said it was new for 19.
117 The variables @code{interprogram-paste-function} and
118 @code{interprogram-cut-function} have been removed in Emacs 18.
120 In addition, there's no need for @code{mark-active} and
121 @code{deactivate-mark} because there is no Transient Mark mode. We also
122 removed the hooks @code{activate-mark-hook} and
123 @code{deactivate-mark-hook}.
126 The @code{kill-region} function can no longer be used in read-only
127 buffers. The @code{compare-buffer-substrings} and @code{current-kill}
128 functions have been removed.
131 The variable @code{overwrite-mode-binary} has been removed.
134 The function @code{move-to-column} allows just one argument,
138 The search functions now just return @code{t} when successful. This
139 affects the functions @code{search-forward}, @code{search-backward},
140 @code{word-search-forward}, @code{word-search-backward},
141 @code{re-search-forward}, and @code{re-search-backward}.
144 When you do regular expression searching or matching, there is a fixed
145 limit of ten @samp{\(@dots{}\)} pairs that you can get information about
146 with @code{match-beginning} and @code{match-end}. Moreover,
147 @code{save-match-data} does not exist; you must use an explicit
148 @code{unwind-protect} to save the match data.
151 @code{translate-region} is gone.
154 The variables @code{before-change-function},
155 @code{after-change-function}, and @code{first-change-hook} have been
159 The second argument to @code{insert-abbrev-table-description} is no
163 @section Text Properties
165 We eliminated text properties.
167 @section Features for Files
169 Many file-related functions have been eliminated or simplified. Here is
170 a basic listing of these functions.
172 The functions @code{file-accessible-directory-p}, @code{file-truename},
173 @code{make-directory}, @code{delete-directory},
174 @code{set-visited-file-modtime}, @code{directory-abbrev-alist},
175 @code{abbreviate-file-name}, @code{write-region},
176 @code{write-contents-hooks}, @code{after-save-hook},
177 @code{set-default-file-modes}, @code{default-file-modes}, and
178 @code{unix-sync} have been eliminated.
180 We got rid of the ``initial file name'' argument to
181 @code{read-file-name}.
183 Additionally, we removed the 12th element from the list returned by
184 @code{file-attributes}.
186 @code{directory-files} always sorts the list of files. It's not user
187 friendly to process the files in any haphazard order.
189 We eliminated the variables @code{write-contents-hooks} and
190 @code{local-write-file-hooks}.
192 @section Making Certain File Names ``Magic''
194 There are no more magic filenames. Sorry, but all the mana has been
199 There is only one frame in Emacs 18, so all of the frame functions have
202 @section X Window System Features
204 We have simplified the way Emacs and X interact by removing a great deal
205 of creeping featurism.
209 The functions @code{mouse-position} and @code{set-mouse-position}, and
210 the special form @code{track-mouse} have been eliminated.
213 Likewise, the functions @code{x-set-selection}, @code{x-set-cut-buffer},
214 @code{x-close-current-connection}, and @code{x-open-connection} have all
215 been removed from Emacs Lisp 18.
218 We removed a series of functions that gave information about the X
219 server and the screen you were using; after all, the whole point of X is
220 that all servers are equivalent. The names of the removed functions
221 are: @code{x-display-screens}, @code{x-server-version},
222 @code{x-server-vendor}, @code{x-display-pixel-height},
223 @code{x-display-mm-height}, @code{x-display-pixel-width},
224 @code{x-display-mm-width}, @code{x-display-backing-store},
225 @code{x-display-save-under}, @code{x-display-planes},
226 @code{x-display-visual-class}, @code{x-display-color-p}, and
227 @code{x-display-color-cells}.
229 Additionally, we removed the variable @code{x-no-window-manager} and the
230 functions @code{x-synchronize} and @code{x-get-resource}.
232 We didn't abolish @code{x-display-color-p}, but we renamed it to
233 @code{x-color-display-p}. We did abolish @code{x-color-defined-p}.
236 @code{x-popup-menu} no longer accepts a keymap for its first argument.
239 We removed both the function @code{x-rebind-key} and the related
240 function @code{x-rebind-keys}.
243 We abolished @code{x-parse-geometry}.
246 @section Window Actions that Were No Longer Useful
248 Various behaviors of windows in Emacs 19 were obsolete by the time Emacs
249 18 was due to come out. We have removed them. These changes are listed
254 We removed the functions @code{window-at}, @code{window-minibuffer-p},
255 @code{set-window-dedicated-p}, @code{coordinates-in-window-p},
256 @code{walk-windows}, @code{window-dedicated-p}, and @code{window-end}.
259 We removed the variables @code{pop-up-frames},
260 @code{pop-up-frame-function}, @code{display-buffer-function}, and
261 @code{other-window-scroll-buffer}.
264 The function @code{minibuffer-window} no longer accepts a frame as
265 argument, since frames as objects do not exist in Emacs version 18. It
266 returns the window used for minibuffers.
269 The functions @code{next-window} and @code{previous-window} no longer
270 accept the @var{all-frames} argument since there is just one frame.
273 The functions @code{get-lru-window}, @code{get-largest-window},
274 @code{get-buffer-window}, and @code{get-buffer-window} also no longer
275 take the optional argument @var{all-frames} because there is just one
279 @section Display Features
283 There are no overlays, and no faces.
286 We eliminated the mode line spec @samp{%l} that in later versions used
287 to display the current line number. We removed the variables
288 @code{line-number-mode} and @code{line-number-display-limit}.
291 @code{baud-rate} is now a function rather than a variable.
294 You can no longer call @code{message} with @code{nil} as the only
295 argument; therefore, you can not reliably make the contents of the
299 The variable @code{temp-buffer-show-function} has been renamed
300 @code{temp-buffer-show-hook}.
303 We removed the function @code{force-mode-line-update}. Use
304 the following idiom instead:
307 (set-buffer-modified-p (buffer-modified-p))
311 Display tables no longer exist. We know what the @sc{ASCII} characters
312 should look like, and we made them look that way.
315 @section Working with Input Events
317 The big news about input events is that we got rid of function key
318 and mouse events. Now the only input events are characters.
319 What's more, these characters now have to be in the range of 0 to 127,
320 optionally with a meta bit. This makes for big simplifications.
324 Functions like @code{define-key}, @code{global-set-key},
325 @code{read-key-sequence}, and @code{local-set-key} used to accept
326 strings or vectors in Emacs 19; now they only accept strings.
329 The documentation functions (@code{single-key-description},
330 @code{key-description}, etc.) also no longer accept vectors, but they do
334 We removed the @code{read-event}, @code{event-start},
335 @code{posn-window}, @code{posn-point}, @code{posn-col-row},
336 @code{posn-timestamp}, @code{scroll-bar-scale}, and @code{event-end}
337 functions, since they were only useful for non-character events.
340 We removed the @code{unread-command-events} and @code{last-event-frame}
344 The functions @code{this-command-keys} and @code{recent-keys} now always
345 return a string. Likewise, a keyboard macro's definition can only be a
346 string, not a vector.
349 We eliminated @samp{e} as an interactive specification since it
350 was useful only with non-character events.
353 In Emacs 18, we represent Meta characters as character objects with the
354 same encoding used in strings: 128 plus the corresponding non-Meta
355 @sc{ASCII} character.
360 You can no longer define menus as keymaps; good system design requires
361 crafting a special-purpose interface for each facility, so it can
362 precisely fit the requirements of that facility. We decided that
363 unifying keymaps and menus was simply too much of a strain.
365 In Emacs 18, you can only activate menus with the mouse. Using them
366 with a keyboard was too confusing for too many users.
368 Emacs 18 has no menu bars. All functions and variables related to the
369 menu bar have been eliminated.
371 @section Changes in Minibuffer Features
373 The minibuffer history feature has been eliminated. Thus, we removed
374 the optional argument @var{hist} from the minibuffer input functions
375 @code{read-from-minibuffer} and @code{completing-read}.
377 The @var{initial} argument to @code{read-from-minibuffer} and other
378 minibuffer input functions can no longer be a cons cell
379 @code{(@var{string} . @var{position})}.
381 In the function @code{read-no-blanks-input}, the @var{initial} argument
382 is no longer optional.
384 @section New Features for Defining Commands
388 The special meaning of @samp{@@} in an interactive specification has
392 Emacs 18 does not support use of format-style @samp{%}-sequences in the
393 prompt strings in interactive specifications.
396 The property @code{enable-recursive-minibuffers} no longer has any
400 @section Removed Features for Reading Input
402 We removed the third argument (@var{meta}) from the function
403 @code{set-input-mode}. Consequently, we added the variable
404 @code{meta-flag}; set it to @code{t} to enable use of a Meta key, and
405 to @code{nil} to disable it. (Those are the only two alternatives.)
407 We also removed the variable @code{extra-keyboard-modifiers}.
409 We removed the function @code{keyboard-translate} and the variables
410 @code{num-input-keys} and @code{function-key-map}.
412 @section Removed Syntax Table Features
416 We eliminated the functions @code{skip-syntax-forward},
417 @code{skip-syntax-backward}, @code{forward-comment}.
420 We removed the syntax flag for ``prefix syntax'' and the flag for the
421 alternate comment style. Emacs 18 supports only one style of comment
422 in any given syntax table.
425 We abolished the variable @code{words-include-escapes}.
428 @section The Case Table
430 Case tables do not exist in Emacs 18. Due to this change, we have
431 removed the associated functions @code{set-standard-case-table},
432 @code{standard-case-table}, @code{current-case-table},
433 @code{set-case-table}, and @code{set-case-syntax-pair}.
435 @section Features for Dealing with Buffers
439 We eliminated several functions for dealing with buffers:
440 @code{buffer-modified-tick} and @code{generate-new-buffer-name}.
443 We renamed @code{buffer-disable-undo} to @code{buffer-flush-undo}---a
444 more picturesque name, you will agree.
447 The function @code{other-buffer} takes just one argument in Emacs 18.
450 The function @code{rename-buffer} now requires you to specify precisely
451 the new name you want.
454 We removed the local variable @code{list-buffers-directory}.
457 We got rid of the hook @code{kill-buffer-hook}.
460 @section Local Variables Features
464 The function @code{kill-all-local-variables} always eliminates all
465 buffer-local variables of the current buffer. No more exceptions.
468 Making a variable buffer-local when it is void now sets it to
472 We eliminated the functions @code{default-boundp}, because it is no
473 longer possible for the default binding of a variable to be void.
476 The special forms @code{defconst} and @code{defvar} now set the
477 variable's local value rather than its default value when the variable
478 is local in the current buffer.
481 @section Features for Subprocesses
483 @code{call-process} and @code{call-process-region} no longer indicate
484 the termination status of the subprocess. We call on users to have faith
485 that the subprocess executed properly.
489 The standard asynchronous subprocess features do not work on VMS;
490 instead, special VMS asynchronous subprocess functions have been added.
491 Since they are only for VMS, we can't be bothered documenting them;
492 sorry. Use the source, Luke!
495 The function @code{signal-process} has been removed.
498 We eliminated the transaction queue feature, and the associated
499 functions @code{tq-create}, @code{tq-enqueue}, and @code{tq-close}.
502 @section Dealing with Times And Time Delays
506 We removed the functions @code{current-time}, @code{current-time-zone},
507 @code{run-at-time}, and @code{cancel-timer}.
510 The function @code{current-time-string} no longer accepts any optional
514 The functions @code{sit-for} and @code{sleep-for} no longer allow an
515 optional argument to let you specify the time period in milliseconds;
516 just in seconds. Additionally, we took out the optional third argument
517 @var{nodisp} from @code{sit-for}.
520 We removed the optional second and third arguments from the
521 @code{accept-process-output} function. It accepts just one argument,
527 @section Features not Available for Lisp Debuggers
531 In Emacs 18, you can no longer specify to invoke the Lisp debugger only
532 upon encountering certain types of errors. Any non-@code{nil} value for
533 the variable @code{debug-on-error} says to invoke the debugger for any
537 We removed the variable @code{command-debug-status} and the function
538 @code{backtrace-frame}.
541 @section Memory Allocation Changes
543 We removed the function @code{memory-limit}.
545 The list returned by @code{garbage-collect} no longer contains an
546 element to describe floating point numbers, since there aren't any
547 floating point numbers in Emacs 18.
549 @section Hook Changes
553 We removed the hooks @code{pre-abbrev-expand-hook},
554 @code{pre-command-hook}, @code{post-command-hook}, and
555 @code{auto-save-hook}.
558 We removed the variable
559 @code{revert-buffer-insert-file-contents-function}.
562 We also removed the new function @code{add-hook}; you will have to set
563 your hooks by hand. If you want to get really into the swing of things,
564 set your hook variables the archaic way: store just one function rather
565 than a list of functions. But that is optional.
568 The variable @code{lisp-indent-hook} has been renamed to
569 @code{lisp-indent-function}.
572 The variable @code{auto-fill-function} has been renamed to
573 @code{auto-fill-hook}.
576 The @code{blink-paren-function} has been renamed to
577 @code{blink-paren-hook}.
580 The variable @code{temp-buffer-show-function} has been renamed to
581 @code{temp-buffer-show-hook}.