Mercurial > emacs
diff lispref/anti.texi @ 21007:66d807bdc5b4
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 28 Feb 1998 01:53:53 +0000 |
parents | 2d4db32cccd5 |
children | 90da2489c498 |
line wrap: on
line diff
--- a/lispref/anti.texi Sat Feb 28 01:49:58 1998 +0000 +++ b/lispref/anti.texi Sat Feb 28 01:53:53 1998 +0000 @@ -1,619 +1,244 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1993 Free Software Foundation, Inc. +@c Copyright (C) 1998 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @node Antinews, Index, Standard Hooks, Top -@appendix Emacs 18 Antinews +@appendix Emacs 19 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. +downgrading to Emacs version 19.34. We hope you will enjoy the greater +simplicity that results from the absence of many Emacs 19 features. In +the following section, we carry this information back as far as Emacs +19.29, for which the previous printed edition of this manual was made. -@section Old Features in the Lisp Language +@section Old Lisp Features in Emacs 19 -The following functions are missing or different in Emacs version 18. +Here are the most important of the features that you will learn +to do without in Emacs 19: @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. +In a great simplification, Emacs 19 supports ASCII characters only. +There are no multibyte characters, character sets, language +environments, coding systems, or input methods; all the functions that +specifically relate to them are gone as well. -@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. +Valid character codes for text must be in the range 0 through 255. +Within this range, there are no invalid character codes. @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. +The Custom facility has been replaced with a much simpler and more +general method of defining user option variables. Instead of +@code{defcustom}, which requires you to specify each user option's +data type and classify them into groups, all you have to do is write +a @code{defvar} and start the documentation string with @samp{*}. @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 +Here are changes in the Lisp language itself: @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. +Symbols whose names start with @samp{:} are no longer special +in any way. They start out void, like most other symbols. @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. +The macros @code{when} and @code{unless} have been deleted. @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. +The functions @code{caar}, @code{cadr}, @code{cdar} and @code{cddr} +no longer exist. @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. +The function @code{functionp} is now gone. If you don't know +by now whether something is a function, Emacs can't tell you. @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. +Here are changes in handling strings and text. @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. +The function @code{substring} works only on strings, not on vectors. @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. +There are no more character categories. @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. +When you compare strings with @code{equal}, it now compares +their string properties as well as their text. All must match, +or the strings are not equal. @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. +@code{format-time-string} no longer supports specified field width +or specified padding. + +@item +The functions @code{split-string} and @code{concat-chars} no longer exist. +Neither does @code{store-substring} or @code{sref}. @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}. +All printing characters have the same width. Therefore, we have deleted +@code{char-width}, @code{string-width} and +@code{truncate-string-to-width}. + +@item +We have eliminated the functions @code{next-char-property-change} and +@code{previous-char-property-change} also. @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}. +Syntax parsing now determines the syntax of each character from the +syntax table alone---not from text properties. This makes the syntax +codes @samp{|} and @samp{!}, which were meant for use with text +properties, useless; so we have deleted them. @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}. +In the function @code{parse-partial-sexp}, passing @code{syntax-table} +as the sixth argument @var{commentstop} no longer has any special meaning. +And the return value has only eight elements. @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 +Here are changes in other areas of Emacs Lisp: @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. +The macros @code{save-current-buffer}, @code{with-current-buffer}, +@code{with-temp-buffer}, @code{with-temp-file}, @code{save-selected-window}, +and @code{with-output-to-string} are gone. @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. +The easy-mmode facility for defining minor modes is gone too. @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 +Process filters and sentinels must explicitly save the match data, with +@code{save-match-data}, or they will clobber the match data and +something horrible will happen. @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 +As part of our effort to loosen up, @code{batch-byte-compile-file} no +longer returns a nonzero status code if there is a compilation error. -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. +The ``mail user agent'' feature is gone. @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. +We have removed the functions @code{add-to-invisibility-spec} and +@code{remove-from-invisibility-spec}, so you should manipulate +the value of @code{buffer-invisibility-spec} by hand. @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. +The functions @code{face-documentation}, @code{face-bold-p}, +@code{face-italic-p}, @code{set-face-bold-p}, @code{set-face-italic-p} +are gone. Instead, use @code{make-face-bold} and friends. @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. +All the functions that operate on a file now discard an extra redundant +directory name from the beginning of the file name---just like +@code{substitute-in-file-name}. @item -In Emacs 18, you can activate menus only with the mouse. Using them -with a keyboard was too confusing for too many users. +We have got rid of the function @code{access-file}. @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})}. +Most of the minibuffer input functions, no longer take a default value as +an argument. Also, they do not discard text properties from the result. +This means that if you insert text with text properties into the minibuffer, +the minibuffer value really will contain text properties. @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. +You can still bind @code{x-resource-class} around a call to +@code{x-get-resource}, but it won't do anything special. @item -Emacs 18 does not support use of format-style @samp{%}-sequences in the -prompt strings in interactive specifications. +Wave goodbye to the hooks @code{before-make-frame-hook}, +@code{after-make-frame-functions}, and +@code{window-configuration-change-hook}, @item -The property @code{enable-recursive-minibuffers} no longer has any -special meaning. +The functions and variables that deal with MS Windows NT/95 +have been renamed to start with @samp{win32-} instead of @samp{w32-}. +This is because we admire Microsoft more each day as we go back +into the past. @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.) +@section Onward into the Past! -@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 +Here we go even further back, as far as Emacs 19.29, for which the +previous printed edition of the Emacs Lisp manual was made. @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. +There are no char-tables or bool-vectors. Syntax tables, display +tables, and case tables are all vectors now, and the value of +@code{keyboard-translate-table} should be a vector or a string. @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}. +There is only one kind of marker. When you insert text at the place +where a marker points, the marker always ends up before that text, +unless you use @code{insert-before-markers}, which puts all the markers +after the inserted text. @item -We renamed @code{buffer-disable-undo} to @code{buffer-flush-undo}---a -more picturesque name, you will agree. +There is no function @code{overlays-in}. @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. +The variable @code{print-length} applies only to lists, not to +vectors or strings. @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. +The function @code{convert-standard-filename} no longer exists, so each +Lisp package must independently figure out which file names to use for +its initialization files on each kind of operating system. @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. +The macro @code{with-timeout} has been eliminated, along with the +function @code{y-or-n-p-with-timeout}. Idle timers don't exist at all; +instead, maybe you can use @code{post-command-idle-hook} to do some of +the same job. @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! +The functions @code{keymap-parent} and @code{set-keymap-parent} are +gone. We expect keymaps to recognize their own parents. @item -The function @code{signal-process} has been removed. +When you delete text and then undo a deletion, markers that were +originally inside the deleted text end up either at the beginning +or the end of it---not back in their original places. @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}. +The interactive specification @samp{N} is gone now. @item -The function @code{current-time-string} no longer accepts any optional -arguments. +There is no more @code{safe-length}. Don't try to be so safe! Did you +expect to live forever? @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}. +We got rid of @code{insert-file-contents-literally}, because +programmers are too literal-minded anyway. @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. +As part of our continuing effort to help Lisp programmers to relax, we +threw out the function @code{error-message-string}. Don't worry so much +about errors! We all make mistakes. @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}. +The keymap @code{special-event-map} is gone, because Emacs has no more +special events. If you want to hold a party in Emacs, please let us +know. @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}. +You can't do date arithmentic with @code{encode-time} any more. @item -We removed the variable -@code{revert-buffer-insert-file-contents-function}. +The functions @code{command-execute} and @code{call-interactively} no +longer accept the optional argument @var{keys}. @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. +@code{get-buffer-window-list} is gone as well. @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}. +With the function @code{replace-match}, you can only replace the whole +match, not a subexpression of it. @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}. +We eliminated the hooks @code{buffer-access-fontify-functions}, +@code{window-scroll-functions}, and @code{redisplay-end-trigger-functions}. @end itemize