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