comparison lispref/anti.texi @ 25751:467b88fab665

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Fri, 17 Sep 1999 06:59:04 +0000
parents 40089afa2b1d
children 6a17c48b52ef
comparison
equal deleted inserted replaced
25750:f1968a807f56 25751:467b88fab665
1 @c -*-texinfo-*- 1 @c -*-texinfo-*-
2 @c This is part of the GNU Emacs Lisp Reference Manual. 2 @c This is part of the GNU Emacs Lisp Reference Manual.
3 @c Copyright (C) 1998 Free Software Foundation, Inc. 3 @c Copyright (C) 1999 Free Software Foundation, Inc.
4 @c See the file elisp.texi for copying conditions. 4 @c See the file elisp.texi for copying conditions.
5 @node Antinews, Index, Standard Hooks, Top 5 @node Antinews, Index, Standard Hooks, Top
6 @appendix Emacs 19 Antinews 6 @appendix Emacs 20 Antinews
7 7
8 For those users who live backwards in time, here is information about 8 For those users who live backwards in time, here is information about
9 downgrading to Emacs version 19.34. We hope you will enjoy the greater 9 downgrading to Emacs version 20.4. We hope you will enjoy the greater
10 simplicity that results from the absence of many Emacs 20 features. In 10 simplicity that results from the absence of many Emacs 21 features. In
11 the following section, we carry this information back as far as Emacs 11 the following section, we carry this information back to Emacs
12 19.29, for which the previous printed edition of this manual was made. 12 20.3, for which the previous printed edition of this manual was made.
13 13
14 @section Old Lisp Features in Emacs 19 14 @section Old Lisp Features in Emacs 20
15
16 @itemize @bullet
17 @item
18 The @code{push} and @code{pop} macros are not defined.
19
20 @item
21 You can't display images in buffers. (Emacs is meant for editing text.)
22 With no images, there are no display margins, and no tool bars.
23
24 @item
25 The @code{display} text property has no special meaning; you can use it
26 freely in Lisp programs, with no effects except what you implement for
27 yourself. With no images, who needs the @code{display} text property?
28
29 @item
30 Faces have fewer attributes. The attributes @code{:family},
31 @code{:height}, @code{:width}, @code{:weight}, and @code{:slant},
32 have been replaced with a font name, a ``bold'' flag, and an
33 ``italic'' flag.
34
35 The attributes @code{:overline}, @code{:strike-through}
36 and @code{:box} have been eliminated too.
37
38 With fewer font attributes, there are no functions
39 @code{set-face-attribute} and @code{face-attribute}. Instead, you
40 access these attributes using functions such as @code{face-font}, and
41 set them with functions such as @code{set-face-font}. (These functions
42 were available in Emacs 21, but are not as useful there.)
43
44 @item
45 There are no facilities for playing sound. This means Emacs will
46 respect your peace and quiet, aside from occasional beeps.
47
48 @item
49 Regular expressions do not support the POSIX character classes
50 such as @samp{[:alpha:]}. All characters are created equal.
51
52 @item
53 Hash tables have been eliminated; use alists instead.
54
55 @item
56 The Lisp printer does not detect and report circular structure. That is
57 ok, because the Lisp reader cannot recreate circular structure anyway.
58 However, there is a library @samp{cust-print.el} which can report
59 circular structure.
60
61 @item
62 Emacs provides its own implementation of scroll bars, instead
63 of using those of the X toolkit. They always use the frame foreground
64 and background colors, so you cannot specify different colors for
65 the scroll bars.
66
67 @item
68 For simplicity, all ASCII characters now have the same height and width.
69 (Certain characters, such as Chinese characters, always have have twice
70 the standard width.) All characters are created equal.
71
72 @item
73 Tooltips operate using ordinary Emacs frames.
74
75 @item
76 Areas of the mode line are not mouse-sensitive; however, some mouse
77 commands are available for the mode line as a whole.
78
79 @item
80 Windows cannot have header lines. Conversely, there is no way to turn
81 off the mode line of a window unless it is a minibuffer.
82
83 @item
84 Plain dashes are the only separators you can use in a menu.
85
86 @item
87 Vertical fractional scrolling does not exist.
88
89 @item
90 The functions @code{format} and @code{message} ignore and discard text
91 properties.
92
93 @item
94 Colors are supported only on window systems, not on text-only terminals.
95 So the support functions for colors on text-only terminals are
96 not needed.
97
98 @item
99 The functions @code{color-values}, @code{color-defined-p} and
100 @code{defined-colors} have been renamed to @code{x-color-values},
101 @code{x-color-defined-p} and @code{x-defined-colors}.
102
103 @item
104 Windows cannot be made fixed-width or fixed-height;
105 Emacs will adjust the size of all windows when it needs to.
106
107 @item
108 The minibuffer prompt does not actually appear in content of the
109 minibuffer; it is displayed specially in the minibuffer window.
110
111 @item
112 The ``exclusive open'' feature of @code{write-region}
113 has been eliminated; any non-@code{nil} value for the seventh
114 argument now means to ask the user for confirmation.
115
116 @item
117 The function @code{buffer-size} always reports on the
118 current buffer.
119
120 @item
121 The function @code{assoc-delete-all} has itself been deleted.
122 So there!
123
124 @item
125 The variable @code{small-temporary-file-directory} has no special
126 meaning. There's only one variable for specifying which directory to
127 use for temporary files, @code{temporary-file-directory}, but not all
128 Emacs features use it anyway. Some use the @code{TMP} environment
129 variable, and some use the @code{TMPDIR} environment variable.
130
131 @item
132 The variable @code{inhibit-modification-hooks}
133 has no special meaning.
134
135 @item
136 The hook @code{fontification-functions} has been eliminated,
137 but there are other hooks, such as @code{window-scroll-functions},
138 that you can use to do a similar job.
139
140 @item
141 The variable @code{redisplay-dont-pause}
142 has no special meaning.
143
144 @item
145 The hook @code{calendar-move-hook} has been deleted.
146
147 @item
148 The function @code{move-to-column} treats any non-@code{nil}
149 second argument just like @code{t}.
150 @end itemize
151
152 @section Old Lisp Features in Emacs 20.3
15 153
16 Here are the most important of the features that you will learn 154 Here are the most important of the features that you will learn
17 to do without in Emacs 19: 155 to do without in Emacs 20.3:
156
157 Here are changes in the Lisp language itself:
18 158
19 @itemize @bullet 159 @itemize @bullet
20 @item 160 @item
21 In a great simplification, Emacs 19 supports ASCII characters only. 161 The functions @code{line-beginning-position} and @code{line-end-position}
22 There are no multibyte characters, character sets, language 162 have been eliminated.
23 environments, coding systems, or input methods; all the functions that 163
24 specifically relate to them are gone as well. 164 @item
25 165 The functions @code{directory-files-and-attributes},
26 Valid character codes for text must be in the range 0 through 255. 166 @code{file-attributes-lessp}, and @code{file-expand-wildcards}, have
27 Within this range, there are no invalid character codes. 167 been eliminated.
28 168
29 @item 169 @item
30 The Custom facility has been replaced with a much simpler and more 170 The functions @code{decode-coding-region} and @code{encode-coding-region}
31 general method of defining user option variables. Instead of 171 leave text properties untouched, in case that is useful. (It rarely makes
32 @code{defcustom}, which requires you to specify each user option's data 172 any sense, though.)
33 type and classify options into groups, all you have to do is write a 173
34 @code{defvar}. You should still start the documentation string with 174 @item
35 @samp{*}, though. 175 The functions @code{position-bytes} and @code{byte-to-position} have
176 been eliminated.
177
178 @item
179 Temporary buffers made with @code{with-output-to-temp-buffer} are now
180 modifiable by default, and use Fundamental mode rather than Help mode.
181
182 @item
183 The functions @code{sref} interprets its @var{index} argument as a
184 number of bytes, not a number of characters. And the function
185 @code{char-bytes} actually tries to report on the number of bytes that a
186 character occupies.
187
188 @item
189 The function @code{process-running-child-p} has been eliminated.
190
191 @item
192 The function @code{interrupt-process} and similar functions no longer do
193 anything special when the second argument is @code{lambda}.
194
195 @item
196 The function @code{define-prefix-command} accepts only two arguments.
197
198 @item
199 The meaning of the second argument to @code{read-char},
200 @code{read-event}, and @code{read-char-exclusive} has been reversed:
201 they use the current input method if the argument is if @code{nil}.
202
203 @item
204 The function @code{with-temp-message} has been eliminated.
205
206 @item
207 The function @code{clear-this-command-keys} has been eliminated.
208
209 @item
210 The functions @code{gap-position} and @code{gap-size} have been eliminated.
211
212 @item
213 In @code{modify-face}, an argument of @code{(nil)} has no special
214 meaning.
215
216 @item
217 The base64 conversion functions have been eliminated.
218
219 @item
220 Wildcard support has been eliminated from @code{find-file}
221 and allied functions.
222
223 @item
224 @code{file-attributes} returns the file size and the file inode number
225 only as a simple integer.
36 @end itemize 226 @end itemize
37
38 Here are changes in the Lisp language itself:
39
40 @itemize @bullet
41 @item
42 Symbols whose names start with @samp{:} are no longer special
43 in any way. They start out void, like most other symbols.
44
45 @item
46 The macros @code{when} and @code{unless} have been deleted.
47
48 @item
49 The functions @code{caar}, @code{cadr}, @code{cdar} and @code{cddr}
50 no longer exist.
51
52 @item
53 The function @code{functionp} is now gone. If you don't know
54 by now whether something is a function, Emacs can't tell you.
55 @end itemize
56
57 Here are changes in handling strings and text.
58
59 @itemize @bullet
60 @item
61 The function @code{substring} works only on strings, not on vectors.
62
63 @item
64 There are no more character categories.
65
66 @item
67 When you compare strings with @code{equal}, it now compares
68 their string properties as well as their text. All must match,
69 or the strings are not equal.
70
71 @item
72 @code{format-time-string} no longer supports specified field width
73 or specified padding.
74
75 @item
76 The functions @code{split-string} and @code{string} no longer exist.
77 Neither does @code{store-substring} or @code{sref}.
78
79 @item
80 All printing characters have the same width. Therefore, we have deleted
81 @code{char-width}, @code{string-width} and
82 @code{truncate-string-to-width}.
83
84 @item
85 We have eliminated the functions @code{next-char-property-change} and
86 @code{previous-char-property-change} also.
87
88 @item
89 Syntax parsing now determines the syntax of each character from the
90 syntax table alone---not from text properties. This makes the syntax
91 codes @samp{|} and @samp{!}, which were meant for use with text
92 properties, useless; so we have deleted them.
93
94 @item
95 In the function @code{parse-partial-sexp}, passing @code{syntax-table}
96 as the sixth argument @var{commentstop} no longer has any special meaning.
97 And the return value has only eight elements.
98 @end itemize
99
100 Here are changes in other areas of Emacs Lisp:
101
102 @itemize @bullet
103 @item
104 The macros @code{save-current-buffer}, @code{with-current-buffer},
105 @code{with-temp-buffer}, @code{with-temp-file}, @code{save-selected-window},
106 and @code{with-output-to-string} are gone.
107
108 @item
109 The easy-mmode facility for defining minor modes is gone too.
110
111 @item
112 Process filters and sentinels must explicitly save the match data, with
113 @code{save-match-data}, or they will clobber the match data and
114 something horrible will happen.
115
116 @item
117 As part of our effort to loosen up, @code{batch-byte-compile-file} no
118 longer returns a nonzero status code if there is a compilation error.
119
120 @item
121 The ``mail user agent'' feature is gone.
122
123 @item
124 We have removed the functions @code{add-to-invisibility-spec} and
125 @code{remove-from-invisibility-spec}, so you should manipulate
126 the value of @code{buffer-invisibility-spec} by hand.
127
128 @item
129 The functions @code{face-documentation}, @code{face-bold-p},
130 @code{face-italic-p}, @code{set-face-bold-p}, @code{set-face-italic-p}
131 are gone. Instead, use @code{make-face-bold} and friends.
132
133 @item
134 All the functions that operate on a file now discard an extra redundant
135 directory name from the beginning of the file name---just like
136 @code{substitute-in-file-name}.
137
138 @item
139 We have got rid of the function @code{access-file}.
140
141 @item
142 Most of the minibuffer input functions no longer take a default value as
143 an argument. Also, they do not discard text properties from the result.
144 This means that if you insert text with text properties into the minibuffer,
145 the minibuffer value really will contain text properties.
146
147 @item
148 Only the simple menu item format is supported (@pxref{Simple Menu Items}).
149
150 @item
151 You can still bind @code{x-resource-class} around a call to
152 @code{x-get-resource}, but it won't do anything special.
153
154 @item
155 Wave goodbye to the hooks @code{before-make-frame-hook},
156 @code{after-make-frame-functions}, and
157 @code{window-configuration-change-hook},
158
159 @item
160 The functions and variables that deal with MS Windows NT/95
161 have been renamed to start with @samp{win32-} instead of @samp{w32-}.
162 This is because we admire Microsoft more each day as we go back
163 into the past.
164 @end itemize
165
166 @section Onward into the Past!
167
168 Here we go even further back, as far as Emacs 19.29, for which the
169 previous printed edition of the Emacs Lisp manual was made.
170
171 @itemize @bullet
172 @item
173 There are no char-tables or bool-vectors. Syntax tables, display
174 tables, and case tables are all vectors now, and the value of
175 @code{keyboard-translate-table} should be a vector or a string.
176
177 @item
178 There is only one kind of marker. When you insert text at the place
179 where a marker points, the marker always ends up before that text,
180 unless you use @code{insert-before-markers}, which puts all the markers
181 after the inserted text.
182
183 @item
184 There is no function @code{overlays-in}.
185
186 @item
187 The variable @code{print-length} applies only to lists, not to
188 vectors or strings.
189
190 @item
191 The function @code{convert-standard-filename} no longer exists, so each
192 Lisp package must independently figure out which file names to use for
193 its initialization files on each kind of operating system.
194
195 @item
196 The macro @code{with-timeout} has been eliminated, along with the
197 function @code{y-or-n-p-with-timeout}. Idle timers don't exist at all;
198 instead, maybe you can use @code{post-command-idle-hook} to do some of
199 the same job.
200
201 @item
202 The functions @code{keymap-parent} and @code{set-keymap-parent} are
203 gone. We expect keymaps to recognize their own parents.
204
205 @item
206 When you delete text and then undo a deletion, markers that were
207 originally inside the deleted text end up either at the beginning
208 or the end of it---not back in their original places.
209
210 @item
211 The interactive specification @samp{N} is gone now.
212
213 @item
214 There is no more @code{safe-length}. Don't try to be so safe! Did you
215 expect to live forever?
216
217 @item
218 We got rid of @code{insert-file-contents-literally}, because
219 programmers are too literal-minded anyway.
220
221 @item
222 As part of our continuing effort to help Lisp programmers to relax, we
223 threw out the function @code{error-message-string}. Don't worry so much
224 about errors! We all make mistakes.
225
226 @item
227 The keymap @code{special-event-map} is gone, because Emacs has no more
228 special events. If you want to hold a party in Emacs, please let us
229 know.
230
231 @item
232 You can't do date arithmetic with @code{encode-time} any more.
233
234 @item
235 The functions @code{command-execute} and @code{call-interactively} no
236 longer accept the optional argument @var{keys}.
237
238 @item
239 @code{get-buffer-window-list} is gone as well.
240
241 @item
242 With the function @code{replace-match}, you can only replace the whole
243 match, not a subexpression of it.
244
245 @item
246 We eliminated the hooks @code{buffer-access-fontify-functions},
247 @code{window-scroll-functions}, and @code{redisplay-end-trigger-functions}.
248 @end itemize