Fix package.el handling of local variables on first line.
[emacs.git] / doc / lispref / anti.texi
blob59f8f91c855147d625dc46b87e598ed0eb4ec30b
1 @c -*-texinfo-*-
2 @c This is part of the GNU Emacs Lisp Reference Manual.
3 @c Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc.
4 @c See the file elisp.texi for copying conditions.
6 @c This node must have no pointers.
8 @node Antinews, GNU Free Documentation License, Packaging, Top
9 @appendix Emacs 23 Antinews
10 @c Update the elisp.texi, vol1.texi, vol2.texi Antinews menu entries
11 @c with the above version number.
13 For those users who live backwards in time, here is information about
14 downgrading to Emacs version 23.4.  We hope you will enjoy the greater
15 simplicity that results from the absence of many Emacs @value{EMACSVER}
16 features.
18 @section Old Lisp Features in Emacs 23
20 @itemize @bullet
21 @item
22 Support for lexical scoping has been removed; all variables are
23 dynamically scoped.  The @code{lexical-binding} variable has been
24 removed, and so has the @var{lexical} argument to @code{eval}.  The
25 @code{defvar} and @code{defconst} forms no longer mark variables as
26 dynamic, since all variables are dynamic.
28 Having only dynamic binding follows the spirit of Emacs extensibility,
29 for it allows any Emacs code to access any defined variable with a
30 minimum of fuss.  But @xref{Dynamic Binding Tips}, for tips to avoid
31 making your programs hard to understand.
33 @item
34 Calling a minor mode function from Lisp with a nil or omitted argument
35 does not enable the minor mode unconditionally; instead, it toggles
36 the minor mode---which is the straightforward thing to do, since that
37 is the behavior when invoked interactively.  One downside is that it
38 is more troublesome to enable minor modes from hooks; you have to do
39 something like
41 @example
42 (add-hook 'foo-hook (lambda () (bar-mode 1)))
43 @end example
45 @noindent
46 or define @code{turn-on-bar-mode} and call that from the hook.
48 @item
49 The @code{prog-mode} dummy major mode has been removed.  Instead of
50 using it as a crutch to meet programming mode conventions, you should
51 explicitly ensure that your mode follows those conventions.
52 @xref{Major Mode Conventions}.
54 @item
55 Emacs no longer supports bidirectional display and editing.  Since
56 there is no need to worry about the insertion of right-to-left text
57 messing up how lines and paragraphs are displayed, the function
58 @code{bidi-string-mark-left-to-right} has been removed; so have many
59 other functions and variables related to bidirectional display.
60 Unicode directionality characters like @code{U+200E} ("left-to-right
61 mark") have no special effect on display.
63 @item
64 Emacs windows now have most of their internal state hidden from Lisp.
65 Internal windows are no longer visible to Lisp; functions such as
66 @code{window-parent}, window parameters related to window arrangement,
67 and window-local buffer lists have all been removed.  Functions for
68 resizing windows can delete windows if they become too small.
70 The ``action function'' feature for controlling buffer display has
71 been removed, including @code{display-buffer-overriding-action} and
72 related variables, as well as the @var{action} argument to
73 @code{display-buffer} and other functions.  The way to
74 programmatically control how Emacs chooses a window to display a
75 buffer is to bind the right combination of
76 @code{special-display-regexps}, @code{pop-up-frames}, and other
77 variables.
79 @item
80 The standard completion interface has been simplified, eliminating the
81 @code{completion-extra-properties} variable, the @code{metadata}
82 action flag for completion functions, and the concept of
83 ``completion categories''.  Lisp programmers may now find the choice
84 of methods for tuning completion less bewildering, but if a package
85 finds the streamlined interface insufficient for its needs, it must
86 implement its own specialized completion feature.
88 @item
89 @code{copy-directory} now behaves the same whether or not the
90 destination is an existing directory: if the destination exists, the
91 @emph{contents} of the first directory are copied into it (with
92 subdirectories handled recursively), rather than copying the first
93 directory into a subdirectory.
95 @item
96 The @var{trash} arguments for @code{delete-file} and
97 @code{delete-directory} have been removed.  The variable
98 @code{delete-by-moving-to-trash} must now be used with care; whenever
99 it is non-@code{nil}, all calls to @code{delete-file} or
100 @code{delete-directory} use the trash.
102 @item
103 Because Emacs no longer supports SELinux file contexts, the
104 @var{preserve-selinux-context} argument to @code{copy-file} has been
105 removed.  The return value of @code{backup-buffer} no longer has an
106 entry for the SELinux file context.
108 @item
109 For mouse click input events in the text area, the Y pixel coordinate
110 in the @var{position} list (@pxref{Click Events}) now counts from the
111 top of the header line, if there is one, rather than the top of the
112 text area.
114 @item
115 Bindings in menu keymaps (@pxref{Format of Keymaps}) now sometimes get
116 an additional @var{cache} entry in their definitions, like this:
118 @example
119 (@var{type} @var{item-name} @var{cache} . @var{binding})
120 @end example
122 @noindent
123 The @var{cache} entry is used internally by Emacs to record equivalent
124 keyboard key sequences for invoking the same command; Lisp programs
125 should never use it.
126 @c Not really NEWS-worthy then...
128 @item
129 The @code{gnutls} library has been removed, and the function
130 @code{open-network-stream} correspondingly simplified.
131 Lisp programs that want an encrypted network connection must now call
132 external utilities such as @command{starttls} or @command{gnutls-cli}.
134 @item
135 Tool bars can no longer display separators, which frees up several
136 pixels of space on each graphical frame.
138 @item
139 As part of the ongoing quest for simplicity, many other functions and
140 variables have been eliminated.
141 @end itemize