@c-*-texinfo-*-@cThisispartoftheGNUEmacsLispReferenceManual.@cCopyright(C)1993FreeSoftwareFoundation,Inc.@cSeethefileelisp.texiforcopyingconditions.@nodeAntinews,Index,StandardHooks,Top@appendixEmacs18AntinewsForthoseuserswholivebackwardsintime,hereisinformationaboutdowngradingtoEmacsversion18.WehopeyouwillenjoythegreatersimplicitythatresultsfromtheabsenceofmanyEmacs19features.@sectionOldFeaturesintheLispLanguageThefollowingfunctionsaremissingordifferentinEmacsversion18.@itemize@bullet@itemThefunctions@code{delete},@code{member},@code{indirect-function},@code{map-y-or-n-p},and@code{invocation-name}havebeenremoved.@itemThefunction@code{read}nowskipsaterminatorcharacterthatterminatesasymbolwhenreadingfromabuffer.Thus,ifyouuse@code{read}onabuffercontaining@samp{foo(bar)}followingpoint,itreturns@code{foo}andleavespointaftertheopen-parenthesis.Thismeansthere's no way you can properly read the list @samp{(bar)}, butthat'sthewaythecookiecrumbles.Becauseofthissimplification,it's no longer necessary for an inputstream function to accept an optional argument. In Emacs 18, an inputstream is always called with no arguments, and should always returnthe next character of input.@itemThe 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 isloaded. The variable @code{after-load-alist} and the function@code{eval-after-load} have been removed.@itemThe function @code{autoload} no longer supports autoloading a keymap.@item``Magic'' comments of the form @samp{;;;###autoload} are now justcomments. They don'tdoanythinginparticularexceptlookpretty.Ifyouwantafunctiontobeautoloadedbydefault,edit@file{loaddefs.h}byhand.Whatdoyouthinkeditorsarefor?@itemWetookoutthe@samp{%S}fromthe@code{format}function,andtheoptionalargument@var{noescap}from@code{prin1-to-string}.Weremovedthe@code{print-level}variable.@enditemize@sectionCompilationFeatures@itemize@bullet@itemInlinefunctionsarenonexistentinEmacs18.Wefindtheymakethecallingfunctionunnecessarilylarge.(SmallsizeisoneofthefeaturesofEmacs18.)@itemWeeliminatedthetwospecialforms,@code{eval-when-compile}and@code{eval-and-compile},aswellasthe@code{compile-defun}command.@itemWhenyouloadaLispfileorlibrary,youwillnolongerreceiveawarningifthedirectorycontainsbotha@samp{.elc}fileandanew@samp{.el}filethatisnewer.Sobeonyourtoes.@itemWeremovedthespecialdatatypeforbyte-codefunctions.Compiledfunctionsnowworkbymeansofaninterpretedfunctionwhichcallsthefunction@code{bytecode}.Thatfunctionrunsthebytecodeinterpreter.@enditemize@sectionFloatingPointNumbersEmacs18doesn't have or need floating point arithmetic built in.It has a handy Lisp program that allows you to emulate floating point.You'llhavetowriteprogramsspeciallytouseit,though.Asaresult,certainmacros,functions,andpredicatesnolongerhandlespecificationsforfloatingpointnumbers.@itemize@bullet@itemThefunction@code{string-to-number},thepredicate@code{floatp},andthevariable@code{float-output-format}haveallbeeneliminated.@itemThefunctions@code{float},@code{truncate},@code{floor},@code{ceil},@code{round},and@code{logb}donotexist;neitherdothefunctions@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}.@itemThe@code{format}functionnolongerhandlesthespecifications@samp{%e},@samp{%f}and@samp{%g}forprintingfloatingpointnumbers;likewisefor@code{message}.@enditemize@sectionChangesinBasicEditingFunctions@itemize@bullet@item@code{kill-new}and@code{kill-append},theprimitivesforputtingtextinthekillring,havebeeneliminated.@c@code{kill-append}seemstoexistasanon-documented(nodocstring)@cprimitiveinemacs18.butnews.texisaiditwasnewfor19.@itemThevariables@code{interprogram-paste-function}and@code{interprogram-cut-function}havebeenremovedinEmacs18.Inaddition,there's no need for @code{mark-active} and@code{deactivate-mark} because there is no Transient Mark mode. We alsoremoved the hooks @code{activate-mark-hook} and@code{deactivate-mark-hook}.@itemThe @code{kill-region} function can no longer be used in read-onlybuffers. The @code{compare-buffer-substrings} and @code{current-kill}functions have been removed.@itemThe variable @code{overwrite-mode-binary} has been removed.@itemThe function @code{move-to-column} allows just one argument,@var{column}. @item The search functions now just return @code{t} when successful. Thisaffects 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}.@itemWhen you do regular expression searching or matching, there is a fixedlimit of ten @samp{\(@dots{}\)} pairs that you can get information aboutwith @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.@itemThe variables @code{before-change-function},@code{after-change-function}, and @code{first-change-hook} have beeneliminated.@itemThe second argument to @code{insert-abbrev-table-description} is nolonger optional.@end itemize@section Text PropertiesWe eliminated text properties.@section Features for FilesMany file-related functions have been eliminated or simplified. Here isa basic listing of these functions.@itemize @bullet@itemThe 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.@itemWe got rid of the ``initial file name'' argument to@code{read-file-name}.@itemAdditionally, we removed the 12th element from the list returned by@code{file-attributes}.@item@code{directory-files} always sorts the list of files. It'snotuserfriendlytoprocessthefilesinanyhaphazardorder.@itemWeeliminatedthevariables@code{write-contents-hooks}and@code{local-write-file-hooks}.@enditemize@sectionMakingCertainFileNames``Magic''Therearenomoremagicfilenames.Sorry,butallthemanahasbeenusedup.@sectionFramesThereisonlyoneframeinEmacs18,soalloftheframefunctionshavebeeneliminated.@sectionXWindowSystemFeaturesWehavesimplifiedthewayEmacsandXinteractbyremovingagreatdealofcreepingfeaturism.@itemize@bullet@itemThefunctions@code{mouse-position}and@code{set-mouse-position},andthespecialform@code{track-mouse},havebeeneliminated.@itemLikewise,thefunctions@code{x-set-selection},@code{x-set-cut-buffer},@code{x-close-current-connection},and@code{x-open-connection}haveallbeenremovedfromEmacsLisp18.@itemWeremovedaseriesoffunctionsthatgaveinformationabouttheXserverandthescreenyouwereusing;afterall,thewholepointofXisthatallserversareequivalent.Thenamesoftheremovedfunctionsare:@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}.@itemAdditionally,weremovedthevariable@code{x-no-window-manager}andthefunctions@code{x-synchronize}and@code{x-get-resource}.@itemWedidn'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.@itemWe removed both the function @code{x-rebind-key} and the relatedfunction @code{x-rebind-keys}.@item We abolished @code{x-parse-geometry}.@end itemize@section Window Actions that Were No Longer UsefulVarious behaviors of windows in Emacs 19 were obsolete by the time Emacs18 was due to come out. We have removed them. These changes are listedbelow. @itemize @bullet@itemWe 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}.@itemWe removed the variables @code{pop-up-frames},@code{pop-up-frame-function}, @code{display-buffer-function}, and@code{other-window-scroll-buffer}.@itemThe function @code{minibuffer-window} no longer accepts a frame asargument, since frames as objects do not exist in Emacs version 18. Itreturns the window used for minibuffers.@itemThe functions @code{next-window} and @code{previous-window} no longeraccept the @var{all-frames} argument since there is just one frame.@itemThe functions @code{get-lru-window}, @code{get-largest-window},@code{get-buffer-window}, and @code{get-buffer-window} also no longertake the optional argument @var{all-frames} because there is just oneframe to search.@end itemize@section Display Features@itemize @bullet@itemThere are no overlays, and no faces.@itemWe eliminated the mode line spec @samp{%l} that in later versions usedto 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.@itemYou can no longer call @code{message} with @code{nil} as the onlyargument; therefore, you can not reliably make the contents of theminibuffer visible.@itemThe variable @code{temp-buffer-show-function} has been renamed@code{temp-buffer-show-hook}.@itemWe removed the function @code{force-mode-line-update}. Usethe following idiom instead:@example(set-buffer-modified-p (buffer-modified-p))@end example@itemDisplay tables no longer exist. We know what the @sc{ASCII} charactersshould look like, and we made them look that way.@end itemize@section Working with Input EventsThe big news about input events is that we got rid of function keyand mouse events. Now the only input events are characters.What'smore,thesecharactersnowhavetobeintherangeof0to127,optionallywithametabit.Thismakesforbigsimplifications.@itemize@bullet@itemFunctionslike@code{define-key},@code{global-set-key},@code{read-key-sequence},and@code{local-set-key}usedtoacceptstringsorvectorsinEmacs19;nowtheyonlyacceptstrings.@itemThedocumentationfunctions(@code{single-key-description},@code{key-description},etc.)alsonolongeracceptvectors,buttheydoacceptstrings.@itemWeremovedthe@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,sincetheywereusefulonlyfornon-characterevents.@itemWeremovedthe@code{unread-command-events}and@code{last-event-frame}variables.@itemThefunctions@code{this-command-keys}and@code{recent-keys}nowalwaysreturnastring.Likewise,akeyboardmacro's definition can only be astring, not a vector.@itemWe eliminated @samp{e} as an interactive specification since itwas useful only with non-character events.@itemIn Emacs 18, we represent Meta characters as character objects with thesame encoding used in strings: 128 plus the corresponding non-Meta@sc{ASCII} character.@end itemize@section Menus@itemize @bullet@itemYou can no longer define menus as keymaps; good system design requirescrafting a special-purpose interface for each facility, so it canprecisely fit the requirements of that facility. We decided thatunifying keymaps and menus was simply too much of a strain.@itemIn Emacs 18, you can activate menus only with the mouse. Using themwith a keyboard was too confusing for too many users.@itemEmacs 18 has no menu bars. All functions and variables related to themenu bar have been eliminated.@end itemize@section Changes in Minibuffer Features@itemize @bullet@itemThe minibuffer history feature has been eliminated. Thus, we removedthe optional argument @var{hist} from the minibuffer input functions@code{read-from-minibuffer} and @code{completing-read}.@itemThe @var{initial} argument to @code{read-from-minibuffer} and otherminibuffer input functions can no longer be a cons cell@code{(@var{string} . @var{position})}.@itemIn the function @code{read-no-blanks-input}, the @var{initial} argumentis no longer optional.@end itemize@section New Features for Defining Commands@itemize @bullet@itemThe special meaning of @samp{@@} in an interactive specification hasbeen eliminated.@itemEmacs 18 does not support use of format-style @samp{%}-sequences in theprompt strings in interactive specifications.@itemThe property @code{enable-recursive-minibuffers} no longer has anyspecial meaning.@end itemize@section Removed Features for Reading Input@itemize @bullet@itemWe 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, andto @code{nil} to disable it. (Those are the only two alternatives.)@itemWe also removed the variable @code{extra-keyboard-modifiers}.@itemWe 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@itemWe eliminated the functions @code{skip-syntax-forward},@code{skip-syntax-backward}, @code{forward-comment}.@itemWe removed the syntax flag for ``prefix syntax'' and the flag for thealternate comment style. Emacs 18 supports only one style of commentin any given syntax table.@itemWe abolished the variable @code{words-include-escapes}.@end itemize@section The Case Table@itemize @bullet@itemCase tables do not exist in Emacs 18. Due to this change, we haveremoved 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@itemWe eliminated several functions for dealing with buffers:@code{buffer-modified-tick} and @code{generate-new-buffer-name}.@itemWe renamed @code{buffer-disable-undo} to @code{buffer-flush-undo}---amore picturesque name, you will agree.@itemThe function @code{other-buffer} takes just one argument in Emacs 18.@itemThe function @code{rename-buffer} now requires you to specify preciselythe new name you want.@itemWe removed the local variable @code{list-buffers-directory}.@itemWe got rid of the hook @code{kill-buffer-hook}.@end itemize@section Local Variables Features@itemize @bullet@itemThe function @code{kill-all-local-variables} always eliminates allbuffer-local variables of the current buffer. No more exceptions.@itemMaking a variable buffer-local when it is void now sets it to@code{nil}.@itemWe eliminated the functions @code{default-boundp}, because it is nolonger possible for the default binding of a variable to be void.@itemThe special forms @code{defconst} and @code{defvar} now set thevariable'slocalvalueratherthanitsdefaultvaluewhenthevariableislocalinthecurrentbuffer.@enditemize@sectionFeaturesforSubprocesses@itemize@bullet@item@code{call-process}and@code{call-process-region}nolongerindicatetheterminationstatusofthesubprocess.Wecallonuserstohavefaiththatthesubprocessexecutedproperly.@itemThestandardasynchronoussubprocessfeaturesdonotworkonVMS;instead,specialVMSasynchronoussubprocessfunctionshavebeenadded.SincetheyareonlyforVMS,wecan't be bothered documenting them;sorry. Use the source, Luke!@itemThe function @code{signal-process} has been removed.@itemWe eliminated the transaction queue feature, and the associatedfunctions @code{tq-create}, @code{tq-enqueue}, and @code{tq-close}.@end itemize@section Dealing with Times And Time Delays@itemize @bullet@itemWe removed the functions @code{current-time}, @code{current-time-zone},@code{run-at-time}, and @code{cancel-timer}. @itemThe function @code{current-time-string} no longer accepts any optionalarguments.@itemThe functions @code{sit-for} and @code{sleep-for} no longer allow anoptional 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}.@itemWe 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@itemIn Emacs 18, you can no longer specify to invoke the Lisp debugger onlyupon encountering certain types of errors. Any non-@code{nil} value forthe variable @code{debug-on-error} says to invoke the debugger for anyerror whatever.@itemWe removed the variable @code{command-debug-status} and the function@code{backtrace-frame}. @end itemize@section Memory Allocation Changes@itemize @bullet@itemWe removed the function @code{memory-limit}.@itemThe list returned by @code{garbage-collect} no longer contains anelement to describe floating point numbers, since there aren'tanyfloatingpointnumbersinEmacs18.@enditemize@sectionHookChanges@itemize@bullet@itemWeremovedthehooks@code{pre-abbrev-expand-hook},@code{pre-command-hook},@code{post-command-hook},and@code{auto-save-hook}.@itemWeremovedthevariable@code{revert-buffer-insert-file-contents-function}.@itemWealsoremovedthenewfunction@code{add-hook};youwillhavetosetyourhooksbyhand.Ifyouwanttogetreallyintotheswingofthings,setyourhookvariablesthearchaicway:storejustonefunctionratherthanalistoffunctions.Butthatisoptional.@itemThevariable@code{lisp-indent-hook}hasbeenrenamedto@code{lisp-indent-function}.@itemThevariable@code{auto-fill-function}hasbeenrenamedto@code{auto-fill-hook}.@itemThe@code{blink-paren-function}hasbeenrenamedto@code{blink-paren-hook}.@itemThevariable@code{temp-buffer-show-function}hasbeenrenamedto@code{temp-buffer-show-hook}.@enditemize