Commit | Line | Data |
---|---|---|
404fa7d6 DL |
1 | GNU Emacs NEWS -- history of user-visible changes. 5 Jan 2000 |
2 | Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. | |
a933dad1 DL |
3 | See the end for copying conditions. |
4 | ||
5 | Please send Emacs bug reports to bug-gnu-emacs@gnu.org. | |
6 | For older news, see the file ONEWS. | |
7 | ||
8 | \f | |
251584f3 DL |
9 | * Installation Changes in Emacs 21.1 |
10 | ||
1fa28578 GM |
11 | ** `movemail' defaults to supporting POP. You can turn this off using |
12 | the --without-pop configure option, should that be necessary. | |
13 | ||
14 | ** There are new configure options associated with the support for | |
15 | images and toolkit scrollbars. Use the --help option to list them. | |
16 | \f | |
17 | * Changes in Emacs 21.1 | |
18 | ||
5cb6a58e SM |
19 | ** M-; now calls comment-dwim which tries to do something clever based |
20 | on the context. | |
21 | ||
a1b8d58b GM |
22 | ** The function `getenv' is now callable interactively. |
23 | ||
6e417ca5 DL |
24 | ** The many obsolete language `setup-...-environment' commands have |
25 | been removed -- use `set-language-environment'. | |
26 | ||
5898e075 DL |
27 | ** New user options `display-time-mail-face' and |
28 | `display-time-use-mail-icon' control the appearance of mode-line mail | |
29 | indicator used by the display-time package. On a suitable display the | |
30 | indicator can be an icon and is mouse-sensitive. | |
31 | ||
abfcc168 GM |
32 | ** Emacs' auto-save list files are now by default stored in a |
33 | sub-directory `.emacs.d/auto-save-list/' of the user's home directory. | |
874d1079 | 34 | (On MS-DOS, this subdirectory's name is `_emacs.d/auto-save.list/'.) |
abfcc168 GM |
35 | You can customize `auto-save-list-prefix' to change this location. |
36 | ||
cc181e95 GM |
37 | ** On window-systems, additional space can be put between text lines |
38 | on the display using several methods | |
39 | ||
40 | - By setting frame parameter `line-spacing' to PIXELS. PIXELS must be | |
41 | a positive integer, and specifies that PIXELS number of pixels should | |
42 | be put below text lines on the affected frame or frames. | |
43 | ||
44 | - By setting X resource `lineSpacing', class `LineSpacing'. This is | |
45 | equivalent ot specifying the frame parameter. | |
46 | ||
da4496b6 | 47 | - By specifying `--line-spacing=N' or `-lsp N' on the command line. |
cc181e95 GM |
48 | |
49 | - By setting buffer-local variable `line-spacing'. The meaning is | |
50 | the same, but applies to the a particular buffer only. | |
51 | ||
0daee095 | 52 | ** The new command `clone-buffer-indirectly' can be used to create |
1c459486 GM |
53 | an indirect buffer that is a twin copy of the current buffer. The |
54 | command `clone-buffer-indirectly-other-window', bound to C-x 4 c, | |
55 | does the same but displays the indirect buffer in another window. | |
0daee095 | 56 | |
176256a1 | 57 | ** New user options `backup-directory-alist' and |
3bbc50af DL |
58 | `make-backup-file-name-function' control the placement of backups, |
59 | typically in a single directory or in an invisible sub-directory. | |
176256a1 | 60 | |
dd0add8e DL |
61 | ** New commands iso-iso2sgml and iso-sgml2iso convert between Latin-1 |
62 | characters and the corresponding SGML (HTML) entities. | |
63 | ||
699238d9 GM |
64 | ** Emacs now refuses to load compiled Lisp files which weren't |
65 | compiled with Emacs. Set `load-dangerous-libraries' to t to change | |
66 | this behavior. | |
67 | ||
68 | The reason for this change is an incompatible change in XEmacs' byte | |
69 | compiler. Files compiled with XEmacs can contain byte codes that let | |
70 | Emacs dump core. | |
71 | ||
72 | ** New X resources recognized | |
100b3cbb | 73 | |
7233c5bd GM |
74 | *** The X resource `synchronous', class `Synchronous', specifies |
75 | whether Emacs should run in synchronous mode. Synchronous mode | |
76 | is useful for debugging X problems. | |
77 | ||
78 | Example: | |
79 | ||
699238d9 | 80 | emacs.synchronous: true |
7233c5bd | 81 | |
100b3cbb GM |
82 | *** The X resource `visualClass, class `VisualClass', specifies the |
83 | visual Emacs should use. The resource's value should be a string of | |
84 | the form `CLASS-DEPTH', where CLASS is the name of the visual class, | |
85 | and DEPTH is the requested color depth as a decimal number. Valid | |
86 | visual class names are | |
87 | ||
88 | TrueColor | |
89 | PseudoColor | |
90 | DirectColor | |
91 | StaticColor | |
92 | GrayScale | |
93 | StaticGray | |
94 | ||
95 | Visual class names specified as X resource are case-insensitive, i.e. | |
96 | `pseudocolor', `Pseudocolor' and `PseudoColor' all have the same | |
97 | meaning. | |
98 | ||
99 | The program `xdpyinfo' can be used to list the visual classes | |
100 | supported on your display, and which depths they have. If | |
101 | `visualClass' is not specified, Emacs uses the display's default | |
102 | visual. | |
103 | ||
104 | Example: | |
105 | ||
699238d9 | 106 | emacs.visualClass: TrueColor-8 |
100b3cbb GM |
107 | |
108 | *** The X resource `privateColormap', class `PrivateColormap', | |
109 | specifies that Emacs should use a private colormap if it is using the | |
110 | default visual, and that visual is of class PseudoColor. Recognized | |
111 | resource values are `true' or `on'. | |
112 | ||
113 | Example: | |
114 | ||
699238d9 | 115 | emacs.privateColormap: true |
100b3cbb | 116 | |
0d0c76b8 EZ |
117 | ** The menu bar configuration has changed. The new configuration is |
118 | more CUA-compliant. The most significant change is that Options is | |
119 | now a separate menu-bar item, with Mule and Customize as its submenus. | |
120 | ||
42088c12 | 121 | ** User-option `show-cursor-in-non-selected-windows' controls how to |
c60ea02e | 122 | display the cursor in non-selected windows. If nil, no cursor is |
42088c12 GM |
123 | shown, if non-nil a hollow box cursor is shown. This option can |
124 | be customized. | |
c60ea02e | 125 | |
31047e0d DL |
126 | ** The variable `echo-keystrokes' may now have a floating point value. |
127 | ||
b02786f9 GM |
128 | ** C-x 5 1 runs the new command delete-other-frames which deletes |
129 | all frames except the selected one. | |
130 | ||
3261c1d8 DL |
131 | ** If your init file is compiled (.emacs.elc), `user-init-file' is set |
132 | to the source name (.emacs.el), if that exists, after loading it. | |
133 | ||
ffe36136 GM |
134 | ** The help string specified for a menu-item whose definition contains |
135 | the property `:help HELP' is now displayed under X either in the echo | |
136 | area or with tooltips. | |
137 | ||
559cee90 DL |
138 | ** New user option `read-mail-command' specifies a command to use to |
139 | read mail from the menu etc. | |
140 | ||
271b4185 GM |
141 | ** Hexl contains a new command `hexl-insert-hex-string' which inserts |
142 | a string of hexadecimal numbers read from the mini-buffer. | |
143 | ||
0daee095 GM |
144 | ** Changes in Texinfo mode. |
145 | ||
146 | ** A couple of new key bindings have been added for inserting Texinfo | |
147 | macros | |
148 | ||
149 | Key binding Macro | |
150 | ------------------------- | |
151 | C-c C-c C-s @strong | |
152 | C-c C-c C-e @emph | |
153 | C-c C-c u @url | |
154 | C-c C-c q @quotation | |
155 | C-c C-c m @email | |
156 | ||
559cee90 DL |
157 | ** Changes in Outline mode. |
158 | ||
159 | There is now support for Imenu to index headings. A new command | |
160 | `outline-headers-as-kill' copies the visible headings in the region to | |
161 | the kill ring, e.g. to produce a table of contents. | |
162 | ||
404fa7d6 DL |
163 | ** New command M-x check-parens can be used to find unbalanced paren |
164 | groups and strings in buffers in Lisp mode (or other modes). | |
165 | ||
8964fec7 SM |
166 | ** You can now easily create new *Info* buffers using either M-x clone-buffer |
167 | or C-u m <entry> RET. M-x clone-buffer can also be used on *Help* and | |
168 | several other special buffers. | |
169 | ||
39783d73 WP |
170 | ** Emacs can now support 'wheeled' mice (such as the MS IntelliMouse) |
171 | under XFree86. To enable this, simply put (mwheel-install) in your | |
172 | .emacs file. | |
173 | ||
174 | The variables `mwheel-follow-mouse' and `mwheel-scroll-amount' | |
175 | determine where and by how much buffers are scrolled. | |
176 | ||
d35fce81 GM |
177 | ** Listing buffers with M-x list-buffers (C-x C-b) now shows |
178 | abbreviated file names. Abbreviations can be customized by changing | |
179 | `directory-abbrev-alist'. | |
180 | ||
df5a1902 GM |
181 | ** Reading from the mini-buffer now reads from standard input if Emacs |
182 | is running in batch mode. For example, | |
183 | ||
184 | (message "%s" (read t)) | |
185 | ||
186 | will read a Lisp expression from standard input and print the result | |
187 | to standard output. | |
188 | ||
a933dad1 DL |
189 | ** Faces and frame parameters. |
190 | ||
191 | There are four new faces `scroll-bar', `border', `cursor' and `mouse'. | |
192 | Setting the frame parameters `scroll-bar-foreground' and | |
193 | `scroll-bar-background' sets foreground and background color of face | |
194 | `scroll-bar' and vice versa. Setting frame parameter `border-color' | |
195 | sets the background color of face `border' and vice versa. Likewise | |
196 | for frame parameters `cursor-color' and face `cursor', and frame | |
197 | parameter `mouse-color' and face `mouse'. | |
198 | ||
199 | Changing frame parameter `font' sets font-related attributes of the | |
200 | `default' face and vice versa. Setting frame parameters | |
79214ddf | 201 | `foreground-color' or `background-color' sets the colors of the |
a933dad1 DL |
202 | `default' face and vice versa. |
203 | ||
f77a4a8a GM |
204 | ** New face `menu'. |
205 | ||
206 | The face `menu' can be used to change colors and font of Emacs' menus. | |
207 | Setting the font of LessTif/Motif menus is currently not supported; | |
208 | attempts to set the font are ignored in this case. | |
209 | ||
a933dad1 DL |
210 | ** New frame parameter `screen-gamma' for gamma correction. |
211 | ||
212 | The new frame parameter `screen-gamma' specifies gamma-correction for | |
213 | colors. Its value may be nil, the default, in which case no gamma | |
214 | correction occurs, or a number > 0, usually a float, that specifies | |
215 | the screen gamma of a frame's display. | |
216 | ||
217 | PC monitors usually have a screen gamma of 2.2. smaller values result | |
218 | in darker colors. You might want to try a screen gamma of 1.5 for LCD | |
219 | color displays. The viewing gamma Emacs uses is 0.4545. (1/2.2). | |
220 | ||
221 | The X resource name of this parameter is `screenGamma', class | |
222 | `ScreenGamma'. | |
223 | ||
224 | ** Emacs has a new redisplay engine. | |
225 | ||
226 | The new redisplay handles characters of variable width and height. | |
227 | Italic text can be used without redisplay problems. Fonts containing | |
228 | oversized characters, i.e. characters larger than the logical height | |
229 | of a font can be used. Images of various formats can be displayed in | |
230 | the text. | |
231 | ||
232 | ** Emacs has a new face implementation. | |
233 | ||
234 | The new faces no longer fundamentally use X font names to specify the | |
235 | font. Instead, each face has several independent attributes--family, | |
236 | height, width, weight and slant--that it may or may not specify. | |
237 | These attributes can be merged from various faces, and then together | |
238 | specify a font. | |
239 | ||
240 | Faces are supported on terminals that can display color or fonts. | |
241 | These terminal capabilities are auto-detected. Details can be found | |
242 | under Lisp changes, below. | |
243 | ||
244 | ** New default font is Courier 12pt. | |
245 | ||
246 | ** When using a windowing terminal, Emacs window now has a cursor of | |
247 | its own. When the window is selected, the cursor is solid; otherwise, | |
248 | it is hollow. | |
249 | ||
250 | ** Bitmap areas to the left and right of windows are used to display | |
251 | truncation marks, continuation marks, overlay arrows and alike. The | |
252 | foreground, background, and stipple of these areas can be changed by | |
253 | customizing face `fringe'. | |
254 | ||
255 | ** The mode line under X is now drawn with shadows by default. You | |
256 | can change its appearance by modifying the face `modeline'. | |
257 | ||
258 | ** LessTif support. | |
259 | ||
260 | Emacs now runs with LessTif (see <http://www.lesstif.org>). You will | |
261 | need a version 0.88.1 or later. | |
262 | ||
263 | ** Toolkit scroll bars. | |
264 | ||
265 | Emacs now uses toolkit scrollbars if available. When configured for | |
266 | LessTif/Motif, it will use that toolkit's scrollbar. Otherwise, when | |
267 | configured for Lucid and Athena widgets, it will use the Xaw3d scroll | |
268 | bar if Xaw3d is available. You can turn off the use of toolkit scroll | |
269 | bars by specifying `--with-toolkit-scroll-bars=no' when configuring | |
270 | Emacs. | |
271 | ||
272 | When you encounter problems with the Xaw3d scroll bar, watch out how | |
273 | Xaw3d is compiled on your system. If the Makefile generated from | |
274 | Xaw3d's Imakefile contains a `-DNARROWPROTO' compiler option, and your | |
275 | Emacs system configuration file `s/your-system.h' does not contain a | |
276 | define for NARROWPROTO, you might consider adding it. Take | |
277 | `s/freebsd.h' as an example. | |
278 | ||
279 | Alternatively, if you don't have access to the Xaw3d source code, take | |
280 | a look at your system's imake configuration file, for example in the | |
281 | directory `/usr/X11R6/lib/X11/config' (paths are different on | |
282 | different systems). You will find files `*.cf' there. If your | |
283 | system's cf-file contains a line like `#define NeedWidePrototypes NO', | |
284 | add a `#define NARROWPROTO' to your Emacs system configuration file. | |
285 | ||
286 | The reason for this is that one Xaw3d function uses `double' or | |
287 | `float' function parameters depending on the setting of NARROWPROTO. | |
288 | This is not a problem when Imakefiles are used because each system's | |
289 | image configuration file contains the necessary information. Since | |
290 | Emacs doesn't use imake, this has do be done manually. | |
291 | ||
292 | ** Toggle buttons and radio buttons in menus. | |
293 | ||
294 | When compiled with LessTif (or Motif) support, Emacs uses toolkit | |
295 | widgets for radio and toggle buttons in menus. When configured for | |
296 | Lucid, Emacs draws radio buttons and toggle buttons similar to Motif. | |
297 | ||
298 | ** Highlighting of trailing whitespace. | |
299 | ||
300 | When `show-trailing-whitespace' is non-nil, Emacs displays trailing | |
301 | whitespace in the face `trailing-whitespace'. Trailing whitespace is | |
302 | defined as spaces or tabs at the end of a line. To avoid busy | |
303 | highlighting when entering new text, trailing whitespace is not | |
304 | displayed if point is at the end of the line containing the | |
305 | whitespace. | |
306 | ||
307 | ** Busy-cursor. | |
308 | ||
309 | Emacs can optionally display a busy-cursor under X. You can turn the | |
310 | display on or off by customizing group `cursor'. | |
311 | ||
312 | ** Blinking cursor | |
313 | ||
314 | M-x blink-cursor-mode toggles a blinking cursor under X and on | |
315 | terminals having terminal capabilities `vi', `vs', and `ve'. Blinking | |
316 | and related parameters like frequency and delay can be customized in | |
317 | the group `cursor'. | |
318 | ||
319 | ** New font-lock support mode `jit-lock-mode'. | |
320 | ||
321 | This support mode is roughly equivalent to `lazy-lock' but is | |
322 | generally faster. It supports stealth and deferred fontification. | |
323 | See the documentation of the function `jit-lock-mode' for more | |
324 | details. | |
325 | ||
326 | Font-lock uses jit-lock-mode as default support mode, so you don't | |
327 | have to do anything to activate it. | |
328 | ||
329 | ** Tabs and variable-width text. | |
330 | ||
331 | Tabs are now displayed with stretch properties; the width of a tab is | |
332 | defined as a multiple of the normal character width of a frame, and is | |
333 | independent of the fonts used in the text where the tab appears. | |
334 | Thus, tabs can be used to line up text in different fonts. | |
335 | ||
336 | ** Enhancements of the Lucid menu bar | |
337 | ||
338 | *** The Lucid menu bar now supports the resource "margin". | |
339 | ||
340 | emacs.pane.menubar.margin: 5 | |
341 | ||
79dd1637 RS |
342 | The default margin is 4 which makes the menu bar appear like the |
343 | LessTif/Motif one. | |
a933dad1 | 344 | |
79dd1637 RS |
345 | *** Arrows that indicate sub-menus are now drawn with shadows, as in |
346 | LessTif and Motif. | |
a933dad1 DL |
347 | |
348 | ** Hscrolling in C code. | |
349 | ||
cc181e95 GM |
350 | Horizontal scrolling now happens automatically if |
351 | `automatic-hscrolling' is set (the default). This setting can be | |
352 | customized. | |
a933dad1 DL |
353 | |
354 | ** Tool bar support. | |
355 | ||
356 | Emacs supports a tool bar at the top of a frame under X. For details | |
357 | how to define a tool bar, see the page describing Lisp-level changes. | |
358 | ||
359 | ** Mouse-sensitive mode line. | |
360 | ||
361 | Different parts of the mode line under X have been made | |
362 | mouse-sensitive. Moving the mouse to a mouse-sensitive part in the mode | |
363 | line changes the appearance of the mouse pointer to an arrow, and help | |
364 | about available mouse actions is displayed either in the echo area, or | |
365 | in the tooltip window if you have enabled one. | |
366 | ||
367 | Currently, the following actions have been defined: | |
368 | ||
369 | - Mouse-1 on the buffer name in the mode line switches between two | |
370 | buffers. | |
371 | ||
372 | - Mouse-2 on the buffer-name switches to the next buffer, and | |
373 | M-mouse-2 switches to the previous buffer in the buffer list. | |
374 | ||
375 | - Mouse-3 on the buffer-name displays a buffer menu. | |
376 | ||
559cee90 | 377 | - Mouse-2 on the read-only status in the mode line (`%' or `*') |
a933dad1 DL |
378 | toggles the read-only status. |
379 | ||
380 | - Mouse-3 on the mode name display a minor-mode menu. | |
381 | ||
382 | ** LessTif/Motif file selection dialog. | |
383 | ||
384 | When Emacs is configured to use LessTif or Motif, reading a file name | |
e33b0397 | 385 | from a menu will pop up a file selection dialog if `use-dialog-box' is |
a933dad1 DL |
386 | non-nil. |
387 | ||
388 | ** Emacs can display faces on TTY frames. | |
389 | ||
390 | Emacs automatically detects terminals that are able to display colors. | |
391 | Faces with a weight greater than normal are displayed extra-bright, if | |
392 | the terminal supports it. Faces with a weight less than normal and | |
393 | italic faces are displayed dimmed, if the terminal supports it. | |
394 | Underlined faces are displayed underlined if possible. Other face | |
395 | attributes like overlines, strike-throught, box are ignored. | |
396 | ||
397 | ** Sound support | |
398 | ||
399 | Emacs supports playing sound files on GNU/Linux and the free BSDs | |
400 | (Voxware driver and native BSD driver, aka as Luigi's driver). | |
401 | Currently supported file formats are RIFF-WAVE (*.wav) and Sun Audio | |
402 | (*.au). You must configure Emacs with the option `--with-sound=yes' | |
403 | to enable sound support. | |
404 | ||
405 | ** A new variable, backup-by-copying-when-privileged-mismatch, gives | |
406 | the highest file uid for which backup-by-copying-when-mismatch will be | |
407 | forced on. The assumption is that uids less than or equal to this | |
408 | value are special uids (root, bin, daemon, etc.--not real system | |
409 | users) and that files owned by these users should not change ownership, | |
410 | even if your system policy allows users other than root to edit them. | |
411 | ||
412 | The default is 200; set the variable to nil to disable the feature. | |
413 | ||
414 | ** A block cursor can be drawn as wide as the glyph under it under X. | |
415 | ||
416 | As an example: if a block cursor is over a tab character, it will be | |
417 | drawn as wide as that tab on the display. To do this, set | |
418 | `x-stretch-cursor' to a non-nil value. | |
419 | ||
420 | ** Empty display lines at the end of a buffer may be marked with a | |
421 | bitmap (this is similar to the tilde displayed by vi). | |
422 | ||
423 | This behavior is activated by setting the buffer-local variable | |
424 | `indicate-empty-lines' to a non-nil value. The default value of this | |
425 | variable is found in `default-indicate-empty-lines'. | |
426 | ||
427 | ** There is a new "aggressive" scrolling method. | |
428 | ||
429 | When scrolling up because point is above the window start, if the | |
430 | value of the buffer-local variable `scroll-up-aggessively' is a | |
431 | number, Emacs chooses a new window start so that point ends up that | |
432 | fraction of the window's height from the bottom of the window. | |
433 | ||
434 | When scrolling down because point is below the window end, if the | |
435 | value of the buffer-local variable `scroll-down-aggessively' is a | |
436 | number, Emacs chooses a new window start so that point ends up that | |
437 | fraction of the window's height from the top of the window. | |
438 | ||
439 | ** The rectangle commands now avoid inserting undesirable spaces, | |
440 | notably at the end of lines. | |
441 | ||
442 | All these functions have been rewritten to avoid inserting unwanted | |
443 | spaces, and an optional prefix now allows them to behave the old way. | |
444 | ||
eee54b0e DL |
445 | There is a new command M-x replace-rectangle. |
446 | ||
a933dad1 DL |
447 | ** The new command M-x query-replace-regexp-eval acts like |
448 | query-replace-regexp, but takes a Lisp expression which is evaluated | |
449 | after each match to get the replacement text. | |
450 | ||
f0124b4a | 451 | ** M-x query-replace recognizes a new command `E' that lets you |
4ff40dd0 GM |
452 | edit the replacement string. |
453 | ||
454 | ** The new command mail-abbrev-complete-alias, bound to `M-TAB', let's | |
455 | you complete mail aliases in the text, analogous to | |
456 | lisp-complete-symbol. | |
457 | ||
a933dad1 DL |
458 | ** Emacs now resizes mini-windows if appropriate. |
459 | ||
460 | If a message is longer than one line, or mini-buffer contents are | |
461 | longer than one line, Emacs now resizes the mini-window unless it is | |
462 | on a frame of its own. You can control the maximum mini-window size | |
463 | by setting the following variable: | |
464 | ||
465 | - User option: max-mini-window-height | |
466 | ||
467 | Maximum height for resizing mini-windows. If a float, it specifies a | |
468 | fraction of the mini-window frame's height. If an integer, it | |
469 | specifies a number of lines. If nil, don't resize. | |
470 | ||
471 | Default is 0.25. | |
472 | ||
0d43b60d GM |
473 | ** Changes to hideshow.el |
474 | ||
475 | Hideshow is now at version 5.x. It uses a new algorithms for block | |
476 | selection and traversal and includes more isearch support. | |
477 | ||
478 | *** Generalized block selection and traversal | |
479 | ||
480 | A block is now recognized by three things: its start and end regexps | |
481 | (both strings), and a match-data selector (an integer) specifying | |
482 | which sub-expression in the start regexp serves as the place where a | |
483 | `forward-sexp'-like function can operate. Hideshow always adjusts | |
484 | point to this sub-expression before calling `hs-forward-sexp-func' | |
485 | (which for most modes evaluates to `forward-sexp'). | |
486 | ||
487 | If the match-data selector is not specified, it defaults to zero, | |
488 | i.e., the entire start regexp is valid, w/ no prefix. This is | |
489 | backwards compatible with previous versions of hideshow. Please see | |
490 | the docstring for variable `hs-special-modes-alist' for details. | |
491 | ||
492 | *** Isearch support for updating mode line | |
493 | ||
494 | During incremental search, if Hideshow minor mode is active, hidden | |
495 | blocks are temporarily shown. The variable `hs-headline' records the | |
496 | line at the beginning of the opened block (preceding the hidden | |
497 | portion of the buffer), and the mode line is refreshed. When a block | |
498 | is re-hidden, the variable is set to nil. | |
499 | ||
500 | To show `hs-headline' in the mode line, you may wish to include | |
501 | something like this in your .emacs. | |
502 | ||
503 | (add-hook 'hs-minor-mode-hook | |
504 | (lambda () | |
505 | (add-to-list 'mode-line-format 'hs-headline))) | |
506 | ||
559cee90 DL |
507 | ** Changes to Change Log mode and Add-Log functions |
508 | ||
509 | If you invoke `add-change-log-entry' from a backup file, it makes an | |
510 | entry appropriate for the file's parent. This is useful for making | |
511 | log entries by comparing a version with deleted functions. | |
512 | ||
513 | New command M-x change-log-merge merges another log into the current | |
514 | buffer, fixing old-style date formats if necessary. | |
eb2aac9d GM |
515 | |
516 | Change Log mode now adds a file's version number to change log entries | |
517 | if user-option `change-log-version-info-enabled' is non-nil. | |
518 | ||
519 | The search for a file's version number is performed based on regular | |
520 | expressions from `change-log-version-number-regexp-list' which can be | |
521 | cutomized. Version numbers are only found in the first 10 percent of | |
522 | a file. | |
523 | ||
3476b54a GM |
524 | ** Changes in Font Lock |
525 | ||
526 | *** The new function `font-lock-remove-keywords' can be used to remove | |
527 | font-lock keywords from the current buffer or from a specific major | |
528 | mode. | |
529 | ||
b3b98592 GM |
530 | ** Comint (subshell) changes |
531 | ||
532 | Comint now includes new features to send commands to running processes | |
533 | and redirect the output to a designated buffer or buffers. | |
534 | ||
535 | The command M-x comint-redirect-send-command reads a command and | |
536 | buffer name from the mini-buffer. The command is sent to the current | |
537 | buffer's process, and its output is inserted into the specified buffer. | |
538 | ||
539 | The command M-x comint-redirect-send-command-to-process acts like | |
540 | M-x comint-redirect-send-command but additionally reads the name of | |
541 | the buffer whose process should be used from the mini-buffer. | |
542 | ||
e26cec67 GM |
543 | ** Changes to Rmail mode |
544 | ||
c0510d27 GM |
545 | *** The new user-option rmail-rmail-user-mail-address-regexp can be |
546 | set to fine tune the identification of of the correspondent when | |
547 | receiving new mail. If it matches the address of the sender, the | |
548 | recipient is taken as correspondent of a mail. If nil, the default, | |
549 | `user-login-name' and `user-mail-address' are used to exclude yourself | |
550 | as correspondent. | |
551 | ||
552 | Usually you don't have to set this variable, except if you collect | |
553 | mails sent by you under different user names. Then it should be a | |
993d8b7d | 554 | regexp matching your mail addresses. |
c0510d27 | 555 | |
3b55acc9 GM |
556 | *** The new user-option rmail-confirm-expunge controls whether and how |
557 | to ask for confirmation before expunging deleted messages from an | |
558 | Rmail file. You can choose between no confirmation, confirmation | |
559 | with y-or-n-p, or confirmation with yes-or-no-p. Default is to ask | |
560 | for confirmation with yes-or-no-p. | |
561 | ||
6a1950ec GM |
562 | *** RET is now bound in the Rmail summary to rmail-summary-goto-msg, |
563 | like `j'. | |
564 | ||
5bb6f079 RS |
565 | *** There is a new user option `rmail-digest-end-regexps' that |
566 | specifies the regular expressions to detect the line that ends a | |
2d5e9b54 | 567 | digest message. |
e26cec67 | 568 | |
993d8b7d DL |
569 | *** The new user option `rmail-automatic-folder-directives' specifies |
570 | in which folder to put messages automatically. | |
571 | ||
400a1ed0 GM |
572 | ** Changes to TeX mode |
573 | ||
574 | The default mode has been changed from `plain-tex-mode' to | |
575 | `latex-mode'. | |
576 | ||
a933dad1 DL |
577 | ** Changes to RefTeX mode |
578 | ||
579 | *** RefTeX has new support for index generation. Index entries can be | |
580 | created with `C-c <', with completion available on index keys. | |
581 | Pressing `C-c /' indexes the word at the cursor with a default | |
582 | macro. `C-c >' compiles all index entries into an alphabetically | |
583 | sorted *Index* buffer which looks like the final index. Entries | |
584 | can be edited from that buffer. | |
585 | ||
586 | *** Label and citation key selection now allow to select several | |
587 | items and reference them together (use `m' to mark items, `a' or | |
588 | `A' to use all marked entries). | |
589 | ||
590 | *** reftex.el has been split into a number of smaller files to reduce | |
591 | memory use when only a part of RefTeX is being used. | |
592 | ||
593 | *** a new command `reftex-view-crossref-from-bibtex' (bound to `C-c &' | |
594 | in BibTeX-mode) can be called in a BibTeX database buffer in order | |
595 | to show locations in LaTeX documents where a particular entry has | |
596 | been cited. | |
597 | ||
38de9631 GM |
598 | ** Emacs Lisp mode now allows multiple levels of outline headings. |
599 | The level of a heading is determined from the number of leading | |
600 | semicolons in a heading line. Toplevel forms starting with a `(' | |
601 | in column 1 are always made leaves. | |
602 | ||
a933dad1 DL |
603 | ** The M-x time-stamp command (most commonly used on write-file-hooks) |
604 | has the following new features: | |
605 | ||
606 | *** The patterns for finding the time stamp and for updating a pattern | |
607 | may match text spanning multiple lines. For example, some people like | |
608 | to have the filename and date on separate lines. The new variable | |
609 | time-stamp-inserts-lines controls the matching for multi-line patterns. | |
610 | ||
611 | *** More than one time stamp can be updated in the same file. This | |
612 | feature is useful if you need separate time stamps in a program source | |
613 | file to both include in formatted documentation and insert in the | |
614 | compiled binary. The same time-stamp will be written at each matching | |
615 | pattern. The variable time-stamp-count enables this new feature; it | |
616 | defaults to 1. | |
617 | ||
618 | ** Tooltips. | |
619 | ||
620 | Tooltips are small X windows displaying a help string at the current | |
621 | mouse position. To use them, use the Lisp package `tooltip' which you | |
622 | can access via the user option `tooltip-mode'. | |
623 | ||
624 | Tooltips also provides support for GUD debugging. If activated, | |
625 | variable values can be displayed in tooltips by pointing at them with | |
626 | the mouse in source buffers. You can customize various aspects of the | |
627 | tooltip display in the group `tooltip'. | |
628 | ||
629 | ** Customize changes | |
630 | ||
631 | *** Customize now supports comments about customized items. Use the | |
34f94cf9 DL |
632 | `State' menu to add comments. Note that customization comments will |
633 | cause the customizations to fail in earlier versions of Emacs. | |
a933dad1 DL |
634 | |
635 | *** The new option `custom-buffer-done-function' says whether to kill | |
636 | Custom buffers when you've done with them or just bury them (the | |
637 | default). | |
638 | ||
0ae51efb GM |
639 | *** The keyword :set-after in defcustom allows to specify dependencies |
640 | between custom options. Example: | |
641 | ||
642 | (defcustom default-input-method nil | |
643 | "*Default input method for multilingual text (a string). | |
644 | This is the input method activated automatically by the command | |
645 | `toggle-input-method' (\\[toggle-input-method])." | |
646 | :group 'mule | |
647 | :type '(choice (const nil) string) | |
648 | :set-after '(current-language-environment)) | |
649 | ||
650 | This specifies that default-input-method should be set after | |
651 | current-language-environment even if default-input-method appears | |
652 | first in a custom-set-variables statement. | |
653 | ||
a933dad1 DL |
654 | ** New features in evaluation commands |
655 | ||
656 | The commands to evaluate Lisp expressions, such as C-M-x in Lisp | |
657 | modes, C-j in Lisp Interaction mode, and M-:, now bind the variables | |
658 | print-level, print-length, and debug-on-error based on the | |
659 | customizable variables eval-expression-print-level, | |
660 | eval-expression-print-length, and eval-expression-debug-on-error. | |
661 | ||
a933dad1 DL |
662 | ** Dired changes |
663 | ||
664 | *** New variable `dired-recursive-deletes' determines if the delete | |
665 | command will delete non-empty directories recursively. The default | |
666 | is, delete only empty directories. | |
667 | ||
668 | *** New variable `dired-recursive-copies' determines if the copy | |
669 | command will copy directories recursively. The default is, do not | |
670 | copy directories recursively. | |
671 | ||
f6737cde GM |
672 | *** In command `dired-do-shell-command' (usually bound to `!') a `?' |
673 | in the shell command has a special meaning similar to `*', but with | |
674 | the difference that the command will be run on each file individually. | |
675 | ||
a933dad1 DL |
676 | ** The variable mail-specify-envelope-from controls whether to |
677 | use the -f option when sending mail. | |
678 | ||
b1c609b1 GM |
679 | ** CC mode changes. |
680 | ||
681 | Note: This release contains changes that might not be compatible with | |
682 | current user setups (although it's believed that these | |
683 | incompatibilities will only show in very uncommon circumstances). | |
684 | However, since the impact is uncertain, these changes may be rolled | |
685 | back depending on user feedback. Therefore there's no forward | |
686 | compatibility guarantee wrt the new features introduced in this | |
687 | release. | |
688 | ||
689 | *** New initialization procedure for the style system. | |
690 | When the initial style for a buffer is determined by CC Mode (from the | |
691 | variable c-default-style), the global values of style variables now | |
692 | take precedence over the values specified by the chosen style. This | |
693 | is different than the old behavior: previously, the style-specific | |
694 | settings would override the global settings. This change makes it | |
695 | possible to do simple configuration in the intuitive way with | |
696 | Customize or with setq lines in one's .emacs file. | |
697 | ||
698 | By default, the global value of every style variable is the new | |
699 | special symbol set-from-style, which causes the value to be taken from | |
700 | the style system. This means that in effect, only an explicit setting | |
701 | of a style variable will cause the "overriding" behavior described | |
702 | above. | |
703 | ||
704 | Also note that global settings override style-specific settings *only* | |
705 | when the initial style of a buffer is chosen by a CC Mode major mode | |
706 | function. When a style is chosen in other ways --- for example, by a | |
707 | call like (c-set-style "gnu") in a hook, or via M-x c-set-style --- | |
708 | then the style-specific values take precedence over any global style | |
709 | values. In Lisp terms, global values override style-specific values | |
710 | only when the new second argument to c-set-style is non-nil; see the | |
711 | function documentation for more info. | |
712 | ||
713 | The purpose of these changes is to make it easier for users, | |
714 | especially novice users, to do simple customizations with Customize or | |
715 | with setq in their .emacs files. On the other hand, the new system is | |
716 | intended to be compatible with advanced users' customizations as well, | |
717 | such as those that choose styles in hooks or whatnot. This new system | |
718 | is believed to be almost entirely compatible with current | |
719 | configurations, in spite of the changed precedence between style and | |
720 | global variable settings when a buffer's default style is set. | |
721 | ||
722 | (Thanks to Eric Eide for clarifying this explanation a bit.) | |
723 | ||
724 | **** c-offsets-alist is now a customizable variable. | |
725 | This became possible as a result of the new initialization behavior. | |
726 | ||
727 | This variable is treated slightly differently from the other style | |
728 | variables; instead of using the symbol set-from-style, it will be | |
729 | completed with the syntactic symbols it doesn't already contain when | |
730 | the style is first initialized. This means it now defaults to the | |
731 | empty list to make all syntactic elements get their values from the | |
732 | style system. | |
733 | ||
734 | **** Compatibility variable to restore the old behavior. | |
735 | In case your configuration doesn't work with this change, you can set | |
736 | c-old-style-variable-behavior to non-nil to get the old behavior back | |
737 | as far as possible. | |
738 | ||
739 | *** Improvements to line breaking and text filling. | |
740 | CC Mode now handles this more intelligently and seamlessly wrt the | |
741 | surrounding code, especially inside comments. For details see the new | |
742 | chapter about this in the manual. | |
743 | ||
744 | **** New variable to recognize comment line prefix decorations. | |
745 | The variable c-comment-prefix-regexp has been added to properly | |
746 | recognize the line prefix in both block and line comments. It's | |
747 | primarily used to initialize the various paragraph recognition and | |
748 | adaptive filling variables that the text handling functions uses. | |
749 | ||
750 | **** New variable c-block-comment-prefix. | |
751 | This is a generalization of the now obsolete variable | |
752 | c-comment-continuation-stars to handle arbitrary strings. | |
753 | ||
754 | **** CC Mode now uses adaptive fill mode. | |
755 | This to make it adapt better to the paragraph style inside comments. | |
756 | ||
757 | It's also possible to use other adaptive filling packages inside CC | |
758 | Mode, notably Kyle E. Jones' Filladapt mode (http://wonderworks.com/). | |
759 | A new convenience function c-setup-filladapt sets up Filladapt for use | |
760 | inside CC Mode. | |
761 | ||
762 | Note though that the 2.12 version of Filladapt lacks a feature that | |
763 | causes it to work suboptimally when c-comment-prefix-regexp can match | |
764 | the empty string (which it commonly does). A patch for that is | |
765 | available from the CC Mode web site (http://www.python.org/emacs/ | |
766 | cc-mode/). | |
767 | ||
768 | **** It's now possible to selectively turn off auto filling. | |
769 | The variable c-ignore-auto-fill is used to ignore auto fill mode in | |
770 | specific contexts, e.g. in preprocessor directives and in string | |
771 | literals. | |
772 | ||
773 | **** New context sensitive line break function c-context-line-break. | |
774 | It works like newline-and-indent in normal code, and adapts the line | |
775 | prefix according to the comment style when used inside comments. If | |
776 | you're normally using newline-and-indent, you might want to switch to | |
777 | this function. | |
778 | ||
779 | *** Fixes to IDL mode. | |
780 | It now does a better job in recognizing only the constructs relevant | |
781 | to IDL. E.g. it no longer matches "class" as the beginning of a | |
782 | struct block, but it does match the CORBA 2.3 "valuetype" keyword. | |
783 | Thanks to Eric Eide. | |
784 | ||
785 | *** Improvements to the Whitesmith style. | |
786 | It now keeps the style consistently on all levels and both when | |
787 | opening braces hangs and when they don't. | |
788 | ||
789 | **** New lineup function c-lineup-whitesmith-in-block. | |
790 | ||
791 | *** New lineup functions c-lineup-template-args and c-indent-multi-line-block. | |
792 | See their docstrings for details. c-lineup-template-args does a | |
793 | better job of tracking the brackets used as parens in C++ templates, | |
794 | and is used by default to line up continued template arguments. | |
795 | ||
796 | *** c-lineup-comment now preserves alignment with a comment on the | |
797 | previous line. It used to instead preserve comments that started in | |
798 | the column specified by comment-column. | |
799 | ||
800 | *** c-lineup-C-comments handles "free form" text comments. | |
801 | In comments with a long delimiter line at the start, the indentation | |
802 | is kept unchanged for lines that start with an empty comment line | |
803 | prefix. This is intended for the type of large block comments that | |
804 | contain documentation with its own formatting. In these you normally | |
805 | don't want CC Mode to change the indentation. | |
806 | ||
807 | *** The `c' syntactic symbol is now relative to the comment start | |
808 | instead of the previous line, to make integers usable as lineup | |
809 | arguments. | |
810 | ||
811 | *** All lineup functions have gotten docstrings. | |
812 | ||
813 | *** More preprocessor directive movement functions. | |
814 | c-down-conditional does the reverse of c-up-conditional. | |
815 | c-up-conditional-with-else and c-down-conditional-with-else are | |
816 | variants of these that also stops at "#else" lines (suggested by Don | |
817 | Provan). | |
818 | ||
819 | *** Minor improvements to many movement functions in tricky situations. | |
820 | ||
c407c570 GM |
821 | ** Makefile mode changes |
822 | ||
823 | *** The mode now uses the abbrev table `makefile-mode-abbrev-table'. | |
824 | ||
825 | *** Conditionals and include statements are now highlighted when | |
826 | Fontlock mode is active. | |
827 | ||
87be76f6 GM |
828 | ** Isearch changes |
829 | ||
c407c570 GM |
830 | ** In Isearch mode, M-C-s and M-C-r are now bound like C-s and C-r, |
831 | respectively, i.e. you can repeat a regexp isearch with the same keys | |
832 | that started the search. | |
833 | ||
87be76f6 | 834 | *** In Isearch mode, mouse-2 in the echo area now yanks the current |
a933dad1 DL |
835 | selection into the search string rather than giving an error. |
836 | ||
87be76f6 GM |
837 | *** There is a new lazy highlighting feature in incremental search. |
838 | ||
d35fce81 | 839 | Lazy highlighting is switched on/off by customizing variable |
87be76f6 GM |
840 | `isearch-lazy-highlight'. When active, all matches for the current |
841 | search string are highlighted. The current match is highlighted as | |
842 | before using face `isearch' or `region'. All other matches are | |
843 | highlighted using face `isearch-lazy-highlight-face' which defaults to | |
844 | `secondary-selection'. | |
845 | ||
846 | The extra highlighting makes it easier to anticipate where the cursor | |
847 | will end up each time you press C-s or C-r to repeat a pending search. | |
848 | Highlighting of these additional matches happens in a deferred fashion | |
849 | using "idle timers," so the cycles needed do not rob isearch of its | |
850 | usual snappy response. | |
851 | ||
852 | If `isearch-lazy-highlight-cleanup' is set to t, highlights for | |
853 | matches are automatically cleared when you end the search. If it is | |
854 | set to nil, you can remove the highlights manually with `M-x | |
855 | isearch-lazy-highlight-cleanup'. | |
856 | ||
35384f06 GM |
857 | ** Changes in sort.el |
858 | ||
859 | The function sort-numeric-fields interprets numbers starting with `0' | |
12c25bdc | 860 | as octal and numbers starting with `0x' or `0X' as hexadecimal. The |
35384f06 GM |
861 | new user-option sort-numberic-base can be used to specify a default |
862 | numeric base. | |
87be76f6 | 863 | |
d7b511c4 GM |
864 | ** Changes to Ange-ftp |
865 | ||
866 | *** Ange-ftp allows you to specify of a port number in remote file | |
d67f47e4 DL |
867 | names cleanly. It is appended to the host name, separated by a hash |
868 | sign, e.g. `/foo@bar.org#666:mumble'. (This syntax comes from EFS.) | |
869 | ||
d7b511c4 GM |
870 | *** If the new user-option `ange-ftp-try-passive-mode' is set, passive |
871 | ftp mode will be used if the ftp client supports that. | |
872 | ||
4b9347b3 GM |
873 | ** Shell script mode changes. |
874 | ||
875 | Shell script mode (sh-script) can now indent scripts for shells | |
876 | derived from sh and rc. The indentation style is customizeable, and | |
877 | sh-script can attempt to "learn" the current buffer's style. | |
878 | ||
79214ddf FP |
879 | ** Etags changes. |
880 | ||
881 | *** In DOS, etags looks for file.cgz if it cannot find file.c. | |
882 | ||
aca0be23 | 883 | *** New option --ignore-case-regex is an alternative to --regex. It is now |
8dc78b52 FP |
884 | possible to bind a regexp to a language, by prepending the regexp with |
885 | {lang}, where lang is one of the languages that `etags --help' prints out. | |
886 | This feature is useful especially for regex files, where each line contains | |
887 | a regular expression. The manual contains details. | |
aca0be23 | 888 | |
79214ddf FP |
889 | *** In C and derived languages, etags creates tags for function |
890 | declarations when given the --declarations option. | |
891 | ||
892 | *** In C++, tags are created for "operator". The tags have the form | |
aca0be23 | 893 | "operator+", without spaces between the keyword and the operator. |
79214ddf FP |
894 | |
895 | *** New language Ada: tags are functions, procedures, packages, tasks, and | |
896 | types. | |
897 | ||
de370c4c | 898 | *** In Fortran, `procedure' is not tagged. |
79214ddf FP |
899 | |
900 | *** In Java, tags are created for "interface". | |
901 | ||
902 | *** In Lisp, "(defstruct (foo", "(defun (operator" and similar constructs | |
903 | are now tagged. | |
904 | ||
905 | *** In Perl, the --globals option tags global variables. my and local | |
906 | variables are tagged. | |
907 | ||
908 | *** New language Python: def and class at the beginning of a line are tags. | |
909 | ||
8dc78b52 FP |
910 | *** .ss files are Scheme files, .pdb is Postscript with C syntax, .psw is |
911 | for PSWrap. | |
79214ddf | 912 | |
f6737cde GM |
913 | ** Changes in etags.el |
914 | ||
3f6e4b8b GM |
915 | *** The new user-option tags-case-fold-search can be used to make |
916 | tags operations case-sensitive or case-insensitive. The default | |
917 | is to use the same setting as case-fold-search. | |
918 | ||
f6737cde GM |
919 | *** You can display additional output with M-x tags-apropos by setting |
920 | the new variable tags-apropos-additional-actions. | |
921 | ||
922 | If non-nil, the variable's value should be a list of triples (TITLE | |
923 | FUNCTION TO-SEARCH). For each triple, M-x tags-apropos processes | |
924 | TO-SEARCH and lists tags from it. TO-SEARCH should be an alist, | |
925 | obarray, or symbol. If it is a symbol, the symbol's value is used. | |
926 | ||
927 | TITLE is a string to use to label the list of tags from TO-SEARCH. | |
928 | ||
929 | FUNCTION is a function to call when an entry is selected in the Tags | |
930 | List buffer. It is called with one argument, the selected symbol. | |
931 | ||
932 | A useful example value for this variable might be something like: | |
933 | ||
934 | '(("Emacs Lisp" Info-goto-emacs-command-node obarray) | |
935 | ("Common Lisp" common-lisp-hyperspec common-lisp-hyperspec-obarray) | |
936 | ("SCWM" scwm-documentation scwm-obarray)) | |
937 | ||
938 | *** The face tags-tag-face can be used to customize the appearance | |
939 | of tags in the output of M-x tags-apropos. | |
940 | ||
941 | *** Setting tags-apropos-verbose to a non-nil value displays the | |
942 | names of tags files in the *Tags List* buffer. | |
943 | ||
fbc164de PE |
944 | ** Emacs now attempts to determine the initial language environment |
945 | and preferred and locale coding systems systematically from the | |
946 | LC_ALL, LC_CTYPE, and LANG environment variables during startup. | |
947 | ||
59c1bf85 DL |
948 | ** New language environments `Latin-8' and `Latin-9'. |
949 | These correspond respectively to the ISO character sets 8859-14 | |
950 | (Celtic) and 8859-15 (updated Latin-1, with the Euro sign). There is | |
951 | currently no specific input method support for them. | |
952 | ||
e33b0397 DL |
953 | ** Fortran mode has a new command `fortran-strip-sqeuence-nos' to |
954 | remove text past column 72. The syntax class of `\' in Fortran is now | |
955 | appropriate for C-style escape sequences in strings. | |
956 | ||
957 | ** SGML mode's default `sgml-validate-command' is now `nsgmls'. | |
958 | ||
6f8ea2ae DL |
959 | ** A new command `view-emacs-problems' (C-h P) displays the PROBLEMS file. |
960 | ||
c0510d27 GM |
961 | ** The Dabbrev package has a new user-option `dabbrev-ignore-regexps' |
962 | containing a list of regular expressions. Buffers matching a regular | |
963 | expression from that list, are not checked. | |
964 | ||
a933dad1 DL |
965 | ** New modes and packages |
966 | ||
5cb6a58e SM |
967 | *** The comment operations are now provided by the newcomment.el |
968 | package which allows different styles of comment-region and should | |
969 | be more robust while offering the same functionality. | |
970 | ||
578979ee GM |
971 | *** The Ebrowse package implements a C++ class browser and tags |
972 | facilities tailored for use with C++. It is documented in a | |
973 | separate Texinfo file. | |
974 | ||
dc1178bf SM |
975 | *** The PCL-CVS package available by either running M-x cvs-examine |
976 | or by visiting a CVS administrative directory (with a prefix argument) | |
977 | provides an alternative interface to VC-dired for CVS. | |
978 | It comes with log-view-mode to view RCS and SCCS logs and log-edit-mode | |
979 | used to enter checkin log messages. | |
980 | ||
6abca616 EZ |
981 | *** The new package called `woman' allows to browse Unix man pages |
982 | without invoking external programs. | |
983 | ||
984 | The command `M-x woman' formats manual pages entirely in Emacs Lisp | |
985 | and then displays them, like `M-x manual-entry' does. Unlike | |
986 | `manual-entry', `woman' does not invoke any external programs, so it | |
987 | is useful on systems such as MS-DOS/MS-Windows where the `man' and | |
490f2e7b | 988 | Groff or `troff' commands are not readily available. |
6abca616 EZ |
989 | |
990 | The command `M-x woman-find-file' asks for the file name of a man | |
991 | page, then formats and displays it like `M-x woman' does. | |
992 | ||
5e5dff44 GM |
993 | *** The new command M-x re-builder offers a convenient interface for |
994 | authoring regular expressions with immediate visual feedback. | |
995 | ||
996 | The buffer from which the command was called becomes the target for | |
997 | the regexp editor popping up in a separate window. Matching text in | |
998 | the target buffer is immediately color marked during the editing. | |
999 | Each sub-expression of the regexp will show up in a different face so | |
1000 | even complex regexps can be edited and verified on target data in a | |
1001 | single step. | |
1002 | ||
1003 | On displays not supporting faces the matches instead blink like | |
1004 | matching parens to make them stand out. On such a setup you will | |
1005 | probably also want to use the sub-expression mode when the regexp | |
1006 | contains such to get feedback about their respective limits. | |
1007 | ||
f7136ee8 GM |
1008 | *** glasses-mode is a minor mode that makes |
1009 | unreadableIdentifiersLikeThis readable. It works as glasses, without | |
1010 | actually modifying content of a buffer. | |
1011 | ||
bbd9b566 GM |
1012 | *** The package ebnf2ps translates an EBNF to a syntactic chart in |
1013 | PostScript. | |
1014 | ||
1015 | Currently accepts ad-hoc EBNF, ISO EBNF and Bison/Yacc. | |
1016 | ||
1017 | The ad-hoc default EBNF syntax has the following elements: | |
1018 | ||
1019 | ; comment (until end of line) | |
1020 | A non-terminal | |
1021 | "C" terminal | |
1022 | ?C? special | |
1023 | $A default non-terminal | |
1024 | $"C" default terminal | |
1025 | $?C? default special | |
1026 | A = B. production (A is the header and B the body) | |
1027 | C D sequence (C occurs before D) | |
1028 | C | D alternative (C or D occurs) | |
1029 | A - B exception (A excluding B, B without any non-terminal) | |
1030 | n * A repetition (A repeats n (integer) times) | |
1031 | (C) group (expression C is grouped together) | |
1032 | [C] optional (C may or not occurs) | |
1033 | C+ one or more occurrences of C | |
1034 | {C}+ one or more occurrences of C | |
1035 | {C}* zero or more occurrences of C | |
1036 | {C} zero or more occurrences of C | |
1037 | C / D equivalent to: C {D C}* | |
1038 | {C || D}+ equivalent to: C {D C}* | |
1039 | {C || D}* equivalent to: [C {D C}*] | |
1040 | {C || D} equivalent to: [C {D C}*] | |
1041 | ||
1042 | Please, see ebnf2ps documentation for EBNF syntax and how to use it. | |
1043 | ||
99453a38 GM |
1044 | *** The package align.el will align columns within a region, using M-x |
1045 | align. Its mode-specific rules, based on regular expressions, | |
1046 | determine where the columns should be split. In C and C++, for | |
1047 | example, it will align variable names in declaration lists, or the | |
1048 | equal signs of assignments. | |
1049 | ||
559cee90 DL |
1050 | *** `paragraph-indent-minor-mode' is a new minor mode supporting |
1051 | paragraphs in the same style as `paragraph-indent-text-mode'. | |
1052 | ||
6448a6b3 GM |
1053 | *** bs.el is a new package for buffer selection similar to |
1054 | list-buffers or electric-buffer-list. Use M-x bs-show to display a | |
1055 | buffer menu with this package. You can use M-x bs-customize to | |
1056 | customize the package. | |
1057 | ||
249652b1 GM |
1058 | *** calculator.el is a small calculator package that is intended to |
1059 | replace desktop calculators such as xcalc and calc.exe. Actually, it | |
1060 | is not too small - it has more features than most desktop calculators, | |
1061 | and can be customized easily to get many more functions. It should | |
1062 | not be confused with "calc" which is a much bigger mathematical tool | |
1063 | which answers different needs. | |
1064 | ||
3476b54a GM |
1065 | *** The minor modes cwarn-mode and global-cwarn-mode highlights |
1066 | suspicious C and C++ constructions. Currently, assignments inside | |
1067 | expressions, semicolon following `if', `for' and `while' (except, of | |
1068 | course, after a `do .. while' statement), and C++ functions with | |
1069 | reference parameters are recognized. The modes require font-lock mode | |
1070 | to be enabled. | |
1071 | ||
8964fec7 SM |
1072 | *** smerge-mode.el provides `smerge-mode', a simple minor-mode for files |
1073 | containing diff3-style conflict markers, such as generated by RCS. | |
1074 | ||
a933dad1 DL |
1075 | *** 5x5.el is a simple puzzle game. |
1076 | ||
1077 | *** hl-line.el provides a minor mode to highlight the current line. | |
1078 | ||
1079 | *** ansi-color.el translates ANSI terminal escapes into text-properties. | |
1080 | ||
1081 | *** delphi.el provides a major mode for editing the Delphi (Object | |
1082 | Pascal) language. | |
1083 | ||
1084 | *** quickurl.el provides a simple method of inserting a URL based on | |
1085 | the text at point. | |
1086 | ||
1087 | *** sql.el provides an interface to SQL data bases. | |
1088 | ||
8d54eb69 DL |
1089 | *** fortune.el uses the fortune program to create mail/news signatures. |
1090 | ||
a933dad1 DL |
1091 | *** whitespace.el ??? |
1092 | ||
ebcfda83 GM |
1093 | *** PostScript mode (ps-mode) is a new major mode for editing PostScript |
1094 | files. It offers: interaction with a PostScript interpreter, including | |
1095 | (very basic) error handling; fontification, easily customizable for | |
1096 | interpreter messages; auto-indentation; insertion of EPSF templates and | |
1097 | often used code snippets; viewing of BoundingBox; commenting out / | |
1098 | uncommenting regions; conversion of 8bit characters to PostScript octal | |
1099 | codes. All functionality is accessible through a menu. | |
1100 | ||
1101 | *** delim-col helps to prettify columns in a text region or rectangle. | |
1102 | ||
1103 | Here is an example of columns: | |
1104 | ||
1105 | horse apple bus | |
1106 | dog pineapple car EXTRA | |
1107 | porcupine strawberry airplane | |
1108 | ||
1109 | Doing the following settings: | |
1110 | ||
1111 | (setq delimit-columns-str-before "[ ") | |
1112 | (setq delimit-columns-str-after " ]") | |
1113 | (setq delimit-columns-str-separator ", ") | |
1114 | (setq delimit-columns-separator "\t") | |
1115 | ||
1116 | ||
1117 | Selecting the lines above and typing: | |
1118 | ||
1119 | M-x delimit-columns-region | |
1120 | ||
1121 | It results: | |
1122 | ||
1123 | [ horse , apple , bus , ] | |
1124 | [ dog , pineapple , car , EXTRA ] | |
1125 | [ porcupine, strawberry, airplane, ] | |
1126 | ||
1127 | delim-col has the following options: | |
1128 | ||
1129 | delimit-columns-str-before Specify a string to be inserted | |
1130 | before all columns. | |
1131 | ||
1132 | delimit-columns-str-separator Specify a string to be inserted | |
1133 | between each column. | |
1134 | ||
1135 | delimit-columns-str-after Specify a string to be inserted | |
1136 | after all columns. | |
1137 | ||
1138 | delimit-columns-separator Specify a regexp which separates | |
1139 | each column. | |
1140 | ||
1141 | delim-col has the following commands: | |
1142 | ||
1143 | delimit-columns-region Prettify all columns in a text region. | |
1144 | delimit-columns-rectangle Prettify all columns in a text rectangle. | |
1145 | ||
f507826c GM |
1146 | *** The package recentf.el maintains a menu for visiting files that |
1147 | were operated on recently. When enabled, a new "Open Recent" submenu | |
1148 | is displayed in the "Files" menu. | |
1149 | ||
1150 | The recent files list is automatically saved across Emacs sessions. | |
1151 | ||
1152 | To enable/disable recentf use M-x recentf-mode. | |
1153 | ||
1154 | To enable recentf at Emacs startup use | |
1155 | M-x customize-variable RET recentf-mode RET. | |
1156 | ||
1157 | To change the number of recent files displayed and others options use | |
1158 | M-x customize-group RET recentf RET. | |
1159 | ||
8062f458 DL |
1160 | *** elide-head.el provides a mechanism for eliding boilerplate header |
1161 | text. | |
1162 | ||
36e24b82 | 1163 | *** footnote.el provides `footnote-mode', a minor mode supporting use |
91735437 DL |
1164 | of footnotes. It is intended for use with Message mode, but isn't |
1165 | specific to Message mode. | |
1166 | ||
36e24b82 DL |
1167 | *** diff-mode.el provides `diff-mode', a major mode for |
1168 | viewing/editing context diffs (patches). It is selected for files | |
1169 | with extension `.diff', `.diffs', `.patch' and `.rej'. | |
1170 | ||
aaa659ef DL |
1171 | *** EUDC, the Emacs Unified Directory Client, provides a common user |
1172 | interface to access directory servers using different directory | |
1173 | protocols. It has a separate manual. | |
1174 | ||
eee54b0e DL |
1175 | *** autoconf.el provides a major mode for editing configure.in files |
1176 | for Autoconf, selected automatically. | |
1177 | ||
612839b6 GM |
1178 | *** windmove.el provides moving between windows. |
1179 | ||
1180 | *** crm.el provides a facility to read multiple strings from the | |
1181 | minibuffer with completion. | |
aaa659ef | 1182 | |
399da7e3 DL |
1183 | *** todo-mode.el provides management of TODO lists and integration |
1184 | with the diary features. | |
1185 | ||
6e417ca5 DL |
1186 | *** autoarg.el provides a feature reported from Twenex Emacs whereby |
1187 | numeric keys supply prefix args rather than self inserting. | |
1188 | ||
a933dad1 DL |
1189 | ** Withdrawn packages |
1190 | ||
1191 | *** mldrag.el has been removed. mouse.el provides the same | |
1192 | functionality with aliases for the mldrag functions. | |
25a81338 | 1193 | |
3261c1d8 DL |
1194 | *** eval-reg.el has been obsoleted by changes to edebug.el and removed. |
1195 | ||
1196 | *** ph.el has been obsoleted by EUDC and removed. | |
ce75fd23 GM |
1197 | |
1198 | \f | |
1199 | * Lisp changes made after edition 2.6 of the Emacs Lisp Manual, | |
1200 | (Display-related features are described in a page of their own below.) | |
1201 | ||
80c05bd3 | 1202 | ** The function `subr-arity' provides information on the argument list |
de370c4c DL |
1203 | of a primitive. |
1204 | ||
80c05bd3 DL |
1205 | ** The text property `keymap' specifies a key map which overrides the |
1206 | buffer's local map and the map specified by the `local-map' property. | |
1207 | This is probably what most current uses of `local-map' want, rather | |
1208 | than replacing the local map. | |
1209 | ||
4bc7a543 DL |
1210 | ** The function `find-image' can be used to find a usable image |
1211 | satisfying one of a list of specifications. | |
1212 | ||
1213 | ** The obsolete variables before-change-function and | |
1214 | after-change-function are no longer acted upon and have been removed. | |
45f485a6 GM |
1215 | |
1216 | ** The function `apropos-mode' runs the hook `apropos-mode-hook'. | |
1217 | ||
a933dad1 DL |
1218 | \f |
1219 | * Lisp changes in Emacs 21.1 (see following page for display-related features) | |
1220 | ||
1221 | Note that +++ before an item means the Lisp manual has been updated. | |
1222 | --- means that I have decided it does not need to be in the Lisp manual. | |
1223 | When you add a new item, please add it without either +++ or --- | |
1224 | so I will know I still need to look at it -- rms. | |
1225 | ||
399da7e3 | 1226 | +++ |
f0124b4a DL |
1227 | ** If the APPEND argument of `write-region' is an integer, it seeks to |
1228 | that offset in the file before writing. | |
1229 | ||
3bbc50af DL |
1230 | ** `concat' no longer accepts individual integer arguments, as |
1231 | promised long ago. | |
1232 | ||
7464346d GM |
1233 | ** The function `add-minor-mode' simplifies the definition of minor |
1234 | modes. | |
1235 | ||
c94f4677 | 1236 | - Function: add-minor-mode TOGGLE NAME &optional KEYMAP AFTER TOGGLE-FUN |
7464346d | 1237 | |
c94f4677 GM |
1238 | Register a new minor mode. |
1239 | ||
1240 | TOGGLE is a symbol which is the name of a buffer-local variable that | |
1241 | is toggled on or off to say whether the minor mode is active or not. | |
1242 | ||
1243 | NAME specifies what will appear in the mode line when the minor mode | |
1244 | is active. NAME should be either a string starting with a space, or a | |
1245 | symbol whose value is such a string. | |
1246 | ||
1247 | Optional KEYMAP is the keymap for the minor mode that will be added | |
1248 | to `minor-mode-map-alist'. | |
1249 | ||
1250 | Optional AFTER specifies that TOGGLE should be added after AFTER | |
1251 | in `minor-mode-alist'. | |
1252 | ||
1253 | Optional TOGGLE-FUN is there for compatiblity with other Emacssen. | |
1254 | It is currently not used. | |
7464346d | 1255 | |
612839b6 GM |
1256 | ** The function `shell-command' now sets the default directory of the |
1257 | `*Shell Command Output*' buffer to the default directory of the buffer | |
1258 | from which the command was issued. | |
1259 | ||
1260 | ** The functions `query-replace', `query-replace-regexp', | |
1261 | `query-replace-regexp-eval' `map-query-replace-regexp', | |
1262 | `replace-string', `replace-regexp', and `perform-replace' take two | |
1263 | additional optional arguments START and END that specify the region to | |
1264 | operate on. | |
1265 | ||
271b4185 GM |
1266 | ** The new function `count-screen-lines' is a more flexible alternative |
1267 | to `window-buffer-height'. | |
1268 | ||
1269 | - Function: count-screen-lines &optional BEG END COUNT-FINAL-NEWLINE WINDOW | |
1270 | ||
1271 | Return the number of screen lines in the region between BEG and END. | |
1272 | The number of screen lines may be different from the number of actual | |
1273 | lines, due to line breaking, display table, etc. | |
1274 | ||
1275 | Optional arguments BEG and END default to `point-min' and `point-max' | |
1276 | respectively. | |
1277 | ||
1278 | If region ends with a newline, ignore it unless optinal third argument | |
1279 | COUNT-FINAL-NEWLINE is non-nil. | |
1280 | ||
1281 | The optional fourth argument WINDOW specifies the window used for | |
1282 | obtaining parameters such as width, horizontal scrolling, and so | |
1283 | on. The default is to use the selected window's parameters. | |
1284 | ||
1285 | Like `vertical-motion', `count-screen-lines' always uses the current | |
1286 | buffer, regardless of which buffer is displayed in WINDOW. This makes | |
1287 | possible to use `count-screen-lines' in any buffer, whether or not it | |
1288 | is currently displayed in some window. | |
1289 | ||
3c30cb6e DL |
1290 | ** The new function `mapc' is like `mapcar' but doesn't collect the |
1291 | argument function's results. | |
1292 | ||
62f20204 GM |
1293 | ** The functions base64-decode-region and base64-decode-string now |
1294 | signal an error instead of returning nil if decoding fails. | |
1295 | ||
c0510d27 GM |
1296 | ** The function sendmail-user-agent-compose now recognizes a `body' |
1297 | header is the list of headers passed to it. | |
1298 | ||
1299 | ** The new function member-ignore-case works like `member', but | |
1300 | ignores differences in case and text representation. | |
1301 | ||
1302 | ** The buffer-local variable cursor-type can be used to specify the | |
19d1bc27 GM |
1303 | cursor to use in windows displaying a buffer. Values are interpreted |
1304 | as follows: | |
1305 | ||
1306 | t use the cursor specified for the frame (default) | |
1307 | nil don't display a cursor | |
1308 | `bar' display a bar cursor with default width | |
1309 | (bar . WIDTH) display a bar cursor with width WIDTH | |
1310 | others display a box cursor. | |
1311 | ||
9a0dd3dc GM |
1312 | ** The variable open-paren-in-column-0-is-defun-start controls whether |
1313 | an open parenthesis in column 0 is considered to be the start of a | |
1314 | defun. If set, the default, it is considered a defun start. If not | |
1315 | set, an open parenthesis in column 0 has no special meaning. | |
1316 | ||
d7b511c4 | 1317 | ** The new function `string-to-syntax' can be used to translate syntax |
dc1178bf | 1318 | specifications in string form as accepted by `modify-syntax-entry' to |
d7b511c4 GM |
1319 | the cons-cell form that is used for the values of the `syntax-table' |
1320 | text property, and in `font-lock-syntactic-keywords'. | |
1321 | ||
1322 | Example: | |
1323 | ||
1324 | (string-to-syntax "()") | |
1325 | => (4 . 41) | |
1326 | ||
1fa28578 GM |
1327 | ** Emacs' reader supports CL read syntax for integers in bases |
1328 | other than 10. | |
1329 | ||
1330 | *** `#BINTEGER' or `#bINTEGER' reads INTEGER in binary (radix 2). | |
1331 | INTEGER optionally contains a sign. | |
1332 | ||
1333 | #b1111 | |
1334 | => 15 | |
1335 | #b-1111 | |
1336 | => -15 | |
1337 | ||
1338 | *** `#OINTEGER' or `#oINTEGER' reads INTEGER in octal (radix 8). | |
1339 | ||
1340 | #o666 | |
1341 | => 438 | |
1342 | ||
1343 | *** `#XINTEGER' or `#xINTEGER' reads INTEGER in hexadecimal (radix 16). | |
1344 | ||
1345 | #xbeef | |
1346 | => 48815 | |
1347 | ||
1348 | *** `#RADIXrINTEGER' reads INTEGER in radix RADIX, 2 <= RADIX <= 36. | |
1349 | ||
1350 | #2R-111 | |
1351 | => -7 | |
1352 | #25rah | |
1353 | => 267 | |
1354 | ||
3d4ff2dd | 1355 | ** The function `documentation-property' now evaluates the value of |
e9b4e5ff GM |
1356 | the given property to obtain a a string if it doesn't refer to etc/DOC |
1357 | and isn't a string. | |
1358 | ||
3d4ff2dd GM |
1359 | ** If called for a symbol, the function `documentation' now looks for |
1360 | a `function-documentation' property of that symbol. If it has a non-nil | |
1361 | value, the documentation is taken from that value. If the value is | |
1362 | not a string, it is evaluated to obtain a string. | |
1363 | ||
16ce590d DL |
1364 | +++ |
1365 | ** The last argument of `define-key-after' defaults to t for convenience. | |
1366 | ||
73825616 | 1367 | ** The new function `replace-regexp-in-string' replaces all matches |
16ce590d DL |
1368 | for a regexp in a string. |
1369 | ||
1370 | ** `mouse-position' now runs the abnormal hook | |
1371 | `mouse-position-function'. | |
1372 | ||
723e779c GM |
1373 | ** The function string-to-number now returns a float for numbers |
1374 | that don't fit into a Lisp integer. | |
1375 | ||
d1e103b2 GM |
1376 | ** The variable keyword-symbols-constants-flag has been removed. |
1377 | Keywords are now always considered constants. | |
1378 | ||
31047e0d DL |
1379 | +++ |
1380 | ** The new function `delete-and-extract-region' deletes text and | |
1381 | returns it. | |
1382 | ||
7a85e4df GM |
1383 | ** The function `clear-this-command-keys' now also clears the vector |
1384 | returned by function `recent-keys'. | |
1385 | ||
02b14400 RS |
1386 | +++ |
1387 | ** Variables `beginning-of-defun-function' and `end-of-defun-function' | |
1388 | can be used to define handlers for the functions that find defuns. | |
1389 | Major modes can define these locally instead of rebinding M-C-a | |
1390 | etc. if the normal conventions for defuns are not appropriate for the | |
1391 | mode. | |
404fa7d6 | 1392 | |
02b14400 | 1393 | +++ |
8964fec7 SM |
1394 | ** easy-mmode-define-minor-mode now takes an additional BODY argument |
1395 | and is renamed `define-minor-mode'. | |
1396 | ||
02b14400 RS |
1397 | +++ |
1398 | ** If an abbrev has a hook function which is a symbol, and that symbol | |
1399 | has a non-nil `no-self-insert' property, the return value of the hook | |
1400 | function specifies whether an expansion has been done or not. If it | |
1401 | returns nil, abbrev-expand also returns nil, meaning "no expansion has | |
1402 | been performed." | |
1403 | ||
1404 | When abbrev expansion is done by typing a self-inserting character, | |
1405 | and the abbrev has a hook with the `no-self-insert' property, and the | |
1406 | hook function returns non-nil meaning expansion has been done, | |
1407 | then the self-inserting character is not inserted. | |
ef961722 | 1408 | |
02b14400 | 1409 | +++ |
81da8b32 GM |
1410 | ** The function `intern-soft' now accepts a symbol as first argument. |
1411 | In this case, that exact symbol is looked up in the specified obarray, | |
1412 | and the function's value is nil if it is not found. | |
1413 | ||
02b14400 | 1414 | +++ |
9e207b90 GM |
1415 | ** The new macro `with-syntax-table' can be used to evaluate forms |
1416 | with the syntax table of the current buffer temporarily set to a | |
1417 | specified table. | |
1418 | ||
1419 | (with-syntax-table TABLE &rest BODY) | |
1420 | ||
1421 | Evaluate BODY with syntax table of current buffer set to a copy of | |
03d9c64c GM |
1422 | TABLE. The current syntax table is saved, BODY is evaluated, and the |
1423 | saved table is restored, even in case of an abnormal exit. Value is | |
1424 | what BODY returns. | |
9e207b90 | 1425 | |
02b14400 | 1426 | +++ |
d7f89643 | 1427 | ** Regular expressions now support intervals \{n,m\} as well as |
95cd4c40 | 1428 | Perl's shy-groups \(?:...\) and non-greedy *? +? and ?? operators. |
8964fec7 | 1429 | |
02b14400 | 1430 | +++ |
dde9e75a GM |
1431 | ** The optional argument BUFFER of function file-local-copy has been |
1432 | removed since it wasn't used by anything. | |
1433 | ||
02b14400 | 1434 | +++ |
9da30515 GM |
1435 | ** The file name argument of function `file-locked-p' is now required |
1436 | instead of being optional. | |
1437 | ||
02b14400 | 1438 | +++ |
d20679eb GM |
1439 | ** The new built-in error `text-read-only' is signaled when trying to |
1440 | modify read-only text. | |
1441 | ||
02b14400 | 1442 | +++ |
fbc164de PE |
1443 | ** New functions and variables for locales. |
1444 | ||
1445 | The new variable `locale-coding-system' specifies how to encode and | |
1446 | decode strings passed to low-level message functions like strerror and | |
b718982a PE |
1447 | time functions like strftime. The new variables |
1448 | `system-messages-locale' and `system-time-locale' give the system | |
1449 | locales to be used when invoking these two types of functions. | |
fbc164de PE |
1450 | |
1451 | The new function `set-locale-environment' sets the language | |
1452 | environment, preferred coding system, and locale coding system from | |
1453 | the system locale as specified by the LC_ALL, LC_CTYPE, and LANG | |
b718982a PE |
1454 | environment variables. Normally, it is invoked during startup and need |
1455 | not be invoked thereafter. It uses the new variables | |
1456 | `locale-language-names', `locale-charset-language-names', and | |
1457 | `locale-preferred-coding-systems' to make its decisions. | |
fbc164de | 1458 | |
02b14400 | 1459 | +++ |
863476d1 SM |
1460 | ** syntax tables now understand nested comments. |
1461 | To declare a comment syntax as allowing nesting, just add an `n' | |
1462 | modifier to either of the characters of the comment end and the comment | |
1463 | start sequences. | |
1464 | ||
02b14400 | 1465 | +++ |
ef6d912c GM |
1466 | ** The function `pixmap-spec-p' has been renamed `bitmap-spec-p' |
1467 | because `bitmap' is more in line with the usual X terminology. | |
1468 | ||
02b14400 | 1469 | +++ |
a933dad1 DL |
1470 | ** New function `propertize' |
1471 | ||
1472 | The new function `propertize' can be used to conveniently construct | |
1473 | strings with text properties. | |
1474 | ||
1475 | - Function: propertize STRING &rest PROPERTIES | |
1476 | ||
1477 | Value is a copy of STRING with text properties assigned as specified | |
1478 | by PROPERTIES. PROPERTIES is a sequence of pairs PROPERTY VALUE, with | |
1479 | PROPERTY being the name of a text property and VALUE being the | |
1480 | specified value of that property. Example: | |
1481 | ||
1482 | (propertize "foo" 'face 'bold 'read-only t) | |
1483 | ||
1484 | +++ | |
1485 | ** push and pop macros. | |
1486 | ||
02b14400 RS |
1487 | Simple versions of the push and pop macros of Common Lisp |
1488 | are now defined in Emacs Lisp. These macros allow only symbols | |
a933dad1 DL |
1489 | as the place that holds the list to be changed. |
1490 | ||
1491 | (push NEWELT LISTNAME) add NEWELT to the front of LISTNAME's value. | |
1492 | (pop LISTNAME) return first elt of LISTNAME, and remove it | |
1493 | (thus altering the value of LISTNAME). | |
1494 | ||
02b14400 RS |
1495 | ** New dolist and dotimes macros. |
1496 | ||
6c7fd5aa RS |
1497 | Simple versions of the dolist and dotimes macros of Common Lisp |
1498 | are now defined in Emacs Lisp. | |
02b14400 RS |
1499 | |
1500 | (dolist (VAR LIST [RESULT]) BODY...) | |
1501 | Execute body once for each element of LIST, | |
1502 | using the variable VAR to hold the current element. | |
1503 | Then return the value of RESULT, or nil if RESULT is omitted. | |
1504 | ||
1505 | (dotimes (VAR COUNT [RESULT]) BODY...) | |
1506 | Execute BODY with VAR bound to successive integers running from 0, | |
1507 | inclusive, to COUNT, exclusive. | |
1508 | Then return the value of RESULT, or nil if RESULT is omitted. | |
1509 | ||
a933dad1 DL |
1510 | +++ |
1511 | ** Regular expressions now support Posix character classes such | |
1512 | as [:alpha:], [:space:] and so on. | |
1513 | ||
1514 | [:digit:] matches 0 through 9 | |
1515 | [:cntrl:] matches ASCII control characters | |
1516 | [:xdigit:] matches 0 through 9, a through f and A through F. | |
1517 | [:blank:] matches space and tab only | |
1518 | [:graph:] matches graphic characters--everything except ASCII control chars, | |
1519 | space, and DEL. | |
1520 | [:print:] matches printing characters--everything except ASCII control chars | |
1521 | and DEL. | |
1522 | [:alnum:] matches letters and digits. | |
1523 | (But at present, for multibyte characters, | |
1524 | it matches anything that has word syntax.) | |
1525 | [:alpha:] matches letters. | |
1526 | (But at present, for multibyte characters, | |
1527 | it matches anything that has word syntax.) | |
1528 | [:ascii:] matches ASCII (unibyte) characters. | |
1529 | [:nonascii:] matches non-ASCII (multibyte) characters. | |
1530 | [:lower:] matches anything lower-case. | |
1531 | [:punct:] matches punctuation. | |
1532 | (But at present, for multibyte characters, | |
1533 | it matches anything that has non-word syntax.) | |
1534 | [:space:] matches anything that has whitespace syntax. | |
1535 | [:upper:] matches anything upper-case. | |
1536 | [:word:] matches anything that has word syntax. | |
1537 | ||
1538 | +++ | |
1539 | ** Emacs now has built-in hash tables. | |
1540 | ||
1541 | The following functions are defined for hash tables: | |
1542 | ||
1543 | - Function: make-hash-table ARGS | |
1544 | ||
1545 | The argument list ARGS consists of keyword/argument pairs. All arguments | |
1546 | are optional. The following arguments are defined: | |
1547 | ||
1548 | :test TEST | |
1549 | ||
1550 | TEST must be a symbol specifying how to compare keys. Default is `eql'. | |
1551 | Predefined are `eq', `eql' and `equal'. If TEST is not predefined, | |
1552 | it must have been defined with `define-hash-table-test'. | |
1553 | ||
1554 | :size SIZE | |
1555 | ||
1556 | SIZE must be an integer > 0 giving a hint to the implementation how | |
1557 | many elements will be put in the hash table. Default size is 65. | |
1558 | ||
1559 | :rehash-size REHASH-SIZE | |
1560 | ||
1561 | REHASH-SIZE specifies by how much to grow a hash table once it becomes | |
1562 | full. If REHASH-SIZE is an integer, add that to the hash table's old | |
1563 | size to get the new size. Otherwise, REHASH-SIZE must be a float > | |
1564 | 1.0, and the new size is computed by multiplying REHASH-SIZE with the | |
1565 | old size. Default rehash size is 1.5. | |
1566 | ||
1567 | :rehash-threshold THRESHOLD | |
1568 | ||
1569 | THRESHOLD must be a float > 0 and <= 1.0 specifying when to resize the | |
1570 | hash table. It is resized when the ratio of (number of entries) / | |
1571 | (size of hash table) is >= THRESHOLD. Default threshold is 0.8. | |
1572 | ||
1573 | :weakness WEAK | |
1574 | ||
1575 | WEAK must be either nil, one of the symbols `key, `value', or t. | |
1576 | Entries are removed from weak tables during garbage collection if | |
1577 | their key and/or value are not referenced elsewhere outside of the | |
1578 | hash table. Default are non-weak hash tables. | |
1579 | ||
1580 | - Function: makehash &optional TEST | |
1581 | ||
1582 | Similar to make-hash-table, but only TEST can be specified. | |
1583 | ||
1584 | - Function: hash-table-p TABLE | |
1585 | ||
1586 | Returns non-nil if TABLE is a hash table object. | |
1587 | ||
1588 | - Function: copy-hash-table TABLE | |
1589 | ||
1590 | Returns a copy of TABLE. Only the table itself is copied, keys and | |
1591 | values are shared. | |
1592 | ||
1593 | - Function: hash-table-count TABLE | |
1594 | ||
1595 | Returns the number of entries in TABLE. | |
1596 | ||
1597 | - Function: hash-table-rehash-size TABLE | |
1598 | ||
1599 | Returns the rehash size of TABLE. | |
1600 | ||
1601 | - Function: hash-table-rehash-threshold TABLE | |
1602 | ||
1603 | Returns the rehash threshold of TABLE. | |
1604 | ||
1605 | - Function: hash-table-rehash-size TABLE | |
1606 | ||
1607 | Returns the size of TABLE. | |
1608 | ||
1609 | - Function: hash-table-rehash-test TABLE | |
1610 | ||
1611 | Returns the test TABLE uses to compare keys. | |
1612 | ||
1613 | - Function: hash-table-weakness TABLE | |
1614 | ||
1615 | Returns the weakness specified for TABLE. | |
1616 | ||
1617 | - Function: clrhash TABLE | |
1618 | ||
1619 | Clear TABLE. | |
1620 | ||
1621 | - Function: gethash KEY TABLE &optional DEFAULT | |
1622 | ||
1623 | Look up KEY in TABLE and return its associated VALUE or DEFAULT if | |
1624 | not found. | |
1625 | ||
79214ddf | 1626 | - Function: puthash KEY VALUE TABLE |
a933dad1 DL |
1627 | |
1628 | Associate KEY with VALUE in TABLE. If KEY is already associated with | |
1629 | another value, replace the old value with VALUE. | |
1630 | ||
1631 | - Function: remhash KEY TABLE | |
1632 | ||
1633 | Remove KEY from TABLE if it is there. | |
1634 | ||
1635 | - Function: maphash FUNCTION TABLE | |
1636 | ||
1637 | Call FUNCTION for all elements in TABLE. FUNCTION must take two | |
1638 | arguments KEY and VALUE. | |
1639 | ||
1640 | - Function: sxhash OBJ | |
1641 | ||
1642 | Return a hash code for Lisp object OBJ. | |
1643 | ||
1644 | - Function: define-hash-table-test NAME TEST-FN HASH-FN | |
1645 | ||
1646 | Define a new hash table test named NAME. If NAME is specified as | |
1647 | a test in `make-hash-table', the table created will use TEST-FN for | |
79214ddf | 1648 | comparing keys, and HASH-FN to compute hash codes for keys. Test |
a933dad1 DL |
1649 | and hash function are stored as symbol property `hash-table-test' |
1650 | of NAME with a value of (TEST-FN HASH-FN). | |
1651 | ||
1652 | TEST-FN must take two arguments and return non-nil if they are the same. | |
1653 | ||
1654 | HASH-FN must take one argument and return an integer that is the hash | |
1655 | code of the argument. The function should use the whole range of | |
1656 | integer values for hash code computation, including negative integers. | |
1657 | ||
1658 | Example: The following creates a hash table whose keys are supposed to | |
1659 | be strings that are compared case-insensitively. | |
1660 | ||
1661 | (defun case-fold-string= (a b) | |
1662 | (compare-strings a nil nil b nil nil t)) | |
1663 | ||
1664 | (defun case-fold-string-hash (a) | |
1665 | (sxhash (upcase a))) | |
1666 | ||
79214ddf | 1667 | (define-hash-table-test 'case-fold 'case-fold-string= |
a933dad1 DL |
1668 | 'case-fold-string-hash)) |
1669 | ||
1670 | (make-hash-table :test 'case-fold) | |
1671 | ||
1672 | +++ | |
1673 | ** The Lisp reader handles circular structure. | |
1674 | ||
1675 | It now works to use the #N= and #N# constructs to represent | |
1676 | circular structures. For example, #1=(a . #1#) represents | |
1677 | a cons cell which is its own cdr. | |
1678 | ||
1679 | +++ | |
1680 | ** The Lisp printer handles circular structure. | |
1681 | ||
1682 | If you bind print-circle to a non-nil value, the Lisp printer outputs | |
1683 | #N= and #N# constructs to represent circular and shared structure. | |
1684 | ||
a933dad1 DL |
1685 | +++ |
1686 | ** If the second argument to `move-to-column' is anything but nil or | |
1687 | t, that means replace a tab with spaces if necessary to reach the | |
1688 | specified column, but do not add spaces at the end of the line if it | |
1689 | is too short to reach that column. | |
1690 | ||
1691 | +++ | |
1692 | ** perform-replace has a new feature: the REPLACEMENTS argument may | |
1693 | now be a cons cell (FUNCTION . DATA). This means to call FUNCTION | |
1694 | after each match to get the replacement text. FUNCTION is called with | |
1695 | two arguments: DATA, and the number of replacements already made. | |
1696 | ||
1697 | If the FROM-STRING contains any upper-case letters, | |
1698 | perform-replace also turns off `case-fold-search' temporarily | |
1699 | and inserts the replacement text without altering case in it. | |
1700 | ||
1701 | +++ | |
1702 | ** The function buffer-size now accepts an optional argument | |
1703 | to specify which buffer to return the size of. | |
1704 | ||
1705 | +++ | |
1706 | ** The calendar motion commands now run the normal hook | |
1707 | calendar-move-hook after moving point. | |
1708 | ||
1709 | +++ | |
1710 | ** The new variable small-temporary-file-directory specifies a | |
1711 | directory to use for creating temporary files that are likely to be | |
1712 | small. (Certain Emacs features use this directory.) If | |
1713 | small-temporary-file-directory is nil, they use | |
1714 | temporary-file-directory instead. | |
1715 | ||
1716 | +++ | |
1717 | ** The variable `inhibit-modification-hooks', if non-nil, inhibits all | |
1718 | the hooks that track changes in the buffer. This affects | |
1719 | `before-change-functions' and `after-change-functions', as well as | |
1720 | hooks attached to text properties and overlay properties. | |
1721 | ||
1722 | +++ | |
1723 | ** assoc-delete-all is a new function that deletes all the | |
1724 | elements of an alist which have a particular value as the car. | |
1725 | ||
1726 | +++ | |
1727 | ** make-temp-file provides a more reliable way to create a temporary file. | |
1728 | ||
1729 | make-temp-file is used like make-temp-name, except that it actually | |
1730 | creates the file before it returns. This prevents a timing error, | |
1731 | ensuring that no other job can use the same name for a temporary file. | |
1732 | ||
1733 | +++ | |
1734 | ** New exclusive-open feature in `write-region' | |
1735 | ||
1736 | The optional seventh arg is now called MUSTBENEW. If non-nil, it insists | |
1737 | on a check for an existing file with the same name. If MUSTBENEW | |
1738 | is `excl', that means to get an error if the file already exists; | |
1739 | never overwrite. If MUSTBENEW is neither nil nor `excl', that means | |
1740 | ask for confirmation before overwriting, but do go ahead and | |
1741 | overwrite the file if the user gives confirmation. | |
1742 | ||
1743 | If the MUSTBENEW argument in `write-region' is `excl', | |
1744 | that means to use a special feature in the `open' system call | |
1745 | to get an error if the file exists at that time. | |
1746 | The error reported is `file-already-exists'. | |
1747 | ||
1748 | +++ | |
1749 | ** Function `format' now handles text properties. | |
1750 | ||
1751 | Text properties of the format string are applied to the result string. | |
1752 | If the result string is longer than the format string, text properties | |
1753 | ending at the end of the format string are extended to the end of the | |
1754 | result string. | |
1755 | ||
1756 | Text properties from string arguments are applied to the result | |
1757 | string where arguments appear in the result string. | |
1758 | ||
1759 | Example: | |
1760 | ||
1761 | (let ((s1 "hello, %s") | |
1762 | (s2 "world")) | |
1763 | (put-text-property 0 (length s1) 'face 'bold s1) | |
1764 | (put-text-property 0 (length s2) 'face 'italic s2) | |
b246b1f6 | 1765 | (format s1 s2)) |
a933dad1 DL |
1766 | |
1767 | results in a bold-face string with an italic `world' at the end. | |
1768 | ||
1769 | +++ | |
1770 | ** Messages can now be displayed with text properties. | |
1771 | ||
1772 | Text properties are handled as described above for function `format'. | |
1773 | The following example displays a bold-face message with an italic | |
1774 | argument in it. | |
1775 | ||
1776 | (let ((msg "hello, %s!") | |
1777 | (arg "world")) | |
1778 | (put-text-property 0 (length msg) 'face 'bold msg) | |
1779 | (put-text-property 0 (length arg) 'face 'italic arg) | |
1780 | (message msg arg)) | |
1781 | ||
1782 | +++ | |
1783 | ** Sound support | |
1784 | ||
1785 | Emacs supports playing sound files on GNU/Linux and the free BSDs | |
1786 | (Voxware driver and native BSD driver, aka as Luigi's driver). | |
1787 | ||
1788 | Currently supported file formats are RIFF-WAVE (*.wav) and Sun Audio | |
1789 | (*.au). You must configure Emacs with the option `--with-sound=yes' | |
1790 | to enable sound support. | |
1791 | ||
1792 | Sound files can be played by calling (play-sound SOUND). SOUND is a | |
1793 | list of the form `(sound PROPERTY...)'. The function is only defined | |
1794 | when sound support is present for the system on which Emacs runs. The | |
1795 | functions runs `play-sound-functions' with one argument which is the | |
1796 | sound to play, before playing the sound. | |
1797 | ||
1798 | The following sound properties are supported: | |
1799 | ||
1800 | - `:file FILE' | |
1801 | ||
1802 | FILE is a file name. If FILE isn't an absolute name, it will be | |
1803 | searched relative to `data-directory'. | |
1804 | ||
6fb40beb GM |
1805 | - `:data DATA' |
1806 | ||
1807 | DATA is a string containing sound data. Either :file or :data | |
1808 | may be present, but not both. | |
1809 | ||
a933dad1 DL |
1810 | - `:volume VOLUME' |
1811 | ||
1812 | VOLUME must be an integer in the range 0..100 or a float in the range | |
1813 | 0..1. This property is optional. | |
1814 | ||
1815 | Other properties are ignored. | |
1816 | ||
1817 | ** `multimedia' is a new Finder keyword and Custom group. | |
356673d4 DL |
1818 | |
1819 | ** keywordp is a new predicate to test efficiently for an object being | |
1820 | a keyword symbol. | |
fc91dc2d GM |
1821 | |
1822 | ** Changes to garbage collection | |
1823 | ||
1824 | *** The function garbage-collect now additionally returns the number | |
1825 | of live and free strings. | |
1826 | ||
1827 | *** There is a new variable `strings-consed' holding the number of | |
1828 | strings that have been consed so far. | |
1829 | ||
a933dad1 | 1830 | \f |
04545643 GM |
1831 | * Lisp-level Display features added after release 2.6 of the Emacs |
1832 | Lisp Manual | |
1833 | ||
1834 | ** Image specifications may contain the property `:ascent center'. | |
1835 | ||
1836 | When this property is specified, the image is vertically centered | |
1837 | around a centerline which would be the vertical center of text drawn | |
1838 | at the position of the image, in the manner specified by the text | |
1839 | properties and overlays that apply to the image. | |
1840 | ||
1841 | \f | |
a933dad1 DL |
1842 | * New Lisp-level Display features in Emacs 21.1 |
1843 | ||
1844 | Note that +++ before an item means the Lisp manual has been updated. | |
1845 | --- means that I have decided it does not need to be in the Lisp manual. | |
1846 | When you add a new item, please add it without either +++ or --- | |
1847 | so I will know I still need to look at it -- rms. | |
1848 | ||
f6d3257b GM |
1849 | ** The function tty-suppress-bold-inverse-default-colors can be used |
1850 | to make Emacs avoid displaying text with bold black foreground on TTYs. | |
1851 | ||
1852 | Some terminals, notably PC consoles, emulate bold text by displaying | |
1853 | text in brighter colors. On such a console, a bold black foreground | |
1854 | is displayed in a gray color. If this turns out to be hard to read on | |
1855 | your monitor---the problem occurred with the mode line on | |
1856 | laptops---you can instruct Emacs to ignore the text's boldness, and to | |
1857 | just display it black instead. | |
1858 | ||
1859 | This situation can't be detected automatically. You will have to put | |
1860 | a line like | |
1861 | ||
1862 | (tty-suppress-bold-inverse-default-colors t) | |
1863 | ||
1864 | in your `.emacs'. | |
1865 | ||
a933dad1 DL |
1866 | ** New face implementation. |
1867 | ||
1868 | Emacs faces have been reimplemented from scratch. They don't use XLFD | |
1869 | font names anymore and face merging now works as expected. | |
1870 | ||
1871 | +++ | |
1872 | *** New faces. | |
1873 | ||
1874 | Each face can specify the following display attributes: | |
1875 | ||
1876 | 1. Font family or fontset alias name. | |
79214ddf | 1877 | |
a933dad1 DL |
1878 | 2. Relative proportionate width, aka character set width or set |
1879 | width (swidth), e.g. `semi-compressed'. | |
79214ddf | 1880 | |
a933dad1 | 1881 | 3. Font height in 1/10pt |
79214ddf | 1882 | |
a933dad1 | 1883 | 4. Font weight, e.g. `bold'. |
79214ddf | 1884 | |
a933dad1 | 1885 | 5. Font slant, e.g. `italic'. |
79214ddf | 1886 | |
a933dad1 | 1887 | 6. Foreground color. |
79214ddf | 1888 | |
a933dad1 DL |
1889 | 7. Background color. |
1890 | ||
1891 | 8. Whether or not characters should be underlined, and in what color. | |
1892 | ||
1893 | 9. Whether or not characters should be displayed in inverse video. | |
1894 | ||
1895 | 10. A background stipple, a bitmap. | |
1896 | ||
1897 | 11. Whether or not characters should be overlined, and in what color. | |
1898 | ||
1899 | 12. Whether or not characters should be strike-through, and in what | |
1900 | color. | |
1901 | ||
1902 | 13. Whether or not a box should be drawn around characters, its | |
1903 | color, the width of the box lines, and 3D appearance. | |
1904 | ||
1905 | Faces are frame-local by nature because Emacs allows to define the | |
1906 | same named face (face names are symbols) differently for different | |
1907 | frames. Each frame has an alist of face definitions for all named | |
1908 | faces. The value of a named face in such an alist is a Lisp vector | |
1909 | with the symbol `face' in slot 0, and a slot for each each of the face | |
1910 | attributes mentioned above. | |
1911 | ||
1912 | There is also a global face alist `face-new-frame-defaults'. Face | |
1913 | definitions from this list are used to initialize faces of newly | |
1914 | created frames. | |
79214ddf | 1915 | |
a933dad1 DL |
1916 | A face doesn't have to specify all attributes. Those not specified |
1917 | have a nil value. Faces specifying all attributes are called | |
1918 | `fully-specified'. | |
1919 | ||
1920 | +++ | |
1921 | *** Face merging. | |
1922 | ||
1923 | The display style of a given character in the text is determined by | |
1924 | combining several faces. This process is called `face merging'. Any | |
1925 | aspect of the display style that isn't specified by overlays or text | |
1926 | properties is taken from the `default' face. Since it is made sure | |
1927 | that the default face is always fully-specified, face merging always | |
1928 | results in a fully-specified face. | |
1929 | ||
1930 | +++ | |
1931 | *** Face realization. | |
1932 | ||
1933 | After all face attributes for a character have been determined by | |
1934 | merging faces of that character, that face is `realized'. The | |
1935 | realization process maps face attributes to what is physically | |
1936 | available on the system where Emacs runs. The result is a `realized | |
1937 | face' in form of an internal structure which is stored in the face | |
1938 | cache of the frame on which it was realized. | |
1939 | ||
1940 | Face realization is done in the context of the charset of the | |
1941 | character to display because different fonts and encodings are used | |
1942 | for different charsets. In other words, for characters of different | |
1943 | charsets, different realized faces are needed to display them. | |
1944 | ||
1945 | Except for composite characters, faces are always realized for a | |
1946 | specific character set and contain a specific font, even if the face | |
1947 | being realized specifies a fontset. The reason is that the result of | |
1948 | the new font selection stage is better than what can be done with | |
1949 | statically defined font name patterns in fontsets. | |
1950 | ||
1951 | In unibyte text, Emacs' charsets aren't applicable; function | |
1952 | `char-charset' reports ASCII for all characters, including those > | |
1953 | 0x7f. The X registry and encoding of fonts to use is determined from | |
1954 | the variable `face-default-registry' in this case. The variable is | |
1955 | initialized at Emacs startup time from the font the user specified for | |
1956 | Emacs. | |
1957 | ||
1958 | Currently all unibyte text, i.e. all buffers with | |
1959 | `enable-multibyte-characters' nil are displayed with fonts of the same | |
1960 | registry and encoding `face-default-registry'. This is consistent | |
1961 | with the fact that languages can also be set globally, only. | |
1962 | ||
1963 | ++++ | |
1964 | **** Clearing face caches. | |
1965 | ||
1966 | The Lisp function `clear-face-cache' can be called to clear face caches | |
1967 | on all frames. If called with a non-nil argument, it will also unload | |
1968 | unused fonts. | |
1969 | ||
1970 | +++ | |
1971 | *** Font selection. | |
79214ddf | 1972 | |
a933dad1 DL |
1973 | Font selection tries to find the best available matching font for a |
1974 | given (charset, face) combination. This is done slightly differently | |
1975 | for faces specifying a fontset, or a font family name. | |
1976 | ||
1977 | If the face specifies a fontset name, that fontset determines a | |
1978 | pattern for fonts of the given charset. If the face specifies a font | |
1979 | family, a font pattern is constructed. Charset symbols have a | |
1980 | property `x-charset-registry' for that purpose that maps a charset to | |
1981 | an XLFD registry and encoding in the font pattern constructed. | |
1982 | ||
1983 | Available fonts on the system on which Emacs runs are then matched | |
1984 | against the font pattern. The result of font selection is the best | |
1985 | match for the given face attributes in this font list. | |
1986 | ||
1987 | Font selection can be influenced by the user. | |
1988 | ||
1989 | The user can specify the relative importance he gives the face | |
1990 | attributes width, height, weight, and slant by setting | |
1991 | face-font-selection-order (faces.el) to a list of face attribute | |
1992 | names. The default is (:width :height :weight :slant), and means | |
1993 | that font selection first tries to find a good match for the font | |
1994 | width specified by a face, then---within fonts with that width---tries | |
1995 | to find a best match for the specified font height, etc. | |
1996 | ||
1997 | Setting `face-alternative-font-family-alist' allows the user to | |
1998 | specify alternative font families to try if a family specified by a | |
1999 | face doesn't exist. | |
2000 | ||
2001 | +++ | |
2002 | **** Scalable fonts | |
2003 | ||
2004 | Emacs can make use of scalable fonts but doesn't do so by default, | |
2005 | since the use of too many or too big scalable fonts may crash XFree86 | |
2006 | servers. | |
2007 | ||
2008 | To enable scalable font use, set the variable | |
b246b1f6 | 2009 | `scalable-fonts-allowed'. A value of nil, the default, means never use |
a933dad1 DL |
2010 | scalable fonts. A value of t means any scalable font may be used. |
2011 | Otherwise, the value must be a list of regular expressions. A | |
2012 | scalable font may then be used if it matches a regular expression from | |
2013 | that list. Example: | |
2014 | ||
2015 | (setq scalable-fonts-allowed '("muleindian-2$")) | |
2016 | ||
2017 | allows the use of scalable fonts with registry `muleindian-2'. | |
2018 | ||
2019 | +++ | |
2020 | *** Functions and variables related to font selection. | |
2021 | ||
2022 | - Function: x-family-fonts &optional FAMILY FRAME | |
2023 | ||
2024 | Return a list of available fonts of family FAMILY on FRAME. If FAMILY | |
2025 | is omitted or nil, list all families. Otherwise, FAMILY must be a | |
2026 | string, possibly containing wildcards `?' and `*'. | |
2027 | ||
2028 | If FRAME is omitted or nil, use the selected frame. Each element of | |
2029 | the result is a vector [FAMILY WIDTH POINT-SIZE WEIGHT SLANT FIXED-P | |
2030 | FULL REGISTRY-AND-ENCODING]. FAMILY is the font family name. | |
2031 | POINT-SIZE is the size of the font in 1/10 pt. WIDTH, WEIGHT, and | |
2032 | SLANT are symbols describing the width, weight and slant of the font. | |
2033 | These symbols are the same as for face attributes. FIXED-P is non-nil | |
2034 | if the font is fixed-pitch. FULL is the full name of the font, and | |
2035 | REGISTRY-AND-ENCODING is a string giving the registry and encoding of | |
2036 | the font. The result list is sorted according to the current setting | |
2037 | of the face font sort order. | |
2038 | ||
79214ddf | 2039 | - Function: x-font-family-list |
a933dad1 DL |
2040 | |
2041 | Return a list of available font families on FRAME. If FRAME is | |
2042 | omitted or nil, use the selected frame. Value is a list of conses | |
2043 | (FAMILY . FIXED-P) where FAMILY is a font family, and FIXED-P is | |
2044 | non-nil if fonts of that family are fixed-pitch. | |
2045 | ||
2046 | - Variable: font-list-limit | |
2047 | ||
2048 | Limit for font matching. If an integer > 0, font matching functions | |
2049 | won't load more than that number of fonts when searching for a | |
2050 | matching font. The default is currently 100. | |
2051 | ||
2052 | +++ | |
2053 | *** Setting face attributes. | |
2054 | ||
2055 | For the most part, the new face implementation is interface-compatible | |
2056 | with the old one. Old face attribute related functions are now | |
2057 | implemented in terms of the new functions `set-face-attribute' and | |
2058 | `face-attribute'. | |
2059 | ||
2060 | Face attributes are identified by their names which are keyword | |
2061 | symbols. All attributes can be set to `unspecified'. | |
2062 | ||
2063 | The following attributes are recognized: | |
2064 | ||
2065 | `:family' | |
2066 | ||
2067 | VALUE must be a string specifying the font family, e.g. ``courier'', | |
2068 | or a fontset alias name. If a font family is specified, wild-cards `*' | |
2069 | and `?' are allowed. | |
2070 | ||
2071 | `:width' | |
2072 | ||
2073 | VALUE specifies the relative proportionate width of the font to use. | |
2074 | It must be one of the symbols `ultra-condensed', `extra-condensed', | |
2075 | `condensed', `semi-condensed', `normal', `semi-expanded', `expanded', | |
2076 | `extra-expanded', or `ultra-expanded'. | |
2077 | ||
2078 | `:height' | |
2079 | ||
2080 | VALUE must be an integer specifying the height of the font to use in | |
2081 | 1/10 pt. | |
2082 | ||
2083 | `:weight' | |
2084 | ||
2085 | VALUE specifies the weight of the font to use. It must be one of the | |
2086 | symbols `ultra-bold', `extra-bold', `bold', `semi-bold', `normal', | |
2087 | `semi-light', `light', `extra-light', `ultra-light'. | |
2088 | ||
2089 | `:slant' | |
2090 | ||
2091 | VALUE specifies the slant of the font to use. It must be one of the | |
2092 | symbols `italic', `oblique', `normal', `reverse-italic', or | |
2093 | `reverse-oblique'. | |
2094 | ||
2095 | `:foreground', `:background' | |
2096 | ||
2097 | VALUE must be a color name, a string. | |
2098 | ||
2099 | `:underline' | |
2100 | ||
2101 | VALUE specifies whether characters in FACE should be underlined. If | |
2102 | VALUE is t, underline with foreground color of the face. If VALUE is | |
2103 | a string, underline with that color. If VALUE is nil, explicitly | |
2104 | don't underline. | |
2105 | ||
2106 | `:overline' | |
2107 | ||
2108 | VALUE specifies whether characters in FACE should be overlined. If | |
2109 | VALUE is t, overline with foreground color of the face. If VALUE is a | |
2110 | string, overline with that color. If VALUE is nil, explicitly don't | |
2111 | overline. | |
2112 | ||
2113 | `:strike-through' | |
2114 | ||
2115 | VALUE specifies whether characters in FACE should be drawn with a line | |
2116 | striking through them. If VALUE is t, use the foreground color of the | |
2117 | face. If VALUE is a string, strike-through with that color. If VALUE | |
2118 | is nil, explicitly don't strike through. | |
2119 | ||
2120 | `:box' | |
2121 | ||
2122 | VALUE specifies whether characters in FACE should have a box drawn | |
2123 | around them. If VALUE is nil, explicitly don't draw boxes. If | |
2124 | VALUE is t, draw a box with lines of width 1 in the foreground color | |
2125 | of the face. If VALUE is a string, the string must be a color name, | |
2126 | and the box is drawn in that color with a line width of 1. Otherwise, | |
2127 | VALUE must be a property list of the form `(:line-width WIDTH | |
2128 | :color COLOR :style STYLE)'. If a keyword/value pair is missing from | |
2129 | the property list, a default value will be used for the value, as | |
2130 | specified below. WIDTH specifies the width of the lines to draw; it | |
2131 | defaults to 1. COLOR is the name of the color to draw in, default is | |
2132 | the foreground color of the face for simple boxes, and the background | |
2133 | color of the face for 3D boxes. STYLE specifies whether a 3D box | |
2134 | should be draw. If STYLE is `released-button', draw a box looking | |
2135 | like a released 3D button. If STYLE is `pressed-button' draw a box | |
2136 | that appears like a pressed button. If STYLE is nil, the default if | |
2137 | the property list doesn't contain a style specification, draw a 2D | |
2138 | box. | |
2139 | ||
2140 | `:inverse-video' | |
2141 | ||
2142 | VALUE specifies whether characters in FACE should be displayed in | |
2143 | inverse video. VALUE must be one of t or nil. | |
2144 | ||
2145 | `:stipple' | |
2146 | ||
2147 | If VALUE is a string, it must be the name of a file of pixmap data. | |
2148 | The directories listed in the `x-bitmap-file-path' variable are | |
2149 | searched. Alternatively, VALUE may be a list of the form (WIDTH | |
2150 | HEIGHT DATA) where WIDTH and HEIGHT are the size in pixels, and DATA | |
2151 | is a string containing the raw bits of the bitmap. VALUE nil means | |
2152 | explicitly don't use a stipple pattern. | |
2153 | ||
2154 | For convenience, attributes `:family', `:width', `:height', `:weight', | |
2155 | and `:slant' may also be set in one step from an X font name: | |
2156 | ||
2157 | `:font' | |
2158 | ||
2159 | Set font-related face attributes from VALUE. VALUE must be a valid | |
2160 | XLFD font name. If it is a font name pattern, the first matching font | |
2161 | is used--this is for compatibility with the behavior of previous | |
2162 | versions of Emacs. | |
2163 | ||
2164 | For compatibility with Emacs 20, keywords `:bold' and `:italic' can | |
2165 | be used to specify that a bold or italic font should be used. VALUE | |
2166 | must be t or nil in that case. A value of `unspecified' is not allowed." | |
2167 | ||
2168 | Please see also the documentation of `set-face-attribute' and | |
2169 | `defface'. | |
2170 | ||
2171 | *** Face attributes and X resources | |
2172 | ||
2173 | The following X resource names can be used to set face attributes | |
2174 | from X resources: | |
2175 | ||
2176 | Face attribute X resource class | |
2177 | ----------------------------------------------------------------------- | |
2178 | :family attributeFamily . Face.AttributeFamily | |
2179 | :width attributeWidth Face.AttributeWidth | |
2180 | :height attributeHeight Face.AttributeHeight | |
2181 | :weight attributeWeight Face.AttributeWeight | |
2182 | :slant attributeSlant Face.AttributeSlant | |
2183 | foreground attributeForeground Face.AttributeForeground | |
2184 | :background attributeBackground . Face.AttributeBackground | |
2185 | :overline attributeOverline Face.AttributeOverline | |
2186 | :strike-through attributeStrikeThrough Face.AttributeStrikeThrough | |
2187 | :box attributeBox Face.AttributeBox | |
2188 | :underline attributeUnderline Face.AttributeUnderline | |
2189 | :inverse-video attributeInverse Face.AttributeInverse | |
2190 | :stipple attributeStipple Face.AttributeStipple | |
79214ddf | 2191 | or attributeBackgroundPixmap |
a933dad1 DL |
2192 | Face.AttributeBackgroundPixmap |
2193 | :font attributeFont Face.AttributeFont | |
2194 | :bold attributeBold Face.AttributeBold | |
2195 | :italic attributeItalic . Face.AttributeItalic | |
2196 | :font attributeFont Face.AttributeFont | |
2197 | ||
2198 | +++ | |
2199 | *** Text property `face'. | |
2200 | ||
2201 | The value of the `face' text property can now be a single face | |
2202 | specification or a list of such specifications. Each face | |
2203 | specification can be | |
2204 | ||
2205 | 1. A symbol or string naming a Lisp face. | |
2206 | ||
2207 | 2. A property list of the form (KEYWORD VALUE ...) where each | |
2208 | KEYWORD is a face attribute name, and VALUE is an appropriate value | |
2209 | for that attribute. Please see the doc string of `set-face-attribute' | |
2210 | for face attribute names. | |
2211 | ||
2212 | 3. Conses of the form (FOREGROUND-COLOR . COLOR) or | |
2213 | (BACKGROUND-COLOR . COLOR) where COLOR is a color name. This is | |
2214 | for compatibility with previous Emacs versions. | |
2215 | ||
2216 | +++ | |
2217 | ** Support functions for colors on text-only terminals. | |
2218 | ||
acf3ecb7 EZ |
2219 | The function `tty-color-define' can be used to define colors for use |
2220 | on TTY and MSDOS frames. It maps a color name to a color number on | |
2221 | the terminal. Emacs defines a couple of common color mappings by | |
a933dad1 | 2222 | default. You can get defined colors with a call to |
acf3ecb7 | 2223 | `defined-colors'. The function `tty-color-clear' can be |
a933dad1 DL |
2224 | used to clear the mapping table. |
2225 | ||
acf3ecb7 EZ |
2226 | ** Unified support for colors independent of frame type. |
2227 | ||
2228 | The new functions `defined-colors', `color-defined-p', `color-values', | |
2229 | and `display-color-p' work for any type of frame. On frames whose | |
2230 | type is neither x nor w32, these functions transparently map X-style | |
2231 | color specifications to the closest colors supported by the frame | |
2232 | display. Lisp programs should use these new functions instead of the | |
2233 | old `x-defined-colors', `x-color-defined-p', `x-color-values', and | |
2234 | `x-display-color-p'. (The old function names are still available for | |
2235 | compatibility; they are now aliases of the new names.) Lisp programs | |
2236 | should no more look at the value of the variable window-system to | |
2237 | modify their color-related behavior. | |
2238 | ||
2239 | The primitives `color-gray-p' and `color-supported-p' also work for | |
2240 | any frame type. | |
2241 | ||
8a5719f0 EZ |
2242 | ** Platform-independent functions to describe display capabilities. |
2243 | ||
2244 | The new functions `display-mouse-p', `display-popup-menus-p', | |
2245 | `display-graphic-p', `display-selections-p', `display-screens', | |
2246 | `display-pixel-width', `display-pixel-height', `display-mm-width', | |
2247 | `display-mm-height', `display-backing-store', `display-save-under', | |
2248 | `display-planes', `display-color-cells', `display-visual-class', and | |
2249 | `display-grayscale-p' describe the basic capabilities of a particular | |
2250 | display. Lisp programs should call these functions instead of testing | |
2251 | the value of the variables `window-system' or `system-type', or calling | |
2252 | platform-specific functions such as `x-display-pixel-width'. | |
2253 | ||
a933dad1 DL |
2254 | +++ |
2255 | ** The minibuffer prompt is now actually inserted in the minibuffer. | |
a933dad1 | 2256 | |
463cac2d | 2257 | This makes it possible to scroll through the prompt, if you want to. |
a933dad1 DL |
2258 | |
2259 | The function minubuffer-prompt-end returns the current position of the | |
2260 | end of the minibuffer prompt, if the minibuffer is current. | |
2261 | Otherwise, it returns zero. | |
2262 | ||
463cac2d GM |
2263 | ** New `field' abstraction in buffers. |
2264 | ||
2265 | There is now code to support an abstraction called `fields' in emacs | |
2266 | buffers. A field is a contiguous region of text with the same `field' | |
2267 | text-property. | |
2268 | ||
9a9dfda8 | 2269 | Many emacs functions, such as forward-word, forward-sentence, |
463cac2d | 2270 | forward-paragraph, beginning-of-line, etc., stop moving when they come |
9a9dfda8 | 2271 | to the boundary between fields; beginning-of-line and end-of-line will |
463cac2d | 2272 | not let the point move past the field boundary, but other movement |
fc7ac24f GM |
2273 | commands continue into the next field if repeated. Stopping at field |
2274 | boundaries can be suppressed programmatically by binding | |
2275 | `inhibit-field-text-motion' to a non-nil value around calls to these | |
2276 | functions. | |
463cac2d GM |
2277 | |
2278 | Now that the minibuffer prompt is inserted into the minibuffer, it is in | |
9a9dfda8 | 2279 | a separate field from the user-input part of the buffer, so that common |
463cac2d | 2280 | editing commands treat the user's text separately from the prompt. |
a933dad1 | 2281 | |
9a9dfda8 GM |
2282 | The following functions are defined for operating on fields: |
2283 | ||
2284 | - Function: constrain-to-field NEW-POS OLD-POS &optional ESCAPE-FROM-EDGE ONLY-IN-LINE | |
2285 | ||
2286 | Return the position closest to NEW-POS that is in the same field as OLD-POS. | |
2287 | A field is a region of text with the same `field' property. | |
2288 | If NEW-POS is nil, then the current point is used instead, and set to the | |
2289 | constrained position if that is is different. | |
2290 | ||
2291 | If OLD-POS is at the boundary of two fields, then the allowable | |
2292 | positions for NEW-POS depends on the value of the optional argument | |
2293 | ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is | |
2294 | constrained to the field that has the same `field' text-property | |
2295 | as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE | |
2296 | is non-nil, NEW-POS is constrained to the union of the two adjacent | |
2297 | fields. | |
2298 | ||
2299 | If the optional argument ONLY-IN-LINE is non-nil and constraining | |
2300 | NEW-POS would move it to a different line, NEW-POS is returned | |
2301 | unconstrained. This useful for commands that move by line, like | |
2302 | C-n or C-a, which should generally respect field boundaries | |
2303 | only in the case where they can still move to the right line. | |
2304 | ||
2305 | - Function: erase-field &optional POS | |
2306 | ||
2307 | Erases the field surrounding POS. | |
2308 | A field is a region of text with the same `field' property. | |
2309 | If POS is nil, the position of the current buffer's point is used. | |
2310 | ||
2311 | - Function: field-beginning &optional POS ESCAPE-FROM-EDGE | |
2312 | ||
2313 | Return the beginning of the field surrounding POS. | |
2314 | A field is a region of text with the same `field' property. | |
2315 | If POS is nil, the position of the current buffer's point is used. | |
2316 | If ESCAPE-FROM-EDGE is non-nil and POS is already at beginning of an | |
2317 | field, then the beginning of the *previous* field is returned. | |
2318 | ||
2319 | - Function: field-end &optional POS ESCAPE-FROM-EDGE | |
2320 | ||
2321 | Return the end of the field surrounding POS. | |
2322 | A field is a region of text with the same `field' property. | |
2323 | If POS is nil, the position of the current buffer's point is used. | |
2324 | If ESCAPE-FROM-EDGE is non-nil and POS is already at end of a field, | |
2325 | then the end of the *following* field is returned. | |
2326 | ||
2327 | - Function: field-string &optional POS | |
2328 | ||
2329 | Return the contents of the field surrounding POS as a string. | |
2330 | A field is a region of text with the same `field' property. | |
2331 | If POS is nil, the position of the current buffer's point is used. | |
2332 | ||
2333 | - Function: field-string-no-properties &optional POS | |
2334 | ||
2335 | Return the contents of the field around POS, without text-properties. | |
2336 | A field is a region of text with the same `field' property. | |
2337 | If POS is nil, the position of the current buffer's point is used. | |
2338 | ||
a933dad1 DL |
2339 | +++ |
2340 | ** Image support. | |
2341 | ||
2342 | Emacs can now display images. Images are inserted into text by giving | |
2343 | strings or buffer text a `display' text property containing one of | |
2344 | (AREA IMAGE) or IMAGE. The display of the `display' property value | |
2345 | replaces the display of the characters having that property. | |
2346 | ||
2347 | If the property value has the form (AREA IMAGE), AREA must be one of | |
2348 | `(margin left-margin)', `(margin right-margin)' or `(margin nil)'. If | |
2349 | AREA is `(margin nil)', IMAGE will be displayed in the text area of a | |
2350 | window, otherwise it will be displayed in the left or right marginal | |
2351 | area. | |
2352 | ||
2353 | IMAGE is an image specification. | |
2354 | ||
2355 | *** Image specifications | |
2356 | ||
2357 | Image specifications are lists of the form `(image PROPS)' where PROPS | |
2358 | is a property list whose keys are keyword symbols. Each | |
2359 | specifications must contain a property `:type TYPE' with TYPE being a | |
35a5514b GM |
2360 | symbol specifying the image type, e.g. `xbm'. Properties not |
2361 | described below are ignored. | |
a933dad1 DL |
2362 | |
2363 | The following is a list of properties all image types share. | |
2364 | ||
2365 | `:ascent ASCENT' | |
2366 | ||
576da55d GM |
2367 | ASCENT must be a number in the range 0..100, or the symbol `center'. |
2368 | If it is a number, it specifies the percentage of the image's height | |
2369 | to use for its ascent. | |
2370 | ||
2371 | If not specified, ASCENT defaults to the value 50 which means that the | |
2372 | image will be centered with the base line of the row it appears in. | |
2373 | ||
04545643 GM |
2374 | If ASCENT is `center' the image is vertically centered around a |
2375 | centerline which is the vertical center of text drawn at the position | |
2376 | of the image, in the manner specified by the text properties and | |
2377 | overlays that apply to the image. | |
a933dad1 DL |
2378 | |
2379 | `:margin MARGIN' | |
2380 | ||
79214ddf | 2381 | MARGIN must be a number >= 0 specifying how many pixels to put as |
a933dad1 DL |
2382 | margin around the image. Default is 0. |
2383 | ||
2384 | `:relief RELIEF' | |
2385 | ||
2386 | RELIEF is analogous to the `:relief' attribute of faces. Puts a relief | |
2387 | around an image. | |
2388 | ||
2389 | `:algorithm ALGO' | |
2390 | ||
2391 | Apply an image algorithm to the image before displaying it. ALGO must | |
2392 | be a symbol specifying the algorithm. Currently only `laplace' is | |
2393 | supported which applies a Laplace edge detection algorithm to an image | |
2394 | which is intended to display images "disabled." | |
2395 | ||
2396 | `:heuristic-mask BG' | |
2397 | ||
2398 | If BG is not nil, build a clipping mask for the image, so that the | |
2399 | background of a frame is visible behind the image. If BG is t, | |
2400 | determine the background color of the image by looking at the 4 | |
2401 | corners of the image, assuming the most frequently occuring color from | |
2402 | the corners is the background color of the image. Otherwise, BG must | |
2403 | be a list `(RED GREEN BLUE)' specifying the color to assume for the | |
2404 | background of the image. | |
2405 | ||
2406 | `:file FILE' | |
2407 | ||
2408 | Load image from FILE. If FILE is not absolute after expanding it, | |
2409 | search for the image in `data-directory'. Some image types support | |
2410 | building images from data. When this is done, no `:file' property | |
2411 | may be present in the image specification. | |
2412 | ||
518df5c4 GM |
2413 | `:data DATA' |
2414 | ||
2415 | Get image data from DATA. (As of this writing, this is not yet | |
2416 | supported for image type `postscript'). Either :file or :data may be | |
2417 | present in an image specification, but not both. All image types | |
2418 | support strings as DATA, some types allow additional types of DATA. | |
2419 | ||
a933dad1 DL |
2420 | *** Supported image types |
2421 | ||
b246b1f6 | 2422 | **** XBM, image type `xbm'. |
a933dad1 DL |
2423 | |
2424 | XBM images don't require an external library. Additional image | |
2425 | properties supported are | |
2426 | ||
2427 | `:foreground FG' | |
2428 | ||
2429 | FG must be a string specifying the image foreground color. Default | |
2430 | is the frame's foreground. | |
2431 | ||
2432 | `:background FG' | |
2433 | ||
2434 | BG must be a string specifying the image foreground color. Default is | |
2435 | the frame's background color. | |
2436 | ||
2437 | XBM images can be constructed from data instead of file. In this | |
2438 | case, the image specification must contain the following properties | |
2439 | instead of a `:file' property. | |
2440 | ||
2441 | `:width WIDTH' | |
2442 | ||
2443 | WIDTH specifies the width of the image in pixels. | |
2444 | ||
2445 | `:height HEIGHT' | |
2446 | ||
2447 | HEIGHT specifies the height of the image in pixels. | |
2448 | ||
2449 | `:data DATA' | |
2450 | ||
2451 | DATA must be either | |
2452 | ||
2453 | 1. a string large enough to hold the bitmap data, i.e. it must | |
2454 | have a size >= (WIDTH + 7) / 8 * HEIGHT | |
2455 | ||
2456 | 2. a bool-vector of size >= WIDTH * HEIGHT | |
2457 | ||
2458 | 3. a vector of strings or bool-vectors, one for each line of the | |
2459 | bitmap. | |
2460 | ||
c76e04a8 GM |
2461 | 4. a string that's an in-memory XBM file. Neither width nor |
2462 | height may be specified in this case because these are defined | |
2463 | in the file. | |
2464 | ||
a933dad1 DL |
2465 | **** XPM, image type `xpm' |
2466 | ||
2467 | XPM images require the external library `libXpm', package | |
2468 | `xpm-3.4k.tar.gz', version 3.4k or later. Make sure the library is | |
2469 | found when Emacs is configured by supplying appropriate paths via | |
2470 | `--x-includes' and `--x-libraries'. | |
2471 | ||
2472 | Additional image properties supported are: | |
2473 | ||
2474 | `:color-symbols SYMBOLS' | |
2475 | ||
2476 | SYMBOLS must be a list of pairs (NAME . COLOR), with NAME being the | |
2477 | name of color as it appears in an XPM file, and COLOR being an X color | |
2478 | name. | |
2479 | ||
2480 | XPM images can be built from memory instead of files. In that case, | |
2481 | add a `:data' property instead of a `:file' property. | |
2482 | ||
a933dad1 DL |
2483 | The XPM library uses libz in its implementation so that it is able |
2484 | to display compressed images. | |
2485 | ||
2486 | **** PBM, image type `pbm' | |
2487 | ||
2488 | PBM images don't require an external library. Color, gray-scale and | |
2489 | mono images are supported. There are no additional image properties | |
2490 | defined. | |
2491 | ||
2492 | **** JPEG, image type `jpeg' | |
2493 | ||
2494 | Support for JPEG images requires the external library `libjpeg', | |
3bd37feb GM |
2495 | package `jpegsrc.v6a.tar.gz', or later. Additional image properties |
2496 | are: | |
2497 | ||
a933dad1 DL |
2498 | **** TIFF, image type `tiff' |
2499 | ||
2500 | Support for TIFF images requires the external library `libtiff', | |
2501 | package `tiff-v3.4-tar.gz', or later. There are no additional image | |
2502 | properties defined. | |
2503 | ||
2504 | **** GIF, image type `gif' | |
2505 | ||
2506 | Support for GIF images requires the external library `libungif', package | |
2507 | `libungif-4.1.0', or later. | |
2508 | ||
2509 | Additional image properties supported are: | |
2510 | ||
2511 | `:index INDEX' | |
2512 | ||
2513 | INDEX must be an integer >= 0. Load image number INDEX from a | |
2514 | multi-image GIF file. An error is signalled if INDEX is too large. | |
2515 | ||
2516 | This could be used to implement limited support for animated GIFs. | |
2517 | For example, the following function displays a multi-image GIF file | |
2518 | at point-min in the current buffer, switching between sub-images | |
2519 | every 0.1 seconds. | |
2520 | ||
2521 | (defun show-anim (file max) | |
2522 | "Display multi-image GIF file FILE which contains MAX subimages." | |
2523 | (display-anim (current-buffer) file 0 max t)) | |
2524 | ||
2525 | (defun display-anim (buffer file idx max first-time) | |
2526 | (when (= idx max) | |
2527 | (setq idx 0)) | |
518df5c4 | 2528 | (let ((img (create-image file nil nil :index idx))) |
a933dad1 DL |
2529 | (save-excursion |
2530 | (set-buffer buffer) | |
2531 | (goto-char (point-min)) | |
2532 | (unless first-time (delete-char 1)) | |
2533 | (insert-image img "x")) | |
2534 | (run-with-timer 0.1 nil 'display-anim buffer file (1+ idx) max nil))) | |
2535 | ||
2536 | **** PNG, image type `png' | |
2537 | ||
2538 | Support for PNG images requires the external library `libpng', | |
2539 | package `libpng-1.0.2.tar.gz', or later. There are no additional image | |
2540 | properties defined. | |
2541 | ||
2542 | **** Ghostscript, image type `postscript'. | |
2543 | ||
2544 | Additional image properties supported are: | |
2545 | ||
2546 | `:pt-width WIDTH' | |
2547 | ||
2548 | WIDTH is width of the image in pt (1/72 inch). WIDTH must be an | |
b246b1f6 | 2549 | integer. This is a required property. |
a933dad1 DL |
2550 | |
2551 | `:pt-height HEIGHT' | |
2552 | ||
2553 | HEIGHT specifies the height of the image in pt (1/72 inch). HEIGHT | |
b246b1f6 | 2554 | must be a integer. This is an required property. |
a933dad1 DL |
2555 | |
2556 | `:bounding-box BOX' | |
2557 | ||
2558 | BOX must be a list or vector of 4 integers giving the bounding box of | |
2559 | the PS image, analogous to the `BoundingBox' comment found in PS | |
2560 | files. This is an required property. | |
2561 | ||
2562 | Part of the Ghostscript interface is implemented in Lisp. See | |
2563 | lisp/gs.el. | |
2564 | ||
2565 | *** Lisp interface. | |
2566 | ||
79214ddf FP |
2567 | The variable `image-types' contains a list of those image types |
2568 | which are supported in the current configuration. | |
a933dad1 DL |
2569 | |
2570 | Images are stored in an image cache and removed from the cache when | |
2571 | they haven't been displayed for `image-cache-eviction-delay seconds. | |
2572 | The function `clear-image-cache' can be used to clear the image cache | |
084cec2f GM |
2573 | manually. Images in the cache are compared with `equal', i.e. all |
2574 | images with `equal' specifications share the same image. | |
a933dad1 DL |
2575 | |
2576 | *** Simplified image API, image.el | |
2577 | ||
2578 | The new Lisp package image.el contains functions that simplify image | |
2579 | creation and putting images into text. The function `create-image' | |
2580 | can be used to create images. The macro `defimage' can be used to | |
2581 | define an image based on available image types. The functions | |
2582 | `put-image' and `insert-image' can be used to insert an image into a | |
2583 | buffer. | |
2584 | ||
2585 | +++ | |
2586 | ** Display margins. | |
2587 | ||
2588 | Windows can now have margins which are used for special text | |
2589 | and images. | |
2590 | ||
2591 | To give a window margins, either set the buffer-local variables | |
2592 | `left-margin-width' and `right-margin-width', or call | |
2593 | `set-window-margins'. The function `window-margins' can be used to | |
2594 | obtain the current settings. To make `left-margin-width' and | |
2595 | `right-margin-width' take effect, you must set them before displaying | |
2596 | the buffer in a window, or use `set-window-buffer' to force an update | |
2597 | of the display margins. | |
2598 | ||
2599 | You can put text in margins by giving it a `display' text property | |
2600 | containing a pair of the form `(LOCATION . VALUE)', where LOCATION is | |
2601 | one of `left-margin' or `right-margin' or nil. VALUE can be either a | |
2602 | string, an image specification or a stretch specification (see later | |
2603 | in this file). | |
2604 | ||
2605 | +++ | |
2606 | ** Help display | |
2607 | ||
2608 | Emacs displays short help messages in the echo area, when the mouse | |
2609 | moves over a tool-bar item or a piece of text that has a text property | |
2610 | `help-echo'. This feature also applies to strings in the mode line | |
2611 | that have a `help-echo' property. | |
2612 | ||
2613 | The value of the `help-echo' property must be a string. For tool-bar | |
2614 | items, their key definition is used to determine the help to display. | |
2615 | If their definition contains a property `:help FORM', FORM is | |
2616 | evaluated to determine the help string. Otherwise, the caption of the | |
2617 | tool-bar item is used. | |
2618 | ||
2619 | The hook `show-help-function' can be set to a function that displays | |
2620 | help differently. For example, enabling a tooltip window causes the | |
2621 | help display to appear there instead of in the echo area. | |
2622 | ||
2623 | +++ | |
2624 | ** Vertical fractional scrolling. | |
2625 | ||
2626 | The display of text in windows can be scrolled smoothly in pixels. | |
2627 | This is useful, for example, for making parts of large images visible. | |
2628 | ||
2629 | The function `window-vscroll' returns the current value of vertical | |
2630 | scrolling, a non-negative fraction of the canonical character height. | |
2631 | The function `set-window-vscroll' can be used to set the vertical | |
2632 | scrolling value. Here is an example of how these function might be | |
2633 | used. | |
2634 | ||
79214ddf FP |
2635 | (global-set-key [A-down] |
2636 | #'(lambda () | |
a933dad1 | 2637 | (interactive) |
79214ddf | 2638 | (set-window-vscroll (selected-window) |
a933dad1 | 2639 | (+ 0.5 (window-vscroll))))) |
79214ddf | 2640 | (global-set-key [A-up] |
a933dad1 DL |
2641 | #'(lambda () |
2642 | (interactive) | |
79214ddf | 2643 | (set-window-vscroll (selected-window) |
a933dad1 DL |
2644 | (- (window-vscroll) 0.5))))) |
2645 | ||
2646 | +++ | |
2647 | ** New hook `fontification-functions'. | |
2648 | ||
2649 | Functions from `fontification-functions' are called from redisplay | |
2650 | when it encounters a region of text that is not yet fontified. This | |
2651 | variable automatically becomes buffer-local when set. Each function | |
2652 | is called with one argument, POS. | |
2653 | ||
2654 | At least one of the hook functions should fontify one or more | |
2655 | characters starting at POS in the current buffer. It should mark them | |
2656 | as fontified by giving them a non-nil value of the `fontified' text | |
2657 | property. It may be reasonable for these functions to check for the | |
2658 | `fontified' property and not put it back on, but they do not have to. | |
2659 | ||
2660 | +++ | |
2661 | ** Tool bar support. | |
2662 | ||
2663 | Emacs supports a tool bar at the top of a frame under X. The frame | |
2664 | parameter `tool-bar-lines' (X resource "toolBar", class "ToolBar") | |
2665 | controls how may lines to reserve for the tool bar. A zero value | |
2666 | suppresses the tool bar. If the value is non-zero and | |
2667 | `auto-resize-tool-bars' is non-nil the tool bar's size will be changed | |
2668 | automatically so that all tool bar items are visible. | |
2669 | ||
2670 | *** Tool bar item definitions | |
2671 | ||
2672 | Tool bar items are defined using `define-key' with a prefix-key | |
2673 | `tool-bar'. For example `(define-key global-map [tool-bar item1] ITEM)' | |
2674 | where ITEM is a list `(menu-item CAPTION BINDING PROPS...)'. | |
79214ddf | 2675 | |
a933dad1 DL |
2676 | CAPTION is the caption of the item, If it's not a string, it is |
2677 | evaluated to get a string. The caption is currently not displayed in | |
2678 | the tool bar, but it is displayed if the item doesn't have a `:help' | |
2679 | property (see below). | |
79214ddf | 2680 | |
a933dad1 DL |
2681 | BINDING is the tool bar item's binding. Tool bar items with keymaps as |
2682 | binding are currently ignored. | |
2683 | ||
2684 | The following properties are recognized: | |
2685 | ||
2686 | `:enable FORM'. | |
79214ddf | 2687 | |
a933dad1 DL |
2688 | FORM is evaluated and specifies whether the tool bar item is enabled |
2689 | or disabled. | |
79214ddf | 2690 | |
a933dad1 | 2691 | `:visible FORM' |
79214ddf | 2692 | |
a933dad1 | 2693 | FORM is evaluated and specifies whether the tool bar item is displayed. |
79214ddf | 2694 | |
a933dad1 DL |
2695 | `:filter FUNCTION' |
2696 | ||
2697 | FUNCTION is called with one parameter, the same list BINDING in which | |
2698 | FUNCTION is specified as the filter. The value FUNCTION returns is | |
2699 | used instead of BINDING to display this item. | |
79214ddf | 2700 | |
a933dad1 DL |
2701 | `:button (TYPE SELECTED)' |
2702 | ||
2703 | TYPE must be one of `:radio' or `:toggle'. SELECTED is evaluated | |
2704 | and specifies whether the button is selected (pressed) or not. | |
79214ddf | 2705 | |
a933dad1 DL |
2706 | `:image IMAGES' |
2707 | ||
2708 | IMAGES is either a single image specification or a vector of four | |
2709 | image specifications. If it is a vector, this table lists the | |
2710 | meaning of each of the four elements: | |
2711 | ||
2712 | Index Use when item is | |
2713 | ---------------------------------------- | |
2714 | 0 enabled and selected | |
2715 | 1 enabled and deselected | |
2716 | 2 disabled and selected | |
2717 | 3 disabled and deselected | |
79214ddf | 2718 | |
4ba7246d GM |
2719 | If IMAGE is a single image specification, a Laplace edge-detection |
2720 | algorithm is used on that image to draw the image in disabled state. | |
2721 | ||
a933dad1 | 2722 | `:help HELP-STRING'. |
79214ddf | 2723 | |
a933dad1 DL |
2724 | Gives a help string to display for the tool bar item. This help |
2725 | is displayed when the mouse is moved over the item. | |
2726 | ||
2727 | *** Tool-bar-related variables. | |
2728 | ||
2729 | If `auto-resize-tool-bar' is non-nil, the tool bar will automatically | |
2730 | resize to show all defined tool bar items. It will never grow larger | |
2731 | than 1/4 of the frame's size. | |
2732 | ||
79214ddf | 2733 | If `auto-raise-tool-bar-buttons' is non-nil, tool bar buttons will be |
a933dad1 DL |
2734 | raised when the mouse moves over them. |
2735 | ||
2736 | You can add extra space between tool bar items by setting | |
2737 | `tool-bar-button-margin' to a positive integer specifying a number of | |
2738 | pixels. Default is 1. | |
2739 | ||
2740 | You can change the shadow thickness of tool bar buttons by setting | |
2741 | `tool-bar-button-relief' to an integer. Default is 3. | |
2742 | ||
2743 | *** Tool-bar clicks with modifiers. | |
2744 | ||
2745 | You can bind commands to clicks with control, shift, meta etc. on | |
79214ddf | 2746 | a tool bar item. If |
a933dad1 DL |
2747 | |
2748 | (define-key global-map [tool-bar shell] | |
2749 | '(menu-item "Shell" shell | |
2750 | :image (image :type xpm :file "shell.xpm"))) | |
2751 | ||
2752 | is the original tool bar item definition, then | |
2753 | ||
2754 | (define-key global-map [tool-bar S-shell] 'some-command) | |
2755 | ||
2756 | makes a binding to run `some-command' for a shifted click on the same | |
2757 | item. | |
2758 | ||
2759 | ** Mode line changes. | |
2760 | ||
2761 | +++ | |
2762 | *** Mouse-sensitive mode line. | |
2763 | ||
2764 | The mode line can be made mouse-sensitive by displaying strings there | |
2765 | that have a `local-map' text property. There are three ways to display | |
2766 | a string with a `local-map' property in the mode line. | |
2767 | ||
2768 | 1. The mode line spec contains a variable whose string value has | |
2769 | a `local-map' text property. | |
2770 | ||
2771 | 2. The mode line spec contains a format specifier (e.g. `%12b'), and | |
2772 | that format specifier has a `local-map' property. | |
2773 | ||
2774 | 3. The mode line spec contains a list containing `:eval FORM'. FORM | |
2775 | is evaluated. If the result is a string, and that string has a | |
2776 | `local-map' property. | |
2777 | ||
2778 | The same mechanism is used to determine the `face' and `help-echo' | |
2779 | properties of strings in the mode line. See `bindings.el' for an | |
2780 | example. | |
2781 | ||
54522c9f GM |
2782 | *** If a mode line element has the form `(:eval FORM)', FORM is |
2783 | evaluated and the result is used as mode line element. | |
2784 | ||
a933dad1 DL |
2785 | +++ |
2786 | *** You can suppress mode-line display by setting the buffer-local | |
2787 | variable mode-line-format to nil. | |
2788 | ||
2789 | +++ | |
2790 | *** A headerline can now be displayed at the top of a window. | |
2791 | ||
2792 | This mode line's contents are controlled by the new variable | |
2793 | `header-line-format' and `default-header-line-format' which are | |
2794 | completely analogous to `mode-line-format' and | |
2795 | `default-mode-line-format'. A value of nil means don't display a top | |
2796 | line. | |
2797 | ||
2798 | The appearance of top mode lines is controlled by the face | |
2799 | `header-line'. | |
2800 | ||
2801 | The function `coordinates-in-window-p' returns `header-line' for a | |
2802 | position in the header-line. | |
2803 | ||
2804 | +++ | |
2805 | ** Text property `display' | |
2806 | ||
2807 | The `display' text property is used to insert images into text, and | |
2808 | also control other aspects of how text displays. The value of the | |
2809 | `display' property should be a display specification, as described | |
2810 | below, or a list or vector containing display specifications. | |
2811 | ||
2812 | *** Variable width and height spaces | |
2813 | ||
2814 | To display a space of fractional width or height, use a display | |
2815 | specification of the form `(LOCATION STRECH)'. If LOCATION is | |
2816 | `(margin left-margin)', the space is displayed in the left marginal | |
2817 | area, if it is `(margin right-margin)', it is displayed in the right | |
2818 | marginal area, and if LOCATION is `(margin nil)' the space is | |
2819 | displayed in the text. In the latter case you can also use the | |
2820 | simpler form STRETCH as property value. | |
2821 | ||
2822 | The stretch specification STRETCH itself is a list of the form `(space | |
2823 | PROPS)', where PROPS is a property list which can contain the | |
2824 | properties described below. | |
2825 | ||
2826 | The display of the fractional space replaces the display of the | |
2827 | characters having the `display' property. | |
2828 | ||
2829 | - :width WIDTH | |
2830 | ||
2831 | Specifies that the space width should be WIDTH times the normal | |
2832 | character width. WIDTH can be an integer or floating point number. | |
2833 | ||
2834 | - :relative-width FACTOR | |
2835 | ||
2836 | Specifies that the width of the stretch should be computed from the | |
2837 | first character in a group of consecutive characters that have the | |
2838 | same `display' property. The computation is done by multiplying the | |
2839 | width of that character by FACTOR. | |
2840 | ||
2841 | - :align-to HPOS | |
2842 | ||
2843 | Specifies that the space should be wide enough to reach HPOS. The | |
2844 | value HPOS is measured in units of the normal character width. | |
2845 | ||
2846 | Exactly one of the above properties should be used. | |
2847 | ||
2848 | - :height HEIGHT | |
2849 | ||
2850 | Specifies the height of the space, as HEIGHT, measured in terms of the | |
2851 | normal line height. | |
2852 | ||
2853 | - :relative-height FACTOR | |
2854 | ||
2855 | The height of the space is computed as the product of the height | |
2856 | of the text having the `display' property and FACTOR. | |
2857 | ||
2858 | - :ascent ASCENT | |
2859 | ||
2860 | Specifies that ASCENT percent of the height of the stretch should be | |
2861 | used for the ascent of the stretch, i.e. for the part above the | |
2862 | baseline. The value of ASCENT must be a non-negative number less or | |
2863 | equal to 100. | |
2864 | ||
2865 | You should not use both `:height' and `:relative-height' together. | |
2866 | ||
2867 | *** Images | |
2868 | ||
2869 | A display specification for an image has the form `(LOCATION | |
2870 | . IMAGE)', where IMAGE is an image specification. The image replaces, | |
2871 | in the display, the characters having this display specification in | |
2872 | their `display' text property. If LOCATION is `(margin left-margin)', | |
2873 | the image will be displayed in the left marginal area, if it is | |
2874 | `(margin right-margin)' it will be displayed in the right marginal | |
2875 | area, and if LOCATION is `(margin nil)' the image will be displayed in | |
2876 | the text. In the latter case you can also use the simpler form IMAGE | |
2877 | as display specification. | |
2878 | ||
2879 | *** Other display properties | |
2880 | ||
2881 | - :space-width FACTOR | |
2882 | ||
2883 | Specifies that space characters in the text having that property | |
2884 | should be displayed FACTOR times as wide as normal; FACTOR must be an | |
2885 | integer or float. | |
2886 | ||
2887 | - :height HEIGHT | |
2888 | ||
2889 | Display text having this property in a font that is smaller or larger. | |
2890 | ||
2891 | If HEIGHT is a list of the form `(+ N)', where N is an integer, that | |
2892 | means to use a font that is N steps larger. If HEIGHT is a list of | |
2893 | the form `(- N)', that means to use a font that is N steps smaller. A | |
2894 | ``step'' is defined by the set of available fonts; each size for which | |
2895 | a font is available counts as a step. | |
2896 | ||
2897 | If HEIGHT is a number, that means to use a font that is HEIGHT times | |
2898 | as tall as the frame's default font. | |
2899 | ||
2900 | If HEIGHT is a symbol, it is called as a function with the current | |
2901 | height as argument. The function should return the new height to use. | |
2902 | ||
2903 | Otherwise, HEIGHT is evaluated to get the new height, with the symbol | |
2904 | `height' bound to the current specified font height. | |
2905 | ||
2906 | - :raise FACTOR | |
2907 | ||
2908 | FACTOR must be a number, specifying a multiple of the current | |
2909 | font's height. If it is positive, that means to display the characters | |
2910 | raised. If it is negative, that means to display them lower down. The | |
2911 | amount of raising or lowering is computed without taking account of the | |
2912 | `:height' subproperty. | |
2913 | ||
2914 | *** Conditional display properties | |
2915 | ||
2916 | All display specifications can be conditionalized. If a specification | |
2917 | has the form `(:when CONDITION . SPEC)', the specification SPEC | |
2918 | applies only when CONDITION yields a non-nil value when evaluated. | |
2919 | During evaluattion, point is temporarily set to the end position of | |
2920 | the text having the `display' property. | |
2921 | ||
2922 | The normal specification consisting of SPEC only is equivalent to | |
2923 | `(:when t SPEC)'. | |
2924 | ||
2925 | +++ | |
2926 | ** New menu separator types. | |
2927 | ||
2928 | Emacs now supports more than one menu separator type. Menu items with | |
2929 | item names consisting of dashes only (including zero dashes) are | |
2930 | treated like before. In addition, the following item names are used | |
2931 | to specify other menu separator types. | |
2932 | ||
2933 | - `--no-line' or `--space', or `--:space', or `--:noLine' | |
2934 | ||
2935 | No separator lines are drawn, but a small space is inserted where the | |
2936 | separator occurs. | |
2937 | ||
2938 | - `--single-line' or `--:singleLine' | |
2939 | ||
2940 | A single line in the menu's foreground color. | |
2941 | ||
2942 | - `--double-line' or `--:doubleLine' | |
2943 | ||
2944 | A double line in the menu's foreground color. | |
2945 | ||
2946 | - `--single-dashed-line' or `--:singleDashedLine' | |
2947 | ||
2948 | A single dashed line in the menu's foreground color. | |
2949 | ||
2950 | - `--double-dashed-line' or `--:doubleDashedLine' | |
2951 | ||
2952 | A double dashed line in the menu's foreground color. | |
2953 | ||
2954 | - `--shadow-etched-in' or `--:shadowEtchedIn' | |
2955 | ||
2956 | A single line with 3D sunken appearance. This is the the form | |
2957 | displayed for item names consisting of dashes only. | |
2958 | ||
2959 | - `--shadow-etched-out' or `--:shadowEtchedOut' | |
2960 | ||
2961 | A single line with 3D raised appearance. | |
2962 | ||
2963 | - `--shadow-etched-in-dash' or `--:shadowEtchedInDash' | |
2964 | ||
2965 | A single dashed line with 3D sunken appearance. | |
2966 | ||
2967 | - `--shadow-etched-out-dash' or `--:shadowEtchedOutDash' | |
2968 | ||
2969 | A single dashed line with 3D raise appearance. | |
2970 | ||
2971 | - `--shadow-double-etched-in' or `--:shadowDoubleEtchedIn' | |
2972 | ||
2973 | Two lines with 3D sunken appearance. | |
2974 | ||
2975 | - `--shadow-double-etched-out' or `--:shadowDoubleEtchedOut' | |
2976 | ||
2977 | Two lines with 3D raised appearance. | |
2978 | ||
2979 | - `--shadow-double-etched-in-dash' or `--:shadowDoubleEtchedInDash' | |
2980 | ||
2981 | Two dashed lines with 3D sunken appearance. | |
2982 | ||
2983 | - `--shadow-double-etched-out-dash' or `--:shadowDoubleEtchedOutDash' | |
2984 | ||
2985 | Two dashed lines with 3D raised appearance. | |
2986 | ||
2987 | Under LessTif/Motif, the last four separator types are displayed like | |
2988 | the corresponding single-line separators. | |
2989 | ||
2990 | +++ | |
2991 | ** New frame parameters for scroll bar colors. | |
2992 | ||
2993 | The new frame parameters `scroll-bar-foreground' and | |
2994 | `scroll-bar-background' can be used to change scroll bar colors. | |
2995 | Their value must be either a color name, a string, or nil to specify | |
2996 | that scroll bars should use a default color. For toolkit scroll bars, | |
2997 | default colors are toolkit specific. For non-toolkit scroll bars, the | |
2998 | default background is the background color of the frame, and the | |
2999 | default foreground is black. | |
3000 | ||
3001 | The X resource name of these parameters are `scrollBarForeground' | |
3002 | (class ScrollBarForeground) and `scrollBarBackground' (class | |
3003 | `ScrollBarBackground'). | |
3004 | ||
3005 | Setting these parameters overrides toolkit specific X resource | |
3006 | settings for scroll bar colors. | |
3007 | ||
3008 | +++ | |
3009 | ** You can set `redisplay-dont-pause' to a non-nil value to prevent | |
3010 | display updates from being interrupted when input is pending. | |
3011 | ||
3012 | --- | |
3013 | ** Changing a window's width may now change its window start if it | |
3014 | starts on a continuation line. The new window start is computed based | |
3015 | on the window's new width, starting from the start of the continued | |
3016 | line as the start of the screen line with the minimum distance from | |
3017 | the original window start. | |
3018 | ||
3019 | --- | |
3020 | ** The variable `hscroll-step' and the functions | |
3021 | `hscroll-point-visible' and `hscroll-window-column' have been removed | |
3022 | now that proper horizontal scrolling is implemented. | |
3023 | ||
3024 | +++ | |
3025 | ** Windows can now be made fixed-width and/or fixed-height. | |
3026 | ||
3027 | A window is fixed-size if its buffer has a buffer-local variable | |
3028 | `window-size-fixed' whose value is not nil. A value of `height' makes | |
3029 | windows fixed-height, a value of `width' makes them fixed-width, any | |
3030 | other non-nil value makes them both fixed-width and fixed-height. | |
3031 | ||
3032 | The following code makes all windows displaying the current buffer | |
3033 | fixed-width and fixed-height. | |
3034 | ||
3035 | (set (make-local-variable 'window-size-fixed) t) | |
3036 | ||
3037 | A call to enlarge-window on a window gives an error if that window is | |
3038 | fixed-width and it is tried to change the window's width, or if the | |
3039 | window is fixed-height, and it is tried to change its height. To | |
3040 | change the size of a fixed-size window, bind `window-size-fixed' | |
3041 | temporarily to nil, for example | |
3042 | ||
3043 | (let ((window-size-fixed nil)) | |
3044 | (enlarge-window 10)) | |
3045 | ||
79214ddf | 3046 | Likewise, an attempt to split a fixed-height window vertically, |
a933dad1 | 3047 | or a fixed-width window horizontally results in a error. |
e411ce4b EZ |
3048 | |
3049 | ** The cursor-type frame parameter is now supported on MS-DOS | |
3050 | terminals. When Emacs starts, it by default changes the cursor shape | |
3051 | to a solid box, as it does on Unix. The `cursor-type' frame parameter | |
3052 | overrides this as it does on Unix, except that the bar cursor is | |
3053 | horizontal rather than vertical (since the MS-DOS display doesn't | |
3054 | support a vertical-bar cursor). | |
e33b0397 DL |
3055 | ^L |
3056 | * Emacs 20.5 is a bug-fix release with no user-visible changes. | |
3057 | ||
3058 | ** Not new, but not mentioned before: | |
3059 | M-w when Transient Mark mode is enabled disables the mark. | |
a933dad1 DL |
3060 | \f |
3061 | * Changes in Emacs 20.4 | |
3062 | ||
3063 | ** Init file may be called .emacs.el. | |
3064 | ||
3065 | You can now call the Emacs init file `.emacs.el'. | |
3066 | Formerly the name had to be `.emacs'. If you use the name | |
3067 | `.emacs.el', you can byte-compile the file in the usual way. | |
3068 | ||
3069 | If both `.emacs' and `.emacs.el' exist, the latter file | |
3070 | is the one that is used. | |
3071 | ||
3072 | ** shell-command, and shell-command-on-region, now return | |
3073 | the exit code of the command (unless it is asynchronous). | |
3074 | Also, you can specify a place to put the error output, | |
3075 | separate from the command's regular output. | |
3076 | Interactively, the variable shell-command-default-error-buffer | |
3077 | says where to put error output; set it to a buffer name. | |
3078 | In calls from Lisp, an optional argument ERROR-BUFFER specifies | |
3079 | the buffer name. | |
3080 | ||
3081 | When you specify a non-nil error buffer (or buffer name), any error | |
3082 | output is inserted before point in that buffer, with \f\n to separate | |
3083 | it from the previous batch of error output. The error buffer is not | |
3084 | cleared, so error output from successive commands accumulates there. | |
3085 | ||
3086 | ** Setting the default value of enable-multibyte-characters to nil in | |
3087 | the .emacs file, either explicitly using setq-default, or via Custom, | |
3088 | is now essentially equivalent to using --unibyte: all buffers | |
3089 | created during startup will be made unibyte after loading .emacs. | |
3090 | ||
3091 | ** C-x C-f now handles the wildcards * and ? in file names. For | |
3092 | example, typing C-x C-f c*.c RET visits all the files whose names | |
3093 | match c*.c. To visit a file whose name contains * or ?, add the | |
3094 | quoting sequence /: to the beginning of the file name. | |
3095 | ||
3096 | ** The M-x commands keep-lines, flush-lines and count-matches | |
3097 | now have the same feature as occur and query-replace: | |
3098 | if the pattern contains any upper case letters, then | |
3099 | they never ignore case. | |
3100 | ||
3101 | ** The end-of-line format conversion feature previously mentioned | |
3102 | under `* Emacs 20.1 changes for MS-DOS and MS-Windows' actually | |
3103 | applies to all operating systems. Emacs recognizes from the contents | |
3104 | of a file what convention it uses to separate lines--newline, CRLF, or | |
3105 | just CR--and automatically converts the contents to the normal Emacs | |
3106 | convention (using newline to separate lines) for editing. This is a | |
3107 | part of the general feature of coding system conversion. | |
3108 | ||
3109 | If you subsequently save the buffer, Emacs converts the text back to | |
3110 | the same format that was used in the file before. | |
3111 | ||
3112 | You can turn off end-of-line conversion by setting the variable | |
3113 | `inhibit-eol-conversion' to non-nil, e.g. with Custom in the MULE group. | |
3114 | ||
3115 | ** The character set property `prefered-coding-system' has been | |
3116 | renamed to `preferred-coding-system', for the sake of correct spelling. | |
3117 | This is a fairly internal feature, so few programs should be affected. | |
3118 | ||
3119 | ** Mode-line display of end-of-line format is changed. | |
3120 | The indication of the end-of-line format of the file visited by a | |
3121 | buffer is now more explicit when that format is not the usual one for | |
3122 | your operating system. For example, the DOS-style end-of-line format | |
3123 | is displayed as "(DOS)" on Unix and GNU/Linux systems. The usual | |
3124 | end-of-line format is still displayed as a single character (colon for | |
3125 | Unix, backslash for DOS and Windows, and forward slash for the Mac). | |
3126 | ||
3127 | The values of the variables eol-mnemonic-unix, eol-mnemonic-dos, | |
3128 | eol-mnemonic-mac, and eol-mnemonic-undecided, which are strings, | |
3129 | control what is displayed in the mode line for each end-of-line | |
3130 | format. You can now customize these variables. | |
3131 | ||
3132 | ** In the previous version of Emacs, tar-mode didn't work well if a | |
3133 | filename contained non-ASCII characters. Now this is fixed. Such a | |
3134 | filename is decoded by file-name-coding-system if the default value of | |
3135 | enable-multibyte-characters is non-nil. | |
3136 | ||
3137 | ** The command temp-buffer-resize-mode toggles a minor mode | |
3138 | in which temporary buffers (such as help buffers) are given | |
3139 | windows just big enough to hold the whole contents. | |
3140 | ||
3141 | ** If you use completion.el, you must now run the function | |
3142 | dynamic-completion-mode to enable it. Just loading the file | |
3143 | doesn't have any effect. | |
3144 | ||
3145 | ** In Flyspell mode, the default is now to make just one Ispell process, | |
3146 | not one per buffer. | |
3147 | ||
3148 | ** If you use iswitchb but do not call (iswitchb-default-keybindings) to | |
3149 | use the default keybindings, you will need to add the following line: | |
3150 | (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup) | |
3151 | ||
3152 | ** Auto-show mode is no longer enabled just by loading auto-show.el. | |
3153 | To control it, set `auto-show-mode' via Custom or use the | |
3154 | `auto-show-mode' command. | |
3155 | ||
3156 | ** Handling of X fonts' ascent/descent parameters has been changed to | |
3157 | avoid redisplay problems. As a consequence, compared with previous | |
3158 | versions the line spacing and frame size now differ with some font | |
3159 | choices, typically increasing by a pixel per line. This change | |
3160 | occurred in version 20.3 but was not documented then. | |
3161 | ||
3162 | ** If you select the bar cursor style, it uses the frame's | |
3163 | cursor-color, rather than the cursor foreground pixel. | |
3164 | ||
3165 | ** In multibyte mode, Rmail decodes incoming MIME messages using the | |
3166 | character set specified in the message. If you want to disable this | |
3167 | feature, set the variable rmail-decode-mime-charset to nil. | |
3168 | ||
3169 | ** Not new, but not mentioned previously in NEWS: when you use #! at | |
3170 | the beginning of a file to make it executable and specify an | |
3171 | interpreter program, Emacs looks on the second line for the -*- mode | |
3172 | and variable specification, as well as on the first line. | |
3173 | ||
3174 | ** Support for IBM codepage encoding of non-ASCII characters. | |
3175 | ||
3176 | The new command M-x codepage-setup creates a special coding system | |
3177 | that can be used to convert text between a specific IBM codepage and | |
3178 | one of the character sets built into Emacs which matches that | |
3179 | codepage. For example, codepage 850 corresponds to Latin-1 character | |
3180 | set, codepage 855 corresponds to Cyrillic-ISO character set, etc. | |
3181 | ||
3182 | Windows codepages 1250, 1251 and some others, where Windows deviates | |
3183 | from the corresponding ISO character set, are also supported. | |
3184 | ||
3185 | IBM box-drawing characters and other glyphs which don't have | |
3186 | equivalents in the corresponding ISO character set, are converted to | |
3187 | a character defined by dos-unsupported-char-glyph on MS-DOS, and to | |
3188 | `?' on other systems. | |
3189 | ||
3190 | IBM codepages are widely used on MS-DOS and MS-Windows, so this | |
3191 | feature is most useful on those platforms, but it can also be used on | |
3192 | Unix. | |
3193 | ||
3194 | Emacs compiled for MS-DOS automatically loads the support for the | |
3195 | current codepage when it starts. | |
3196 | ||
3197 | ** Mail changes | |
3198 | ||
feab4fba GM |
3199 | *** When mail is sent using compose-mail (C-x m), and if |
3200 | `mail-send-nonascii' is set to the new default value `mime', | |
3201 | appropriate MIME headers are added. The headers are added only if | |
3202 | non-ASCII characters are present in the body of the mail, and no other | |
3203 | MIME headers are already present. For example, the following three | |
3204 | headers are added if the coding system used in the *mail* buffer is | |
3205 | latin-1: | |
3206 | ||
3207 | MIME-version: 1.0 | |
3208 | Content-type: text/plain; charset=iso-8859-1 | |
3209 | Content-Transfer-Encoding: 8bit | |
3210 | ||
a933dad1 DL |
3211 | *** The new variable default-sendmail-coding-system specifies the |
3212 | default way to encode outgoing mail. This has higher priority than | |
3213 | default-buffer-file-coding-system but has lower priority than | |
3214 | sendmail-coding-system and the local value of | |
3215 | buffer-file-coding-system. | |
3216 | ||
3217 | You should not set this variable manually. Instead, set | |
3218 | sendmail-coding-system to specify a fixed encoding for all outgoing | |
3219 | mail. | |
3220 | ||
3221 | *** When you try to send a message that contains non-ASCII characters, | |
3222 | if the coding system specified by those variables doesn't handle them, | |
3223 | Emacs will ask you to select a suitable coding system while showing a | |
3224 | list of possible coding systems. | |
3225 | ||
3226 | ** CC Mode changes | |
3227 | ||
3228 | *** c-default-style can now take an association list that maps major | |
3229 | modes to style names. When this variable is an alist, Java mode no | |
3230 | longer hardcodes a setting to "java" style. See the variable's | |
3231 | docstring for details. | |
3232 | ||
3233 | *** It's now possible to put a list as the offset on a syntactic | |
3234 | symbol. The list is evaluated recursively until a non-nil offset is | |
3235 | found. This is useful to combine several lineup functions to act in a | |
3236 | prioritized order on a single line. However, none of the supplied | |
3237 | lineup functions use this feature currently. | |
3238 | ||
3239 | *** New syntactic symbol catch-clause, which is used on the "catch" and | |
3240 | "finally" lines in try-catch constructs in C++ and Java. | |
3241 | ||
3242 | *** New cleanup brace-catch-brace on c-cleanup-list, which does for | |
3243 | "catch" lines what brace-elseif-brace does for "else if" lines. | |
3244 | ||
3245 | *** The braces of Java anonymous inner classes are treated separately | |
3246 | from the braces of other classes in auto-newline mode. Two new | |
3247 | symbols inexpr-class-open and inexpr-class-close may be used on | |
3248 | c-hanging-braces-alist to control the automatic newlines used for | |
3249 | anonymous classes. | |
3250 | ||
3251 | *** Support for the Pike language added, along with new Pike specific | |
3252 | syntactic symbols: inlambda, lambda-intro-cont | |
3253 | ||
3254 | *** Support for Java anonymous classes via new syntactic symbol | |
3255 | inexpr-class. New syntactic symbol inexpr-statement for Pike | |
3256 | support and gcc-style statements inside expressions. New lineup | |
3257 | function c-lineup-inexpr-block. | |
3258 | ||
3259 | *** New syntactic symbol brace-entry-open which is used in brace lists | |
3260 | (i.e. static initializers) when a list entry starts with an open | |
3261 | brace. These used to be recognized as brace-list-entry's. | |
3262 | c-electric-brace also recognizes brace-entry-open braces | |
3263 | (brace-list-entry's can no longer be electrified). | |
3264 | ||
3265 | *** New command c-indent-line-or-region, not bound by default. | |
3266 | ||
3267 | *** `#' is only electric when typed in the indentation of a line. | |
3268 | ||
3269 | *** Parentheses are now electric (via the new command c-electric-paren) | |
3270 | for auto-reindenting lines when parens are typed. | |
3271 | ||
3272 | *** In "gnu" style, inline-open offset is now set to zero. | |
3273 | ||
3274 | *** Uniform handling of the inclass syntactic symbol. The indentation | |
3275 | associated with it is now always relative to the class opening brace. | |
3276 | This means that the indentation behavior has changed in some | |
3277 | circumstances, but only if you've put anything besides 0 on the | |
3278 | class-open syntactic symbol (none of the default styles do that). | |
3279 | ||
3280 | ** Gnus changes. | |
3281 | ||
3282 | *** New functionality for using Gnus as an offline newsreader has been | |
3283 | added. A plethora of new commands and modes have been added. See the | |
3284 | Gnus manual for the full story. | |
3285 | ||
3286 | *** The nndraft backend has returned, but works differently than | |
3287 | before. All Message buffers are now also articles in the nndraft | |
3288 | group, which is created automatically. | |
3289 | ||
3290 | *** `gnus-alter-header-function' can now be used to alter header | |
3291 | values. | |
3292 | ||
3293 | *** `gnus-summary-goto-article' now accept Message-ID's. | |
3294 | ||
3295 | *** A new Message command for deleting text in the body of a message | |
3296 | outside the region: `C-c C-v'. | |
3297 | ||
3298 | *** You can now post to component group in nnvirtual groups with | |
3299 | `C-u C-c C-c'. | |
3300 | ||
3301 | *** `nntp-rlogin-program' -- new variable to ease customization. | |
3302 | ||
3303 | *** `C-u C-c C-c' in `gnus-article-edit-mode' will now inhibit | |
3304 | re-highlighting of the article buffer. | |
3305 | ||
3306 | *** New element in `gnus-boring-article-headers' -- `long-to'. | |
3307 | ||
3308 | *** `M-i' symbolic prefix command. See the section "Symbolic | |
3309 | Prefixes" in the Gnus manual for details. | |
3310 | ||
3311 | *** `L' and `I' in the summary buffer now take the symbolic prefix | |
3312 | `a' to add the score rule to the "all.SCORE" file. | |
3313 | ||
3314 | *** `gnus-simplify-subject-functions' variable to allow greater | |
3315 | control over simplification. | |
3316 | ||
3317 | *** `A T' -- new command for fetching the current thread. | |
3318 | ||
3319 | *** `/ T' -- new command for including the current thread in the | |
3320 | limit. | |
3321 | ||
3322 | *** `M-RET' is a new Message command for breaking cited text. | |
3323 | ||
3324 | *** \\1-expressions are now valid in `nnmail-split-methods'. | |
3325 | ||
79214ddf | 3326 | *** The `custom-face-lookup' function has been removed. |
a933dad1 DL |
3327 | If you used this function in your initialization files, you must |
3328 | rewrite them to use `face-spec-set' instead. | |
3329 | ||
3330 | *** Cancelling now uses the current select method. Symbolic prefix | |
3331 | `a' forces normal posting method. | |
3332 | ||
3333 | *** New command to translate M******** sm*rtq**t*s into proper text | |
3334 | -- `W d'. | |
3335 | ||
3336 | *** For easier debugging of nntp, you can set `nntp-record-commands' | |
3337 | to a non-nil value. | |
3338 | ||
3339 | *** nntp now uses ~/.authinfo, a .netrc-like file, for controlling | |
3340 | where and how to send AUTHINFO to NNTP servers. | |
3341 | ||
3342 | *** A command for editing group parameters from the summary buffer | |
3343 | has been added. | |
3344 | ||
3345 | *** A history of where mails have been split is available. | |
3346 | ||
3347 | *** A new article date command has been added -- `article-date-iso8601'. | |
3348 | ||
3349 | *** Subjects can be simplified when threading by setting | |
3350 | `gnus-score-thread-simplify'. | |
3351 | ||
3352 | *** A new function for citing in Message has been added -- | |
3353 | `message-cite-original-without-signature'. | |
3354 | ||
3355 | *** `article-strip-all-blank-lines' -- new article command. | |
3356 | ||
3357 | *** A new Message command to kill to the end of the article has | |
3358 | been added. | |
3359 | ||
3360 | *** A minimum adaptive score can be specified by using the | |
3361 | `gnus-adaptive-word-minimum' variable. | |
3362 | ||
3363 | *** The "lapsed date" article header can be kept continually | |
3364 | updated by the `gnus-start-date-timer' command. | |
3365 | ||
3366 | *** Web listserv archives can be read with the nnlistserv backend. | |
3367 | ||
3368 | *** Old dejanews archives can now be read by nnweb. | |
3369 | ||
3370 | *** `gnus-posting-styles' has been re-activated. | |
3371 | ||
3372 | ** Changes to TeX and LaTeX mode | |
3373 | ||
3374 | *** The new variable `tex-start-options-string' can be used to give | |
3375 | options for the TeX run. The default value causes TeX to run in | |
3376 | nonstopmode. For an interactive TeX run set it to nil or "". | |
3377 | ||
3378 | *** The command `tex-feed-input' sends input to the Tex Shell. In a | |
3379 | TeX buffer it is bound to the keys C-RET, C-c RET, and C-c C-m (some | |
3380 | of these keys may not work on all systems). For instance, if you run | |
3381 | TeX interactively and if the TeX run stops because of an error, you | |
3382 | can continue it without leaving the TeX buffer by typing C-RET. | |
3383 | ||
3384 | *** The Tex Shell Buffer is now in `compilation-shell-minor-mode'. | |
3385 | All error-parsing commands of the Compilation major mode are available | |
3386 | but bound to keys that don't collide with the shell. Thus you can use | |
3387 | the Tex Shell for command line executions like a usual shell. | |
3388 | ||
3389 | *** The commands `tex-validate-region' and `tex-validate-buffer' check | |
3390 | the matching of braces and $'s. The errors are listed in a *Occur* | |
3391 | buffer and you can use C-c C-c or mouse-2 to go to a particular | |
3392 | mismatch. | |
3393 | ||
3394 | ** Changes to RefTeX mode | |
3395 | ||
3396 | *** The table of contents buffer can now also display labels and | |
3397 | file boundaries in addition to sections. Use `l', `i', and `c' keys. | |
3398 | ||
3399 | *** Labels derived from context (the section heading) are now | |
3400 | lowercase by default. To make the label legal in LaTeX, latin-1 | |
3401 | characters will lose their accent. All Mule characters will be | |
3402 | removed from the label. | |
3403 | ||
3404 | *** The automatic display of cross reference information can also use | |
3405 | a window instead of the echo area. See variable `reftex-auto-view-crossref'. | |
3406 | ||
3407 | *** kpsewhich can be used by RefTeX to find TeX and BibTeX files. See the | |
3408 | customization group `reftex-finding-files'. | |
3409 | ||
3410 | *** The option `reftex-bibfile-ignore-list' has been renamed to | |
3411 | `reftex-bibfile-ignore-regexps' and indeed can be fed with regular | |
79214ddf | 3412 | expressions. |
a933dad1 DL |
3413 | |
3414 | *** Multiple Selection buffers are now hidden buffers. | |
3415 | ||
3416 | ** New/deleted modes and packages | |
3417 | ||
3418 | *** The package snmp-mode.el provides major modes for editing SNMP and | |
3419 | SNMPv2 MIBs. It has entries on `auto-mode-alist'. | |
3420 | ||
3421 | *** The package sql.el provides a major mode, M-x sql-mode, for | |
3422 | editing SQL files, and M-x sql-interactive-mode for interacting with | |
3423 | SQL interpreters. It has an entry on `auto-mode-alist'. | |
3424 | ||
3425 | *** M-x highlight-changes-mode provides a minor mode displaying buffer | |
3426 | changes with a special face. | |
3427 | ||
3428 | *** ispell4.el has been deleted. It got in the way of ispell.el and | |
3429 | this was hard to fix reliably. It has long been obsolete -- use | |
3430 | Ispell 3.1 and ispell.el. | |
3431 | \f | |
3432 | * MS-DOS changes in Emacs 20.4 | |
3433 | ||
3434 | ** Emacs compiled for MS-DOS now supports MULE features better. | |
3435 | This includes support for display of all ISO 8859-N character sets, | |
3436 | conversion to and from IBM codepage encoding of non-ASCII characters, | |
3437 | and automatic setup of the MULE environment at startup. For details, | |
3438 | check out the section `MS-DOS and MULE' in the manual. | |
3439 | ||
3440 | The MS-DOS installation procedure automatically configures and builds | |
3441 | Emacs with input method support if it finds an unpacked Leim | |
3442 | distribution when the config.bat script is run. | |
3443 | ||
3444 | ** Formerly, the value of lpr-command did not affect printing on | |
3445 | MS-DOS unless print-region-function was set to nil, but now it | |
3446 | controls whether an external program is invoked or output is written | |
3447 | directly to a printer port. Similarly, in the previous version of | |
3448 | Emacs, the value of ps-lpr-command did not affect PostScript printing | |
3449 | on MS-DOS unless ps-printer-name was set to something other than a | |
3450 | string (eg. t or `pipe'), but now it controls whether an external | |
3451 | program is used. (These changes were made so that configuration of | |
3452 | printing variables would be almost identical across all platforms.) | |
3453 | ||
3454 | ** In the previous version of Emacs, PostScript and non-PostScript | |
3455 | output was piped to external programs, but because most print programs | |
3456 | available for MS-DOS and MS-Windows cannot read data from their standard | |
3457 | input, on those systems the data to be output is now written to a | |
3458 | temporary file whose name is passed as the last argument to the external | |
3459 | program. | |
3460 | ||
3461 | An exception is made for `print', a standard program on Windows NT, | |
3462 | and `nprint', a standard program on Novell Netware. For both of these | |
3463 | programs, the command line is constructed in the appropriate syntax | |
3464 | automatically, using only the value of printer-name or ps-printer-name | |
3465 | as appropriate--the value of the relevant `-switches' variable is | |
3466 | ignored, as both programs have no useful switches. | |
3467 | ||
3468 | ** The value of the variable dos-printer (cf. dos-ps-printer), if it has | |
3469 | a value, overrides the value of printer-name (cf. ps-printer-name), on | |
3470 | MS-DOS and MS-Windows only. This has been true since version 20.3, but | |
3471 | was not documented clearly before. | |
3472 | ||
3473 | ** All the Emacs games now work on MS-DOS terminals. | |
3474 | This includes Tetris and Snake. | |
3475 | \f | |
3476 | * Lisp changes in Emacs 20.4 | |
3477 | ||
3478 | ** New functions line-beginning-position and line-end-position | |
3479 | return the position of the beginning or end of the current line. | |
3480 | They both accept an optional argument, which has the same | |
3481 | meaning as the argument to beginning-of-line or end-of-line. | |
3482 | ||
3483 | ** find-file and allied functions now have an optional argument | |
3484 | WILDCARD. If this is non-nil, they do wildcard processing, | |
3485 | and visit all files that match the wildcard pattern. | |
3486 | ||
3487 | ** Changes in the file-attributes function. | |
3488 | ||
3489 | *** The file size returned by file-attributes may be an integer or a float. | |
3490 | It is an integer if the size fits in a Lisp integer, float otherwise. | |
3491 | ||
3492 | *** The inode number returned by file-attributes may be an integer (if | |
3493 | the number fits in a Lisp integer) or a cons cell containing two | |
3494 | integers. | |
3495 | ||
3496 | ** The new function directory-files-and-attributes returns a list of | |
3497 | files in a directory and their attributes. It accepts the same | |
3498 | arguments as directory-files and has similar semantics, except that | |
3499 | file names and attributes are returned. | |
3500 | ||
3501 | ** The new function file-attributes-lessp is a helper function for | |
3502 | sorting the list generated by directory-files-and-attributes. It | |
3503 | accepts two arguments, each a list of a file name and its atttributes. | |
3504 | It compares the file names of each according to string-lessp and | |
3505 | returns the result. | |
3506 | ||
3507 | ** The new function file-expand-wildcards expands a wildcard-pattern | |
3508 | to produce a list of existing files that match the pattern. | |
3509 | ||
3510 | ** New functions for base64 conversion: | |
3511 | ||
3512 | The function base64-encode-region converts a part of the buffer | |
3513 | into the base64 code used in MIME. base64-decode-region | |
3514 | performs the opposite conversion. Line-breaking is supported | |
3515 | optionally. | |
3516 | ||
3517 | Functions base64-encode-string and base64-decode-string do a similar | |
3518 | job on the text in a string. They return the value as a new string. | |
3519 | ||
3520 | ** | |
3521 | The new function process-running-child-p | |
3522 | will tell you if a subprocess has given control of its | |
3523 | terminal to its own child process. | |
3524 | ||
3525 | ** interrupt-process and such functions have a new feature: | |
3526 | when the second argument is `lambda', they send a signal | |
3527 | to the running child of the subshell, if any, but if the shell | |
3528 | itself owns its terminal, no signal is sent. | |
3529 | ||
3530 | ** There are new widget types `plist' and `alist' which can | |
3531 | be used for customizing variables whose values are plists or alists. | |
3532 | ||
3533 | ** easymenu.el Now understands `:key-sequence' and `:style button'. | |
3534 | :included is an alias for :visible. | |
3535 | ||
3536 | easy-menu-add-item now understands the values returned by | |
3537 | easy-menu-remove-item and easy-menu-item-present-p. This can be used | |
3538 | to move or copy menu entries. | |
3539 | ||
3540 | ** Multibyte editing changes | |
3541 | ||
3542 | *** The definitions of sref and char-bytes are changed. Now, sref is | |
3543 | an alias of aref and char-bytes always returns 1. This change is to | |
3544 | make some Emacs Lisp code which works on 20.2 and earlier also | |
3545 | work on the latest Emacs. Such code uses a combination of sref and | |
3546 | char-bytes in a loop typically as below: | |
3547 | (setq char (sref str idx) | |
3548 | idx (+ idx (char-bytes idx))) | |
3549 | The byte-compiler now warns that this is obsolete. | |
3550 | ||
3551 | If you want to know how many bytes a specific multibyte character | |
3552 | (say, CH) occupies in a multibyte buffer, use this code: | |
3553 | (charset-bytes (char-charset ch)) | |
3554 | ||
3555 | *** In multibyte mode, when you narrow a buffer to some region, and the | |
3556 | region is preceded or followed by non-ASCII codes, inserting or | |
3557 | deleting at the head or the end of the region may signal this error: | |
3558 | ||
3559 | Byte combining across boundary of accessible buffer text inhibitted | |
3560 | ||
3561 | This is to avoid some bytes being combined together into a character | |
3562 | across the boundary. | |
3563 | ||
3564 | *** The functions find-charset-region and find-charset-string include | |
3565 | `unknown' in the returned list in the following cases: | |
3566 | o The current buffer or the target string is unibyte and | |
3567 | contains 8-bit characters. | |
3568 | o The current buffer or the target string is multibyte and | |
3569 | contains invalid characters. | |
3570 | ||
3571 | *** The functions decode-coding-region and encode-coding-region remove | |
3572 | text properties of the target region. Ideally, they should correctly | |
3573 | preserve text properties, but for the moment, it's hard. Removing | |
3574 | text properties is better than preserving them in a less-than-correct | |
3575 | way. | |
3576 | ||
3577 | *** prefer-coding-system sets EOL conversion of default coding systems. | |
3578 | If the argument to prefer-coding-system specifies a certain type of | |
3579 | end of line conversion, the default coding systems set by | |
3580 | prefer-coding-system will specify that conversion type for end of line. | |
3581 | ||
3582 | *** The new function thai-compose-string can be used to properly | |
3583 | compose Thai characters in a string. | |
3584 | ||
3585 | ** The primitive `define-prefix-command' now takes an optional third | |
3586 | argument NAME, which should be a string. It supplies the menu name | |
3587 | for the created keymap. Keymaps created in order to be displayed as | |
3588 | menus should always use the third argument. | |
3589 | ||
3590 | ** The meanings of optional second arguments for read-char, | |
3591 | read-event, and read-char-exclusive are flipped. Now the second | |
3592 | arguments are INHERIT-INPUT-METHOD. These functions use the current | |
3593 | input method (if any) if and only if INHERIT-INPUT-METHOD is non-nil. | |
3594 | ||
3595 | ** The new function clear-this-command-keys empties out the contents | |
3596 | of the vector that (this-command-keys) returns. This is useful in | |
3597 | programs that read passwords, to prevent the passwords from echoing | |
3598 | inadvertently as part of the next command in certain cases. | |
3599 | ||
3600 | ** The new macro `with-temp-message' displays a temporary message in | |
3601 | the echo area, while executing some Lisp code. Like `progn', it | |
3602 | returns the value of the last form, but it also restores the previous | |
3603 | echo area contents. | |
3604 | ||
3605 | (with-temp-message MESSAGE &rest BODY) | |
3606 | ||
3607 | ** The function `require' now takes an optional third argument | |
3608 | NOERROR. If it is non-nil, then there is no error if the | |
3609 | requested feature cannot be loaded. | |
3610 | ||
3611 | ** In the function modify-face, an argument of (nil) for the | |
3612 | foreground color, background color or stipple pattern | |
79214ddf | 3613 | means to clear out that attribute. |
a933dad1 DL |
3614 | |
3615 | ** The `outer-window-id' frame property of an X frame | |
3616 | gives the window number of the outermost X window for the frame. | |
3617 | ||
3618 | ** Temporary buffers made with with-output-to-temp-buffer are now | |
3619 | read-only by default, and normally use the major mode Help mode | |
3620 | unless you put them in some other non-Fundamental mode before the | |
3621 | end of with-output-to-temp-buffer. | |
3622 | ||
3623 | ** The new functions gap-position and gap-size return information on | |
3624 | the gap of the current buffer. | |
3625 | ||
3626 | ** The new functions position-bytes and byte-to-position provide a way | |
3627 | to convert between character positions and byte positions in the | |
3628 | current buffer. | |
3629 | ||
3630 | ** vc.el defines two new macros, `edit-vc-file' and `with-vc-file', to | |
3631 | facilitate working with version-controlled files from Lisp programs. | |
3632 | These macros check out a given file automatically if needed, and check | |
3633 | it back in after any modifications have been made. | |
3634 | \f | |
3635 | * Installation Changes in Emacs 20.3 | |
3636 | ||
3637 | ** The default value of load-path now includes most subdirectories of | |
3638 | the site-specific directories /usr/local/share/emacs/site-lisp and | |
3639 | /usr/local/share/emacs/VERSION/site-lisp, in addition to those | |
3640 | directories themselves. Both immediate subdirectories and | |
3641 | subdirectories multiple levels down are added to load-path. | |
3642 | ||
3643 | Not all subdirectories are included, though. Subdirectories whose | |
3644 | names do not start with a letter or digit are excluded. | |
3645 | Subdirectories named RCS or CVS are excluded. Also, a subdirectory | |
3646 | which contains a file named `.nosearch' is excluded. You can use | |
3647 | these methods to prevent certain subdirectories from being searched. | |
3648 | ||
3649 | Emacs finds these subdirectories and adds them to load-path when it | |
3650 | starts up. While it would be cleaner to find the subdirectories each | |
3651 | time Emacs loads a file, that would be much slower. | |
3652 | ||
3653 | This feature is an incompatible change. If you have stored some Emacs | |
3654 | Lisp files in a subdirectory of the site-lisp directory specifically | |
3655 | to prevent them from being used, you will need to rename the | |
3656 | subdirectory to start with a non-alphanumeric character, or create a | |
3657 | `.nosearch' file in it, in order to continue to achieve the desired | |
3658 | results. | |
3659 | ||
3660 | ** Emacs no longer includes an old version of the C preprocessor from | |
3661 | GCC. This was formerly used to help compile Emacs with C compilers | |
3662 | that had limits on the significant length of an identifier, but in | |
3663 | fact we stopped supporting such compilers some time ago. | |
3664 | \f | |
3665 | * Changes in Emacs 20.3 | |
3666 | ||
3667 | ** The new command C-x z (repeat) repeats the previous command | |
3668 | including its argument. If you repeat the z afterward, | |
3669 | it repeats the command additional times; thus, you can | |
3670 | perform many repetitions with one keystroke per repetition. | |
3671 | ||
3672 | ** Emacs now supports "selective undo" which undoes only within a | |
3673 | specified region. To do this, set point and mark around the desired | |
3674 | region and type C-u C-x u (or C-u C-_). You can then continue undoing | |
3675 | further, within the same region, by repeating the ordinary undo | |
3676 | command C-x u or C-_. This will keep undoing changes that were made | |
3677 | within the region you originally specified, until either all of them | |
3678 | are undone, or it encounters a change which crosses the edge of that | |
3679 | region. | |
3680 | ||
3681 | In Transient Mark mode, undoing when a region is active requests | |
3682 | selective undo. | |
3683 | ||
3684 | ** If you specify --unibyte when starting Emacs, then all buffers are | |
3685 | unibyte, except when a Lisp program specifically creates a multibyte | |
3686 | buffer. Setting the environment variable EMACS_UNIBYTE has the same | |
3687 | effect. The --no-unibyte option overrides EMACS_UNIBYTE and directs | |
3688 | Emacs to run normally in multibyte mode. | |
3689 | ||
3690 | The option --unibyte does not affect the reading of Emacs Lisp files, | |
3691 | though. If you want a Lisp file to be read in unibyte mode, use | |
3692 | -*-unibyte: t;-*- on its first line. That will force Emacs to | |
3693 | load that file in unibyte mode, regardless of how Emacs was started. | |
3694 | ||
3695 | ** toggle-enable-multibyte-characters no longer has a key binding and | |
3696 | no longer appears in the menu bar. We've realized that changing the | |
3697 | enable-multibyte-characters variable in an existing buffer is | |
3698 | something that most users not do. | |
3699 | ||
3700 | ** You can specify a coding system to use for the next cut or paste | |
3701 | operations through the window system with the command C-x RET X. | |
3702 | The coding system can make a difference for communication with other | |
3703 | applications. | |
3704 | ||
3705 | C-x RET x specifies a coding system for all subsequent cutting and | |
3706 | pasting operations. | |
3707 | ||
3708 | ** You can specify the printer to use for commands that do printing by | |
3709 | setting the variable `printer-name'. Just what a printer name looks | |
3710 | like depends on your operating system. You can specify a different | |
3711 | printer for the Postscript printing commands by setting | |
3712 | `ps-printer-name'. | |
3713 | ||
3714 | ** Emacs now supports on-the-fly spell checking by the means of a | |
3715 | minor mode. It is called M-x flyspell-mode. You don't have to remember | |
3716 | any other special commands to use it, and you will hardly notice it | |
3717 | except when you make a spelling error. Flyspell works by highlighting | |
3718 | incorrect words as soon as they are completed or as soon as the cursor | |
3719 | hits a new word. | |
3720 | ||
3721 | Flyspell mode works with whichever dictionary you have selected for | |
3722 | Ispell in Emacs. In TeX mode, it understands TeX syntax so as not | |
3723 | to be confused by TeX commands. | |
3724 | ||
3725 | You can correct a misspelled word by editing it into something | |
3726 | correct. You can also correct it, or accept it as correct, by | |
3727 | clicking on the word with Mouse-2; that gives you a pop-up menu | |
3728 | of various alternative replacements and actions. | |
3729 | ||
3730 | Flyspell mode also proposes "automatic" corrections. M-TAB replaces | |
3731 | the current misspelled word with a possible correction. If several | |
3732 | corrections are made possible, M-TAB cycles through them in | |
3733 | alphabetical order, or in order of decreasing likelihood if | |
3734 | flyspell-sort-corrections is nil. | |
3735 | ||
3736 | Flyspell mode also flags an error when a word is repeated, if | |
3737 | flyspell-mark-duplications-flag is non-nil. | |
3738 | ||
3739 | ** Changes in input method usage. | |
3740 | ||
3741 | Now you can use arrow keys (right, left, down, up) for selecting among | |
3742 | the alternatives just the same way as you do by C-f, C-b, C-n, and C-p | |
3743 | respectively. | |
3744 | ||
3745 | You can use the ENTER key to accept the current conversion. | |
3746 | ||
3747 | If you type TAB to display a list of alternatives, you can select one | |
3748 | of the alternatives with Mouse-2. | |
3749 | ||
3750 | The meaning of the variable `input-method-verbose-flag' is changed so | |
3751 | that you can set it to t, nil, `default', or `complex-only'. | |
3752 | ||
3753 | If the value is nil, extra guidance is never given. | |
3754 | ||
3755 | If the value is t, extra guidance is always given. | |
3756 | ||
3757 | If the value is `complex-only', extra guidance is always given only | |
3758 | when you are using complex input methods such as chinese-py. | |
3759 | ||
3760 | If the value is `default' (this is the default), extra guidance is | |
79214ddf | 3761 | given in the following case: |
a933dad1 DL |
3762 | o When you are using a complex input method. |
3763 | o When you are using a simple input method but not in the minibuffer. | |
3764 | ||
3765 | If you are using Emacs through a very slow line, setting | |
3766 | input-method-verbose-flag to nil or to complex-only is a good choice, | |
3767 | and if you are using an input method you are not familiar with, | |
3768 | setting it to t is helpful. | |
3769 | ||
3770 | The old command select-input-method is now called set-input-method. | |
3771 | ||
3772 | In the language environment "Korean", you can use the following | |
3773 | keys: | |
3774 | Shift-SPC toggle-korean-input-method | |
3775 | C-F9 quail-hangul-switch-symbol-ksc | |
3776 | F9 quail-hangul-switch-hanja | |
3777 | These key bindings are canceled when you switch to another language | |
3778 | environment. | |
3779 | ||
3780 | ** The minibuffer history of file names now records the specified file | |
3781 | names, not the entire minibuffer input. For example, if the | |
3782 | minibuffer starts out with /usr/foo/, you might type in /etc/passwd to | |
3783 | get | |
3784 | ||
3785 | /usr/foo//etc/passwd | |
3786 | ||
3787 | which stands for the file /etc/passwd. | |
3788 | ||
3789 | Formerly, this used to put /usr/foo//etc/passwd in the history list. | |
3790 | Now this puts just /etc/passwd in the history list. | |
3791 | ||
3792 | ** If you are root, Emacs sets backup-by-copying-when-mismatch to t | |
3793 | at startup, so that saving a file will be sure to preserve | |
3794 | its owner and group. | |
3795 | ||
3796 | ** find-func.el can now also find the place of definition of Emacs | |
3797 | Lisp variables in user-loaded libraries. | |
3798 | ||
3799 | ** C-x r t (string-rectangle) now deletes the existing rectangle | |
3800 | contents before inserting the specified string on each line. | |
3801 | ||
3802 | ** There is a new command delete-whitespace-rectangle | |
3803 | which deletes whitespace starting from a particular column | |
3804 | in all the lines on a rectangle. The column is specified | |
3805 | by the left edge of the rectangle. | |
3806 | ||
3807 | ** You can now store a number into a register with C-u NUMBER C-x r n REG, | |
3808 | increment it by INC with C-u INC C-x r + REG (to increment by one, omit | |
3809 | C-u INC), and insert it in the buffer with C-x r g REG. This is useful | |
3810 | for writing keyboard macros. | |
3811 | ||
3812 | ** The new command M-x speedbar displays a frame in which directories, | |
3813 | files, and tags can be displayed, manipulated, and jumped to. The | |
3814 | frame defaults to 20 characters in width, and is the same height as | |
3815 | the frame that it was started from. Some major modes define | |
3816 | additional commands for the speedbar, including Rmail, GUD/GDB, and | |
3817 | info. | |
3818 | ||
3819 | ** query-replace-regexp is now bound to C-M-%. | |
3820 | ||
3821 | ** In Transient Mark mode, when the region is active, M-x | |
3822 | query-replace and the other replace commands now operate on the region | |
3823 | contents only. | |
3824 | ||
3825 | ** M-x write-region, when used interactively, now asks for | |
3826 | confirmation before overwriting an existing file. When you call | |
3827 | the function from a Lisp program, a new optional argument CONFIRM | |
3828 | says whether to ask for confirmation in this case. | |
3829 | ||
3830 | ** If you use find-file-literally and the file is already visited | |
3831 | non-literally, the command asks you whether to revisit the file | |
3832 | literally. If you say no, it signals an error. | |
3833 | ||
3834 | ** Major modes defined with the "derived mode" feature | |
3835 | now use the proper name for the mode hook: WHATEVER-mode-hook. | |
3836 | Formerly they used the name WHATEVER-mode-hooks, but that is | |
3837 | inconsistent with Emacs conventions. | |
3838 | ||
3839 | ** shell-command-on-region (and shell-command) reports success or | |
3840 | failure if the command produces no output. | |
3841 | ||
3842 | ** Set focus-follows-mouse to nil if your window system or window | |
3843 | manager does not transfer focus to another window when you just move | |
3844 | the mouse. | |
3845 | ||
3846 | ** mouse-menu-buffer-maxlen has been renamed to | |
3847 | mouse-buffer-menu-maxlen to be consistent with the other related | |
3848 | function and variable names. | |
3849 | ||
3850 | ** The new variable auto-coding-alist specifies coding systems for | |
3851 | reading specific files. This has higher priority than | |
3852 | file-coding-system-alist. | |
3853 | ||
3854 | ** If you set the variable unibyte-display-via-language-environment to | |
3855 | t, then Emacs displays non-ASCII characters are displayed by | |
3856 | converting them to the equivalent multibyte characters according to | |
3857 | the current language environment. As a result, they are displayed | |
3858 | according to the current fontset. | |
3859 | ||
3860 | ** C-q's handling of codes in the range 0200 through 0377 is changed. | |
3861 | ||
3862 | The codes in the range 0200 through 0237 are inserted as one byte of | |
3863 | that code regardless of the values of nonascii-translation-table and | |
3864 | nonascii-insert-offset. | |
3865 | ||
3866 | For the codes in the range 0240 through 0377, if | |
3867 | enable-multibyte-characters is non-nil and nonascii-translation-table | |
3868 | nor nonascii-insert-offset can't convert them to valid multibyte | |
3869 | characters, they are converted to Latin-1 characters. | |
3870 | ||
3871 | ** If you try to find a file that is not read-accessible, you now get | |
3872 | an error, rather than an empty buffer and a warning. | |
3873 | ||
3874 | ** In the minibuffer history commands M-r and M-s, an upper case | |
3875 | letter in the regular expression forces case-sensitive search. | |
3876 | ||
3877 | ** In the *Help* buffer, cross-references to commands and variables | |
3878 | are inferred and hyperlinked. Use C-h m in Help mode for the relevant | |
3879 | command keys. | |
3880 | ||
3881 | ** M-x apropos-command, with a prefix argument, no longer looks for | |
3882 | user option variables--instead it looks for noninteractive functions. | |
3883 | ||
3884 | Meanwhile, the command apropos-variable normally searches for | |
3885 | user option variables; with a prefix argument, it looks at | |
3886 | all variables that have documentation. | |
3887 | ||
3888 | ** When you type a long line in the minibuffer, and the minibuffer | |
3889 | shows just one line, automatically scrolling works in a special way | |
3890 | that shows you overlap with the previous line of text. The variable | |
3891 | minibuffer-scroll-overlap controls how many characters of overlap | |
3892 | it should show; the default is 20. | |
3893 | ||
3894 | Meanwhile, Resize Minibuffer mode is still available; in that mode, | |
3895 | the minibuffer grows taller (up to a point) as needed to show the whole | |
3896 | of your input. | |
3897 | ||
3898 | ** The new command M-x customize-changed-options lets you customize | |
3899 | all the options whose meanings or default values have changed in | |
3900 | recent Emacs versions. You specify a previous Emacs version number as | |
3901 | argument, and the command creates a customization buffer showing all | |
3902 | the customizable options which were changed since that version. | |
3903 | Newly added options are included as well. | |
3904 | ||
3905 | If you don't specify a particular version number argument, | |
3906 | then the customization buffer shows all the customizable options | |
3907 | for which Emacs versions of changes are recorded. | |
3908 | ||
3909 | This function is also bound to the Changed Options entry in the | |
3910 | Customize menu. | |
3911 | ||
3912 | ** When you run M-x grep with a prefix argument, it figures out | |
3913 | the tag around point and puts that into the default grep command. | |
3914 | ||
3915 | ** The new command M-* (pop-tag-mark) pops back through a history of | |
3916 | buffer positions from which M-. or other tag-finding commands were | |
3917 | invoked. | |
3918 | ||
3919 | ** The new variable comment-padding specifies the number of spaces | |
3920 | that `comment-region' will insert before the actual text of the comment. | |
3921 | The default is 1. | |
3922 | ||
3923 | ** In Fortran mode the characters `.', `_' and `$' now have symbol | |
3924 | syntax, not word syntax. Fortran mode now supports `imenu' and has | |
3925 | new commands fortran-join-line (M-^) and fortran-narrow-to-subprogram | |
3926 | (C-x n d). M-q can be used to fill a statement or comment block | |
3927 | sensibly. | |
3928 | ||
3929 | ** GUD now supports jdb, the Java debugger, and pdb, the Python debugger. | |
3930 | ||
3931 | ** If you set the variable add-log-keep-changes-together to a non-nil | |
3932 | value, the command `C-x 4 a' will automatically notice when you make | |
3933 | two entries in one day for one file, and combine them. | |
3934 | ||
3935 | ** You can use the command M-x diary-mail-entries to mail yourself a | |
3936 | reminder about upcoming diary entries. See the documentation string | |
3937 | for a sample shell script for calling this function automatically | |
3938 | every night. | |
3939 | ||
7464346d GM |
3940 | ** Desktop changes |
3941 | ||
3942 | *** All you need to do to enable use of the Desktop package, is to set | |
a933dad1 DL |
3943 | the variable desktop-enable to t with Custom. |
3944 | ||
7464346d GM |
3945 | *** Minor modes are now restored. Which minor modes are restored |
3946 | and how modes are restored is controlled by `desktop-minor-mode-table'. | |
3947 | ||
a933dad1 DL |
3948 | ** There is no need to do anything special, now, to enable Gnus to |
3949 | read and post multi-lingual articles. | |
3950 | ||
3951 | ** Outline mode has now support for showing hidden outlines when | |
3952 | doing an isearch. In order for this to happen search-invisible should | |
3953 | be set to open (the default). If an isearch match is inside a hidden | |
3954 | outline the outline is made visible. If you continue pressing C-s and | |
3955 | the match moves outside the formerly invisible outline, the outline is | |
79214ddf | 3956 | made invisible again. |
a933dad1 DL |
3957 | |
3958 | ** Mail reading and sending changes | |
3959 | ||
3960 | *** The Rmail e command now switches to displaying the whole header of | |
3961 | the message before it lets you edit the message. This is so that any | |
3962 | changes you make in the header will not be lost if you subsequently | |
3963 | toggle. | |
3964 | ||
3965 | *** The w command in Rmail, which writes the message body into a file, | |
3966 | now works in the summary buffer as well. (The command to delete the | |
3967 | summary buffer is now Q.) The default file name for the w command, if | |
3968 | the message has no subject, is stored in the variable | |
3969 | rmail-default-body-file. | |
3970 | ||
3971 | *** Most of the commands and modes that operate on mail and netnews no | |
3972 | longer depend on the value of mail-header-separator. Instead, they | |
3973 | handle whatever separator the buffer happens to use. | |
3974 | ||
3975 | *** If you set mail-signature to a value which is not t, nil, or a string, | |
3976 | it should be an expression. When you send a message, this expression | |
3977 | is evaluated to insert the signature. | |
3978 | ||
3979 | *** The new Lisp library feedmail.el (version 8) enhances processing of | |
3980 | outbound email messages. It works in coordination with other email | |
3981 | handling packages (e.g., rmail, VM, gnus) and is responsible for | |
3982 | putting final touches on messages and actually submitting them for | |
3983 | transmission. Users of the emacs program "fakemail" might be | |
3984 | especially interested in trying feedmail. | |
3985 | ||
3986 | feedmail is not enabled by default. See comments at the top of | |
3987 | feedmail.el for set-up instructions. Among the bigger features | |
3988 | provided by feedmail are: | |
3989 | ||
3990 | **** you can park outgoing messages into a disk-based queue and | |
3991 | stimulate sending some or all of them later (handy for laptop users); | |
3992 | there is also a queue for draft messages | |
3993 | ||
3994 | **** you can get one last look at the prepped outbound message and | |
3995 | be prompted for confirmation | |
3996 | ||
3997 | **** does smart filling of address headers | |
3998 | ||
3999 | **** can generate a MESSAGE-ID: line and a DATE: line; the date can be | |
4000 | the time the message was written or the time it is being sent; this | |
4001 | can make FCC copies more closely resemble copies that recipients get | |
4002 | ||
4003 | **** you can specify an arbitrary function for actually transmitting | |
4004 | the message; included in feedmail are interfaces for /bin/[r]mail, | |
4005 | /usr/lib/sendmail, and elisp smtpmail; it's easy to write a new | |
4006 | function for something else (10-20 lines of elisp) | |
4007 | ||
4008 | ** Dired changes | |
4009 | ||
4010 | *** The Dired function dired-do-toggle, which toggles marked and unmarked | |
4011 | files, is now bound to "t" instead of "T". | |
4012 | ||
4013 | *** dired-at-point has been added to ffap.el. It allows one to easily | |
4014 | run Dired on the directory name at point. | |
4015 | ||
4016 | *** Dired has a new command: %g. It searches the contents of | |
4017 | files in the directory and marks each file that contains a match | |
4018 | for a specified regexp. | |
4019 | ||
4020 | ** VC Changes | |
4021 | ||
4022 | *** New option vc-ignore-vc-files lets you turn off version control | |
4023 | conveniently. | |
4024 | ||
4025 | *** VC Dired has been completely rewritten. It is now much | |
4026 | faster, especially for CVS, and works very similar to ordinary | |
4027 | Dired. | |
4028 | ||
4029 | VC Dired is invoked by typing C-x v d and entering the name of the | |
4030 | directory to display. By default, VC Dired gives you a recursive | |
4031 | listing of all files at or below the given directory which are | |
4032 | currently locked (for CVS, all files not up-to-date are shown). | |
4033 | ||
4034 | You can change the listing format by setting vc-dired-recurse to nil, | |
4035 | then it shows only the given directory, and you may also set | |
4036 | vc-dired-terse-display to nil, then it shows all files under version | |
4037 | control plus the names of any subdirectories, so that you can type `i' | |
4038 | on such lines to insert them manually, as in ordinary Dired. | |
4039 | ||
4040 | All Dired commands operate normally in VC Dired, except for `v', which | |
4041 | is redefined as the version control prefix. That means you may type | |
4042 | `v l', `v =' etc. to invoke `vc-print-log', `vc-diff' and the like on | |
4043 | the file named in the current Dired buffer line. `v v' invokes | |
4044 | `vc-next-action' on this file, or on all files currently marked. | |
4045 | ||
4046 | The new command `v t' (vc-dired-toggle-terse-mode) allows you to | |
4047 | toggle between terse display (only locked files) and full display (all | |
79214ddf | 4048 | VC files plus subdirectories). There is also a special command, |
a933dad1 DL |
4049 | `* l', to mark all files currently locked. |
4050 | ||
4051 | Giving a prefix argument to C-x v d now does the same thing as in | |
4052 | ordinary Dired: it allows you to supply additional options for the ls | |
4053 | command in the minibuffer, to fine-tune VC Dired's output. | |
4054 | ||
4055 | *** Under CVS, if you merge changes from the repository into a working | |
4056 | file, and CVS detects conflicts, VC now offers to start an ediff | |
4057 | session to resolve them. | |
4058 | ||
4059 | Alternatively, you can use the new command `vc-resolve-conflicts' to | |
4060 | resolve conflicts in a file at any time. It works in any buffer that | |
4061 | contains conflict markers as generated by rcsmerge (which is what CVS | |
4062 | uses as well). | |
4063 | ||
4064 | *** You can now transfer changes between branches, using the new | |
4065 | command vc-merge (C-x v m). It is implemented for RCS and CVS. When | |
4066 | you invoke it in a buffer under version-control, you can specify | |
4067 | either an entire branch or a pair of versions, and the changes on that | |
4068 | branch or between the two versions are merged into the working file. | |
4069 | If this results in any conflicts, they may be resolved interactively, | |
4070 | using ediff. | |
4071 | ||
4072 | ** Changes in Font Lock | |
4073 | ||
4074 | *** The face and variable previously known as font-lock-reference-face | |
4075 | are now called font-lock-constant-face to better reflect their typical | |
4076 | use for highlighting constants and labels. (Its face properties are | |
4077 | unchanged.) The variable font-lock-reference-face remains for now for | |
4078 | compatibility reasons, but its value is font-lock-constant-face. | |
4079 | ||
4080 | ** Frame name display changes | |
4081 | ||
4082 | *** The command set-frame-name lets you set the name of the current | |
4083 | frame. You can use the new command select-frame-by-name to select and | |
4084 | raise a frame; this is mostly useful on character-only terminals, or | |
4085 | when many frames are invisible or iconified. | |
4086 | ||
4087 | *** On character-only terminal (not a window system), changing the | |
4088 | frame name is now reflected on the mode line and in the Buffers/Frames | |
4089 | menu. | |
4090 | ||
4091 | ** Comint (subshell) changes | |
4092 | ||
4093 | *** In Comint modes, the commands to kill, stop or interrupt a | |
4094 | subjob now also kill pending input. This is for compatibility | |
4095 | with ordinary shells, where the signal characters do this. | |
4096 | ||
4097 | *** There are new commands in Comint mode. | |
4098 | ||
4099 | C-c C-x fetches the "next" line from the input history; | |
4100 | that is, the line after the last line you got. | |
4101 | You can use this command to fetch successive lines, one by one. | |
4102 | ||
4103 | C-c SPC accumulates lines of input. More precisely, it arranges to | |
4104 | send the current line together with the following line, when you send | |
4105 | the following line. | |
4106 | ||
4107 | C-c C-a if repeated twice consecutively now moves to the process mark, | |
4108 | which separates the pending input from the subprocess output and the | |
4109 | previously sent input. | |
4110 | ||
4111 | C-c M-r now runs comint-previous-matching-input-from-input; | |
4112 | it searches for a previous command, using the current pending input | |
4113 | as the search string. | |
4114 | ||
4115 | *** New option compilation-scroll-output can be set to scroll | |
4116 | automatically in compilation-mode windows. | |
4117 | ||
4118 | ** C mode changes | |
4119 | ||
4120 | *** Multiline macros are now handled, both as they affect indentation, | |
4121 | and as recognized syntax. New syntactic symbol cpp-macro-cont is | |
4122 | assigned to second and subsequent lines of a multiline macro | |
79214ddf | 4123 | definition. |
a933dad1 DL |
4124 | |
4125 | *** A new style "user" which captures all non-hook-ified | |
4126 | (i.e. top-level) .emacs file variable settings and customizations. | |
4127 | Style "cc-mode" is an alias for "user" and is deprecated. "gnu" | |
4128 | style is still the default however. | |
4129 | ||
4130 | *** "java" style now conforms to Sun's JDK coding style. | |
4131 | ||
4132 | *** There are new commands c-beginning-of-defun, c-end-of-defun which | |
4133 | are alternatives which you could bind to C-M-a and C-M-e if you prefer | |
4134 | them. They do not have key bindings by default. | |
4135 | ||
4136 | *** New and improved implementations of M-a (c-beginning-of-statement) | |
4137 | and M-e (c-end-of-statement). | |
4138 | ||
4139 | *** C++ namespace blocks are supported, with new syntactic symbols | |
4140 | namespace-open, namespace-close, and innamespace. | |
4141 | ||
4142 | *** File local variable settings of c-file-style and c-file-offsets | |
4143 | makes the style variables local to that buffer only. | |
4144 | ||
4145 | *** New indentation functions c-lineup-close-paren, | |
4146 | c-indent-one-line-block, c-lineup-dont-change. | |
4147 | ||
4148 | *** Improvements (hopefully!) to the way CC Mode is loaded. You | |
4149 | should now be able to do a (require 'cc-mode) to get the entire | |
4150 | package loaded properly for customization in your .emacs file. A new | |
4151 | variable c-initialize-on-load controls this and is t by default. | |
4152 | ||
4153 | ** Changes to hippie-expand. | |
4154 | ||
79214ddf | 4155 | *** New customization variable `hippie-expand-dabbrev-skip-space'. If |
a933dad1 DL |
4156 | non-nil, trailing spaces may be included in the abbreviation to search for, |
4157 | which then gives the same behavior as the original `dabbrev-expand'. | |
4158 | ||
4159 | *** New customization variable `hippie-expand-dabbrev-as-symbol'. If | |
4160 | non-nil, characters of syntax '_' is considered part of the word when | |
4161 | expanding dynamically. | |
4162 | ||
4163 | *** New customization variable `hippie-expand-no-restriction'. If | |
4164 | non-nil, narrowed buffers are widened before they are searched. | |
4165 | ||
4166 | *** New customization variable `hippie-expand-only-buffers'. If | |
4167 | non-empty, buffers searched are restricted to the types specified in | |
4168 | this list. Useful for example when constructing new special-purpose | |
4169 | expansion functions with `make-hippie-expand-function'. | |
4170 | ||
4171 | *** Text properties of the expansion are no longer copied. | |
4172 | ||
4173 | ** Changes in BibTeX mode. | |
4174 | ||
4175 | *** Any titleword matching a regexp in the new variable | |
4176 | bibtex-autokey-titleword-ignore (case sensitive) is ignored during | |
4177 | automatic key generation. This replaces variable | |
4178 | bibtex-autokey-titleword-first-ignore, which only checked for matches | |
4179 | against the first word in the title. | |
4180 | ||
4181 | *** Autokey generation now uses all words from the title, not just | |
4182 | capitalized words. To avoid conflicts with existing customizations, | |
4183 | bibtex-autokey-titleword-ignore is set up such that words starting with | |
79214ddf | 4184 | lowerkey characters will still be ignored. Thus, if you want to use |
a933dad1 | 4185 | lowercase words from the title, you will have to overwrite the |
79214ddf | 4186 | bibtex-autokey-titleword-ignore standard setting. |
a933dad1 DL |
4187 | |
4188 | *** Case conversion of names and title words for automatic key | |
4189 | generation is more flexible. Variable bibtex-autokey-preserve-case is | |
4190 | replaced by bibtex-autokey-titleword-case-convert and | |
4191 | bibtex-autokey-name-case-convert. | |
4192 | ||
4193 | ** Changes in vcursor.el. | |
4194 | ||
4195 | *** Support for character terminals is available: there is a new keymap | |
4196 | and the vcursor will appear as an arrow between buffer text. A | |
4197 | variable `vcursor-interpret-input' allows input from the vcursor to be | |
4198 | entered exactly as if typed. Numerous functions, including | |
4199 | `vcursor-compare-windows', have been rewritten to improve consistency | |
4200 | in the selection of windows and corresponding keymaps. | |
4201 | ||
4202 | *** vcursor options can now be altered with M-x customize under the | |
4203 | Editing group once the package is loaded. | |
4204 | ||
4205 | *** Loading vcursor now does not define keys by default, as this is | |
4206 | generally a bad side effect. Use M-x customize to set | |
4207 | vcursor-key-bindings to t to restore the old behaviour. | |
4208 | ||
4209 | *** vcursor-auto-disable can be `copy', which turns off copying from the | |
4210 | vcursor, but doesn't disable it, after any non-vcursor command. | |
4211 | ||
4212 | ** Ispell changes. | |
4213 | ||
79214ddf FP |
4214 | *** You can now spell check comments and strings in the current |
4215 | buffer with M-x ispell-comments-and-strings. Comments and strings | |
a933dad1 DL |
4216 | are identified by syntax tables in effect. |
4217 | ||
4218 | *** Generic region skipping implemented. | |
4219 | A single buffer can be broken into a number of regions where text will | |
4220 | and will not be checked. The definitions of the regions can be user | |
4221 | defined. New applications and improvements made available by this | |
79214ddf | 4222 | include: |
a933dad1 DL |
4223 | |
4224 | o URLs are automatically skipped | |
4225 | o EMail message checking is vastly improved. | |
4226 | ||
4227 | *** Ispell can highlight the erroneous word even on non-window terminals. | |
4228 | ||
4229 | ** Changes to RefTeX mode | |
4230 | ||
4231 | RefTeX has been updated in order to make it more usable with very | |
4232 | large projects (like a several volume math book). The parser has been | |
4233 | re-written from scratch. To get maximum speed from RefTeX, check the | |
4234 | section `Optimizations' in the manual. | |
4235 | ||
4236 | *** New recursive parser. | |
4237 | ||
4238 | The old version of RefTeX created a single large buffer containing the | |
4239 | entire multifile document in order to parse the document. The new | |
4240 | recursive parser scans the individual files. | |
4241 | ||
4242 | *** Parsing only part of a document. | |
79214ddf | 4243 | |
a933dad1 DL |
4244 | Reparsing of changed document parts can now be made faster by enabling |
4245 | partial scans. To use this feature, read the documentation string of | |
4246 | the variable `reftex-enable-partial-scans' and set the variable to t. | |
4247 | ||
4248 | (setq reftex-enable-partial-scans t) | |
4249 | ||
4250 | *** Storing parsing information in a file. | |
4251 | ||
4252 | This can improve startup times considerably. To turn it on, use | |
4253 | ||
4254 | (setq reftex-save-parse-info t) | |
4255 | ||
4256 | *** Using multiple selection buffers | |
4257 | ||
4258 | If the creation of label selection buffers is too slow (this happens | |
4259 | for large documents), you can reuse these buffers by setting | |
4260 | ||
4261 | (setq reftex-use-multiple-selection-buffers t) | |
4262 | ||
4263 | *** References to external documents. | |
4264 | ||
4265 | The LaTeX package `xr' allows to cross-reference labels in external | |
4266 | documents. RefTeX can provide information about the external | |
4267 | documents as well. To use this feature, set up the \externaldocument | |
4268 | macros required by the `xr' package and rescan the document with | |
4269 | RefTeX. The external labels can then be accessed with the `x' key in | |
4270 | the selection buffer provided by `reftex-reference' (bound to `C-c )'). | |
4271 | The `x' key also works in the table of contents buffer. | |
4272 | ||
4273 | *** Many more labeled LaTeX environments are recognized by default. | |
4274 | ||
4275 | The builtin command list now covers all the standard LaTeX commands, | |
4276 | and all of the major packages included in the LaTeX distribution. | |
4277 | ||
4278 | Also, RefTeX now understands the \appendix macro and changes | |
4279 | the enumeration of sections in the *toc* buffer accordingly. | |
4280 | ||
4281 | *** Mouse support for selection and *toc* buffers | |
4282 | ||
4283 | The mouse can now be used to select items in the selection and *toc* | |
4284 | buffers. See also the new option `reftex-highlight-selection'. | |
4285 | ||
4286 | *** New keymaps for selection and table of contents modes. | |
4287 | ||
4288 | The selection processes for labels and citation keys, and the table of | |
4289 | contents buffer now have their own keymaps: `reftex-select-label-map', | |
4290 | `reftex-select-bib-map', `reftex-toc-map'. The selection processes | |
4291 | have a number of new keys predefined. In particular, TAB lets you | |
4292 | enter a label with completion. Check the on-the-fly help (press `?' | |
4293 | at the selection prompt) or read the Info documentation to find out | |
4294 | more. | |
4295 | ||
4296 | *** Support for the varioref package | |
4297 | ||
4298 | The `v' key in the label selection buffer toggles \ref versus \vref. | |
4299 | ||
4300 | *** New hooks | |
4301 | ||
4302 | Three new hooks can be used to redefine the way labels, references, | |
4303 | and citations are created. These hooks are | |
4304 | `reftex-format-label-function', `reftex-format-ref-function', | |
4305 | `reftex-format-cite-function'. | |
4306 | ||
4307 | *** Citations outside LaTeX | |
4308 | ||
4309 | The command `reftex-citation' may also be used outside LaTeX (e.g. in | |
4310 | a mail buffer). See the Info documentation for details. | |
4311 | ||
4312 | *** Short context is no longer fontified. | |
4313 | ||
4314 | The short context in the label menu no longer copies the | |
4315 | fontification from the text in the buffer. If you prefer it to be | |
4316 | fontified, use | |
4317 | ||
4318 | (setq reftex-refontify-context t) | |
4319 | ||
4320 | ** file-cache-minibuffer-complete now accepts a prefix argument. | |
4321 | With a prefix argument, it does not try to do completion of | |
4322 | the file name within its directory; it only checks for other | |
4323 | directories that contain the same file name. | |
4324 | ||
4325 | Thus, given the file name Makefile, and assuming that a file | |
4326 | Makefile.in exists in the same directory, ordinary | |
4327 | file-cache-minibuffer-complete will try to complete Makefile to | |
4328 | Makefile.in and will therefore never look for other directories that | |
4329 | have Makefile. A prefix argument tells it not to look for longer | |
4330 | names such as Makefile.in, so that instead it will look for other | |
4331 | directories--just as if the name were already complete in its present | |
4332 | directory. | |
4333 | ||
4334 | ** New modes and packages | |
4335 | ||
4336 | *** There is a new alternative major mode for Perl, Cperl mode. | |
4337 | It has many more features than Perl mode, and some people prefer | |
4338 | it, but some do not. | |
4339 | ||
4340 | *** There is a new major mode, M-x vhdl-mode, for editing files of VHDL | |
4341 | code. | |
4342 | ||
4343 | *** M-x which-function-mode enables a minor mode that displays the | |
4344 | current function name continuously in the mode line, as you move | |
4345 | around in a buffer. | |
4346 | ||
4347 | Which Function mode is effective in major modes which support Imenu. | |
4348 | ||
4349 | *** Gametree is a major mode for editing game analysis trees. The author | |
4350 | uses it for keeping notes about his postal Chess games, but it should | |
4351 | be helpful for other two-player games as well, as long as they have an | |
4352 | established system of notation similar to Chess. | |
4353 | ||
4354 | *** The new minor mode checkdoc-minor-mode provides Emacs Lisp | |
4355 | documentation string checking for style and spelling. The style | |
4356 | guidelines are found in the Emacs Lisp programming manual. | |
4357 | ||
4358 | *** The net-utils package makes some common networking features | |
4359 | available in Emacs. Some of these functions are wrappers around | |
4360 | system utilities (ping, nslookup, etc); others are implementations of | |
4361 | simple protocols (finger, whois) in Emacs Lisp. There are also | |
4362 | functions to make simple connections to TCP/IP ports for debugging and | |
4363 | the like. | |
4364 | ||
4365 | *** highlight-changes-mode is a minor mode that uses colors to | |
4366 | identify recently changed parts of the buffer text. | |
4367 | ||
4368 | *** The new package `midnight' lets you specify things to be done | |
4369 | within Emacs at midnight--by default, kill buffers that you have not | |
4370 | used in a considerable time. To use this feature, customize | |
4371 | the user option `midnight-mode' to t. | |
4372 | ||
4373 | *** The file generic-x.el defines a number of simple major modes. | |
4374 | ||
4375 | apache-generic-mode: For Apache and NCSA httpd configuration files | |
4376 | samba-generic-mode: Samba configuration files | |
4377 | fvwm-generic-mode: For fvwm initialization files | |
4378 | x-resource-generic-mode: For X resource files | |
4379 | hosts-generic-mode: For hosts files (.rhosts, /etc/hosts, etc) | |
4380 | mailagent-rules-generic-mode: For mailagent .rules files | |
4381 | javascript-generic-mode: For JavaScript files | |
4382 | vrml-generic-mode: For VRML files | |
4383 | java-manifest-generic-mode: For Java MANIFEST files | |
4384 | java-properties-generic-mode: For Java property files | |
4385 | mailrc-generic-mode: For .mailrc files | |
4386 | ||
4387 | Platform-specific modes: | |
4388 | ||
4389 | prototype-generic-mode: For Solaris/Sys V prototype files | |
4390 | pkginfo-generic-mode: For Solaris/Sys V pkginfo files | |
4391 | alias-generic-mode: For C shell alias files | |
4392 | inf-generic-mode: For MS-Windows INF files | |
4393 | ini-generic-mode: For MS-Windows INI files | |
4394 | reg-generic-mode: For MS-Windows Registry files | |
4395 | bat-generic-mode: For MS-Windows BAT scripts | |
4396 | rc-generic-mode: For MS-Windows Resource files | |
4397 | rul-generic-mode: For InstallShield scripts | |
4398 | \f | |
4399 | * Lisp changes in Emacs 20.3 since the Emacs Lisp Manual was published | |
4400 | ||
4401 | ** If you want a Lisp file to be read in unibyte mode, | |
4402 | use -*-unibyte: t;-*- on its first line. | |
4403 | That will force Emacs to read that file in unibyte mode. | |
4404 | Otherwise, the file will be loaded and byte-compiled in multibyte mode. | |
4405 | ||
4406 | Thus, each lisp file is read in a consistent way regardless of whether | |
4407 | you started Emacs with --unibyte, so that a Lisp program gives | |
4408 | consistent results regardless of how Emacs was started. | |
4409 | ||
4410 | ** The new function assoc-default is useful for searching an alist, | |
4411 | and using a default value if the key is not found there. You can | |
4412 | specify a comparison predicate, so this function is useful for | |
4413 | searching comparing a string against an alist of regular expressions. | |
4414 | ||
4415 | ** The functions unibyte-char-to-multibyte and | |
4416 | multibyte-char-to-unibyte convert between unibyte and multibyte | |
4417 | character codes, in a way that is appropriate for the current language | |
4418 | environment. | |
4419 | ||
4420 | ** The functions read-event, read-char and read-char-exclusive now | |
4421 | take two optional arguments. PROMPT, if non-nil, specifies a prompt | |
4422 | string. SUPPRESS-INPUT-METHOD, if non-nil, says to disable the | |
4423 | current input method for reading this one event. | |
4424 | ||
4425 | ** Two new variables print-escape-nonascii and print-escape-multibyte | |
4426 | now control whether to output certain characters as | |
4427 | backslash-sequences. print-escape-nonascii applies to single-byte | |
4428 | non-ASCII characters; print-escape-multibyte applies to multibyte | |
4429 | characters. Both of these variables are used only when printing | |
4430 | in readable fashion (prin1 uses them, princ does not). | |
4431 | \f | |
4432 | * Lisp changes in Emacs 20.3 before the Emacs Lisp Manual was published | |
4433 | ||
4434 | ** Compiled Emacs Lisp files made with the modified "MBSK" version | |
4435 | of Emacs 20.2 do not work in Emacs 20.3. | |
4436 | ||
4437 | ** Buffer positions are now measured in characters, as they were | |
4438 | in Emacs 19 and before. This means that (forward-char 1) | |
4439 | always increases point by 1. | |
4440 | ||
4441 | The function chars-in-region now just subtracts its arguments. It is | |
4442 | considered obsolete. The function char-boundary-p has been deleted. | |
4443 | ||
4444 | See below for additional changes relating to multibyte characters. | |
4445 | ||
4446 | ** defcustom, defface and defgroup now accept the keyword `:version'. | |
4447 | Use this to specify in which version of Emacs a certain variable's | |
4448 | default value changed. For example, | |
4449 | ||
4450 | (defcustom foo-max 34 "*Maximum number of foo's allowed." | |
4451 | :type 'integer | |
4452 | :group 'foo | |
4453 | :version "20.3") | |
4454 | ||
79214ddf | 4455 | (defgroup foo-group nil "The foo group." |
a933dad1 DL |
4456 | :version "20.3") |
4457 | ||
4458 | If an entire new group is added or the variables in it have the | |
4459 | default values changed, then just add a `:version' to that group. It | |
4460 | is recommended that new packages added to the distribution contain a | |
4461 | `:version' in the top level group. | |
4462 | ||
4463 | This information is used to control the customize-changed-options command. | |
4464 | ||
4465 | ** It is now an error to change the value of a symbol whose name | |
4466 | starts with a colon--if it is interned in the standard obarray. | |
4467 | ||
4468 | However, setting such a symbol to its proper value, which is that | |
4469 | symbol itself, is not an error. This is for the sake of programs that | |
4470 | support previous Emacs versions by explicitly setting these variables | |
4471 | to themselves. | |
4472 | ||
4473 | If you set the variable keyword-symbols-constant-flag to nil, | |
4474 | this error is suppressed, and you can set these symbols to any | |
4475 | values whatever. | |
4476 | ||
4477 | ** There is a new debugger command, R. | |
4478 | It evaluates an expression like e, but saves the result | |
4479 | in the buffer *Debugger-record*. | |
4480 | ||
4481 | ** Frame-local variables. | |
4482 | ||
4483 | You can now make a variable local to various frames. To do this, call | |
4484 | the function make-variable-frame-local; this enables frames to have | |
4485 | local bindings for that variable. | |
4486 | ||
4487 | These frame-local bindings are actually frame parameters: you create a | |
4488 | frame-local binding in a specific frame by calling | |
4489 | modify-frame-parameters and specifying the variable name as the | |
4490 | parameter name. | |
4491 | ||
4492 | Buffer-local bindings take precedence over frame-local bindings. | |
4493 | Thus, if the current buffer has a buffer-local binding, that binding is | |
4494 | active; otherwise, if the selected frame has a frame-local binding, | |
4495 | that binding is active; otherwise, the default binding is active. | |
4496 | ||
4497 | It would not be hard to implement window-local bindings, but it is not | |
4498 | clear that this would be very useful; windows tend to come and go in a | |
4499 | very transitory fashion, so that trying to produce any specific effect | |
4500 | through a window-local binding would not be very robust. | |
4501 | ||
4502 | ** `sregexq' and `sregex' are two new functions for constructing | |
4503 | "symbolic regular expressions." These are Lisp expressions that, when | |
4504 | evaluated, yield conventional string-based regexps. The symbolic form | |
4505 | makes it easier to construct, read, and maintain complex patterns. | |
4506 | See the documentation in sregex.el. | |
4507 | ||
4508 | ** parse-partial-sexp's return value has an additional element which | |
4509 | is used to pass information along if you pass it to another call to | |
4510 | parse-partial-sexp, starting its scan where the first call ended. | |
4511 | The contents of this field are not yet finalized. | |
4512 | ||
4513 | ** eval-region now accepts a fourth optional argument READ-FUNCTION. | |
4514 | If it is non-nil, that function is used instead of `read'. | |
4515 | ||
4516 | ** unload-feature by default removes the feature's functions from | |
4517 | known hooks to avoid trouble, but a package providing FEATURE can | |
4518 | define a hook FEATURE-unload-hook to be run by unload-feature instead. | |
4519 | ||
4520 | ** read-from-minibuffer no longer returns the argument DEFAULT-VALUE | |
4521 | when the user enters empty input. It now returns the null string, as | |
4522 | it did in Emacs 19. The default value is made available in the | |
4523 | history via M-n, but it is not applied here as a default. | |
4524 | ||
4525 | The other, more specialized minibuffer-reading functions continue to | |
4526 | return the default value (not the null string) when the user enters | |
4527 | empty input. | |
4528 | ||
4529 | ** The new variable read-buffer-function controls which routine to use | |
4530 | for selecting buffers. For example, if you set this variable to | |
4531 | `iswitchb-read-buffer', iswitchb will be used to read buffer names. | |
4532 | Other functions can also be used if they accept the same arguments as | |
4533 | `read-buffer' and return the selected buffer name as a string. | |
4534 | ||
4535 | ** The new function read-passwd reads a password from the terminal, | |
4536 | echoing a period for each character typed. It takes three arguments: | |
4537 | a prompt string, a flag which says "read it twice to make sure", and a | |
4538 | default password to use if the user enters nothing. | |
4539 | ||
4540 | ** The variable fill-nobreak-predicate gives major modes a way to | |
4541 | specify not to break a line at certain places. Its value is a | |
4542 | function which is called with no arguments, with point located at the | |
4543 | place where a break is being considered. If the function returns | |
4544 | non-nil, then the line won't be broken there. | |
4545 | ||
4546 | ** window-end now takes an optional second argument, UPDATE. | |
4547 | If this is non-nil, then the function always returns an accurate | |
4548 | up-to-date value for the buffer position corresponding to the | |
4549 | end of the window, even if this requires computation. | |
4550 | ||
4551 | ** other-buffer now takes an optional argument FRAME | |
4552 | which specifies which frame's buffer list to use. | |
4553 | If it is nil, that means use the selected frame's buffer list. | |
4554 | ||
4555 | ** The new variable buffer-display-time, always local in every buffer, | |
4556 | holds the value of (current-time) as of the last time that a window | |
4557 | was directed to display this buffer. | |
4558 | ||
4559 | ** It is now meaningful to compare two window-configuration objects | |
4560 | with `equal'. Two window-configuration objects are equal if they | |
4561 | describe equivalent arrangements of windows, in the same frame--in | |
4562 | other words, if they would give the same results if passed to | |
4563 | set-window-configuration. | |
4564 | ||
4565 | ** compare-window-configurations is a new function that compares two | |
4566 | window configurations loosely. It ignores differences in saved buffer | |
4567 | positions and scrolling, and considers only the structure and sizes of | |
4568 | windows and the choice of buffers to display. | |
4569 | ||
4570 | ** The variable minor-mode-overriding-map-alist allows major modes to | |
4571 | override the key bindings of a minor mode. The elements of this alist | |
4572 | look like the elements of minor-mode-map-alist: (VARIABLE . KEYMAP). | |
4573 | ||
4574 | If the VARIABLE in an element of minor-mode-overriding-map-alist has a | |
4575 | non-nil value, the paired KEYMAP is active, and totally overrides the | |
4576 | map (if any) specified for the same variable in minor-mode-map-alist. | |
4577 | ||
4578 | minor-mode-overriding-map-alist is automatically local in all buffers, | |
4579 | and it is meant to be set by major modes. | |
4580 | ||
4581 | ** The function match-string-no-properties is like match-string | |
4582 | except that it discards all text properties from the result. | |
4583 | ||
4584 | ** The function load-average now accepts an optional argument | |
4585 | USE-FLOATS. If it is non-nil, the load average values are returned as | |
4586 | floating point numbers, rather than as integers to be divided by 100. | |
4587 | ||
4588 | ** The new variable temporary-file-directory specifies the directory | |
4589 | to use for creating temporary files. The default value is determined | |
4590 | in a reasonable way for your operating system; on GNU and Unix systems | |
4591 | it is based on the TMP and TMPDIR environment variables. | |
4592 | ||
4593 | ** Menu changes | |
4594 | ||
4595 | *** easymenu.el now uses the new menu item format and supports the | |
4596 | keywords :visible and :filter. The existing keyword :keys is now | |
4597 | better supported. | |
4598 | ||
4599 | The variable `easy-menu-precalculate-equivalent-keybindings' controls | |
4600 | a new feature which calculates keyboard equivalents for the menu when | |
4601 | you define the menu. The default is t. If you rarely use menus, you | |
4602 | can set the variable to nil to disable this precalculation feature; | |
4603 | then the calculation is done only if you use the menu bar. | |
4604 | ||
4605 | *** A new format for menu items is supported. | |
4606 | ||
4607 | In a keymap, a key binding that has the format | |
4608 | (STRING . REAL-BINDING) or (STRING HELP-STRING . REAL-BINDING) | |
4609 | defines a menu item. Now a menu item definition may also be a list that | |
4610 | starts with the symbol `menu-item'. | |
4611 | ||
4612 | The format is: | |
4613 | (menu-item ITEM-NAME) or | |
4614 | (menu-item ITEM-NAME REAL-BINDING . ITEM-PROPERTY-LIST) | |
4615 | where ITEM-NAME is an expression which evaluates to the menu item | |
4616 | string, and ITEM-PROPERTY-LIST has the form of a property list. | |
4617 | The supported properties include | |
4618 | ||
4619 | :enable FORM Evaluate FORM to determine whether the | |
4620 | item is enabled. | |
4621 | :visible FORM Evaluate FORM to determine whether the | |
4622 | item should appear in the menu. | |
79214ddf | 4623 | :filter FILTER-FN |
a933dad1 DL |
4624 | FILTER-FN is a function of one argument, |
4625 | which will be REAL-BINDING. | |
4626 | It should return a binding to use instead. | |
4627 | :keys DESCRIPTION | |
4628 | DESCRIPTION is a string that describes an equivalent keyboard | |
4629 | binding for for REAL-BINDING. DESCRIPTION is expanded with | |
4630 | `substitute-command-keys' before it is used. | |
4631 | :key-sequence KEY-SEQUENCE | |
4632 | KEY-SEQUENCE is a key-sequence for an equivalent | |
4633 | keyboard binding. | |
4634 | :key-sequence nil | |
4635 | This means that the command normally has no | |
4636 | keyboard equivalent. | |
4637 | :help HELP HELP is the extra help string (not currently used). | |
4638 | :button (TYPE . SELECTED) | |
4639 | TYPE is :toggle or :radio. | |
4640 | SELECTED is a form, to be evaluated, and its | |
4641 | value says whether this button is currently selected. | |
4642 | ||
4643 | Buttons are at the moment only simulated by prefixes in the menu. | |
4644 | Eventually ordinary X-buttons may be supported. | |
4645 | ||
4646 | (menu-item ITEM-NAME) defines unselectable item. | |
4647 | ||
4648 | ** New event types | |
4649 | ||
4650 | *** The new event type `mouse-wheel' is generated by a wheel on a | |
4651 | mouse (such as the MS Intellimouse). The event contains a delta that | |
4652 | corresponds to the amount and direction that the wheel is rotated, | |
4653 | which is typically used to implement a scroll or zoom. The format is: | |
4654 | ||
4655 | (mouse-wheel POSITION DELTA) | |
4656 | ||
4657 | where POSITION is a list describing the position of the event in the | |
4658 | same format as a mouse-click event, and DELTA is a signed number | |
4659 | indicating the number of increments by which the wheel was rotated. A | |
4660 | negative DELTA indicates that the wheel was rotated backwards, towards | |
4661 | the user, and a positive DELTA indicates that the wheel was rotated | |
4662 | forward, away from the user. | |
4663 | ||
4664 | As of now, this event type is generated only on MS Windows. | |
4665 | ||
4666 | *** The new event type `drag-n-drop' is generated when a group of | |
4667 | files is selected in an application outside of Emacs, and then dragged | |
4668 | and dropped onto an Emacs frame. The event contains a list of | |
4669 | filenames that were dragged and dropped, which are then typically | |
4670 | loaded into Emacs. The format is: | |
4671 | ||
4672 | (drag-n-drop POSITION FILES) | |
4673 | ||
4674 | where POSITION is a list describing the position of the event in the | |
4675 | same format as a mouse-click event, and FILES is the list of filenames | |
4676 | that were dragged and dropped. | |
4677 | ||
4678 | As of now, this event type is generated only on MS Windows. | |
4679 | ||
4680 | ** Changes relating to multibyte characters. | |
4681 | ||
4682 | *** The variable enable-multibyte-characters is now read-only; | |
4683 | any attempt to set it directly signals an error. The only way | |
4684 | to change this value in an existing buffer is with set-buffer-multibyte. | |
4685 | ||
4686 | *** In a string constant, `\ ' now stands for "nothing at all". You | |
4687 | can use it to terminate a hex escape which is followed by a character | |
4688 | that could otherwise be read as part of the hex escape. | |
4689 | ||
4690 | *** String indices are now measured in characters, as they were | |
4691 | in Emacs 19 and before. | |
4692 | ||
4693 | The function chars-in-string has been deleted. | |
4694 | The function concat-chars has been renamed to `string'. | |
4695 | ||
4696 | *** The function set-buffer-multibyte sets the flag in the current | |
4697 | buffer that says whether the buffer uses multibyte representation or | |
4698 | unibyte representation. If the argument is nil, it selects unibyte | |
4699 | representation. Otherwise it selects multibyte representation. | |
4700 | ||
4701 | This function does not change the contents of the buffer, viewed | |
4702 | as a sequence of bytes. However, it does change the contents | |
4703 | viewed as characters; a sequence of two bytes which is treated as | |
4704 | one character when the buffer uses multibyte representation | |
4705 | will count as two characters using unibyte representation. | |
4706 | ||
4707 | This function sets enable-multibyte-characters to record which | |
4708 | representation is in use. It also adjusts various data in the buffer | |
4709 | (including its markers, overlays and text properties) so that they are | |
4710 | consistent with the new representation. | |
4711 | ||
4712 | *** string-make-multibyte takes a string and converts it to multibyte | |
4713 | representation. Most of the time, you don't need to care | |
4714 | about the representation, because Emacs converts when necessary; | |
4715 | however, it makes a difference when you compare strings. | |
4716 | ||
4717 | The conversion of non-ASCII characters works by adding the value of | |
4718 | nonascii-insert-offset to each character, or by translating them | |
4719 | using the table nonascii-translation-table. | |
4720 | ||
4721 | *** string-make-unibyte takes a string and converts it to unibyte | |
4722 | representation. Most of the time, you don't need to care about the | |
4723 | representation, but it makes a difference when you compare strings. | |
4724 | ||
4725 | The conversion from multibyte to unibyte representation | |
4726 | loses information; the only time Emacs performs it automatically | |
4727 | is when inserting a multibyte string into a unibyte buffer. | |
4728 | ||
4729 | *** string-as-multibyte takes a string, and returns another string | |
4730 | which contains the same bytes, but treats them as multibyte. | |
4731 | ||
4732 | *** string-as-unibyte takes a string, and returns another string | |
4733 | which contains the same bytes, but treats them as unibyte. | |
4734 | ||
4735 | *** The new function compare-strings lets you compare | |
4736 | portions of two strings. Unibyte strings are converted to multibyte, | |
4737 | so that a unibyte string can match a multibyte string. | |
4738 | You can specify whether to ignore case or not. | |
4739 | ||
4740 | *** assoc-ignore-case now uses compare-strings so that | |
4741 | it can treat unibyte and multibyte strings as equal. | |
4742 | ||
4743 | *** Regular expression operations and buffer string searches now | |
4744 | convert the search pattern to multibyte or unibyte to accord with the | |
4745 | buffer or string being searched. | |
4746 | ||
4747 | One consequence is that you cannot always use \200-\377 inside of | |
4748 | [...] to match all non-ASCII characters. This does still work when | |
4749 | searching or matching a unibyte buffer or string, but not when | |
4750 | searching or matching a multibyte string. Unfortunately, there is no | |
4751 | obvious choice of syntax to use within [...] for that job. But, what | |
4752 | you want is just to match all non-ASCII characters, the regular | |
4753 | expression [^\0-\177] works for it. | |
4754 | ||
4755 | *** Structure of coding system changed. | |
4756 | ||
4757 | All coding systems (including aliases and subsidiaries) are named | |
4758 | by symbols; the symbol's `coding-system' property is a vector | |
4759 | which defines the coding system. Aliases share the same vector | |
4760 | as the principal name, so that altering the contents of this | |
4761 | vector affects the principal name and its aliases. You can define | |
4762 | your own alias name of a coding system by the function | |
4763 | define-coding-system-alias. | |
4764 | ||
4765 | The coding system definition includes a property list of its own. Use | |
4766 | the new functions `coding-system-get' and `coding-system-put' to | |
4767 | access such coding system properties as post-read-conversion, | |
4768 | pre-write-conversion, character-translation-table-for-decode, | |
4769 | character-translation-table-for-encode, mime-charset, and | |
4770 | safe-charsets. For instance, (coding-system-get 'iso-latin-1 | |
4771 | 'mime-charset) gives the corresponding MIME-charset parameter | |
4772 | `iso-8859-1'. | |
4773 | ||
4774 | Among the coding system properties listed above, safe-charsets is new. | |
4775 | The value of this property is a list of character sets which this | |
4776 | coding system can correctly encode and decode. For instance: | |
4777 | (coding-system-get 'iso-latin-1 'safe-charsets) => (ascii latin-iso8859-1) | |
4778 | ||
4779 | Here, "correctly encode" means that the encoded character sets can | |
4780 | also be handled safely by systems other than Emacs as far as they | |
4781 | are capable of that coding system. Though, Emacs itself can encode | |
4782 | the other character sets and read it back correctly. | |
4783 | ||
4784 | *** The new function select-safe-coding-system can be used to find a | |
4785 | proper coding system for encoding the specified region or string. | |
4786 | This function requires a user interaction. | |
4787 | ||
4788 | *** The new functions find-coding-systems-region and | |
4789 | find-coding-systems-string are helper functions used by | |
4790 | select-safe-coding-system. They return a list of all proper coding | |
4791 | systems to encode a text in some region or string. If you don't want | |
4792 | a user interaction, use one of these functions instead of | |
4793 | select-safe-coding-system. | |
4794 | ||
4795 | *** The explicit encoding and decoding functions, such as | |
4796 | decode-coding-region and encode-coding-string, now set | |
4797 | last-coding-system-used to reflect the actual way encoding or decoding | |
4798 | was done. | |
4799 | ||
4800 | *** The new function detect-coding-with-language-environment can be | |
4801 | used to detect a coding system of text according to priorities of | |
4802 | coding systems used by some specific language environment. | |
4803 | ||
4804 | *** The functions detect-coding-region and detect-coding-string always | |
4805 | return a list if the arg HIGHEST is nil. Thus, if only ASCII | |
4806 | characters are found, they now return a list of single element | |
4807 | `undecided' or its subsidiaries. | |
4808 | ||
4809 | *** The new functions coding-system-change-eol-conversion and | |
4810 | coding-system-change-text-conversion can be used to get a different | |
4811 | coding system than what specified only in how end-of-line or text is | |
4812 | converted. | |
4813 | ||
4814 | *** The new function set-selection-coding-system can be used to set a | |
4815 | coding system for communicating with other X clients. | |
4816 | ||
4817 | *** The function `map-char-table' now passes as argument only valid | |
4818 | character codes, plus generic characters that stand for entire | |
4819 | character sets or entire subrows of a character set. In other words, | |
4820 | each time `map-char-table' calls its FUNCTION argument, the key value | |
4821 | either will be a valid individual character code, or will stand for a | |
4822 | range of characters. | |
4823 | ||
4824 | *** The new function `char-valid-p' can be used for checking whether a | |
4825 | Lisp object is a valid character code or not. | |
4826 | ||
4827 | *** The new function `charset-after' returns a charset of a character | |
4828 | in the current buffer at position POS. | |
4829 | ||
4830 | *** Input methods are now implemented using the variable | |
4831 | input-method-function. If this is non-nil, its value should be a | |
4832 | function; then, whenever Emacs reads an input event that is a printing | |
4833 | character with no modifier bits, it calls that function, passing the | |
4834 | event as an argument. Often this function will read more input, first | |
4835 | binding input-method-function to nil. | |
4836 | ||
4837 | The return value should be a list of the events resulting from input | |
4838 | method processing. These events will be processed sequentially as | |
4839 | input, before resorting to unread-command-events. Events returned by | |
4840 | the input method function are not passed to the input method function, | |
4841 | not even if they are printing characters with no modifier bits. | |
4842 | ||
4843 | The input method function is not called when reading the second and | |
4844 | subsequent events of a key sequence. | |
4845 | ||
4846 | *** You can customize any language environment by using | |
4847 | set-language-environment-hook and exit-language-environment-hook. | |
4848 | ||
4849 | The hook `exit-language-environment-hook' should be used to undo | |
4850 | customizations that you made with set-language-environment-hook. For | |
4851 | instance, if you set up a special key binding for a specific language | |
4852 | environment by set-language-environment-hook, you should set up | |
4853 | exit-language-environment-hook to restore the normal key binding. | |
4854 | \f | |
4855 | * Changes in Emacs 20.1 | |
4856 | ||
4857 | ** Emacs has a new facility for customization of its many user | |
4858 | options. It is called M-x customize. With this facility you can look | |
4859 | at the many user options in an organized way; they are grouped into a | |
4860 | tree structure. | |
4861 | ||
4862 | M-x customize also knows what sorts of values are legitimate for each | |
4863 | user option and ensures that you don't use invalid values. | |
4864 | ||
4865 | With M-x customize, you can set options either for the present Emacs | |
4866 | session or permanently. (Permanent settings are stored automatically | |
4867 | in your .emacs file.) | |
4868 | ||
4869 | ** Scroll bars are now on the left side of the window. | |
4870 | You can change this with M-x customize-option scroll-bar-mode. | |
4871 | ||
4872 | ** The mode line no longer includes the string `Emacs'. | |
4873 | This makes more space in the mode line for other information. | |
4874 | ||
4875 | ** When you select a region with the mouse, it is highlighted | |
4876 | immediately afterward. At that time, if you type the DELETE key, it | |
4877 | kills the region. | |
4878 | ||
4879 | The BACKSPACE key, and the ASCII character DEL, do not do this; they | |
4880 | delete the character before point, as usual. | |
4881 | ||
4882 | ** In an incremental search the whole current match is highlighted | |
4883 | on terminals which support this. (You can disable this feature | |
4884 | by setting search-highlight to nil.) | |
4885 | ||
4886 | ** In the minibuffer, in some cases, you can now use M-n to | |
4887 | insert the default value into the minibuffer as text. In effect, | |
4888 | the default value (if the minibuffer routines know it) is tacked | |
4889 | onto the history "in the future". (The more normal use of the | |
4890 | history list is to use M-p to insert minibuffer input used in the | |
4891 | past.) | |
4892 | ||
4893 | ** In Text mode, now only blank lines separate paragraphs. | |
4894 | This makes it possible to get the full benefit of Adaptive Fill mode | |
4895 | in Text mode, and other modes derived from it (such as Mail mode). | |
4896 | TAB in Text mode now runs the command indent-relative; this | |
4897 | makes a practical difference only when you use indented paragraphs. | |
4898 | ||
4899 | As a result, the old Indented Text mode is now identical to Text mode, | |
4900 | and is an alias for it. | |
4901 | ||
4902 | If you want spaces at the beginning of a line to start a paragraph, | |
4903 | use the new mode, Paragraph Indent Text mode. | |
4904 | ||
4905 | ** Scrolling changes | |
4906 | ||
4907 | *** Scroll commands to scroll a whole screen now preserve the screen | |
4908 | position of the cursor, if scroll-preserve-screen-position is non-nil. | |
4909 | ||
4910 | In this mode, if you scroll several screens back and forth, finishing | |
4911 | on the same screen where you started, the cursor goes back to the line | |
4912 | where it started. | |
4913 | ||
4914 | *** If you set scroll-conservatively to a small number, then when you | |
4915 | move point a short distance off the screen, Emacs will scroll the | |
4916 | screen just far enough to bring point back on screen, provided that | |
4917 | does not exceed `scroll-conservatively' lines. | |
4918 | ||
4919 | *** The new variable scroll-margin says how close point can come to the | |
4920 | top or bottom of a window. It is a number of screen lines; if point | |
4921 | comes within that many lines of the top or bottom of the window, Emacs | |
4922 | recenters the window. | |
4923 | ||
4924 | ** International character set support (MULE) | |
4925 | ||
4926 | Emacs now supports a wide variety of international character sets, | |
4927 | including European variants of the Latin alphabet, as well as Chinese, | |
4928 | Devanagari (Hindi and Marathi), Ethiopian, Greek, IPA, Japanese, | |
4929 | Korean, Lao, Russian, Thai, Tibetan, and Vietnamese scripts. These | |
4930 | features have been merged from the modified version of Emacs known as | |
4931 | MULE (for "MULti-lingual Enhancement to GNU Emacs") | |
4932 | ||
4933 | Users of these scripts have established many more-or-less standard | |
4934 | coding systems for storing files. Emacs uses a single multibyte | |
4935 | character encoding within Emacs buffers; it can translate from a wide | |
4936 | variety of coding systems when reading a file and can translate back | |
4937 | into any of these coding systems when saving a file. | |
4938 | ||
4939 | Keyboards, even in the countries where these character sets are used, | |
4940 | generally don't have keys for all the characters in them. So Emacs | |
4941 | supports various "input methods", typically one for each script or | |
4942 | language, to make it possible to type them. | |
4943 | ||
4944 | The Emacs internal multibyte encoding represents a non-ASCII | |
4945 | character as a sequence of bytes in the range 0200 through 0377. | |
4946 | ||
4947 | The new prefix key C-x RET is used for commands that pertain | |
4948 | to multibyte characters, coding systems, and input methods. | |
4949 | ||
4950 | You can disable multibyte character support as follows: | |
4951 | ||
4952 | (setq-default enable-multibyte-characters nil) | |
4953 | ||
4954 | Calling the function standard-display-european turns off multibyte | |
4955 | characters, unless you specify a non-nil value for the second | |
4956 | argument, AUTO. This provides compatibility for people who are | |
4957 | already using standard-display-european to continue using unibyte | |
4958 | characters for their work until they want to change. | |
4959 | ||
4960 | *** Input methods | |
4961 | ||
4962 | An input method is a kind of character conversion which is designed | |
4963 | specifically for interactive input. In Emacs, typically each language | |
4964 | has its own input method (though sometimes several languages which use | |
4965 | the same characters can share one input method). Some languages | |
4966 | support several input methods. | |
4967 | ||
4968 | The simplest kind of input method works by mapping ASCII letters into | |
4969 | another alphabet. This is how the Greek and Russian input methods | |
4970 | work. | |
4971 | ||
4972 | A more powerful technique is composition: converting sequences of | |
4973 | characters into one letter. Many European input methods use | |
4974 | composition to produce a single non-ASCII letter from a sequence which | |
4975 | consists of a letter followed by diacritics. For example, a' is one | |
4976 | sequence of two characters that might be converted into a single | |
4977 | letter. | |
4978 | ||
4979 | The input methods for syllabic scripts typically use mapping followed | |
4980 | by conversion. The input methods for Thai and Korean work this way. | |
4981 | First, letters are mapped into symbols for particular sounds or tone | |
4982 | marks; then, sequences of these which make up a whole syllable are | |
4983 | mapped into one syllable sign--most often a "composite character". | |
4984 | ||
4985 | None of these methods works very well for Chinese and Japanese, so | |
4986 | they are handled specially. First you input a whole word using | |
4987 | phonetic spelling; then, after the word is in the buffer, Emacs | |
4988 | converts it into one or more characters using a large dictionary. | |
4989 | ||
4990 | Since there is more than one way to represent a phonetically spelled | |
4991 | word using Chinese characters, Emacs can only guess which one to use; | |
4992 | typically these input methods give you a way to say "guess again" if | |
4993 | the first guess is wrong. | |
4994 | ||
4995 | *** The command C-x RET m (toggle-enable-multibyte-characters) | |
4996 | turns multibyte character support on or off for the current buffer. | |
4997 | ||
4998 | If multibyte character support is turned off in a buffer, then each | |
4999 | byte is a single character, even codes 0200 through 0377--exactly as | |
5000 | they did in Emacs 19.34. This includes the features for support for | |
5001 | the European characters, ISO Latin-1 and ISO Latin-2. | |
5002 | ||
5003 | However, there is no need to turn off multibyte character support to | |
5004 | use ISO Latin-1 or ISO Latin-2; the Emacs multibyte character set | |
5005 | includes all the characters in these character sets, and Emacs can | |
5006 | translate automatically to and from either one. | |
5007 | ||
5008 | *** Visiting a file in unibyte mode. | |
5009 | ||
5010 | Turning off multibyte character support in the buffer after visiting a | |
5011 | file with multibyte code conversion will display the multibyte | |
5012 | sequences already in the buffer, byte by byte. This is probably not | |
5013 | what you want. | |
5014 | ||
5015 | If you want to edit a file of unibyte characters (Latin-1, for | |
5016 | example), you can do it by specifying `no-conversion' as the coding | |
5017 | system when reading the file. This coding system also turns off | |
5018 | multibyte characters in that buffer. | |
5019 | ||
5020 | If you turn off multibyte character support entirely, this turns off | |
5021 | character conversion as well. | |
5022 | ||
5023 | *** Displaying international characters on X Windows. | |
5024 | ||
5025 | A font for X typically displays just one alphabet or script. | |
5026 | Therefore, displaying the entire range of characters Emacs supports | |
5027 | requires using many fonts. | |
5028 | ||
5029 | Therefore, Emacs now supports "fontsets". Each fontset is a | |
5030 | collection of fonts, each assigned to a range of character codes. | |
5031 | ||
5032 | A fontset has a name, like a font. Individual fonts are defined by | |
5033 | the X server; fontsets are defined within Emacs itself. But once you | |
5034 | have defined a fontset, you can use it in a face or a frame just as | |
5035 | you would use a font. | |
5036 | ||
5037 | If a fontset specifies no font for a certain character, or if it | |
5038 | specifies a font that does not exist on your system, then it cannot | |
5039 | display that character. It will display an empty box instead. | |
5040 | ||
5041 | The fontset height and width are determined by the ASCII characters | |
5042 | (that is, by the font in the fontset which is used for ASCII | |
5043 | characters). If another font in the fontset has a different height, | |
5044 | or the wrong width, then characters assigned to that font are clipped, | |
5045 | and displayed within a box if highlight-wrong-size-font is non-nil. | |
5046 | ||
5047 | *** Defining fontsets. | |
5048 | ||
5049 | Emacs does not use any fontset by default. Its default font is still | |
5050 | chosen as in previous versions. You can tell Emacs to use a fontset | |
5051 | with the `-fn' option or the `Font' X resource. | |
5052 | ||
5053 | Emacs creates a standard fontset automatically according to the value | |
5054 | of standard-fontset-spec. This fontset's short name is | |
5055 | `fontset-standard'. Bold, italic, and bold-italic variants of the | |
5056 | standard fontset are created automatically. | |
5057 | ||
5058 | If you specify a default ASCII font with the `Font' resource or `-fn' | |
5059 | argument, a fontset is generated from it. This works by replacing the | |
5060 | FOUNDARY, FAMILY, ADD_STYLE, and AVERAGE_WIDTH fields of the font name | |
5061 | with `*' then using this to specify a fontset. This fontset's short | |
5062 | name is `fontset-startup'. | |
5063 | ||
5064 | Emacs checks resources of the form Fontset-N where N is 0, 1, 2... | |
5065 | The resource value should have this form: | |
5066 | FONTSET-NAME, [CHARSET-NAME:FONT-NAME]... | |
5067 | FONTSET-NAME should have the form of a standard X font name, except: | |
5068 | * most fields should be just the wild card "*". | |
5069 | * the CHARSET_REGISTRY field should be "fontset" | |
5070 | * the CHARSET_ENCODING field can be any nickname of the fontset. | |
5071 | The construct CHARSET-NAME:FONT-NAME can be repeated any number | |
5072 | of times; each time specifies the font for one character set. | |
5073 | CHARSET-NAME should be the name name of a character set, and | |
5074 | FONT-NAME should specify an actual font to use for that character set. | |
5075 | ||
5076 | Each of these fontsets has an alias which is made from the | |
5077 | last two font name fields, CHARSET_REGISTRY and CHARSET_ENCODING. | |
5078 | You can refer to the fontset by that alias or by its full name. | |
5079 | ||
5080 | For any character sets that you don't mention, Emacs tries to choose a | |
5081 | font by substituting into FONTSET-NAME. For instance, with the | |
5082 | following resource, | |
5083 | Emacs*Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-24 | |
5084 | the font for ASCII is generated as below: | |
5085 | -*-fixed-medium-r-normal-*-24-*-ISO8859-1 | |
5086 | Here is the substitution rule: | |
5087 | Change CHARSET_REGISTRY and CHARSET_ENCODING to that of the charset | |
5088 | defined in the variable x-charset-registries. For instance, ASCII has | |
5089 | the entry (ascii . "ISO8859-1") in this variable. Then, reduce | |
5090 | sequences of wild cards -*-...-*- with a single wildcard -*-. | |
5091 | (This is to prevent use of auto-scaled fonts.) | |
5092 | ||
5093 | The function which processes the fontset resource value to create the | |
5094 | fontset is called create-fontset-from-fontset-spec. You can also call | |
5095 | that function explicitly to create a fontset. | |
5096 | ||
5097 | With the X resource Emacs.Font, you can specify a fontset name just | |
5098 | like an actual font name. But be careful not to specify a fontset | |
5099 | name in a wildcard resource like Emacs*Font--that tries to specify the | |
5100 | fontset for other purposes including menus, and they cannot handle | |
5101 | fontsets. | |
5102 | ||
5103 | *** The command M-x set-language-environment sets certain global Emacs | |
5104 | defaults for a particular choice of language. | |
5105 | ||
5106 | Selecting a language environment typically specifies a default input | |
5107 | method and which coding systems to recognize automatically when | |
5108 | visiting files. However, it does not try to reread files you have | |
5109 | already visited; the text in those buffers is not affected. The | |
5110 | language environment may also specify a default choice of coding | |
5111 | system for new files that you create. | |
5112 | ||
5113 | It makes no difference which buffer is current when you use | |
5114 | set-language-environment, because these defaults apply globally to the | |
5115 | whole Emacs session. | |
5116 | ||
5117 | For example, M-x set-language-environment RET Latin-1 RET | |
5118 | chooses the Latin-1 character set. In the .emacs file, you can do this | |
5119 | with (set-language-environment "Latin-1"). | |
5120 | ||
5121 | *** The command C-x RET f (set-buffer-file-coding-system) | |
5122 | specifies the file coding system for the current buffer. This | |
5123 | specifies what sort of character code translation to do when saving | |
5124 | the file. As an argument, you must specify the name of one of the | |
5125 | coding systems that Emacs supports. | |
5126 | ||
5127 | *** The command C-x RET c (universal-coding-system-argument) | |
5128 | lets you specify a coding system when you read or write a file. | |
5129 | This command uses the minibuffer to read a coding system name. | |
5130 | After you exit the minibuffer, the specified coding system | |
5131 | is used for *the immediately following command*. | |
5132 | ||
5133 | So if the immediately following command is a command to read or | |
5134 | write a file, it uses the specified coding system for that file. | |
5135 | ||
5136 | If the immediately following command does not use the coding system, | |
5137 | then C-x RET c ultimately has no effect. | |
5138 | ||
5139 | For example, C-x RET c iso-8859-1 RET C-x C-f temp RET | |
5140 | visits the file `temp' treating it as ISO Latin-1. | |
5141 | ||
5142 | *** You can specify the coding system for a file using the -*- | |
5143 | construct. Include `coding: CODINGSYSTEM;' inside the -*-...-*- | |
5144 | to specify use of coding system CODINGSYSTEM. You can also | |
5145 | specify the coding system in a local variable list at the end | |
5146 | of the file. | |
5147 | ||
5148 | *** The command C-x RET t (set-terminal-coding-system) specifies | |
5149 | the coding system for terminal output. If you specify a character | |
5150 | code for terminal output, all characters output to the terminal are | |
5151 | translated into that character code. | |
5152 | ||
5153 | This feature is useful for certain character-only terminals built in | |
5154 | various countries to support the languages of those countries. | |
5155 | ||
5156 | By default, output to the terminal is not translated at all. | |
5157 | ||
5158 | *** The command C-x RET k (set-keyboard-coding-system) specifies | |
5159 | the coding system for keyboard input. | |
5160 | ||
5161 | Character code translation of keyboard input is useful for terminals | |
5162 | with keys that send non-ASCII graphic characters--for example, | |
5163 | some terminals designed for ISO Latin-1 or subsets of it. | |
5164 | ||
5165 | By default, keyboard input is not translated at all. | |
5166 | ||
5167 | Character code translation of keyboard input is similar to using an | |
5168 | input method, in that both define sequences of keyboard input that | |
5169 | translate into single characters. However, input methods are designed | |
5170 | to be convenient for interactive use, while the code translations are | |
5171 | designed to work with terminals. | |
5172 | ||
5173 | *** The command C-x RET p (set-buffer-process-coding-system) | |
5174 | specifies the coding system for input and output to a subprocess. | |
5175 | This command applies to the current buffer; normally, each subprocess | |
5176 | has its own buffer, and thus you can use this command to specify | |
5177 | translation to and from a particular subprocess by giving the command | |
5178 | in the corresponding buffer. | |
5179 | ||
5180 | By default, process input and output are not translated at all. | |
5181 | ||
5182 | *** The variable file-name-coding-system specifies the coding system | |
5183 | to use for encoding file names before operating on them. | |
5184 | It is also used for decoding file names obtained from the system. | |
5185 | ||
5186 | *** The command C-\ (toggle-input-method) activates or deactivates | |
5187 | an input method. If no input method has been selected before, the | |
5188 | command prompts for you to specify the language and input method you | |
5189 | want to use. | |
5190 | ||
5191 | C-u C-\ (select-input-method) lets you switch to a different input | |
5192 | method. C-h C-\ (or C-h I) describes the current input method. | |
5193 | ||
5194 | *** Some input methods remap the keyboard to emulate various keyboard | |
5195 | layouts commonly used for particular scripts. How to do this | |
5196 | remapping properly depends on your actual keyboard layout. To specify | |
5197 | which layout your keyboard has, use M-x quail-set-keyboard-layout. | |
5198 | ||
5199 | *** The command C-h C (describe-coding-system) displays | |
5200 | the coding systems currently selected for various purposes, plus | |
5201 | related information. | |
5202 | ||
5203 | *** The command C-h h (view-hello-file) displays a file called | |
5204 | HELLO, which has examples of text in many languages, using various | |
5205 | scripts. | |
5206 | ||
5207 | *** The command C-h L (describe-language-support) displays | |
5208 | information about the support for a particular language. | |
5209 | You specify the language as an argument. | |
5210 | ||
5211 | *** The mode line now contains a letter or character that identifies | |
5212 | the coding system used in the visited file. It normally follows the | |
5213 | first dash. | |
5214 | ||
5215 | A dash indicates the default state of affairs: no code conversion | |
5216 | (except CRLF => newline if appropriate). `=' means no conversion | |
5217 | whatsoever. The ISO 8859 coding systems are represented by digits | |
5218 | 1 through 9. Other coding systems are represented by letters: | |
5219 | ||
5220 | A alternativnyj (Russian) | |
5221 | B big5 (Chinese) | |
5222 | C cn-gb-2312 (Chinese) | |
5223 | C iso-2022-cn (Chinese) | |
5224 | D in-is13194-devanagari (Indian languages) | |
5225 | E euc-japan (Japanese) | |
5226 | I iso-2022-cjk or iso-2022-ss2 (Chinese, Japanese, Korean) | |
5227 | J junet (iso-2022-7) or old-jis (iso-2022-jp-1978-irv) (Japanese) | |
5228 | K euc-korea (Korean) | |
5229 | R koi8 (Russian) | |
5230 | Q tibetan | |
5231 | S shift_jis (Japanese) | |
5232 | T lao | |
5233 | T tis620 (Thai) | |
5234 | V viscii or vscii (Vietnamese) | |
5235 | i iso-2022-lock (Chinese, Japanese, Korean) | |
5236 | k iso-2022-kr (Korean) | |
5237 | v viqr (Vietnamese) | |
5238 | z hz (Chinese) | |
5239 | ||
5240 | When you are using a character-only terminal (not a window system), | |
5241 | two additional characters appear in between the dash and the file | |
5242 | coding system. These two characters describe the coding system for | |
5243 | keyboard input, and the coding system for terminal output. | |
5244 | ||
5245 | *** The new variable rmail-file-coding-system specifies the code | |
5246 | conversion to use for RMAIL files. The default value is nil. | |
5247 | ||
5248 | When you read mail with Rmail, each message is decoded automatically | |
5249 | into Emacs' internal format. This has nothing to do with | |
5250 | rmail-file-coding-system. That variable controls reading and writing | |
5251 | Rmail files themselves. | |
5252 | ||
5253 | *** The new variable sendmail-coding-system specifies the code | |
5254 | conversion for outgoing mail. The default value is nil. | |
5255 | ||
5256 | Actually, there are three different ways of specifying the coding system | |
5257 | for sending mail: | |
5258 | ||
5259 | - If you use C-x RET f in the mail buffer, that takes priority. | |
5260 | - Otherwise, if you set sendmail-coding-system non-nil, that specifies it. | |
5261 | - Otherwise, the default coding system for new files is used, | |
5262 | if that is non-nil. That comes from your language environment. | |
5263 | - Otherwise, Latin-1 is used. | |
5264 | ||
5265 | *** The command C-h t (help-with-tutorial) accepts a prefix argument | |
5266 | to specify the language for the tutorial file. Currently, English, | |
5267 | Japanese, Korean and Thai are supported. We welcome additional | |
5268 | translations. | |
5269 | ||
5270 | ** An easy new way to visit a file with no code or format conversion | |
5271 | of any kind: Use M-x find-file-literally. There is also a command | |
5272 | insert-file-literally which inserts a file into the current buffer | |
5273 | without any conversion. | |
5274 | ||
5275 | ** C-q's handling of octal character codes is changed. | |
5276 | You can now specify any number of octal digits. | |
5277 | RET terminates the digits and is discarded; | |
5278 | any other non-digit terminates the digits and is then used as input. | |
5279 | ||
5280 | ** There are new commands for looking up Info documentation for | |
5281 | functions, variables and file names used in your programs. | |
5282 | ||
5283 | Type M-x info-lookup-symbol to look up a symbol in the buffer at point. | |
5284 | Type M-x info-lookup-file to look up a file in the buffer at point. | |
5285 | ||
5286 | Precisely which Info files are used to look it up depends on the major | |
5287 | mode. For example, in C mode, the GNU libc manual is used. | |
5288 | ||
5289 | ** M-TAB in most programming language modes now runs the command | |
5290 | complete-symbol. This command performs completion on the symbol name | |
5291 | in the buffer before point. | |
5292 | ||
5293 | With a numeric argument, it performs completion based on the set of | |
5294 | symbols documented in the Info files for the programming language that | |
5295 | you are using. | |
5296 | ||
5297 | With no argument, it does completion based on the current tags tables, | |
5298 | just like the old binding of M-TAB (complete-tag). | |
5299 | ||
5300 | ** File locking works with NFS now. | |
5301 | ||
5302 | The lock file for FILENAME is now a symbolic link named .#FILENAME, | |
5303 | in the same directory as FILENAME. | |
5304 | ||
5305 | This means that collision detection between two different machines now | |
5306 | works reasonably well; it also means that no file server or directory | |
5307 | can become a bottleneck. | |
5308 | ||
5309 | The new method does have drawbacks. It means that collision detection | |
5310 | does not operate when you edit a file in a directory where you cannot | |
5311 | create new files. Collision detection also doesn't operate when the | |
5312 | file server does not support symbolic links. But these conditions are | |
5313 | rare, and the ability to have collision detection while using NFS is | |
5314 | so useful that the change is worth while. | |
5315 | ||
5316 | When Emacs or a system crashes, this may leave behind lock files which | |
5317 | are stale. So you may occasionally get warnings about spurious | |
5318 | collisions. When you determine that the collision is spurious, just | |
5319 | tell Emacs to go ahead anyway. | |
5320 | ||
5321 | ** If you wish to use Show Paren mode to display matching parentheses, | |
5322 | it is no longer sufficient to load paren.el. Instead you must call | |
5323 | show-paren-mode. | |
5324 | ||
5325 | ** If you wish to use Delete Selection mode to replace a highlighted | |
5326 | selection when you insert new text, it is no longer sufficient to load | |
5327 | delsel.el. Instead you must call the function delete-selection-mode. | |
5328 | ||
5329 | ** If you wish to use Partial Completion mode to complete partial words | |
5330 | within symbols or filenames, it is no longer sufficient to load | |
5331 | complete.el. Instead you must call the function partial-completion-mode. | |
5332 | ||
5333 | ** If you wish to use uniquify to rename buffers for you, | |
5334 | it is no longer sufficient to load uniquify.el. You must also | |
5335 | set uniquify-buffer-name-style to one of the non-nil legitimate values. | |
5336 | ||
5337 | ** Changes in View mode. | |
5338 | ||
5339 | *** Several new commands are available in View mode. | |
5340 | Do H in view mode for a list of commands. | |
5341 | ||
5342 | *** There are two new commands for entering View mode: | |
5343 | view-file-other-frame and view-buffer-other-frame. | |
5344 | ||
5345 | *** Exiting View mode does a better job of restoring windows to their | |
5346 | previous state. | |
5347 | ||
5348 | *** New customization variable view-scroll-auto-exit. If non-nil, | |
5349 | scrolling past end of buffer makes view mode exit. | |
5350 | ||
5351 | *** New customization variable view-exits-all-viewing-windows. If | |
5352 | non-nil, view-mode will at exit restore all windows viewing buffer, | |
5353 | not just the selected window. | |
5354 | ||
5355 | *** New customization variable view-read-only. If non-nil, visiting a | |
5356 | read-only file automatically enters View mode, and toggle-read-only | |
5357 | turns View mode on or off. | |
5358 | ||
5359 | *** New customization variable view-remove-frame-by-deleting controls | |
5360 | how to remove a not needed frame at view mode exit. If non-nil, | |
5361 | delete the frame, if nil make an icon of it. | |
5362 | ||
5363 | ** C-x v l, the command to print a file's version control log, | |
5364 | now positions point at the entry for the file's current branch version. | |
5365 | ||
5366 | ** C-x v =, the command to compare a file with the last checked-in version, | |
5367 | has a new feature. If the file is currently not locked, so that it is | |
5368 | presumably identical to the last checked-in version, the command now asks | |
5369 | which version to compare with. | |
5370 | ||
5371 | ** When using hideshow.el, incremental search can temporarily show hidden | |
79214ddf | 5372 | blocks if a match is inside the block. |
a933dad1 DL |
5373 | |
5374 | The block is hidden again if the search is continued and the next match | |
5375 | is outside the block. By customizing the variable | |
5376 | isearch-hide-immediately you can choose to hide all the temporarily | |
5377 | shown blocks only when exiting from incremental search. | |
5378 | ||
5379 | By customizing the variable hs-isearch-open you can choose what kind | |
5380 | of blocks to temporarily show during isearch: comment blocks, code | |
5381 | blocks, all of them or none. | |
5382 | ||
5383 | ** The new command C-x 4 0 (kill-buffer-and-window) kills the | |
5384 | current buffer and deletes the selected window. It asks for | |
5385 | confirmation first. | |
5386 | ||
5387 | ** C-x C-w, which saves the buffer into a specified file name, | |
5388 | now changes the major mode according to that file name. | |
5389 | However, the mode will not be changed if | |
5390 | (1) a local variables list or the `-*-' line specifies a major mode, or | |
5391 | (2) the current major mode is a "special" mode, | |
5392 | not suitable for ordinary files, or | |
5393 | (3) the new file name does not particularly specify any mode. | |
5394 | ||
5395 | This applies to M-x set-visited-file-name as well. | |
5396 | ||
5397 | However, if you set change-major-mode-with-file-name to nil, then | |
5398 | these commands do not change the major mode. | |
5399 | ||
5400 | ** M-x occur changes. | |
5401 | ||
5402 | *** If the argument to M-x occur contains upper case letters, | |
5403 | it performs a case-sensitive search. | |
5404 | ||
5405 | *** In the *Occur* buffer made by M-x occur, | |
5406 | if you type g or M-x revert-buffer, this repeats the search | |
5407 | using the same regular expression and the same buffer as before. | |
5408 | ||
5409 | ** In Transient Mark mode, the region in any one buffer is highlighted | |
5410 | in just one window at a time. At first, it is highlighted in the | |
5411 | window where you set the mark. The buffer's highlighting remains in | |
5412 | that window unless you select to another window which shows the same | |
5413 | buffer--then the highlighting moves to that window. | |
5414 | ||
5415 | ** The feature to suggest key bindings when you use M-x now operates | |
5416 | after the command finishes. The message suggesting key bindings | |
5417 | appears temporarily in the echo area. The previous echo area contents | |
5418 | come back after a few seconds, in case they contain useful information. | |
5419 | ||
5420 | ** Each frame now independently records the order for recently | |
5421 | selected buffers, so that the default for C-x b is now based on the | |
5422 | buffers recently selected in the selected frame. | |
5423 | ||
5424 | ** Outline mode changes. | |
5425 | ||
5426 | *** Outline mode now uses overlays (this is the former noutline.el). | |
5427 | ||
5428 | *** Incremental searches skip over invisible text in Outline mode. | |
5429 | ||
5430 | ** When a minibuffer window is active but not the selected window, if | |
5431 | you try to use the minibuffer, you used to get a nested minibuffer. | |
5432 | Now, this not only gives an error, it also cancels the minibuffer that | |
5433 | was already active. | |
5434 | ||
5435 | The motive for this change is so that beginning users do not | |
5436 | unknowingly move away from minibuffers, leaving them active, and then | |
5437 | get confused by it. | |
5438 | ||
5439 | If you want to be able to have recursive minibuffers, you must | |
5440 | set enable-recursive-minibuffers to non-nil. | |
5441 | ||
5442 | ** Changes in dynamic abbrevs. | |
5443 | ||
5444 | *** Expanding dynamic abbrevs with M-/ is now smarter about case | |
5445 | conversion. If the expansion has mixed case not counting the first | |
5446 | character, and the abbreviation matches the beginning of the expansion | |
5447 | including case, then the expansion is copied verbatim. | |
5448 | ||
5449 | The expansion is also copied verbatim if the abbreviation itself has | |
5450 | mixed case. And using SPC M-/ to copy an additional word always | |
5451 | copies it verbatim except when the previous copied word is all caps. | |
5452 | ||
5453 | *** The values of `dabbrev-case-replace' and `dabbrev-case-fold-search' | |
5454 | are no longer Lisp expressions. They have simply three possible | |
5455 | values. | |
5456 | ||
5457 | `dabbrev-case-replace' has these three values: nil (don't preserve | |
5458 | case), t (do), or `case-replace' (do like M-x query-replace). | |
5459 | `dabbrev-case-fold-search' has these three values: nil (don't ignore | |
5460 | case), t (do), or `case-fold-search' (do like search). | |
5461 | ||
5462 | ** Minibuffer history lists are truncated automatically now to a | |
5463 | certain length. The variable history-length specifies how long they | |
5464 | can be. The default value is 30. | |
5465 | ||
5466 | ** Changes in Mail mode. | |
5467 | ||
5468 | *** The key C-x m no longer runs the `mail' command directly. | |
5469 | Instead, it runs the command `compose-mail', which invokes the mail | |
5470 | composition mechanism you have selected with the variable | |
5471 | `mail-user-agent'. The default choice of user agent is | |
5472 | `sendmail-user-agent', which gives behavior compatible with the old | |
5473 | behavior. | |
5474 | ||
5475 | C-x 4 m now runs compose-mail-other-window, and C-x 5 m runs | |
5476 | compose-mail-other-frame. | |
5477 | ||
5478 | *** While composing a reply to a mail message, from Rmail, you can use | |
5479 | the command C-c C-r to cite just the region from the message you are | |
5480 | replying to. This copies the text which is the selected region in the | |
5481 | buffer that shows the original message. | |
5482 | ||
5483 | *** The command C-c C-i inserts a file at the end of the message, | |
5484 | with separator lines around the contents. | |
5485 | ||
5486 | *** The command M-x expand-mail-aliases expands all mail aliases | |
5487 | in suitable mail headers. Emacs automatically extracts mail alias | |
5488 | definitions from your mail alias file (e.g., ~/.mailrc). You do not | |
5489 | need to expand mail aliases yourself before sending mail. | |
5490 | ||
5491 | *** New features in the mail-complete command. | |
5492 | ||
5493 | **** The mail-complete command now inserts the user's full name, | |
5494 | for local users or if that is known. The variable mail-complete-style | |
5495 | controls the style to use, and whether to do this at all. | |
5496 | Its values are like those of mail-from-style. | |
5497 | ||
5498 | **** The variable mail-passwd-command lets you specify a shell command | |
5499 | to run to fetch a set of password-entries that add to the ones in | |
5500 | /etc/passwd. | |
5501 | ||
5502 | **** The variable mail-passwd-file now specifies a list of files to read | |
5503 | to get the list of user ids. By default, one file is used: | |
5504 | /etc/passwd. | |
5505 | ||
5506 | ** You can "quote" a file name to inhibit special significance of | |
5507 | special syntax, by adding `/:' to the beginning. Thus, if you have a | |
5508 | directory named `/foo:', you can prevent it from being treated as a | |
5509 | reference to a remote host named `foo' by writing it as `/:/foo:'. | |
5510 | ||
5511 | Emacs uses this new construct automatically when necessary, such as | |
5512 | when you start it with a working directory whose name might otherwise | |
5513 | be taken to be magic. | |
5514 | ||
5515 | ** There is a new command M-x grep-find which uses find to select | |
5516 | files to search through, and grep to scan them. The output is | |
5517 | available in a Compile mode buffer, as with M-x grep. | |
5518 | ||
5519 | M-x grep now uses the -e option if the grep program supports that. | |
5520 | (-e prevents problems if the search pattern starts with a dash.) | |
5521 | ||
5522 | ** In Dired, the & command now flags for deletion the files whose names | |
5523 | suggest they are probably not needed in the long run. | |
5524 | ||
5525 | In Dired, * is now a prefix key for mark-related commands. | |
5526 | ||
5527 | new key dired.el binding old key | |
5528 | ------- ---------------- ------- | |
5529 | * c dired-change-marks c | |
5530 | * m dired-mark m | |
5531 | * * dired-mark-executables * (binding deleted) | |
5532 | * / dired-mark-directories / (binding deleted) | |
5533 | * @ dired-mark-symlinks @ (binding deleted) | |
5534 | * u dired-unmark u | |
5535 | * DEL dired-unmark-backward DEL | |
5536 | * ? dired-unmark-all-files M-C-? | |
5537 | * ! dired-unmark-all-marks | |
5538 | * % dired-mark-files-regexp % m | |
5539 | * C-n dired-next-marked-file M-} | |
5540 | * C-p dired-prev-marked-file M-{ | |
5541 | ||
5542 | ** Rmail changes. | |
5543 | ||
5544 | *** When Rmail cannot convert your incoming mail into Babyl format, it | |
5545 | saves the new mail in the file RMAILOSE.n, where n is an integer | |
5546 | chosen to make a unique name. This way, Rmail will not keep crashing | |
5547 | each time you run it. | |
5548 | ||
5549 | *** In Rmail, the variable rmail-summary-line-count-flag now controls | |
5550 | whether to include the line count in the summary. Non-nil means yes. | |
5551 | ||
5552 | *** In Rmail summary buffers, d and C-d (the commands to delete | |
5553 | messages) now take repeat counts as arguments. A negative argument | |
5554 | means to move in the opposite direction. | |
5555 | ||
5556 | *** In Rmail, the t command now takes an optional argument which lets | |
5557 | you specify whether to show the message headers in full or pruned. | |
5558 | ||
5559 | *** In Rmail, the new command w (rmail-output-body-to-file) writes | |
5560 | just the body of the current message into a file, without the headers. | |
5561 | It takes the file name from the message subject, by default, but you | |
5562 | can edit that file name in the minibuffer before it is actually used | |
5563 | for output. | |
5564 | ||
5565 | ** Gnus changes. | |
5566 | ||
5567 | *** nntp.el has been totally rewritten in an asynchronous fashion. | |
5568 | ||
79214ddf FP |
5569 | *** Article prefetching functionality has been moved up into |
5570 | Gnus. | |
a933dad1 | 5571 | |
79214ddf | 5572 | *** Scoring can now be performed with logical operators like |
a933dad1 DL |
5573 | `and', `or', `not', and parent redirection. |
5574 | ||
5575 | *** Article washing status can be displayed in the | |
5576 | article mode line. | |
5577 | ||
5578 | *** gnus.el has been split into many smaller files. | |
5579 | ||
5580 | *** Suppression of duplicate articles based on Message-ID. | |
5581 | ||
5582 | (setq gnus-suppress-duplicates t) | |
5583 | ||
5584 | *** New variables for specifying what score and adapt files | |
5585 | are to be considered home score and adapt files. See | |
5586 | `gnus-home-score-file' and `gnus-home-adapt-files'. | |
5587 | ||
5588 | *** Groups can inherit group parameters from parent topics. | |
5589 | ||
5590 | *** Article editing has been revamped and is now usable. | |
5591 | ||
5592 | *** Signatures can be recognized in more intelligent fashions. | |
5593 | See `gnus-signature-separator' and `gnus-signature-limit'. | |
5594 | ||
5595 | *** Summary pick mode has been made to look more nn-like. | |
5596 | Line numbers are displayed and the `.' command can be | |
5597 | used to pick articles. | |
5598 | ||
5599 | *** Commands for moving the .newsrc.eld from one server to | |
5600 | another have been added. | |
5601 | ||
5602 | `M-x gnus-change-server' | |
5603 | ||
5604 | *** A way to specify that "uninteresting" fields be suppressed when | |
5605 | generating lines in buffers. | |
5606 | ||
5607 | *** Several commands in the group buffer can be undone with | |
5608 | `M-C-_'. | |
5609 | ||
5610 | *** Scoring can be done on words using the new score type `w'. | |
5611 | ||
5612 | *** Adaptive scoring can be done on a Subject word-by-word basis: | |
5613 | ||
5614 | (setq gnus-use-adaptive-scoring '(word)) | |
5615 | ||
5616 | *** Scores can be decayed. | |
79214ddf | 5617 | |
a933dad1 DL |
5618 | (setq gnus-decay-scores t) |
5619 | ||
5620 | *** Scoring can be performed using a regexp on the Date header. The | |
5621 | Date is normalized to compact ISO 8601 format first. | |
5622 | ||
5623 | *** A new command has been added to remove all data on articles from | |
5624 | the native server. | |
5625 | ||
5626 | `M-x gnus-group-clear-data-on-native-groups' | |
5627 | ||
5628 | *** A new command for reading collections of documents | |
5629 | (nndoc with nnvirtual on top) has been added -- `M-C-d'. | |
5630 | ||
5631 | *** Process mark sets can be pushed and popped. | |
5632 | ||
5633 | *** A new mail-to-news backend makes it possible to post | |
5634 | even when the NNTP server doesn't allow posting. | |
5635 | ||
5636 | *** A new backend for reading searches from Web search engines | |
5637 | (DejaNews, Alta Vista, InReference) has been added. | |
5638 | ||
5639 | Use the `G w' command in the group buffer to create such | |
5640 | a group. | |
5641 | ||
5642 | *** Groups inside topics can now be sorted using the standard | |
5643 | sorting functions, and each topic can be sorted independently. | |
5644 | ||
5645 | See the commands under the `T S' submap. | |
5646 | ||
5647 | *** Subsets of the groups can be sorted independently. | |
5648 | ||
5649 | See the commands under the `G P' submap. | |
5650 | ||
5651 | *** Cached articles can be pulled into the groups. | |
79214ddf | 5652 | |
a933dad1 DL |
5653 | Use the `Y c' command. |
5654 | ||
5655 | *** Score files are now applied in a more reliable order. | |
5656 | ||
5657 | *** Reports on where mail messages end up can be generated. | |
5658 | ||
5659 | `M-x nnmail-split-history' | |
5660 | ||
5661 | *** More hooks and functions have been added to remove junk | |
5662 | from incoming mail before saving the mail. | |
79214ddf | 5663 | |
a933dad1 DL |
5664 | See `nnmail-prepare-incoming-header-hook'. |
5665 | ||
5666 | *** The nnml mail backend now understands compressed article files. | |
5667 | ||
5668 | *** To enable Gnus to read/post multi-lingual articles, you must execute | |
5669 | the following code, for instance, in your .emacs. | |
5670 | ||
5671 | (add-hook 'gnus-startup-hook 'gnus-mule-initialize) | |
5672 | ||
5673 | Then, when you start Gnus, it will decode non-ASCII text automatically | |
5674 | and show appropriate characters. (Note: if you are using gnus-mime | |
5675 | from the SEMI package, formerly known as TM, you should NOT add this | |
5676 | hook to gnus-startup-hook; gnus-mime has its own method of handling | |
5677 | this issue.) | |
5678 | ||
5679 | Since it is impossible to distinguish all coding systems | |
5680 | automatically, you may need to specify a choice of coding system for a | |
5681 | particular news group. This can be done by: | |
5682 | ||
5683 | (gnus-mule-add-group NEWSGROUP 'CODING-SYSTEM) | |
5684 | ||
5685 | Here NEWSGROUP should be a string which names a newsgroup or a tree | |
5686 | of newsgroups. If NEWSGROUP is "XXX.YYY", all news groups under | |
5687 | "XXX.YYY" (including "XXX.YYY.ZZZ") will use the specified coding | |
5688 | system. CODING-SYSTEM specifies which coding system to use (for both | |
5689 | for reading and posting). | |
5690 | ||
5691 | CODING-SYSTEM can also be a cons cell of the form | |
5692 | (READ-CODING-SYSTEM . POST-CODING-SYSTEM) | |
5693 | Then READ-CODING-SYSTEM is used when you read messages from the | |
5694 | newsgroups, while POST-CODING-SYSTEM is used when you post messages | |
5695 | there. | |
5696 | ||
5697 | Emacs knows the right coding systems for certain newsgroups by | |
5698 | default. Here are some of these default settings: | |
5699 | ||
5700 | (gnus-mule-add-group "fj" 'iso-2022-7) | |
5701 | (gnus-mule-add-group "alt.chinese.text" 'hz-gb-2312) | |
5702 | (gnus-mule-add-group "alt.hk" 'hz-gb-2312) | |
5703 | (gnus-mule-add-group "alt.chinese.text.big5" 'cn-big5) | |
5704 | (gnus-mule-add-group "soc.culture.vietnamese" '(nil . viqr)) | |
5705 | ||
5706 | When you reply by mail to an article, these settings are ignored; | |
5707 | the mail is encoded according to sendmail-coding-system, as usual. | |
5708 | ||
5709 | ** CC mode changes. | |
5710 | ||
5711 | *** If you edit primarily one style of C (or C++, Objective-C, Java) | |
5712 | code, you may want to make the CC Mode style variables have global | |
5713 | values so that you can set them directly in your .emacs file. To do | |
5714 | this, set c-style-variables-are-local-p to nil in your .emacs file. | |
5715 | Note that this only takes effect if you do it *before* cc-mode.el is | |
5716 | loaded. | |
5717 | ||
5718 | If you typically edit more than one style of C (or C++, Objective-C, | |
79214ddf | 5719 | Java) code in a single Emacs session, you may want to make the CC Mode |
a933dad1 | 5720 | style variables have buffer local values. By default, all buffers |
79214ddf FP |
5721 | share the same style variable settings; to make them buffer local, set |
5722 | c-style-variables-are-local-p to t in your .emacs file. Note that you | |
a933dad1 DL |
5723 | must do this *before* CC Mode is loaded. |
5724 | ||
5725 | *** The new variable c-indentation-style holds the C style name | |
5726 | of the current buffer. | |
5727 | ||
5728 | *** The variable c-block-comments-indent-p has been deleted, because | |
5729 | it is no longer necessary. C mode now handles all the supported styles | |
5730 | of block comments, with no need to say which one you will use. | |
5731 | ||
5732 | *** There is a new indentation style "python", which specifies the C | |
5733 | style that the Python developers like. | |
5734 | ||
5735 | *** There is a new c-cleanup-list option: brace-elseif-brace. | |
5736 | This says to put ...} else if (...) {... on one line, | |
5737 | just as brace-else-brace says to put ...} else {... on one line. | |
5738 | ||
5739 | ** VC Changes [new] | |
5740 | ||
5741 | ** In vc-retrieve-snapshot (C-x v r), if you don't specify a snapshot | |
5742 | name, it retrieves the *latest* versions of all files in the current | |
5743 | directory and its subdirectories (aside from files already locked). | |
5744 | ||
5745 | This feature is useful if your RCS directory is a link to a common | |
5746 | master directory, and you want to pick up changes made by other | |
5747 | developers. | |
5748 | ||
5749 | You can do the same thing for an individual file by typing C-u C-x C-q | |
5750 | RET in a buffer visiting that file. | |
5751 | ||
5752 | *** VC can now handle files under CVS that are being "watched" by | |
5753 | other developers. Such files are made read-only by CVS. To get a | |
5754 | writable copy, type C-x C-q in a buffer visiting such a file. VC then | |
5755 | calls "cvs edit", which notifies the other developers of it. | |
5756 | ||
5757 | *** vc-version-diff (C-u C-x v =) now suggests reasonable defaults for | |
5758 | version numbers, based on the current state of the file. | |
5759 | ||
5760 | ** Calendar changes. | |
5761 | ||
5762 | A new function, list-holidays, allows you list holidays or subclasses | |
5763 | of holidays for ranges of years. Related menu items allow you do this | |
5764 | for the year of the selected date, or the following/previous years. | |
5765 | ||
5766 | ** ps-print changes | |
5767 | ||
79214ddf | 5768 | There are some new user variables for customizing the page layout. |
a933dad1 DL |
5769 | |
5770 | *** Paper size, paper orientation, columns | |
5771 | ||
5772 | The variable `ps-paper-type' determines the size of paper ps-print | |
5773 | formats for; it should contain one of the symbols: | |
5774 | `a4' `a3' `letter' `legal' `letter-small' `tabloid' | |
5775 | `ledger' `statement' `executive' `a4small' `b4' `b5' | |
5776 | It defaults to `letter'. | |
5777 | If you need other sizes, see the variable `ps-page-dimensions-database'. | |
5778 | ||
5779 | The variable `ps-landscape-mode' determines the orientation | |
79214ddf | 5780 | of the printing on the page. nil, the default, means "portrait" mode, |
a933dad1 DL |
5781 | non-nil means "landscape" mode. |
5782 | ||
5783 | The variable `ps-number-of-columns' must be a positive integer. | |
5784 | It determines the number of columns both in landscape and portrait mode. | |
79214ddf | 5785 | It defaults to 1. |
a933dad1 DL |
5786 | |
5787 | *** Horizontal layout | |
5788 | ||
5789 | The horizontal layout is determined by the variables | |
5790 | `ps-left-margin', `ps-inter-column', and `ps-right-margin'. | |
5791 | All are measured in points. | |
5792 | ||
5793 | *** Vertical layout | |
5794 | ||
5795 | The vertical layout is determined by the variables | |
5796 | `ps-bottom-margin', `ps-top-margin', and `ps-header-offset'. | |
5797 | All are measured in points. | |
5798 | ||
5799 | *** Headers | |
5800 | ||
5801 | If the variable `ps-print-header' is nil, no header is printed. Then | |
5802 | `ps-header-offset' is not relevant and `ps-top-margin' represents the | |
5803 | margin above the text. | |
5804 | ||
79214ddf | 5805 | If the variable `ps-print-header-frame' is non-nil, a gaudy |
a933dad1 DL |
5806 | framing box is printed around the header. |
5807 | ||
5808 | The contents of the header are determined by `ps-header-lines', | |
5809 | `ps-show-n-of-n', `ps-left-header' and `ps-right-header'. | |
5810 | ||
79214ddf FP |
5811 | The height of the header is determined by `ps-header-line-pad', |
5812 | `ps-header-font-family', `ps-header-title-font-size' and | |
a933dad1 DL |
5813 | `ps-header-font-size'. |
5814 | ||
5815 | *** Font managing | |
5816 | ||
5817 | The variable `ps-font-family' determines which font family is to be | |
5818 | used for ordinary text. Its value must be a key symbol in the alist | |
5819 | `ps-font-info-database'. You can add other font families by adding | |
5820 | elements to this alist. | |
5821 | ||
79214ddf | 5822 | The variable `ps-font-size' determines the size of the font |
a933dad1 DL |
5823 | for ordinary text. It defaults to 8.5 points. |
5824 | ||
5825 | ** hideshow changes. | |
5826 | ||
5827 | *** now supports hiding of blocks of single line comments (like // for | |
79214ddf | 5828 | C++, ; for lisp). |
a933dad1 DL |
5829 | |
5830 | *** Support for java-mode added. | |
5831 | ||
5832 | *** When doing `hs-hide-all' it is now possible to also hide the comments | |
5833 | in the file if `hs-hide-comments-when-hiding-all' is set. | |
5834 | ||
5835 | *** The new function `hs-hide-initial-comment' hides the the comments at | |
5836 | the beginning of the files. Finally those huge RCS logs don't stay in your | |
5837 | way! This is run by default when entering the `hs-minor-mode'. | |
5838 | ||
5839 | *** Now uses overlays instead of `selective-display', so is more | |
5840 | robust and a lot faster. | |
5841 | ||
79214ddf | 5842 | *** A block beginning can span multiple lines. |
a933dad1 DL |
5843 | |
5844 | *** The new variable `hs-show-hidden-short-form' if t, directs hideshow | |
5845 | to show only the beginning of a block when it is hidden. See the | |
5846 | documentation for more details. | |
5847 | ||
5848 | ** Changes in Enriched mode. | |
5849 | ||
5850 | *** When you visit a file in enriched-mode, Emacs will make sure it is | |
5851 | filled to the current fill-column. This behavior is now independent | |
5852 | of the size of the window. When you save the file, the fill-column in | |
5853 | use is stored as well, so that the whole buffer need not be refilled | |
5854 | the next time unless the fill-column is different. | |
5855 | ||
5856 | *** use-hard-newlines is now a minor mode. When it is enabled, Emacs | |
5857 | distinguishes between hard and soft newlines, and treats hard newlines | |
5858 | as paragraph boundaries. Otherwise all newlines inserted are marked | |
5859 | as soft, and paragraph boundaries are determined solely from the text. | |
5860 | ||
5861 | ** Font Lock mode | |
5862 | ||
5863 | *** Custom support | |
5864 | ||
5865 | The variables font-lock-face-attributes, font-lock-display-type and | |
5866 | font-lock-background-mode are now obsolete; the recommended way to specify the | |
5867 | faces to use for Font Lock mode is with M-x customize-group on the new custom | |
5868 | group font-lock-highlighting-faces. If you set font-lock-face-attributes in | |
5869 | your ~/.emacs file, Font Lock mode will respect its value. However, you should | |
5870 | consider converting from setting that variable to using M-x customize. | |
5871 | ||
5872 | You can still use X resources to specify Font Lock face appearances. | |
5873 | ||
5874 | *** Maximum decoration | |
5875 | ||
5876 | Fontification now uses the maximum level of decoration supported by | |
5877 | default. Previously, fontification used a mode-specific default level | |
5878 | of decoration, which is typically the minimum level of decoration | |
5879 | supported. You can set font-lock-maximum-decoration to nil | |
5880 | to get the old behavior. | |
5881 | ||
5882 | *** New support | |
5883 | ||
5884 | Support is now provided for Java, Objective-C, AWK and SIMULA modes. | |
5885 | ||
5886 | Note that Font Lock mode can be turned on without knowing exactly what modes | |
5887 | support Font Lock mode, via the command global-font-lock-mode. | |
5888 | ||
5889 | *** Configurable support | |
5890 | ||
5891 | Support for C, C++, Objective-C and Java can be more easily configured for | |
5892 | additional types and classes via the new variables c-font-lock-extra-types, | |
5893 | c++-font-lock-extra-types, objc-font-lock-extra-types and, you guessed it, | |
5894 | java-font-lock-extra-types. These value of each of these variables should be a | |
5895 | list of regexps matching the extra type names. For example, the default value | |
5896 | of c-font-lock-extra-types is ("\\sw+_t") which means fontification follows the | |
5897 | convention that C type names end in _t. This results in slower fontification. | |
5898 | ||
5899 | Of course, you can change the variables that specify fontification in whatever | |
5900 | way you wish, typically by adding regexps. However, these new variables make | |
5901 | it easier to make specific and common changes for the fontification of types. | |
5902 | ||
5903 | *** Adding highlighting patterns to existing support | |
5904 | ||
5905 | You can use the new function font-lock-add-keywords to add your own | |
5906 | highlighting patterns, such as for project-local or user-specific constructs, | |
5907 | for any mode. | |
5908 | ||
5909 | For example, to highlight `FIXME:' words in C comments, put: | |
5910 | ||
5911 | (font-lock-add-keywords 'c-mode '(("\\<FIXME:" 0 font-lock-warning-face t))) | |
5912 | ||
5913 | in your ~/.emacs. | |
5914 | ||
5915 | *** New faces | |
5916 | ||
5917 | Font Lock now defines two new faces, font-lock-builtin-face and | |
5918 | font-lock-warning-face. These are intended to highlight builtin keywords, | |
5919 | distinct from a language's normal keywords, and objects that should be brought | |
5920 | to user attention, respectively. Various modes now use these new faces. | |
5921 | ||
5922 | *** Changes to fast-lock support mode | |
5923 | ||
5924 | The fast-lock package, one of the two Font Lock support modes, can now process | |
5925 | cache files silently. You can use the new variable fast-lock-verbose, in the | |
5926 | same way as font-lock-verbose, to control this feature. | |
5927 | ||
5928 | *** Changes to lazy-lock support mode | |
5929 | ||
5930 | The lazy-lock package, one of the two Font Lock support modes, can now fontify | |
5931 | according to the true syntactic context relative to other lines. You can use | |
5932 | the new variable lazy-lock-defer-contextually to control this feature. If | |
5933 | non-nil, changes to the buffer will cause subsequent lines in the buffer to be | |
5934 | refontified after lazy-lock-defer-time seconds of idle time. If nil, then only | |
5935 | the modified lines will be refontified; this is the same as the previous Lazy | |
5936 | Lock mode behaviour and the behaviour of Font Lock mode. | |
5937 | ||
5938 | This feature is useful in modes where strings or comments can span lines. | |
5939 | For example, if a string or comment terminating character is deleted, then if | |
5940 | this feature is enabled subsequent lines in the buffer will be correctly | |
5941 | refontified to reflect their new syntactic context. Previously, only the line | |
5942 | containing the deleted character would be refontified and you would have to use | |
5943 | the command M-g M-g (font-lock-fontify-block) to refontify some lines. | |
5944 | ||
5945 | As a consequence of this new feature, two other variables have changed: | |
5946 | ||
5947 | Variable `lazy-lock-defer-driven' is renamed `lazy-lock-defer-on-scrolling'. | |
5948 | Variable `lazy-lock-defer-time' can now only be a time, i.e., a number. | |
5949 | Buffer modes for which on-the-fly deferral applies can be specified via the | |
5950 | new variable `lazy-lock-defer-on-the-fly'. | |
5951 | ||
5952 | If you set these variables in your ~/.emacs, then you may have to change those | |
5953 | settings. | |
5954 | ||
5955 | ** Ada mode changes. | |
5956 | ||
5957 | *** There is now better support for using find-file.el with Ada mode. | |
5958 | If you switch between spec and body, the cursor stays in the same | |
5959 | procedure (modulo overloading). If a spec has no body file yet, but | |
5960 | you try to switch to its body file, Ada mode now generates procedure | |
5961 | stubs. | |
5962 | ||
5963 | *** There are two new commands: | |
5964 | - `ada-make-local' : invokes gnatmake on the current buffer | |
5965 | - `ada-check-syntax' : check syntax of current buffer. | |
5966 | ||
5967 | The user options `ada-compiler-make', `ada-make-options', | |
5968 | `ada-language-version', `ada-compiler-syntax-check', and | |
79214ddf | 5969 | `ada-compile-options' are used within these commands. |
a933dad1 DL |
5970 | |
5971 | *** Ada mode can now work with Outline minor mode. The outline level | |
5972 | is calculated from the indenting, not from syntactic constructs. | |
5973 | Outlining does not work if your code is not correctly indented. | |
5974 | ||
5975 | *** The new function `ada-gnat-style' converts the buffer to the style of | |
5976 | formatting used in GNAT. It places two blanks after a comment start, | |
5977 | places one blank between a word end and an opening '(', and puts one | |
5978 | space between a comma and the beginning of a word. | |
5979 | ||
5980 | ** Scheme mode changes. | |
5981 | ||
5982 | *** Scheme mode indentation now uses many of the facilities of Lisp | |
5983 | mode; therefore, the variables to customize it are the variables used | |
5984 | for Lisp mode which have names starting with `lisp-'. The variables | |
5985 | with names starting with `scheme-' which used to do this no longer | |
5986 | have any effect. | |
5987 | ||
5988 | If you want to use different indentation for Scheme and Lisp, this is | |
5989 | still possible, but now you must do it by adding a hook to | |
5990 | scheme-mode-hook, which could work by setting the `lisp-' indentation | |
5991 | variables as buffer-local variables. | |
5992 | ||
5993 | *** DSSSL mode is a variant of Scheme mode, for editing DSSSL scripts. | |
5994 | Use M-x dsssl-mode. | |
5995 | ||
133c9e59 GM |
5996 | ** Changes to the emacsclient program |
5997 | ||
875c1439 GM |
5998 | *** If a socket can't be found, and environment variables LOGNAME or |
5999 | USER are set, emacsclient now looks for a socket based on the UID | |
6000 | associated with the name. That is an emacsclient running as root | |
6001 | can connect to an Emacs server started by a non-root user. | |
6002 | ||
133c9e59 | 6003 | *** The emacsclient program now accepts an option --no-wait which tells |
a933dad1 DL |
6004 | it to return immediately without waiting for you to "finish" the |
6005 | buffer in Emacs. | |
6006 | ||
133c9e59 GM |
6007 | *** The new option --alternate-editor allows to specify an editor to |
6008 | use if Emacs is not running. The environment variable | |
6009 | ALTERNATE_EDITOR can be used for the same effect; the command line | |
6010 | option takes precedence. | |
6011 | ||
a933dad1 DL |
6012 | ** M-x eldoc-mode enables a minor mode in which the echo area |
6013 | constantly shows the parameter list for function being called at point | |
6014 | (in Emacs Lisp and Lisp Interaction modes only). | |
6015 | ||
6016 | ** C-x n d now runs the new command narrow-to-defun, | |
6017 | which narrows the accessible parts of the buffer to just | |
6018 | the current defun. | |
6019 | ||
6020 | ** Emacs now handles the `--' argument in the standard way; all | |
6021 | following arguments are treated as ordinary file names. | |
6022 | ||
6023 | ** On MSDOS and Windows, the bookmark file is now called _emacs.bmk, | |
6024 | and the saved desktop file is now called _emacs.desktop (truncated if | |
6025 | necessary). | |
6026 | ||
6027 | ** When you kill a buffer that visits a file, | |
6028 | if there are any registers that save positions in the file, | |
6029 | these register values no longer become completely useless. | |
6030 | If you try to go to such a register with C-x j, then you are | |
6031 | asked whether to visit the file again. If you say yes, | |
6032 | it visits the file and then goes to the same position. | |
6033 | ||
6034 | ** When you visit a file that changes frequently outside Emacs--for | |
6035 | example, a log of output from a process that continues to run--it may | |
6036 | be useful for Emacs to revert the file without querying you whenever | |
6037 | you visit the file afresh with C-x C-f. | |
6038 | ||
6039 | You can request this behavior for certain files by setting the | |
6040 | variable revert-without-query to a list of regular expressions. If a | |
6041 | file's name matches any of these regular expressions, find-file and | |
6042 | revert-buffer revert the buffer without asking for permission--but | |
6043 | only if you have not edited the buffer text yourself. | |
6044 | ||
6045 | ** set-default-font has been renamed to set-frame-font | |
6046 | since it applies only to the current frame. | |
6047 | ||
6048 | ** In TeX mode, you can use the variable tex-main-file to specify the | |
6049 | file for tex-file to run TeX on. (By default, tex-main-file is nil, | |
6050 | and tex-file runs TeX on the current visited file.) | |
6051 | ||
6052 | This is useful when you are editing a document that consists of | |
6053 | multiple files. In each of the included files, you can set up a local | |
6054 | variable list which specifies the top-level file of your document for | |
6055 | tex-main-file. Then tex-file will run TeX on the whole document | |
6056 | instead of just the file you are editing. | |
6057 | ||
6058 | ** RefTeX mode | |
6059 | ||
6060 | RefTeX mode is a new minor mode with special support for \label, \ref | |
6061 | and \cite macros in LaTeX documents. RefTeX distinguishes labels of | |
6062 | different environments (equation, figure, ...) and has full support for | |
6063 | multifile documents. To use it, select a buffer with a LaTeX document and | |
6064 | turn the mode on with M-x reftex-mode. Here are the main user commands: | |
6065 | ||
79214ddf | 6066 | C-c ( reftex-label |
a933dad1 DL |
6067 | Creates a label semi-automatically. RefTeX is context sensitive and |
6068 | knows which kind of label is needed. | |
6069 | ||
6070 | C-c ) reftex-reference | |
6071 | Offers in a menu all labels in the document, along with context of the | |
6072 | label definition. The selected label is referenced as \ref{LABEL}. | |
6073 | ||
6074 | C-c [ reftex-citation | |
6075 | Prompts for a regular expression and displays a list of matching BibTeX | |
6076 | database entries. The selected entry is cited with a \cite{KEY} macro. | |
6077 | ||
6078 | C-c & reftex-view-crossref | |
6079 | Views the cross reference of a \ref or \cite command near point. | |
6080 | ||
6081 | C-c = reftex-toc | |
6082 | Shows a table of contents of the (multifile) document. From there you | |
6083 | can quickly jump to every section. | |
79214ddf | 6084 | |
a933dad1 DL |
6085 | Under X, RefTeX installs a "Ref" menu in the menu bar, with additional |
6086 | commands. Press `?' to get help when a prompt mentions this feature. | |
6087 | Full documentation and customization examples are in the file | |
6088 | reftex.el. You can use the finder to view the file documentation: | |
6089 | C-h p --> tex --> reftex.el | |
6090 | ||
6091 | ** Changes in BibTeX mode. | |
6092 | ||
6093 | *** Info documentation is now available. | |
6094 | ||
6095 | *** Don't allow parentheses in string constants anymore. This confused | |
6096 | both the BibTeX program and Emacs BibTeX mode. | |
6097 | ||
6098 | *** Renamed variable bibtex-mode-user-optional-fields to | |
6099 | bibtex-user-optional-fields. | |
6100 | ||
6101 | *** Removed variable bibtex-include-OPTannote | |
6102 | (use bibtex-user-optional-fields instead). | |
6103 | ||
6104 | *** New interactive functions to copy and kill fields and complete | |
6105 | entries to the BibTeX kill ring, from where they can be yanked back by | |
6106 | appropriate functions. | |
6107 | ||
6108 | *** New interactive functions for repositioning and marking of | |
6109 | entries. They are bound by default to M-C-l and M-C-h. | |
6110 | ||
6111 | *** New hook bibtex-clean-entry-hook. It is called after entry has | |
6112 | been cleaned. | |
6113 | ||
6114 | *** New variable bibtex-field-delimiters, which replaces variables | |
6115 | bibtex-field-{left|right}-delimiter. | |
6116 | ||
6117 | *** New variable bibtex-entry-delimiters to determine how entries | |
6118 | shall be delimited. | |
6119 | ||
6120 | *** Allow preinitialization of fields. See documentation of | |
6121 | bibtex-user-optional-fields, bibtex-entry-field-alist, and | |
6122 | bibtex-include-OPTkey for details. | |
6123 | ||
6124 | *** Book and InBook entries require either an author or an editor | |
6125 | field. This is now supported by bibtex.el. Alternative fields are | |
6126 | prefixed with `ALT'. | |
6127 | ||
6128 | *** New variable bibtex-entry-format, which replaces variable | |
6129 | bibtex-clean-entry-zap-empty-opts and allows specification of many | |
6130 | formatting options performed on cleaning an entry (see variable | |
6131 | documentation). | |
6132 | ||
6133 | *** Even more control on how automatic keys are generated. See | |
6134 | documentation of bibtex-generate-autokey for details. Transcriptions | |
6135 | for foreign languages other than German are now handled, too. | |
6136 | ||
6137 | *** New boolean user option bibtex-comma-after-last-field to decide if | |
6138 | comma should be inserted at end of last field. | |
6139 | ||
6140 | *** New boolean user option bibtex-align-at-equal-sign to determine if | |
6141 | alignment should be made at left side of field contents or at equal | |
6142 | signs. New user options to control entry layout (e.g. indentation). | |
6143 | ||
6144 | *** New function bibtex-fill-entry to realign entries. | |
6145 | ||
6146 | *** New function bibtex-reformat to reformat region or buffer. | |
6147 | ||
6148 | *** New function bibtex-convert-alien to convert a BibTeX database | |
6149 | from alien sources. | |
6150 | ||
6151 | *** New function bibtex-complete-key (similar to bibtex-complete-string) | |
6152 | to complete prefix to a key defined in buffer. Mainly useful in | |
6153 | crossref entries. | |
6154 | ||
6155 | *** New function bibtex-count-entries to count entries in buffer or | |
6156 | region. | |
6157 | ||
6158 | *** Added support for imenu. | |
6159 | ||
6160 | *** The function `bibtex-validate' now checks current region instead | |
6161 | of buffer if mark is active. Now it shows all errors of buffer in a | |
6162 | `compilation mode' buffer. You can use the normal commands (e.g. | |
6163 | `next-error') for compilation modes to jump to errors. | |
6164 | ||
6165 | *** New variable `bibtex-string-file-path' to determine where the files | |
6166 | from `bibtex-string-files' are searched. | |
6167 | ||
6168 | ** Iso Accents mode now supports Latin-3 as an alternative. | |
6169 | ||
30a009a5 | 6170 | ** The command next-error now opens blocks hidden by hideshow. |
047f434a | 6171 | |
a933dad1 DL |
6172 | ** The function using-unix-filesystems has been replaced by the |
6173 | functions add-untranslated-filesystem and remove-untranslated-filesystem. | |
6174 | Each of these functions takes the name of a drive letter or directory | |
6175 | as an argument. | |
6176 | ||
6177 | When a filesystem is added as untranslated, all files on it are read | |
6178 | and written in binary mode (no cr/lf translation is performed). | |
6179 | ||
6180 | ** browse-url changes | |
6181 | ||
6182 | *** New methods for: Grail (browse-url-generic), MMM (browse-url-mmm), | |
6183 | Lynx in a separate xterm (browse-url-lynx-xterm) or in an Emacs window | |
6184 | (browse-url-lynx-emacs), remote W3 (browse-url-w3-gnudoit), generic | |
6185 | non-remote-controlled browsers (browse-url-generic) and associated | |
6186 | customization variables. | |
6187 | ||
6188 | *** New commands `browse-url-of-region' and `browse-url'. | |
6189 | ||
6190 | *** URLs marked up with <URL:...> (RFC1738) work if broken across | |
6191 | lines. Browsing methods can be associated with URL regexps | |
6192 | (e.g. mailto: URLs) via `browse-url-browser-function'. | |
6193 | ||
6194 | ** Changes in Ediff | |
6195 | ||
6196 | *** Clicking Mouse-2 on a brief command description in Ediff control panel | |
6197 | pops up the Info file for this command. | |
6198 | ||
6199 | *** There is now a variable, ediff-autostore-merges, which controls whether | |
6200 | the result of a merge is saved in a file. By default, this is done only when | |
6201 | merge is done from a session group (eg, when merging files in two different | |
6202 | directories). | |
6203 | ||
6204 | *** Since Emacs 19.31 (this hasn't been announced before), Ediff can compare | |
6205 | and merge groups of files residing in different directories, or revisions of | |
6206 | files in the same directory. | |
6207 | ||
6208 | *** Since Emacs 19.31, Ediff can apply multi-file patches interactively. | |
6209 | The patches must be in the context format or GNU unified format. (The bug | |
6210 | related to the GNU format has now been fixed.) | |
6211 | ||
6212 | ** Changes in Viper | |
6213 | ||
6214 | *** The startup file is now .viper instead of .vip | |
79214ddf | 6215 | *** All variable/function names have been changed to start with viper- |
a933dad1 DL |
6216 | instead of vip-. |
6217 | *** C-\ now simulates the meta-key in all Viper states. | |
79214ddf | 6218 | *** C-z in Insert state now escapes to Vi for the duration of the next |
a933dad1 DL |
6219 | Viper command. In Vi and Insert states, C-z behaves as before. |
6220 | *** C-c \ escapes to Vi for one command if Viper is in Insert or Emacs states. | |
6221 | *** _ is no longer the meta-key in Vi state. | |
6222 | *** The variable viper-insert-state-cursor-color can be used to change cursor | |
6223 | color when Viper is in insert state. | |
6224 | *** If search lands the cursor near the top or the bottom of the window, | |
6225 | Viper pulls the window up or down to expose more context. The variable | |
6226 | viper-adjust-window-after-search controls this behavior. | |
6227 | ||
6228 | ** Etags changes. | |
6229 | ||
6230 | *** In C, C++, Objective C and Java, Etags tags global variables by | |
6231 | default. The resulting tags files are inflated by 30% on average. | |
6232 | Use --no-globals to turn this feature off. Etags can also tag | |
6233 | variables which are members of structure-like constructs, but it does | |
6234 | not by default. Use --members to turn this feature on. | |
6235 | ||
6236 | *** C++ member functions are now recognized as tags. | |
6237 | ||
6238 | *** Java is tagged like C++. In addition, "extends" and "implements" | |
6239 | constructs are tagged. Files are recognised by the extension .java. | |
6240 | ||
6241 | *** Etags can now handle programs written in Postscript. Files are | |
6242 | recognised by the extensions .ps and .pdb (Postscript with C syntax). | |
6243 | In Postscript, tags are lines that start with a slash. | |
6244 | ||
6245 | *** Etags now handles Objective C and Objective C++ code. The usual C and | |
6246 | C++ tags are recognized in these languages; in addition, etags | |
6247 | recognizes special Objective C syntax for classes, class categories, | |
6248 | methods and protocols. | |
6249 | ||
6250 | *** Etags also handles Cobol. Files are recognised by the extension | |
6251 | .cobol. The tagged lines are those containing a word that begins in | |
6252 | column 8 and ends in a full stop, i.e. anything that could be a | |
6253 | paragraph name. | |
6254 | ||
6255 | *** Regexps in Etags now support intervals, as in ed or grep. The syntax of | |
6256 | an interval is \{M,N\}, and it means to match the preceding expression | |
6257 | at least M times and as many as N times. | |
6258 | ||
6259 | ** The format for specifying a custom format for time-stamp to insert | |
6260 | in files has changed slightly. | |
6261 | ||
6262 | With the new enhancements to the functionality of format-time-string, | |
6263 | time-stamp-format will change to be eventually compatible with it. | |
6264 | This conversion is being done in two steps to maintain compatibility | |
6265 | with old time-stamp-format values. | |
6266 | ||
6267 | In the new scheme, alternate case is signified by the number-sign | |
6268 | (`#') modifier, rather than changing the case of the format character. | |
6269 | This feature is as yet incompletely implemented for compatibility | |
6270 | reasons. | |
6271 | ||
6272 | In the old time-stamp-format, all numeric fields defaulted to their | |
6273 | natural width. (With format-time-string, each format has a | |
6274 | fixed-width default.) In this version, you can specify the colon | |
6275 | (`:') modifier to a numeric conversion to mean "give me the historical | |
6276 | time-stamp-format width default." Do not use colon if you are | |
6277 | specifying an explicit width, as in "%02d". | |
6278 | ||
6279 | Numbers are no longer truncated to the requested width, except in the | |
6280 | case of "%02y", which continues to give a two-digit year. Digit | |
6281 | truncation probably wasn't being used for anything else anyway. | |
6282 | ||
6283 | The new formats will work with old versions of Emacs. New formats are | |
6284 | being recommended now to allow time-stamp-format to change in the | |
6285 | future to be compatible with format-time-string. The new forms being | |
6286 | recommended now will continue to work then. | |
6287 | ||
6288 | See the documentation string for the variable time-stamp-format for | |
6289 | details. | |
6290 | ||
6291 | ** There are some additional major modes: | |
6292 | ||
6293 | dcl-mode, for editing VMS DCL files. | |
6294 | m4-mode, for editing files of m4 input. | |
6295 | meta-mode, for editing MetaFont and MetaPost source files. | |
6296 | ||
6297 | ** In Shell mode, the command shell-copy-environment-variable lets you | |
6298 | copy the value of a specified environment variable from the subshell | |
6299 | into Emacs. | |
6300 | ||
6301 | ** New Lisp packages include: | |
6302 | ||
6303 | *** battery.el displays battery status for laptops. | |
6304 | ||
6305 | *** M-x bruce (named after Lenny Bruce) is a program that might | |
6306 | be used for adding some indecent words to your email. | |
6307 | ||
6308 | *** M-x crisp-mode enables an emulation for the CRiSP editor. | |
6309 | ||
6310 | *** M-x dirtrack arranges for better tracking of directory changes | |
6311 | in shell buffers. | |
6312 | ||
6313 | *** The new library elint.el provides for linting of Emacs Lisp code. | |
6314 | See the documentation for `elint-initialize', `elint-current-buffer' | |
6315 | and `elint-defun'. | |
6316 | ||
6317 | *** M-x expand-add-abbrevs defines a special kind of abbrev which is | |
6318 | meant for programming constructs. These abbrevs expand like ordinary | |
6319 | ones, when you type SPC, but only at the end of a line and not within | |
6320 | strings or comments. | |
6321 | ||
6322 | These abbrevs can act as templates: you can define places within an | |
6323 | abbrev for insertion of additional text. Once you expand the abbrev, | |
6324 | you can then use C-x a p and C-x a n to move back and forth to these | |
6325 | insertion points. Thus you can conveniently insert additional text | |
6326 | at these points. | |
6327 | ||
6328 | *** filecache.el remembers the location of files so that you | |
6329 | can visit them by short forms of their names. | |
6330 | ||
6331 | *** find-func.el lets you find the definition of the user-loaded | |
6332 | Emacs Lisp function at point. | |
6333 | ||
6334 | *** M-x handwrite converts text to a "handwritten" picture. | |
6335 | ||
6336 | *** M-x iswitchb-buffer is a command for switching to a buffer, much like | |
6337 | switch-buffer, but it reads the argument in a more helpful way. | |
6338 | ||
6339 | *** M-x landmark implements a neural network for landmark learning. | |
6340 | ||
6341 | *** M-x locate provides a convenient interface to the `locate' program. | |
6342 | ||
6343 | *** M4 mode is a new mode for editing files of m4 input. | |
6344 | ||
6345 | *** mantemp.el creates C++ manual template instantiations | |
6346 | from the GCC error messages which indicate which instantiations are needed. | |
6347 | ||
6348 | *** mouse-copy.el provides a one-click copy and move feature. | |
6349 | You can drag a region with M-mouse-1, and it is automatically | |
6350 | inserted at point. M-Shift-mouse-1 deletes the text from its | |
6351 | original place after inserting the copy. | |
6352 | ||
6353 | *** mouse-drag.el lets you do scrolling by dragging Mouse-2 | |
6354 | on the buffer. | |
6355 | ||
6356 | You click the mouse and move; that distance either translates into the | |
6357 | velocity to scroll (with mouse-drag-throw) or the distance to scroll | |
6358 | (with mouse-drag-drag). Horizontal scrolling is enabled when needed. | |
6359 | ||
6360 | Enable mouse-drag with: | |
6361 | (global-set-key [down-mouse-2] 'mouse-drag-throw) | |
6362 | -or- | |
6363 | (global-set-key [down-mouse-2] 'mouse-drag-drag) | |
6364 | ||
6365 | *** mspools.el is useful for determining which mail folders have | |
6366 | mail waiting to be read in them. It works with procmail. | |
6367 | ||
6368 | *** Octave mode is a major mode for editing files of input for Octave. | |
6369 | It comes with a facility for communicating with an Octave subprocess. | |
6370 | ||
6371 | *** ogonek | |
6372 | ||
6373 | The ogonek package provides functions for changing the coding of | |
6374 | Polish diacritic characters in buffers. Codings known from various | |
6375 | platforms are supported such as ISO8859-2, Mazovia, IBM Latin2, and | |
6376 | TeX. For example, you can change the coding from Mazovia to | |
6377 | ISO8859-2. Another example is a change of coding from ISO8859-2 to | |
6378 | prefix notation (in which `/a' stands for the aogonek character, for | |
6379 | instance) and vice versa. | |
6380 | ||
6381 | To use this package load it using | |
6382 | M-x load-library [enter] ogonek | |
6383 | Then, you may get an explanation by calling one of | |
79214ddf | 6384 | M-x ogonek-jak -- in Polish |
a933dad1 DL |
6385 | M-x ogonek-how -- in English |
6386 | The info specifies the commands and variables provided as well as the | |
6387 | ways of customization in `.emacs'. | |
6388 | ||
6389 | *** Interface to ph. | |
6390 | ||
6391 | Emacs provides a client interface to CCSO Nameservers (ph/qi) | |
6392 | ||
6393 | The CCSO nameserver is used in many universities to provide directory | |
6394 | services about people. ph.el provides a convenient Emacs interface to | |
6395 | these servers. | |
6396 | ||
6397 | *** uce.el is useful for replying to unsolicited commercial email. | |
6398 | ||
6399 | *** vcursor.el implements a "virtual cursor" feature. | |
6400 | You can move the virtual cursor with special commands | |
6401 | while the real cursor does not move. | |
6402 | ||
6403 | *** webjump.el is a "hot list" package which you can set up | |
6404 | for visiting your favorite web sites. | |
6405 | ||
6406 | *** M-x winner-mode is a minor mode which saves window configurations, | |
6407 | so you can move back to other configurations that you have recently used. | |
6408 | ||
6409 | ** movemail change | |
6410 | ||
6411 | Movemail no longer needs to be installed setuid root in order for POP | |
6412 | mail retrieval to function properly. This is because it no longer | |
6413 | supports the RPOP (reserved-port POP) protocol; instead, it uses the | |
6414 | user's POP password to authenticate to the mail server. | |
6415 | ||
6416 | This change was made earlier, but not reported in NEWS before. | |
6417 | \f | |
6418 | * Emacs 20.1 changes for MS-DOS and MS-Windows. | |
6419 | ||
6420 | ** Changes in handling MS-DOS/MS-Windows text files. | |
6421 | ||
6422 | Emacs handles three different conventions for representing | |
6423 | end-of-line: CRLF for MSDOS, LF for Unix and GNU, and CR (used on the | |
6424 | Macintosh). Emacs determines which convention is used in a specific | |
6425 | file based on the contents of that file (except for certain special | |
6426 | file names), and when it saves the file, it uses the same convention. | |
6427 | ||
6428 | To save the file and change the end-of-line convention, you can use | |
6429 | C-x RET f (set-buffer-file-coding-system) to specify a different | |
6430 | coding system for the buffer. Then, when you save the file, the newly | |
6431 | specified coding system will take effect. For example, to save with | |
6432 | LF, specify undecided-unix (or some other ...-unix coding system); to | |
6433 | save with CRLF, specify undecided-dos. | |
6434 | \f | |
6435 | * Lisp Changes in Emacs 20.1 | |
6436 | ||
6437 | ** Byte-compiled files made with Emacs 20 will, in general, work in | |
6438 | Emacs 19 as well, as long as the source code runs in Emacs 19. And | |
6439 | vice versa: byte-compiled files made with Emacs 19 should also run in | |
6440 | Emacs 20, as long as the program itself works in Emacs 20. | |
6441 | ||
6442 | ** Windows-specific functions and variables have been renamed | |
6443 | to start with w32- instead of win32-. | |
6444 | ||
6445 | In hacker language, calling something a "win" is a form of praise. We | |
6446 | don't want to praise a non-free Microsoft system, so we don't call it | |
6447 | "win". | |
6448 | ||
6449 | ** Basic Lisp changes | |
6450 | ||
6451 | *** A symbol whose name starts with a colon now automatically | |
6452 | evaluates to itself. Therefore such a symbol can be used as a constant. | |
6453 | ||
6454 | *** The defined purpose of `defconst' has been changed. It should now | |
6455 | be used only for values that should not be changed whether by a program | |
6456 | or by the user. | |
6457 | ||
6458 | The actual behavior of defconst has not been changed. | |
6459 | ||
6460 | *** There are new macros `when' and `unless' | |
6461 | ||
6462 | (when CONDITION BODY...) is short for (if CONDITION (progn BODY...)) | |
6463 | (unless CONDITION BODY...) is short for (if CONDITION nil BODY...) | |
6464 | ||
6465 | *** Emacs now defines functions caar, cadr, cdar and cddr with their | |
6466 | usual Lisp meanings. For example, caar returns the car of the car of | |
6467 | its argument. | |
6468 | ||
6469 | *** equal, when comparing strings, now ignores their text properties. | |
6470 | ||
6471 | *** The new function `functionp' tests whether an object is a function. | |
6472 | ||
6473 | *** arrayp now returns t for char-tables and bool-vectors. | |
6474 | ||
6475 | *** Certain primitives which use characters (as integers) now get an | |
6476 | error if the integer is not a valid character code. These primitives | |
6477 | include insert-char, char-to-string, and the %c construct in the | |
6478 | `format' function. | |
6479 | ||
6480 | *** The `require' function now insists on adding a suffix, either .el | |
6481 | or .elc, to the file name. Thus, (require 'foo) will not use a file | |
6482 | whose name is just foo. It insists on foo.el or foo.elc. | |
6483 | ||
6484 | *** The `autoload' function, when the file name does not contain | |
6485 | either a directory name or the suffix .el or .elc, insists on | |
6486 | adding one of these suffixes. | |
6487 | ||
6488 | *** string-to-number now takes an optional second argument BASE | |
6489 | which specifies the base to use when converting an integer. | |
79214ddf | 6490 | If BASE is omitted, base 10 is used. |
a933dad1 DL |
6491 | |
6492 | We have not implemented other radices for floating point numbers, | |
6493 | because that would be much more work and does not seem useful. | |
6494 | ||
6495 | *** substring now handles vectors as well as strings. | |
6496 | ||
6497 | *** The Common Lisp function eql is no longer defined normally. | |
6498 | You must load the `cl' library to define it. | |
6499 | ||
6500 | *** The new macro `with-current-buffer' lets you evaluate an expression | |
6501 | conveniently with a different current buffer. It looks like this: | |
6502 | ||
6503 | (with-current-buffer BUFFER BODY-FORMS...) | |
6504 | ||
6505 | BUFFER is the expression that says which buffer to use. | |
6506 | BODY-FORMS say what to do in that buffer. | |
6507 | ||
6508 | *** The new primitive `save-current-buffer' saves and restores the | |
6509 | choice of current buffer, like `save-excursion', but without saving or | |
6510 | restoring the value of point or the mark. `with-current-buffer' | |
6511 | works using `save-current-buffer'. | |
6512 | ||
6513 | *** The new macro `with-temp-file' lets you do some work in a new buffer and | |
6514 | write the output to a specified file. Like `progn', it returns the value | |
6515 | of the last form. | |
6516 | ||
6517 | *** The new macro `with-temp-buffer' lets you do some work in a new buffer, | |
6518 | which is discarded after use. Like `progn', it returns the value of the | |
6519 | last form. If you wish to return the buffer contents, use (buffer-string) | |
6520 | as the last form. | |
6521 | ||
6522 | *** The new function split-string takes a string, splits it at certain | |
6523 | characters, and returns a list of the substrings in between the | |
6524 | matches. | |
6525 | ||
6526 | For example, (split-string "foo bar lose" " +") returns ("foo" "bar" "lose"). | |
6527 | ||
6528 | *** The new macro with-output-to-string executes some Lisp expressions | |
6529 | with standard-output set up so that all output feeds into a string. | |
6530 | Then it returns that string. | |
6531 | ||
6532 | For example, if the current buffer name is `foo', | |
6533 | ||
6534 | (with-output-to-string | |
6535 | (princ "The buffer is ") | |
6536 | (princ (buffer-name))) | |
6537 | ||
6538 | returns "The buffer is foo". | |
6539 | ||
6540 | ** Non-ASCII characters are now supported, if enable-multibyte-characters | |
6541 | is non-nil. | |
6542 | ||
6543 | These characters have character codes above 256. When inserted in the | |
6544 | buffer or stored in a string, they are represented as multibyte | |
6545 | characters that occupy several buffer positions each. | |
6546 | ||
6547 | *** When enable-multibyte-characters is non-nil, a single character in | |
6548 | a buffer or string can be two or more bytes (as many as four). | |
6549 | ||
6550 | Buffers and strings are still made up of unibyte elements; | |
6551 | character positions and string indices are always measured in bytes. | |
6552 | Therefore, moving forward one character can increase the buffer | |
6553 | position by 2, 3 or 4. The function forward-char moves by whole | |
6554 | characters, and therefore is no longer equivalent to | |
6555 | (lambda (n) (goto-char (+ (point) n))). | |
6556 | ||
6557 | ASCII characters (codes 0 through 127) are still single bytes, always. | |
6558 | Sequences of byte values 128 through 255 are used to represent | |
6559 | non-ASCII characters. These sequences are called "multibyte | |
6560 | characters". | |
6561 | ||
6562 | The first byte of a multibyte character is always in the range 128 | |
6563 | through 159 (octal 0200 through 0237). These values are called | |
6564 | "leading codes". The second and subsequent bytes are always in the | |
6565 | range 160 through 255 (octal 0240 through 0377). The first byte, the | |
6566 | leading code, determines how many bytes long the sequence is. | |
6567 | ||
6568 | *** The function forward-char moves over characters, and therefore | |
6569 | (forward-char 1) may increase point by more than 1 if it moves over a | |
6570 | multibyte character. Likewise, delete-char always deletes a | |
6571 | character, which may be more than one buffer position. | |
6572 | ||
6573 | This means that some Lisp programs, which assume that a character is | |
6574 | always one buffer position, need to be changed. | |
6575 | ||
6576 | However, all ASCII characters are always one buffer position. | |
79214ddf | 6577 | |
a933dad1 DL |
6578 | *** The regexp [\200-\377] no longer matches all non-ASCII characters, |
6579 | because when enable-multibyte-characters is non-nil, these characters | |
6580 | have codes that are not in the range octal 200 to octal 377. However, | |
6581 | the regexp [^\000-\177] does match all non-ASCII characters, | |
6582 | guaranteed. | |
6583 | ||
6584 | *** The function char-boundary-p returns non-nil if position POS is | |
6585 | between two characters in the buffer (not in the middle of a | |
6586 | character). | |
6587 | ||
6588 | When the value is non-nil, it says what kind of character follows POS: | |
6589 | ||
6590 | 0 if POS is at an ASCII character or at the end of range, | |
6591 | 1 if POS is before a 2-byte length multi-byte form, | |
6592 | 2 if POS is at a head of 3-byte length multi-byte form, | |
6593 | 3 if POS is at a head of 4-byte length multi-byte form, | |
6594 | 4 if POS is at a head of multi-byte form of a composite character. | |
6595 | ||
6596 | *** The function char-bytes returns how many bytes the character CHAR uses. | |
6597 | ||
6598 | *** Strings can contain multibyte characters. The function | |
6599 | `length' returns the string length counting bytes, which may be | |
6600 | more than the number of characters. | |
6601 | ||
6602 | You can include a multibyte character in a string constant by writing | |
6603 | it literally. You can also represent it with a hex escape, | |
6604 | \xNNNNNNN..., using as many digits as necessary. Any character which | |
6605 | is not a valid hex digit terminates this construct. If you want to | |
6606 | follow it with a character that is a hex digit, write backslash and | |
6607 | newline in between; that will terminate the hex escape. | |
6608 | ||
6609 | *** The function concat-chars takes arguments which are characters | |
6610 | and returns a string containing those characters. | |
6611 | ||
6612 | *** The function sref access a multibyte character in a string. | |
6613 | (sref STRING INDX) returns the character in STRING at INDEX. INDEX | |
6614 | counts from zero. If INDEX is at a position in the middle of a | |
6615 | character, sref signals an error. | |
6616 | ||
6617 | *** The function chars-in-string returns the number of characters | |
6618 | in a string. This is less than the length of the string, if the | |
6619 | string contains multibyte characters (the length counts bytes). | |
6620 | ||
6621 | *** The function chars-in-region returns the number of characters | |
6622 | in a region from BEG to END. This is less than (- END BEG) if the | |
6623 | region contains multibyte characters (the length counts bytes). | |
6624 | ||
6625 | *** The function string-to-list converts a string to a list of | |
6626 | the characters in it. string-to-vector converts a string | |
6627 | to a vector of the characters in it. | |
6628 | ||
6629 | *** The function store-substring alters part of the contents | |
6630 | of a string. You call it as follows: | |
6631 | ||
6632 | (store-substring STRING IDX OBJ) | |
6633 | ||
6634 | This says to alter STRING, by storing OBJ starting at index IDX in | |
6635 | STRING. OBJ may be either a character or a (smaller) string. | |
6636 | This function really does alter the contents of STRING. | |
6637 | Since it is impossible to change the length of an existing string, | |
6638 | it is an error if OBJ doesn't fit within STRING's actual length. | |
6639 | ||
6640 | *** char-width returns the width (in columns) of the character CHAR, | |
6641 | if it were displayed in the current buffer and the selected window. | |
6642 | ||
6643 | *** string-width returns the width (in columns) of the text in STRING, | |
6644 | if it were displayed in the current buffer and the selected window. | |
6645 | ||
6646 | *** truncate-string-to-width shortens a string, if necessary, | |
6647 | to fit within a certain number of columns. (Of course, it does | |
6648 | not alter the string that you give it; it returns a new string | |
6649 | which contains all or just part of the existing string.) | |
6650 | ||
6651 | (truncate-string-to-width STR END-COLUMN &optional START-COLUMN PADDING) | |
6652 | ||
6653 | This returns the part of STR up to column END-COLUMN. | |
6654 | ||
6655 | The optional argument START-COLUMN specifies the starting column. | |
6656 | If this is non-nil, then the first START-COLUMN columns of the string | |
6657 | are not included in the resulting value. | |
6658 | ||
6659 | The optional argument PADDING, if non-nil, is a padding character to be added | |
6660 | at the beginning and end the resulting string, to extend it to exactly | |
6661 | WIDTH columns. If PADDING is nil, that means do not pad; then, if STRING | |
6662 | is narrower than WIDTH, the value is equal to STRING. | |
6663 | ||
6664 | If PADDING and START-COLUMN are both non-nil, and if there is no clean | |
6665 | place in STRING that corresponds to START-COLUMN (because one | |
6666 | character extends across that column), then the padding character | |
6667 | PADDING is added one or more times at the beginning of the result | |
6668 | string, so that its columns line up as if it really did start at | |
6669 | column START-COLUMN. | |
6670 | ||
6671 | *** When the functions in the list after-change-functions are called, | |
6672 | the third argument is the number of bytes in the pre-change text, not | |
6673 | necessarily the number of characters. It is, in effect, the | |
6674 | difference in buffer position between the beginning and the end of the | |
6675 | changed text, before the change. | |
6676 | ||
6677 | *** The characters Emacs uses are classified in various character | |
6678 | sets, each of which has a name which is a symbol. In general there is | |
6679 | one character set for each script, not for each language. | |
6680 | ||
6681 | **** The function charsetp tests whether an object is a character set name. | |
6682 | ||
6683 | **** The variable charset-list holds a list of character set names. | |
6684 | ||
6685 | **** char-charset, given a character code, returns the name of the character | |
6686 | set that the character belongs to. (The value is a symbol.) | |
6687 | ||
6688 | **** split-char, given a character code, returns a list containing the | |
6689 | name of the character set, followed by one or two byte-values | |
6690 | which identify the character within that character set. | |
6691 | ||
6692 | **** make-char, given a character set name and one or two subsequent | |
6693 | byte-values, constructs a character code. This is roughly the | |
6694 | opposite of split-char. | |
6695 | ||
6696 | **** find-charset-region returns a list of the character sets | |
6697 | of all the characters between BEG and END. | |
6698 | ||
6699 | **** find-charset-string returns a list of the character sets | |
6700 | of all the characters in a string. | |
6701 | ||
6702 | *** Here are the Lisp facilities for working with coding systems | |
6703 | and specifying coding systems. | |
6704 | ||
6705 | **** The function coding-system-list returns a list of all coding | |
6706 | system names (symbols). With optional argument t, it returns a list | |
6707 | of all distinct base coding systems, not including variants. | |
6708 | (Variant coding systems are those like latin-1-dos, latin-1-unix | |
6709 | and latin-1-mac which specify the end-of-line conversion as well | |
6710 | as what to do about code conversion.) | |
6711 | ||
6712 | **** coding-system-p tests a symbol to see if it is a coding system | |
6713 | name. It returns t if so, nil if not. | |
6714 | ||
6715 | **** file-coding-system-alist specifies which coding systems to use | |
6716 | for certain file names. It works like network-coding-system-alist, | |
6717 | except that the PATTERN is matched against the file name. | |
6718 | ||
6719 | Each element has the format (PATTERN . VAL), where PATTERN determines | |
6720 | which file names the element applies to. PATTERN should be a regexp | |
6721 | to match against a file name. | |
6722 | ||
6723 | VAL is a coding system, a cons cell containing two coding systems, or | |
6724 | a function symbol. If VAL is a coding system, it is used for both | |
6725 | decoding what received from the network stream and encoding what sent | |
6726 | to the network stream. If VAL is a cons cell containing two coding | |
6727 | systems, the car specifies the coding system for decoding, and the cdr | |
6728 | specifies the coding system for encoding. | |
6729 | ||
6730 | If VAL is a function symbol, the function must return a coding system | |
6731 | or a cons cell containing two coding systems, which is used as above. | |
6732 | ||
6733 | **** The variable network-coding-system-alist specifies | |
6734 | the coding system to use for network sockets. | |
6735 | ||
6736 | Each element has the format (PATTERN . VAL), where PATTERN determines | |
6737 | which network sockets the element applies to. PATTERN should be | |
6738 | either a port number or a regular expression matching some network | |
6739 | service names. | |
6740 | ||
6741 | VAL is a coding system, a cons cell containing two coding systems, or | |
6742 | a function symbol. If VAL is a coding system, it is used for both | |
6743 | decoding what received from the network stream and encoding what sent | |
6744 | to the network stream. If VAL is a cons cell containing two coding | |
6745 | systems, the car specifies the coding system for decoding, and the cdr | |
6746 | specifies the coding system for encoding. | |
6747 | ||
6748 | If VAL is a function symbol, the function must return a coding system | |
6749 | or a cons cell containing two coding systems, which is used as above. | |
6750 | ||
6751 | **** process-coding-system-alist specifies which coding systems to use | |
6752 | for certain subprocess. It works like network-coding-system-alist, | |
6753 | except that the PATTERN is matched against the program name used to | |
6754 | start the subprocess. | |
6755 | ||
6756 | **** The variable default-process-coding-system specifies the coding | |
6757 | systems to use for subprocess (and net connection) input and output, | |
6758 | when nothing else specifies what to do. The value is a cons cell | |
6759 | (OUTPUT-CODING . INPUT-CODING). OUTPUT-CODING applies to output | |
6760 | to the subprocess, and INPUT-CODING applies to input from it. | |
6761 | ||
6762 | **** The variable coding-system-for-write, if non-nil, specifies the | |
6763 | coding system to use for writing a file, or for output to a synchronous | |
6764 | subprocess. | |
6765 | ||
6766 | It also applies to any asynchronous subprocess or network connection, | |
6767 | but in a different way: the value of coding-system-for-write when you | |
6768 | start the subprocess or connection affects that subprocess or | |
6769 | connection permanently or until overridden. | |
6770 | ||
6771 | The variable coding-system-for-write takes precedence over | |
6772 | file-coding-system-alist, process-coding-system-alist and | |
6773 | network-coding-system-alist, and all other methods of specifying a | |
6774 | coding system for output. But most of the time this variable is nil. | |
6775 | It exists so that Lisp programs can bind it to a specific coding | |
6776 | system for one operation at a time. | |
6777 | ||
6778 | **** coding-system-for-read applies similarly to input from | |
6779 | files, subprocesses or network connections. | |
6780 | ||
6781 | **** The function process-coding-system tells you what | |
6782 | coding systems(s) an existing subprocess is using. | |
6783 | The value is a cons cell, | |
6784 | (DECODING-CODING-SYSTEM . ENCODING-CODING-SYSTEM) | |
6785 | where DECODING-CODING-SYSTEM is used for decoding output from | |
6786 | the subprocess, and ENCODING-CODING-SYSTEM is used for encoding | |
6787 | input to the subprocess. | |
6788 | ||
6789 | **** The function set-process-coding-system can be used to | |
6790 | change the coding systems in use for an existing subprocess. | |
6791 | ||
6792 | ** Emacs has a new facility to help users manage the many | |
6793 | customization options. To make a Lisp program work with this facility, | |
6794 | you need to use the new macros defgroup and defcustom. | |
6795 | ||
6796 | You use defcustom instead of defvar, for defining a user option | |
6797 | variable. The difference is that you specify two additional pieces of | |
6798 | information (usually): the "type" which says what values are | |
6799 | legitimate, and the "group" which specifies the hierarchy for | |
6800 | customization. | |
6801 | ||
6802 | Thus, instead of writing | |
6803 | ||
6804 | (defvar foo-blurgoze nil | |
6805 | "*Non-nil means that foo will act very blurgozely.") | |
6806 | ||
6807 | you would now write this: | |
6808 | ||
6809 | (defcustom foo-blurgoze nil | |
6810 | "*Non-nil means that foo will act very blurgozely." | |
6811 | :type 'boolean | |
6812 | :group foo) | |
6813 | ||
6814 | The type `boolean' means that this variable has only | |
6815 | two meaningful states: nil and non-nil. Other type values | |
6816 | describe other possibilities; see the manual for Custom | |
6817 | for a description of them. | |
6818 | ||
6819 | The "group" argument is used to specify a group which the option | |
6820 | should belong to. You define a new group like this: | |
6821 | ||
6822 | (defgroup ispell nil | |
6823 | "Spell checking using Ispell." | |
6824 | :group 'processes) | |
6825 | ||
6826 | The "group" argument in defgroup specifies the parent group. The root | |
6827 | group is called `emacs'; it should not contain any variables itself, | |
6828 | but only other groups. The immediate subgroups of `emacs' correspond | |
6829 | to the keywords used by C-h p. Under these subgroups come | |
6830 | second-level subgroups that belong to individual packages. | |
6831 | ||
6832 | Each Emacs package should have its own set of groups. A simple | |
6833 | package should have just one group; a more complex package should | |
6834 | have a hierarchy of its own groups. The sole or root group of a | |
6835 | package should be a subgroup of one or more of the "keyword" | |
6836 | first-level subgroups. | |
6837 | ||
6838 | ** New `widget' library for inserting UI components in buffers. | |
6839 | ||
6840 | This library, used by the new custom library, is documented in a | |
6841 | separate manual that accompanies Emacs. | |
6842 | ||
6843 | ** easy-mmode | |
6844 | ||
6845 | The easy-mmode package provides macros and functions that make | |
6846 | developing minor modes easier. Roughly, the programmer has to code | |
6847 | only the functionality of the minor mode. All the rest--toggles, | |
6848 | predicate, and documentation--can be done in one call to the macro | |
6849 | `easy-mmode-define-minor-mode' (see the documentation). See also | |
6850 | `easy-mmode-define-keymap'. | |
6851 | ||
6852 | ** Text property changes | |
6853 | ||
6854 | *** The `intangible' property now works on overlays as well as on a | |
6855 | text property. | |
6856 | ||
6857 | *** The new functions next-char-property-change and | |
6858 | previous-char-property-change scan through the buffer looking for a | |
6859 | place where either a text property or an overlay might change. The | |
6860 | functions take two arguments, POSITION and LIMIT. POSITION is the | |
6861 | starting position for the scan. LIMIT says where to stop the scan. | |
6862 | ||
6863 | If no property change is found before LIMIT, the value is LIMIT. If | |
6864 | LIMIT is nil, scan goes to the beginning or end of the accessible part | |
6865 | of the buffer. If no property change is found, the value is the | |
6866 | position of the beginning or end of the buffer. | |
6867 | ||
6868 | *** In the `local-map' text property or overlay property, the property | |
6869 | value can now be a symbol whose function definition is a keymap. This | |
6870 | is an alternative to using the keymap itself. | |
6871 | ||
6872 | ** Changes in invisibility features | |
6873 | ||
6874 | *** Isearch can now temporarily show parts of the buffer which are | |
6875 | hidden by an overlay with a invisible property, when the search match | |
6876 | is inside that portion of the buffer. To enable this the overlay | |
6877 | should have a isearch-open-invisible property which is a function that | |
6878 | would be called having the overlay as an argument, the function should | |
6879 | make the overlay visible. | |
6880 | ||
6881 | During incremental search the overlays are shown by modifying the | |
6882 | invisible and intangible properties, if beside this more actions are | |
6883 | needed the overlay should have a isearch-open-invisible-temporary | |
6884 | which is a function. The function is called with 2 arguments: one is | |
6885 | the overlay and the second is nil when it should show the overlay and | |
6886 | t when it should hide it. | |
6887 | ||
6888 | *** add-to-invisibility-spec, remove-from-invisibility-spec | |
6889 | ||
6890 | Modes that use overlays to hide portions of a buffer should set the | |
79214ddf FP |
6891 | invisible property of the overlay to the mode's name (or another symbol) |
6892 | and modify the `buffer-invisibility-spec' to include that symbol. | |
a933dad1 | 6893 | Use `add-to-invisibility-spec' and `remove-from-invisibility-spec' to |
79214ddf | 6894 | manipulate the `buffer-invisibility-spec'. |
a933dad1 DL |
6895 | Here is an example of how to do this: |
6896 | ||
6897 | ;; If we want to display an ellipsis: | |
79214ddf | 6898 | (add-to-invisibility-spec '(my-symbol . t)) |
a933dad1 | 6899 | ;; If you don't want ellipsis: |
79214ddf | 6900 | (add-to-invisibility-spec 'my-symbol) |
a933dad1 DL |
6901 | |
6902 | ... | |
6903 | (overlay-put (make-overlay beginning end) 'invisible 'my-symbol) | |
6904 | ||
6905 | ... | |
6906 | ;; When done with the overlays: | |
6907 | (remove-from-invisibility-spec '(my-symbol . t)) | |
6908 | ;; Or respectively: | |
6909 | (remove-from-invisibility-spec 'my-symbol) | |
6910 | ||
6911 | ** Changes in syntax parsing. | |
6912 | ||
6913 | *** The syntax-directed buffer-scan functions (such as | |
6914 | `parse-partial-sexp', `forward-word' and similar functions) can now | |
6915 | obey syntax information specified by text properties, if the variable | |
6916 | `parse-sexp-lookup-properties' is non-nil. | |
6917 | ||
6918 | If the value of `parse-sexp-lookup-properties' is nil, the behavior | |
6919 | is as before: the syntax-table of the current buffer is always | |
6920 | used to determine the syntax of the character at the position. | |
6921 | ||
6922 | When `parse-sexp-lookup-properties' is non-nil, the syntax of a | |
6923 | character in the buffer is calculated thus: | |
6924 | ||
6925 | a) if the `syntax-table' text-property of that character | |
6926 | is a cons, this cons becomes the syntax-type; | |
6927 | ||
6928 | Valid values of `syntax-table' text-property are: nil, a valid | |
6929 | syntax-table, and a valid syntax-table element, i.e., | |
6930 | a cons cell of the form (SYNTAX-CODE . MATCHING-CHAR). | |
6931 | ||
6932 | b) if the character's `syntax-table' text-property | |
6933 | is a syntax table, this syntax table is used | |
6934 | (instead of the syntax-table of the current buffer) to | |
6935 | determine the syntax type of the character. | |
6936 | ||
6937 | c) otherwise the syntax-type is determined by the syntax-table | |
6938 | of the current buffer. | |
6939 | ||
6940 | *** The meaning of \s in regular expressions is also affected by the | |
6941 | value of `parse-sexp-lookup-properties'. The details are the same as | |
6942 | for the syntax-directed buffer-scan functions. | |
6943 | ||
6944 | *** There are two new syntax-codes, `!' and `|' (numeric values 14 | |
6945 | and 15). A character with a code `!' starts a comment which is ended | |
6946 | only by another character with the same code (unless quoted). A | |
6947 | character with a code `|' starts a string which is ended only by | |
6948 | another character with the same code (unless quoted). | |
6949 | ||
6950 | These codes are mainly meant for use as values of the `syntax-table' | |
6951 | text property. | |
6952 | ||
6953 | *** The function `parse-partial-sexp' has new semantics for the sixth | |
6954 | arg COMMENTSTOP. If it is `syntax-table', parse stops after the start | |
6955 | of a comment or a string, or after end of a comment or a string. | |
6956 | ||
6957 | *** The state-list which the return value from `parse-partial-sexp' | |
6958 | (and can also be used as an argument) now has an optional ninth | |
6959 | element: the character address of the start of last comment or string; | |
6960 | nil if none. The fourth and eighth elements have special values if the | |
6961 | string/comment is started by a "!" or "|" syntax-code. | |
6962 | ||
6963 | *** Since new features of `parse-partial-sexp' allow a complete | |
6964 | syntactic parsing, `font-lock' no longer supports | |
6965 | `font-lock-comment-start-regexp'. | |
6966 | ||
6967 | ** Changes in face features | |
6968 | ||
6969 | *** The face functions are now unconditionally defined in Emacs, even | |
6970 | if it does not support displaying on a device that supports faces. | |
6971 | ||
6972 | *** The function face-documentation returns the documentation string | |
6973 | of a face (or nil if it doesn't have one). | |
6974 | ||
6975 | *** The function face-bold-p returns t if a face should be bold. | |
6976 | set-face-bold-p sets that flag. | |
6977 | ||
6978 | *** The function face-italic-p returns t if a face should be italic. | |
6979 | set-face-italic-p sets that flag. | |
6980 | ||
6981 | *** You can now specify foreground and background colors for text | |
6982 | by adding elements of the form (foreground-color . COLOR-NAME) | |
6983 | and (background-color . COLOR-NAME) to the list of faces in | |
6984 | the `face' property (either the character's text property or an | |
6985 | overlay property). | |
6986 | ||
6987 | This means that you no longer need to create named faces to use | |
6988 | arbitrary colors in a Lisp package. | |
6989 | ||
6990 | ** Changes in file-handling functions | |
6991 | ||
6992 | *** File-access primitive functions no longer discard an extra redundant | |
6993 | directory name from the beginning of the file name. In other words, | |
6994 | they no longer do anything special with // or /~. That conversion | |
6995 | is now done only in substitute-in-file-name. | |
6996 | ||
6997 | This makes it possible for a Lisp program to open a file whose name | |
6998 | begins with ~. | |
6999 | ||
7000 | *** If copy-file is unable to set the date of the output file, | |
7001 | it now signals an error with the condition file-date-error. | |
7002 | ||
7003 | *** The inode number returned by file-attributes may be an integer (if | |
7004 | the number fits in a Lisp integer) or a list of integers. | |
7005 | ||
7006 | *** insert-file-contents can now read from a special file, | |
7007 | as long as the arguments VISIT and REPLACE are nil. | |
7008 | ||
7009 | *** The RAWFILE arg to find-file-noselect, if non-nil, now suppresses | |
7010 | character code conversion as well as other things. | |
7011 | ||
7012 | Meanwhile, this feature does work with remote file names | |
7013 | (formerly it did not). | |
7014 | ||
7015 | *** Lisp packages which create temporary files should use the TMPDIR | |
7016 | environment variable to decide which directory to put them in. | |
7017 | ||
7018 | *** interpreter-mode-alist elements now specify regexps | |
7019 | instead of constant strings. | |
7020 | ||
7021 | *** expand-file-name no longer treats `//' or `/~' specially. It used | |
7022 | to delete all the text of a file name up through the first slash of | |
7023 | any `//' or `/~' sequence. Now it passes them straight through. | |
7024 | ||
7025 | substitute-in-file-name continues to treat those sequences specially, | |
7026 | in the same way as before. | |
7027 | ||
7028 | *** The variable `format-alist' is more general now. | |
7029 | The FROM-FN and TO-FN in a format definition can now be strings | |
7030 | which specify shell commands to use as filters to perform conversion. | |
7031 | ||
7032 | *** The new function access-file tries to open a file, and signals an | |
7033 | error if that fails. If the open succeeds, access-file does nothing | |
7034 | else, and returns nil. | |
7035 | ||
7036 | *** The function insert-directory now signals an error if the specified | |
7037 | directory cannot be listed. | |
7038 | ||
7039 | ** Changes in minibuffer input | |
7040 | ||
7041 | *** The functions read-buffer, read-variable, read-command, read-string | |
7042 | read-file-name, read-from-minibuffer and completing-read now take an | |
7043 | additional argument which specifies the default value. If this | |
7044 | argument is non-nil, it should be a string; that string is used in two | |
7045 | ways: | |
7046 | ||
7047 | It is returned if the user enters empty input. | |
7048 | It is available through the history command M-n. | |
7049 | ||
7050 | *** The functions read-string, read-from-minibuffer, | |
7051 | read-no-blanks-input and completing-read now take an additional | |
7052 | argument INHERIT-INPUT-METHOD. If this is non-nil, then the | |
7053 | minibuffer inherits the current input method and the setting of | |
7054 | enable-multibyte-characters from the previously current buffer. | |
7055 | ||
7056 | In an interactive spec, you can use M instead of s to read an | |
7057 | argument in this way. | |
7058 | ||
7059 | *** All minibuffer input functions discard text properties | |
7060 | from the text you enter in the minibuffer, unless the variable | |
7061 | minibuffer-allow-text-properties is non-nil. | |
7062 | ||
7063 | ** Echo area features | |
7064 | ||
7065 | *** Clearing the echo area now runs the normal hook | |
7066 | echo-area-clear-hook. Note that the echo area can be used while the | |
7067 | minibuffer is active; in that case, the minibuffer is still active | |
7068 | after the echo area is cleared. | |
7069 | ||
7070 | *** The function current-message returns the message currently displayed | |
7071 | in the echo area, or nil if there is none. | |
7072 | ||
7073 | ** Keyboard input features | |
7074 | ||
7075 | *** tty-erase-char is a new variable that reports which character was | |
7076 | set up as the terminal's erase character when time Emacs was started. | |
7077 | ||
7078 | *** num-nonmacro-input-events is the total number of input events | |
7079 | received so far from the terminal. It does not count those generated | |
7080 | by keyboard macros. | |
7081 | ||
7082 | ** Frame-related changes | |
7083 | ||
7084 | *** make-frame runs the normal hook before-make-frame-hook just before | |
7085 | creating a frame, and just after creating a frame it runs the abnormal | |
7086 | hook after-make-frame-functions with the new frame as arg. | |
7087 | ||
7088 | *** The new hook window-configuration-change-hook is now run every time | |
7089 | the window configuration has changed. The frame whose configuration | |
7090 | has changed is the selected frame when the hook is run. | |
7091 | ||
7092 | *** Each frame now independently records the order for recently | |
7093 | selected buffers, in its buffer-list frame parameter, so that the | |
7094 | value of other-buffer is now based on the buffers recently displayed | |
7095 | in the selected frame. | |
7096 | ||
7097 | *** The value of the frame parameter vertical-scroll-bars | |
7098 | is now `left', `right' or nil. A non-nil value specifies | |
7099 | which side of the window to put the scroll bars on. | |
7100 | ||
7101 | ** X Windows features | |
7102 | ||
7103 | *** You can examine X resources for other applications by binding | |
7104 | x-resource-class around a call to x-get-resource. The usual value of | |
7105 | x-resource-class is "Emacs", which is the correct value for Emacs. | |
7106 | ||
7107 | *** In menus, checkboxes and radio buttons now actually work. | |
7108 | The menu displays the current status of the box or button. | |
7109 | ||
7110 | *** The function x-list-fonts now takes an optional fourth argument | |
7111 | MAXIMUM which sets a limit on how many matching fonts to return. | |
7112 | A smaller value of MAXIMUM makes the function faster. | |
7113 | ||
7114 | If the only question is whether *any* font matches the pattern, | |
7115 | it is good to supply 1 for this argument. | |
7116 | ||
7117 | ** Subprocess features | |
7118 | ||
7119 | *** A reminder: it is no longer necessary for subprocess filter | |
7120 | functions and sentinels to do save-match-data, because Emacs does this | |
7121 | automatically. | |
7122 | ||
7123 | *** The new function shell-command-to-string executes a shell command | |
7124 | and returns the output from the command as a string. | |
7125 | ||
7126 | *** The new function process-contact returns t for a child process, | |
7127 | and (HOSTNAME SERVICE) for a net connection. | |
7128 | ||
7129 | ** An error in running pre-command-hook or post-command-hook | |
7130 | does clear the variable to nil. The documentation was wrong before. | |
7131 | ||
7132 | ** In define-key-after, if AFTER is t, the new binding now always goes | |
7133 | at the end of the keymap. If the keymap is a menu, this means it | |
7134 | goes after the other menu items. | |
7135 | ||
7136 | ** If you have a program that makes several changes in the same area | |
79214ddf | 7137 | of the buffer, you can use the macro combine-after-change-calls |
a933dad1 DL |
7138 | around that Lisp code to make it faster when after-change hooks |
7139 | are in use. | |
7140 | ||
7141 | The macro arranges to call the after-change functions just once for a | |
7142 | series of several changes--if that seems safe. | |
7143 | ||
7144 | Don't alter the variables after-change-functions and | |
7145 | after-change-function within the body of a combine-after-change-calls | |
7146 | form. | |
7147 | ||
7148 | ** If you define an abbrev (with define-abbrev) whose EXPANSION | |
7149 | is not a string, then the abbrev does not expand in the usual sense, | |
7150 | but its hook is still run. | |
7151 | ||
7152 | ** Normally, the Lisp debugger is not used (even if you have enabled it) | |
7153 | for errors that are handled by condition-case. | |
7154 | ||
7155 | If you set debug-on-signal to a non-nil value, then the debugger is called | |
7156 | regardless of whether there is a handler for the condition. This is | |
7157 | useful for debugging problems that happen inside of a condition-case. | |
7158 | ||
7159 | This mode of operation seems to be unreliable in other ways. Errors that | |
7160 | are normal and ought to be handled, perhaps in timers or process | |
7161 | filters, will instead invoke the debugger. So don't say you weren't | |
7162 | warned. | |
7163 | ||
7164 | ** The new variable ring-bell-function lets you specify your own | |
7165 | way for Emacs to "ring the bell". | |
7166 | ||
7167 | ** If run-at-time's TIME argument is t, the action is repeated at | |
7168 | integral multiples of REPEAT from the epoch; this is useful for | |
7169 | functions like display-time. | |
7170 | ||
7171 | ** You can use the function locate-library to find the precise file | |
7172 | name of a Lisp library. This isn't new, but wasn't documented before. | |
7173 | ||
7174 | ** Commands for entering view mode have new optional arguments that | |
7175 | can be used from Lisp. Low-level entrance to and exit from view mode | |
7176 | is done by functions view-mode-enter and view-mode-exit. | |
7177 | ||
7178 | ** batch-byte-compile-file now makes Emacs return a nonzero status code | |
7179 | if there is an error in compilation. | |
7180 | ||
7181 | ** pop-to-buffer, switch-to-buffer-other-window and | |
7182 | switch-to-buffer-other-frame now accept an additional optional | |
7183 | argument NORECORD, much like switch-to-buffer. If it is non-nil, | |
7184 | they don't put the buffer at the front of the buffer list. | |
7185 | ||
7186 | ** If your .emacs file leaves the *scratch* buffer non-empty, | |
7187 | Emacs does not display the startup message, so as to avoid changing | |
7188 | the *scratch* buffer. | |
7189 | ||
7190 | ** The new function regexp-opt returns an efficient regexp to match a string. | |
7191 | The arguments are STRINGS and (optionally) PAREN. This function can be used | |
7192 | where regexp matching or searching is intensively used and speed is important, | |
7193 | e.g., in Font Lock mode. | |
7194 | ||
7195 | ** The variable buffer-display-count is local to each buffer, | |
7196 | and is incremented each time the buffer is displayed in a window. | |
7197 | It starts at 0 when the buffer is created. | |
7198 | ||
7199 | ** The new function compose-mail starts composing a mail message | |
7200 | using the user's chosen mail composition agent (specified with the | |
7201 | variable mail-user-agent). It has variants compose-mail-other-window | |
7202 | and compose-mail-other-frame. | |
7203 | ||
7204 | ** The `user-full-name' function now takes an optional parameter which | |
7205 | can either be a number (the UID) or a string (the login name). The | |
7206 | full name of the specified user will be returned. | |
7207 | ||
7208 | ** Lisp packages that load files of customizations, or any other sort | |
7209 | of user profile, should obey the variable init-file-user in deciding | |
7210 | where to find it. They should load the profile of the user name found | |
7211 | in that variable. If init-file-user is nil, meaning that the -q | |
7212 | option was used, then Lisp packages should not load the customization | |
7213 | files at all. | |
7214 | ||
7215 | ** format-time-string now allows you to specify the field width | |
7216 | and type of padding. This works as in printf: you write the field | |
7217 | width as digits in the middle of a %-construct. If you start | |
7218 | the field width with 0, it means to pad with zeros. | |
7219 | ||
7220 | For example, %S normally specifies the number of seconds since the | |
7221 | minute; %03S means to pad this with zeros to 3 positions, %_3S to pad | |
7222 | with spaces to 3 positions. Plain %3S pads with zeros, because that | |
7223 | is how %S normally pads to two positions. | |
7224 | ||
7225 | ** thing-at-point now supports a new kind of "thing": url. | |
7226 | ||
7227 | ** imenu.el changes. | |
7228 | ||
7229 | You can now specify a function to be run when selecting an | |
79214ddf | 7230 | item from menu created by imenu. |
a933dad1 DL |
7231 | |
7232 | An example of using this feature: if we define imenu items for the | |
7233 | #include directives in a C file, we can open the included file when we | |
7234 | select one of those items. | |
7235 | \f | |
7236 | * Emacs 19.34 is a bug-fix release with no user-visible changes. | |
7237 | \f | |
7238 | * Changes in Emacs 19.33. | |
7239 | ||
7240 | ** Bibtex mode no longer turns on Auto Fill automatically. (No major | |
7241 | mode should do that--it is the user's choice.) | |
7242 | ||
7243 | ** The variable normal-auto-fill-function specifies the function to | |
7244 | use for auto-fill-function, if and when Auto Fill is turned on. | |
7245 | Major modes can set this locally to alter how Auto Fill works. | |
7246 | \f | |
7247 | * Editing Changes in Emacs 19.32 | |
7248 | ||
7249 | ** C-x f with no argument now signals an error. | |
7250 | To set the fill column at the current column, use C-u C-x f. | |
7251 | ||
7252 | ** Expanding dynamic abbrevs with M-/ is now smarter about case | |
7253 | conversion. If you type the abbreviation with mixed case, and it | |
7254 | matches the beginning of the expansion including case, then the | |
7255 | expansion is copied verbatim. Using SPC M-/ to copy an additional | |
7256 | word always copies it verbatim except when the previous copied word is | |
7257 | all caps. | |
7258 | ||
7259 | ** On a non-windowing terminal, which can display only one Emacs frame | |
7260 | at a time, creating a new frame with C-x 5 2 also selects that frame. | |
7261 | ||
7262 | When using a display that can show multiple frames at once, C-x 5 2 | |
7263 | does make the frame visible, but does not select it. This is the same | |
7264 | as in previous Emacs versions. | |
7265 | ||
7266 | ** You can use C-x 5 2 to create multiple frames on MSDOS, just as on a | |
7267 | non-X terminal on Unix. Of course, only one frame is visible at any | |
7268 | time, since your terminal doesn't have the ability to display multiple | |
7269 | frames. | |
7270 | ||
7271 | ** On Windows, set win32-pass-alt-to-system to a non-nil value | |
7272 | if you would like tapping the Alt key to invoke the Windows menu. | |
7273 | This feature is not enabled by default; since the Alt key is also the | |
7274 | Meta key, it is too easy and painful to activate this feature by | |
7275 | accident. | |
7276 | ||
7277 | ** The command apply-macro-to-region-lines repeats the last defined | |
7278 | keyboard macro once for each complete line within the current region. | |
7279 | It does this line by line, by moving point to the beginning of that | |
7280 | line and then executing the macro. | |
7281 | ||
7282 | This command is not new, but was never documented before. | |
7283 | ||
7284 | ** You can now use Mouse-1 to place the region around a string constant | |
7285 | (something surrounded by doublequote characters or other delimiter | |
7286 | characters of like syntax) by double-clicking on one of the delimiting | |
7287 | characters. | |
7288 | ||
7289 | ** Font Lock mode | |
7290 | ||
7291 | *** Font Lock support modes | |
7292 | ||
7293 | Font Lock can be configured to use Fast Lock mode and Lazy Lock mode (see | |
7294 | below) in a flexible way. Rather than adding the appropriate function to the | |
7295 | hook font-lock-mode-hook, you can use the new variable font-lock-support-mode | |
7296 | to control which modes have Fast Lock mode or Lazy Lock mode turned on when | |
7297 | Font Lock mode is enabled. | |
7298 | ||
7299 | For example, to use Fast Lock mode when Font Lock mode is turned on, put: | |
7300 | ||
7301 | (setq font-lock-support-mode 'fast-lock-mode) | |
7302 | ||
7303 | in your ~/.emacs. | |
7304 | ||
7305 | *** lazy-lock | |
7306 | ||
7307 | The lazy-lock package speeds up Font Lock mode by making fontification occur | |
7308 | only when necessary, such as when a previously unfontified part of the buffer | |
7309 | becomes visible in a window. When you create a buffer with Font Lock mode and | |
7310 | Lazy Lock mode turned on, the buffer is not fontified. When certain events | |
7311 | occur (such as scrolling), Lazy Lock makes sure that the visible parts of the | |
7312 | buffer are fontified. Lazy Lock also defers on-the-fly fontification until | |
7313 | Emacs has been idle for a given amount of time. | |
7314 | ||
7315 | To use this package, put in your ~/.emacs: | |
7316 | ||
7317 | (setq font-lock-support-mode 'lazy-lock-mode) | |
7318 | ||
7319 | To control the package behaviour, see the documentation for `lazy-lock-mode'. | |
7320 | ||
7321 | ** Changes in BibTeX mode. | |
7322 | ||
7323 | *** For all entries allow spaces and tabs between opening brace or | |
7324 | paren and key. | |
7325 | ||
7326 | *** Non-escaped double-quoted characters (as in `Sch"of') are now | |
7327 | supported. | |
7328 | ||
7329 | ** Gnus changes. | |
7330 | ||
7331 | Gnus, the Emacs news reader, has undergone further rewriting. Many new | |
7332 | commands and variables have been added. There should be no | |
7333 | significant incompatibilities between this Gnus version and the | |
7334 | previously released version, except in the message composition area. | |
7335 | ||
7336 | Below is a list of the more user-visible changes. Coding changes | |
7337 | between Gnus 5.1 and 5.2 are more extensive. | |
7338 | ||
79214ddf | 7339 | *** A new message composition mode is used. All old customization |
a933dad1 DL |
7340 | variables for mail-mode, rnews-reply-mode and gnus-msg are now |
7341 | obsolete. | |
7342 | ||
7343 | *** Gnus is now able to generate "sparse" threads -- threads where | |
7344 | missing articles are represented by empty nodes. | |
7345 | ||
7346 | (setq gnus-build-sparse-threads 'some) | |
7347 | ||
7348 | *** Outgoing articles are stored on a special archive server. | |
7349 | ||
7350 | To disable this: (setq gnus-message-archive-group nil) | |
7351 | ||
7352 | *** Partial thread regeneration now happens when articles are | |
79214ddf | 7353 | referred. |
a933dad1 DL |
7354 | |
7355 | *** Gnus can make use of GroupLens predictions: | |
7356 | ||
7357 | (setq gnus-use-grouplens t) | |
7358 | ||
7359 | *** A trn-line tree buffer can be displayed. | |
7360 | ||
7361 | (setq gnus-use-trees t) | |
7362 | ||
7363 | *** An nn-like pick-and-read minor mode is available for the summary | |
79214ddf | 7364 | buffers. |
a933dad1 DL |
7365 | |
7366 | (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode) | |
7367 | ||
7368 | *** In binary groups you can use a special binary minor mode: | |
7369 | ||
7370 | `M-x gnus-binary-mode' | |
7371 | ||
7372 | *** Groups can be grouped in a folding topic hierarchy. | |
7373 | ||
7374 | (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) | |
7375 | ||
7376 | *** Gnus can re-send and bounce mail. | |
7377 | ||
7378 | Use the `S D r' and `S D b'. | |
7379 | ||
7380 | *** Groups can now have a score, and bubbling based on entry frequency | |
7381 | is possible. | |
7382 | ||
7383 | (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group) | |
7384 | ||
7385 | *** Groups can be process-marked, and commands can be performed on | |
7386 | groups of groups. | |
7387 | ||
7388 | *** Caching is possible in virtual groups. | |
7389 | ||
7390 | *** nndoc now understands all kinds of digests, mail boxes, rnews news | |
79214ddf | 7391 | batches, ClariNet briefs collections, and just about everything else. |
a933dad1 DL |
7392 | |
7393 | *** Gnus has a new backend (nnsoup) to create/read SOUP packets. | |
7394 | ||
7395 | *** The Gnus cache is much faster. | |
7396 | ||
7397 | *** Groups can be sorted according to many criteria. | |
7398 | ||
7399 | For instance: (setq gnus-group-sort-function 'gnus-group-sort-by-rank) | |
7400 | ||
7401 | *** New group parameters have been introduced to set list-address and | |
7402 | expiration times. | |
7403 | ||
7404 | *** All formatting specs allow specifying faces to be used. | |
7405 | ||
7406 | *** There are several more commands for setting/removing/acting on | |
7407 | process marked articles on the `M P' submap. | |
7408 | ||
7409 | *** The summary buffer can be limited to show parts of the available | |
7410 | articles based on a wide range of criteria. These commands have been | |
7411 | bound to keys on the `/' submap. | |
7412 | ||
7413 | *** Articles can be made persistent -- as an alternative to saving | |
7414 | articles with the `*' command. | |
7415 | ||
7416 | *** All functions for hiding article elements are now toggles. | |
7417 | ||
7418 | *** Article headers can be buttonized. | |
7419 | ||
7420 | (add-hook 'gnus-article-display-hook 'gnus-article-add-buttons-to-head) | |
7421 | ||
7422 | *** All mail backends support fetching articles by Message-ID. | |
7423 | ||
79214ddf | 7424 | *** Duplicate mail can now be treated properly. See the |
a933dad1 DL |
7425 | `nnmail-treat-duplicates' variable. |
7426 | ||
7427 | *** All summary mode commands are available directly from the article | |
79214ddf | 7428 | buffer. |
a933dad1 DL |
7429 | |
7430 | *** Frames can be part of `gnus-buffer-configuration'. | |
7431 | ||
7432 | *** Mail can be re-scanned by a daemonic process. | |
7433 | ||
7434 | *** Gnus can make use of NoCeM files to filter spam. | |
7435 | ||
7436 | (setq gnus-use-nocem t) | |
7437 | ||
79214ddf | 7438 | *** Groups can be made permanently visible. |
a933dad1 DL |
7439 | |
7440 | (setq gnus-permanently-visible-groups "^nnml:") | |
7441 | ||
79214ddf | 7442 | *** Many new hooks have been introduced to make customizing easier. |
a933dad1 DL |
7443 | |
7444 | *** Gnus respects the Mail-Copies-To header. | |
7445 | ||
79214ddf | 7446 | *** Threads can be gathered by looking at the References header. |
a933dad1 | 7447 | |
79214ddf | 7448 | (setq gnus-summary-thread-gathering-function |
a933dad1 DL |
7449 | 'gnus-gather-threads-by-references) |
7450 | ||
7451 | *** Read articles can be stored in a special backlog buffer to avoid | |
79214ddf | 7452 | refetching. |
a933dad1 DL |
7453 | |
7454 | (setq gnus-keep-backlog 50) | |
7455 | ||
7456 | *** A clean copy of the current article is always stored in a separate | |
7457 | buffer to allow easier treatment. | |
7458 | ||
7459 | *** Gnus can suggest where to save articles. See `gnus-split-methods'. | |
7460 | ||
7461 | *** Gnus doesn't have to do as much prompting when saving. | |
7462 | ||
7463 | (setq gnus-prompt-before-saving t) | |
7464 | ||
7465 | *** gnus-uu can view decoded files asynchronously while fetching | |
79214ddf | 7466 | articles. |
a933dad1 DL |
7467 | |
7468 | (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view) | |
7469 | ||
79214ddf | 7470 | *** Filling in the article buffer now works properly on cited text. |
a933dad1 DL |
7471 | |
7472 | *** Hiding cited text adds buttons to toggle hiding, and how much | |
7473 | cited text to hide is now customizable. | |
7474 | ||
7475 | (setq gnus-cited-lines-visible 2) | |
7476 | ||
7477 | *** Boring headers can be hidden. | |
7478 | ||
7479 | (add-hook 'gnus-article-display-hook 'gnus-article-hide-boring-headers) | |
7480 | ||
7481 | *** Default scoring values can now be set from the menu bar. | |
7482 | ||
7483 | *** Further syntax checking of outgoing articles have been added. | |
7484 | ||
7485 | The Gnus manual has been expanded. It explains all these new features | |
7486 | in greater detail. | |
7487 | \f | |
7488 | * Lisp Changes in Emacs 19.32 | |
7489 | ||
7490 | ** The function set-visited-file-name now accepts an optional | |
7491 | second argument NO-QUERY. If it is non-nil, then the user is not | |
7492 | asked for confirmation in the case where the specified file already | |
7493 | exists. | |
7494 | ||
7495 | ** The variable print-length applies to printing vectors and bitvectors, | |
7496 | as well as lists. | |
7497 | ||
7498 | ** The new function keymap-parent returns the parent keymap | |
7499 | of a given keymap. | |
7500 | ||
7501 | ** The new function set-keymap-parent specifies a new parent for a | |
7502 | given keymap. The arguments are KEYMAP and PARENT. PARENT must be a | |
7503 | keymap or nil. | |
7504 | ||
7505 | ** Sometimes menu keymaps use a command name, a symbol, which is really | |
7506 | an automatically generated alias for some other command, the "real" | |
7507 | name. In such a case, you should give that alias symbol a non-nil | |
7508 | menu-alias property. That property tells the menu system to look for | |
7509 | equivalent keys for the real name instead of equivalent keys for the | |
7510 | alias. | |
7511 | \f | |
7512 | * Editing Changes in Emacs 19.31 | |
7513 | ||
7514 | ** Freedom of the press restricted in the United States. | |
7515 | ||
7516 | Emacs has been censored in accord with the Communications Decency Act. | |
7517 | This includes removing some features of the doctor program. That law | |
7518 | was described by its supporters as a ban on pornography, but it bans | |
7519 | far more than that. The Emacs distribution has never contained any | |
7520 | pornography, but parts of it were nonetheless prohibited. | |
7521 | ||
7522 | For information on US government censorship of the Internet, and what | |
7523 | you can do to bring back freedom of the press, see the web site | |
7524 | `http://www.vtw.org/'. | |
7525 | ||
7526 | ** A note about C mode indentation customization. | |
7527 | ||
7528 | The old (Emacs 19.29) ways of specifying a C indentation style | |
7529 | do not normally work in the new implementation of C mode. | |
7530 | It has its own methods of customizing indentation, which are | |
7531 | much more powerful than the old C mode. See the Editing Programs | |
7532 | chapter of the manual for details. | |
7533 | ||
7534 | However, you can load the library cc-compat to make the old | |
7535 | customization variables take effect. | |
7536 | ||
7537 | ** Marking with the mouse. | |
7538 | ||
7539 | When you mark a region with the mouse, the region now remains | |
7540 | highlighted until the next input event, regardless of whether you are | |
7541 | using M-x transient-mark-mode. | |
7542 | ||
7543 | ** Improved Windows NT/95 support. | |
7544 | ||
7545 | *** Emacs now supports scroll bars on Windows NT and Windows 95. | |
7546 | ||
7547 | *** Emacs now supports subprocesses on Windows 95. (Subprocesses used | |
7548 | to work on NT only and not on 95.) | |
7549 | ||
7550 | *** There are difficulties with subprocesses, though, due to problems | |
7551 | in Windows, beyond the control of Emacs. They work fine as long as | |
7552 | you run Windows applications. The problems arise when you run a DOS | |
7553 | application in a subprocesses. Since current shells run as DOS | |
7554 | applications, these problems are significant. | |
7555 | ||
7556 | If you run a DOS application in a subprocess, then the application is | |
7557 | likely to busy-wait, which means that your machine will be 100% busy. | |
7558 | However, if you don't mind the temporary heavy load, the subprocess | |
7559 | will work OK as long as you tell it to terminate before you start any | |
7560 | other DOS application as a subprocess. | |
7561 | ||
7562 | Emacs is unable to terminate or interrupt a DOS subprocess. | |
7563 | You have to do this by providing input directly to the subprocess. | |
7564 | ||
7565 | If you run two DOS applications at the same time in two separate | |
7566 | subprocesses, even if one of them is asynchronous, you will probably | |
7567 | have to reboot your machine--until then, it will remain 100% busy. | |
7568 | Windows simply does not cope when one Windows process tries to run two | |
7569 | separate DOS subprocesses. Typing CTL-ALT-DEL and then choosing | |
7570 | Shutdown seems to work although it may take a few minutes. | |
7571 | ||
7572 | ** M-x resize-minibuffer-mode. | |
7573 | ||
7574 | This command, not previously mentioned in NEWS, toggles a mode in | |
7575 | which the minibuffer window expands to show as many lines as the | |
7576 | minibuffer contains. | |
7577 | ||
7578 | ** `title' frame parameter and resource. | |
7579 | ||
7580 | The `title' X resource now specifies just the frame title, nothing else. | |
7581 | It does not affect the name used for looking up other X resources. | |
7582 | It works by setting the new `title' frame parameter, which likewise | |
7583 | affects just the displayed title of the frame. | |
7584 | ||
7585 | The `name' parameter continues to do what it used to do: | |
7586 | it specifies the frame name for looking up X resources, | |
7587 | and also serves as the default for the displayed title | |
7588 | when the `title' parameter is unspecified or nil. | |
7589 | ||
7590 | ** Emacs now uses the X toolkit by default, if you have a new | |
7591 | enough version of X installed (X11R5 or newer). | |
7592 | ||
7593 | ** When you compile Emacs with the Motif widget set, Motif handles the | |
7594 | F10 key by activating the menu bar. To avoid confusion, the usual | |
7595 | Emacs binding of F10 is replaced with a no-op when using Motif. | |
7596 | ||
7597 | If you want to be able to use F10 in Emacs, you can rebind the Motif | |
7598 | menubar to some other key which you don't use. To do so, add | |
7599 | something like this to your X resources file. This example rebinds | |
7600 | the Motif menu bar activation key to S-F12: | |
7601 | ||
7602 | Emacs*defaultVirtualBindings: osfMenuBar : Shift<Key>F12 | |
7603 | ||
7604 | ** In overwrite mode, DEL now inserts spaces in most cases | |
7605 | to replace the characters it "deletes". | |
7606 | ||
7607 | ** The Rmail summary now shows the number of lines in each message. | |
7608 | ||
7609 | ** Rmail has a new command M-x unforward-rmail-message, which extracts | |
7610 | a forwarded message from the message that forwarded it. To use it, | |
7611 | select a message which contains a forwarded message and then type the command. | |
7612 | It inserts the forwarded message as a separate Rmail message | |
7613 | immediately after the selected one. | |
7614 | ||
7615 | This command also undoes the textual modifications that are standardly | |
7616 | made, as part of forwarding, by Rmail and other mail reader programs. | |
7617 | ||
7618 | ** Turning off saving of .saves-... files in your home directory. | |
7619 | ||
7620 | Each Emacs session writes a file named .saves-... in your home | |
7621 | directory to record which files M-x recover-session should recover. | |
7622 | If you exit Emacs normally with C-x C-c, it deletes that file. If | |
7623 | Emacs or the operating system crashes, the file remains for M-x | |
7624 | recover-session. | |
7625 | ||
7626 | You can turn off the writing of these files by setting | |
7627 | auto-save-list-file-name to nil. If you do this, M-x recover-session | |
7628 | will not work. | |
7629 | ||
7630 | Some previous Emacs versions failed to delete these files even on | |
7631 | normal exit. This is fixed now. If you are thinking of turning off | |
7632 | this feature because of past experiences with versions that had this | |
7633 | bug, it would make sense to check whether you still want to do so | |
7634 | now that the bug is fixed. | |
7635 | ||
7636 | ** Changes to Version Control (VC) | |
7637 | ||
7638 | There is a new variable, vc-follow-symlinks. It indicates what to do | |
7639 | when you visit a link to a file that is under version control. | |
7640 | Editing the file through the link bypasses the version control system, | |
7641 | which is dangerous and probably not what you want. | |
7642 | ||
7643 | If this variable is t, VC follows the link and visits the real file, | |
7644 | telling you about it in the echo area. If it is `ask' (the default), | |
7645 | VC asks for confirmation whether it should follow the link. If nil, | |
7646 | the link is visited and a warning displayed. | |
7647 | ||
7648 | ** iso-acc.el now lets you specify a choice of language. | |
7649 | Languages include "latin-1" (the default) and "latin-2" (which | |
7650 | is designed for entering ISO Latin-2 characters). | |
7651 | ||
7652 | There are also choices for specific human languages such as French and | |
7653 | Portuguese. These are subsets of Latin-1, which differ in that they | |
7654 | enable only the accent characters needed for particular language. | |
7655 | The other accent characters, not needed for the chosen language, | |
7656 | remain normal. | |
7657 | ||
7658 | ** Posting articles and sending mail now has M-TAB completion on various | |
7659 | header fields (Newsgroups, To, CC, ...). | |
7660 | ||
7661 | Completion in the Newsgroups header depends on the list of groups | |
7662 | known to your news reader. Completion in the Followup-To header | |
7663 | offers those groups which are in the Newsgroups header, since | |
7664 | Followup-To usually just holds one of those. | |
7665 | ||
7666 | Completion in fields that hold mail addresses works based on the list | |
7667 | of local users plus your aliases. Additionally, if your site provides | |
7668 | a mail directory or a specific host to use for any unrecognized user | |
7669 | name, you can arrange to query that host for completion also. (See the | |
7670 | documentation of variables `mail-directory-process' and | |
7671 | `mail-directory-stream'.) | |
7672 | ||
7673 | ** A greatly extended sgml-mode offers new features such as (to be configured) | |
7674 | skeletons with completing read for tags and attributes, typing named | |
7675 | characters including optionally all 8bit characters, making tags invisible | |
7676 | with optional alternate display text, skipping and deleting tag(pair)s. | |
7677 | ||
7678 | Note: since Emacs' syntax feature cannot limit the special meaning of ', " and | |
7679 | - to inside <>, for some texts the result, especially of font locking, may be | |
7680 | wrong (see `sgml-specials' if you get wrong results). | |
7681 | ||
7682 | The derived html-mode configures this with tags and attributes more or | |
7683 | less HTML3ish. It also offers optional quick keys like C-c 1 for | |
7684 | headline or C-c u for unordered list (see `html-quick-keys'). Edit / | |
7685 | Text Properties / Face or M-g combinations create tags as applicable. | |
7686 | Outline minor mode is supported and level 1 font-locking tries to | |
7687 | fontify tag contents (which only works when they fit on one line, due | |
7688 | to a limitation in font-lock). | |
7689 | ||
7690 | External viewing via browse-url can occur automatically upon saving. | |
7691 | ||
7692 | ** M-x imenu-add-to-menubar now adds to the menu bar for the current | |
7693 | buffer only. If you want to put an Imenu item in the menu bar for all | |
7694 | buffers that use a particular major mode, use the mode hook, as in | |
7695 | this example: | |
7696 | ||
7697 | (add-hook 'emacs-lisp-mode-hook | |
7698 | '(lambda () (imenu-add-to-menubar "Index"))) | |
7699 | ||
7700 | ** Changes in BibTeX mode. | |
7701 | ||
7702 | *** Field names may now contain digits, hyphens, and underscores. | |
7703 | ||
7704 | *** Font Lock mode is now supported. | |
7705 | ||
7706 | *** bibtex-make-optional-field is no longer interactive. | |
7707 | ||
7708 | *** If bibtex-maintain-sorted-entries is non-nil, inserting new | |
7709 | entries is now done with a faster algorithm. However, inserting | |
7710 | will fail in this case if the buffer contains invalid entries or | |
7711 | isn't in sorted order, so you should finish each entry with C-c C-c | |
7712 | (bibtex-close-entry) after you have inserted or modified it. | |
7713 | The default value of bibtex-maintain-sorted-entries is nil. | |
7714 | ||
7715 | *** Function `show-all' is no longer bound to a key, since C-u C-c C-q | |
7716 | does the same job. | |
7717 | ||
7718 | *** Entries with quotes inside quote-delimited fields (as `author = | |
7719 | "Stefan Sch{\"o}f"') are now supported. | |
7720 | ||
7721 | *** Case in field names doesn't matter anymore when searching for help | |
7722 | text. | |
7723 | ||
7724 | ** Font Lock mode | |
7725 | ||
7726 | *** Global Font Lock mode | |
7727 | ||
7728 | Font Lock mode can be turned on globally, in buffers that support it, by the | |
7729 | new command global-font-lock-mode. You can use the new variable | |
7730 | font-lock-global-modes to control which modes have Font Lock mode automagically | |
7731 | turned on. By default, this variable is set so that Font Lock mode is turned | |
7732 | on globally where the buffer mode supports it. | |
7733 | ||
7734 | For example, to automagically turn on Font Lock mode where supported, put: | |
7735 | ||
7736 | (global-font-lock-mode t) | |
7737 | ||
7738 | in your ~/.emacs. | |
7739 | ||
7740 | *** Local Refontification | |
7741 | ||
7742 | In Font Lock mode, editing a line automatically refontifies that line only. | |
7743 | However, if your change alters the syntactic context for following lines, | |
7744 | those lines remain incorrectly fontified. To refontify them, use the new | |
7745 | command M-g M-g (font-lock-fontify-block). | |
7746 | ||
7747 | In certain major modes, M-g M-g refontifies the entire current function. | |
7748 | (The variable font-lock-mark-block-function controls how to find the | |
7749 | current function.) In other major modes, M-g M-g refontifies 16 lines | |
7750 | above and below point. | |
7751 | ||
7752 | With a prefix argument N, M-g M-g refontifies N lines above and below point. | |
7753 | ||
7754 | ** Follow mode | |
7755 | ||
7756 | Follow mode is a new minor mode combining windows showing the same | |
7757 | buffer into one tall "virtual window". The windows are typically two | |
7758 | side-by-side windows. Follow mode makes them scroll together as if | |
7759 | they were a unit. To use it, go to a frame with just one window, | |
7760 | split it into two side-by-side windows using C-x 3, and then type M-x | |
7761 | follow-mode. | |
7762 | ||
7763 | M-x follow-mode turns off Follow mode if it is already enabled. | |
7764 | ||
7765 | To display two side-by-side windows and activate Follow mode, use the | |
7766 | command M-x follow-delete-other-windows-and-split. | |
7767 | ||
7768 | ** hide-show changes. | |
7769 | ||
7770 | The hooks hs-hide-hooks and hs-show-hooks have been renamed | |
7771 | to hs-hide-hook and hs-show-hook, to follow the convention for | |
7772 | normal hooks. | |
7773 | ||
7774 | ** Simula mode now has a menu containing the most important commands. | |
7775 | The new command simula-indent-exp is bound to C-M-q. | |
7776 | ||
7777 | ** etags can now handle programs written in Erlang. Files are | |
7778 | recognised by the extensions .erl and .hrl. The tagged lines are | |
7779 | those that begin a function, record, or macro. | |
7780 | ||
7781 | ** MSDOS Changes | |
7782 | ||
7783 | *** It is now possible to compile Emacs with the version 2 of DJGPP. | |
7784 | Compilation with DJGPP version 1 also still works. | |
7785 | ||
7786 | *** The documentation of DOS-specific aspects of Emacs was rewritten | |
7787 | and expanded; see the ``MS-DOS'' node in the on-line docs. | |
7788 | ||
7789 | *** Emacs now uses ~ for backup file names, not .bak. | |
7790 | ||
7791 | *** You can simulate mouse-3 on two-button mice by simultaneously | |
7792 | pressing both mouse buttons. | |
7793 | ||
7794 | *** A number of packages and commands which previously failed or had | |
7795 | restricted functionality on MS-DOS, now work. The most important ones | |
79214ddf | 7796 | are: |
a933dad1 DL |
7797 | |
7798 | **** Printing (both with `M-x lpr-buffer' and with `ps-print' package) | |
7799 | now works. | |
7800 | ||
7801 | **** `Ediff' works (in a single-frame mode). | |
7802 | ||
7803 | **** `M-x display-time' can be used on MS-DOS (due to the new | |
7804 | implementation of Emacs timers, see below). | |
7805 | ||
7806 | **** `Dired' supports Unix-style shell wildcards. | |
7807 | ||
7808 | **** The `c-macro-expand' command now works as on other platforms. | |
7809 | ||
7810 | **** `M-x recover-session' works. | |
7811 | ||
7812 | **** `M-x list-colors-display' displays all the available colors. | |
7813 | ||
7814 | **** The `TPU-EDT' package works. | |
7815 | \f | |
7816 | * Lisp changes in Emacs 19.31. | |
7817 | ||
7818 | ** The function using-unix-filesystems on Windows NT and Windows 95 | |
7819 | tells Emacs to read and write files assuming that they reside on a | |
7820 | remote Unix filesystem. No CR/LF translation is done on any files in | |
7821 | this case. Invoking using-unix-filesystems with t activates this | |
7822 | behavior, and invoking it with any other value deactivates it. | |
7823 | ||
7824 | ** Change in system-type and system-configuration values. | |
7825 | ||
7826 | The value of system-type on a Linux-based GNU system is now `lignux', | |
7827 | not `linux'. This means that some programs which use `system-type' | |
7828 | need to be changed. The value of `system-configuration' will also | |
7829 | be different. | |
7830 | ||
7831 | It is generally recommended to use `system-configuration' rather | |
7832 | than `system-type'. | |
7833 | ||
7834 | See the file LINUX-GNU in this directory for more about this. | |
7835 | ||
7836 | ** The functions shell-command and dired-call-process | |
7837 | now run file name handlers for default-directory, if it has them. | |
7838 | ||
7839 | ** Undoing the deletion of text now restores the positions of markers | |
7840 | that pointed into or next to the deleted text. | |
7841 | ||
7842 | ** Timers created with run-at-time now work internally to Emacs, and | |
7843 | no longer use a separate process. Therefore, they now work more | |
7844 | reliably and can be used for shorter time delays. | |
7845 | ||
7846 | The new function run-with-timer is a convenient way to set up a timer | |
7847 | to run a specified amount of time after the present. A call looks | |
7848 | like this: | |
7849 | ||
7850 | (run-with-timer SECS REPEAT FUNCTION ARGS...) | |
7851 | ||
7852 | SECS says how many seconds should elapse before the timer happens. | |
7853 | It may be an integer or a floating point number. When the timer | |
7854 | becomes ripe, the action is to call FUNCTION with arguments ARGS. | |
7855 | ||
7856 | REPEAT gives the interval for repeating the timer (measured in | |
7857 | seconds). It may be an integer or a floating point number. nil or 0 | |
7858 | means don't repeat at all--call FUNCTION just once. | |
7859 | ||
7860 | *** with-timeout provides an easy way to do something but give | |
7861 | up if too much time passes. | |
7862 | ||
7863 | (with-timeout (SECONDS TIMEOUT-FORMS...) BODY...) | |
7864 | ||
7865 | This executes BODY, but gives up after SECONDS seconds. | |
7866 | If it gives up, it runs the TIMEOUT-FORMS and returns the value | |
7867 | of the last one of them. Normally it returns the value of the last | |
7868 | form in BODY. | |
7869 | ||
7870 | *** You can now arrange to call a function whenever Emacs is idle for | |
7871 | a certain length of time. To do this, call run-with-idle-timer. A | |
7872 | call looks like this: | |
7873 | ||
7874 | (run-with-idle-timer SECS REPEAT FUNCTION ARGS...) | |
7875 | ||
7876 | SECS says how many seconds of idleness should elapse before the timer | |
7877 | runs. It may be an integer or a floating point number. When the | |
7878 | timer becomes ripe, the action is to call FUNCTION with arguments | |
7879 | ARGS. | |
7880 | ||
7881 | Emacs becomes idle whenever it finishes executing a keyboard or mouse | |
7882 | command. It remains idle until it receives another keyboard or mouse | |
7883 | command. | |
7884 | ||
7885 | REPEAT, if non-nil, means this timer should be activated again each | |
7886 | time Emacs becomes idle and remains idle for SECS seconds The timer | |
7887 | does not repeat if Emacs *remains* idle; it runs at most once after | |
7888 | each time Emacs becomes idle. | |
7889 | ||
7890 | If REPEAT is nil, the timer runs just once, the first time Emacs is | |
7891 | idle for SECS seconds. | |
7892 | ||
7893 | *** post-command-idle-hook is now obsolete; you shouldn't use it at | |
7894 | all, because it interferes with the idle timer mechanism. If your | |
7895 | programs use post-command-idle-hook, convert them to use idle timers | |
7896 | instead. | |
7897 | ||
7898 | *** y-or-n-p-with-timeout lets you ask a question but give up if | |
7899 | there is no answer within a certain time. | |
7900 | ||
7901 | (y-or-n-p-with-timeout PROMPT SECONDS DEFAULT-VALUE) | |
7902 | ||
7903 | asks the question PROMPT (just like y-or-n-p). If the user answers | |
7904 | within SECONDS seconds, it returns the answer that the user gave. | |
7905 | Otherwise it gives up after SECONDS seconds, and returns DEFAULT-VALUE. | |
7906 | ||
7907 | ** Minor change to `encode-time': you can now pass more than seven | |
7908 | arguments. If you do that, the first six arguments have the usual | |
7909 | meaning, the last argument is interpreted as the time zone, and the | |
7910 | arguments in between are ignored. | |
7911 | ||
7912 | This means that it works to use the list returned by `decode-time' as | |
7913 | the list of arguments for `encode-time'. | |
7914 | ||
7915 | ** The default value of load-path now includes the directory | |
7916 | /usr/local/share/emacs/VERSION/site-lisp In addition to | |
7917 | /usr/local/share/emacs/site-lisp. You can use this new directory for | |
7918 | site-specific Lisp packages that belong with a particular Emacs | |
7919 | version. | |
7920 | ||
7921 | It is not unusual for a Lisp package that works well in one Emacs | |
7922 | version to cause trouble in another. Sometimes packages need updating | |
7923 | for incompatible changes; sometimes they look at internal data that | |
7924 | has changed; sometimes the package has been installed in Emacs itself | |
7925 | and the installed version should be used. Whatever the reason for the | |
7926 | problem, this new feature makes it easier to solve. | |
7927 | ||
7928 | ** When your program contains a fixed file name (like .completions or | |
7929 | .abbrev.defs), the file name usually needs to be different on operating | |
7930 | systems with limited file name syntax. | |
7931 | ||
7932 | Now you can avoid ad-hoc conditionals by using the function | |
7933 | convert-standard-filename to convert the file name to a proper form | |
7934 | for each operating system. Here is an example of use, from the file | |
7935 | completions.el: | |
7936 | ||
7937 | (defvar save-completions-file-name | |
7938 | (convert-standard-filename "~/.completions") | |
7939 | "*The filename to save completions to.") | |
7940 | ||
7941 | This sets the variable save-completions-file-name to a value that | |
7942 | depends on the operating system, because the definition of | |
7943 | convert-standard-filename depends on the operating system. On | |
7944 | Unix-like systems, it returns the specified file name unchanged. On | |
7945 | MS-DOS, it adapts the name to fit the limitations of that system. | |
7946 | ||
7947 | ** The interactive spec N now returns the numeric prefix argument | |
7948 | rather than the raw prefix argument. (It still reads a number using the | |
7949 | minibuffer if there is no prefix argument at all.) | |
7950 | ||
7951 | ** When a process is deleted, this no longer disconnects the process | |
7952 | marker from its buffer position. | |
7953 | ||
7954 | ** The variable garbage-collection-messages now controls whether | |
7955 | Emacs displays a message at the beginning and end of garbage collection. | |
7956 | The default is nil, meaning there are no messages. | |
7957 | ||
7958 | ** The variable debug-ignored-errors specifies certain kinds of errors | |
7959 | that should not enter the debugger. Its value is a list of error | |
7960 | condition symbols and/or regular expressions. If the error has any | |
7961 | of the condition symbols listed, or if any of the regular expressions | |
7962 | matches the error message, then that error does not enter the debugger, | |
7963 | regardless of the value of debug-on-error. | |
7964 | ||
7965 | This variable is initialized to match certain common but uninteresting | |
7966 | errors that happen often during editing. | |
7967 | ||
7968 | ** The new function error-message-string converts an error datum | |
7969 | into its error message. The error datum is what condition-case | |
7970 | puts into the variable, to describe the error that happened. | |
7971 | ||
7972 | ** Anything that changes which buffer appears in a given window | |
7973 | now runs the window-scroll-functions for that window. | |
7974 | ||
7975 | ** The new function get-buffer-window-list returns a list of windows displaying | |
7976 | a buffer. The function is called with the buffer (a buffer object or a buffer | |
7977 | name) and two optional arguments specifying the minibuffer windows and frames | |
7978 | to search. Therefore this function takes optional args like next-window etc., | |
7979 | and not get-buffer-window. | |
7980 | ||
7981 | ** buffer-substring now runs the hook buffer-access-fontify-functions, | |
7982 | calling each function with two arguments--the range of the buffer | |
7983 | being accessed. buffer-substring-no-properties does not call them. | |
7984 | ||
7985 | If you use this feature, you should set the variable | |
7986 | buffer-access-fontified-property to a non-nil symbol, which is a | |
7987 | property name. Then, if all the characters in the buffer range have a | |
7988 | non-nil value for that property, the buffer-access-fontify-functions | |
7989 | are not called. When called, these functions should put a non-nil | |
7990 | property on the text that they fontify, so that they won't get called | |
7991 | over and over for the same text. | |
7992 | ||
7993 | ** Changes in lisp-mnt.el | |
7994 | ||
7995 | *** The lisp-mnt package can now recognize file headers that are written | |
7996 | in the formats used by the `what' command and the RCS `ident' command: | |
7997 | ||
7998 | ;; @(#) HEADER: text | |
7999 | ;; $HEADER: text $ | |
8000 | ||
8001 | in addition to the normal | |
8002 | ||
8003 | ;; HEADER: text | |
8004 | ||
8005 | *** The commands lm-verify and lm-synopsis are now interactive. lm-verify | |
8006 | checks that the library file has proper sections and headers, and | |
8007 | lm-synopsis extracts first line "synopsis'"information. | |
8008 | \f | |
8009 | * For older news, see the file ONEWS. | |
8010 | ||
8011 | ---------------------------------------------------------------------- | |
8012 | Copyright information: | |
8013 | ||
404fa7d6 | 8014 | Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
a933dad1 DL |
8015 | |
8016 | Permission is granted to anyone to make or distribute verbatim copies | |
8017 | of this document as received, in any medium, provided that the | |
8018 | copyright notice and this permission notice are preserved, | |
8019 | thus giving the recipient permission to redistribute in turn. | |
8020 | ||
8021 | Permission is granted to distribute modified versions | |
8022 | of this document, or of portions of it, | |
8023 | under the above conditions, provided also that they | |
8024 | carry prominent notices stating who last changed them. | |
8025 | \f | |
8026 | Local variables: | |
8027 | mode: outline | |
8028 | paragraph-separate: "[ \f]*$" | |
8029 | end: |