Merge from emacs--devo--0
[bpt/emacs.git] / etc / NEWS.22
CommitLineData
782f8379
GM
1GNU Emacs NEWS -- history of user-visible changes.
2
3Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
4 Free Software Foundation, Inc.
5See the end of the file for license conditions.
6
7Please send Emacs bug reports to bug-gnu-emacs@gnu.org.
8If possible, use M-x report-emacs-bug.
9
10This file is about changes in Emacs version 22.
11
12See files NEWS.21, NEWS.20, NEWS.19, NEWS.18, and NEWS.1-17 for changes
13in older Emacs versions.
14
15You can narrow news to a specific version by calling `view-emacs-news'
16with a prefix argument or by typing C-u C-h C-n.
17\f
18* About external Lisp packages
19
20When you upgrade to Emacs 22 from a previous version, some older
21versions of external Lisp packages are known to behave badly.
22So in general, it is recommended that you upgrade to the latest
23versions of any external Lisp packages that you are using.
24
25You should also be aware that many Lisp packages have been included
26with Emacs 22 (see the extensive list below), and you should remove
27any older versions of these packages to ensure that the Emacs 22
28version is used. You can use M-x list-load-path-shadows to find such
29older packages.
30
b879e281
GM
31Some specific packages that are known to cause problems are given
32below. Emacs tries to warn you about these through `bad-packages-alist'.
782f8379
GM
33
34** Semantic (used by CEDET, ECB, JDEE): upgrade to latest version.
35
36** cua.el, cua-mode.el: remove old versions.
163a6901 37
01140829
MB
38\f
39* Installation Changes in Emacs 22.2
40
9aecacd0
MB
41** Emacs is now licensed under the GNU GPL version 3 (or later).
42
472fd4dc
GM
43** Support for GNU/kFreeBSD (GNU userland and FreeBSD kernel) was added.
44
01140829
MB
45* Changes in Emacs 22.2
46
b17f53ab
MB
47** `find-name-dired' now uses -iname rather than -name
48for case-insensitive filesystems. The default behavior is determined
49by the value of `read-file-name-completion-ignore-case'; if you don't
50like that, customize the value of the new option `find-name-arg'.
51
01140829
MB
52** In Image mode, whenever the displayed image is wider and/or higher
53than the window, the usual keys for moving the cursor cause the image
54to be scrolled horizontally or vertically instead.
55
c89d0fd4
MB
56** Scrollbars follow the system theme on Windows XP and later.
57Windows XP introduced themed scrollbars, but applications have to take
58special steps to use them. Emacs now has the appropriate resources linked
59in to make it use the scrollbars from the system theme.
60
fdc90613 61** focus-follows-mouse defaults to nil on MS Windows.
1af74d06
MB
62Previously this variable was incorrectly documented as having no effect
63on MS Windows, and the default was inappropriate for the majority of
64Windows installations. Users of software which modifies the behaviour of
65Windows to cause focus to follow the mouse will now need to explicitly set
66this variable.
67
c12ecb0a
MB
68** `bad-packages-alist' will warn about external packages that are known
69to cause problems in this version of Emacs.
70
71** The values of `dired-recursive-deletes' and `dired-recursive-copies'
72have been changed to `top'. This means that the user is asked once,
73before deleting/copying the indicated directory recursively.
74
75** `browse-url-emacs' loads a URL into an Emacs buffer. Handy for *.el URLs.
76
1af74d06
MB
77** The command gdba has been removed as gdb works now for those cases where it
78was needed. In text command mode, if you have problems before execution has
79started, use M-x gud-gdb.
80
fdc90613
MB
81** desktop.el now detects conflicting uses of the desktop file.
82When loading the desktop, desktop.el can now detect that the file is already
83in use. The default behavior is to ask the user what to do, but you can
84customize it with the new option `desktop-load-locked-desktop'. When saving,
85desktop.el warns about attempts to overwrite a desktop file if it determines
86that the desktop being saved is not an update of the one on disk.
87
01140829
MB
88* New Modes and Packages in Emacs 22.2
89
37cc095b
MB
90** bibtex-style-mode helps you write BibTeX's *.bst files.
91
01140829
MB
92** The new package css-mode.el provides a major mode for editing CSS files.
93
858a9480
DN
94** The new package vera-mode.el provides a major mode for editing Vera files.
95
47854a55
MB
96** The new package verilog-mode.el provides a major mode for editing Verilog files.
97
01140829 98** The new package socks.el implements the SOCKS v5 protocol.
782f8379 99
d6d25ba8
DN
100** VC
101
2f12b713
MB
102*** VC backends can provide completion of revision names.
103
1af74d06
MB
104*** VC backends can provide extra menu entries to be added to the "Version Control" menu.
105This can be used to add menu entries for backend specific functions.
106
107*** VC has some support for Mercurial (Hg).
108
109*** VC has some support for Monotone (Mtn).
d6d25ba8 110
37cc095b
MB
111*** VC has some support for Bazaar (Bzr).
112
2f12b713
MB
113*** VC has some support for Git.
114
9b482dcb
CY
115* Lisp Changes in Emacs 22.2.
116
fdc90613 117** Frame-local variables are deprecated and are slated for removal.
c12ecb0a
MB
118Use frame parameters instead.
119
7f22a765 120** The function invisible-p returns non-nil if the character
6554da99 121after a specified position is invisible.
7f22a765
MB
122
123+++
124** inhibit-modification-hooks is bound to t while running modification hooks.
125As a happy consequence, after-change-functions and before-change-functions
126are not bound to nil any more while running an (after|before)-change-function.
127
9b482dcb
CY
128** New function `window-full-width-p' returns t if a window is as wide
129as its frame.
130
131** The new function `image-refresh' refreshes all images associated
132with a given image specification.
133
c12ecb0a
MB
134** The new function `combine-and-quote-strings' concatenates a list of strings
135using a specified separator. If a string contains double quotes, they
136are escaped in the output.
137
138** The new function `split-string-and-unquote' performs the inverse operation to
139`combine-and-quote-strings', i.e. splits a single string into a list
140of strings, undoing any quoting added by `combine-and-quote-strings'.
141(For some separator/string combinations, the original strings cannot
142be recovered.)
37cc095b 143
782f8379
GM
144\f
145* Installation Changes in Emacs 22.1
146
147** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk'
148when you run configure. This requires Gtk+ 2.4 or newer. This port
149provides a way to display multilingual text in menus (with some caveats).
150
151** The Emacs Lisp Reference Manual is now part of the distribution.
152
153The Emacs Lisp Reference Manual in Info format is built as part of the
154Emacs build procedure and installed together with the Emacs User
155Manual. A menu item was added to the menu bar to make it easily
156accessible (Help->More Manuals->Emacs Lisp Reference).
157
158** The Introduction to Programming in Emacs Lisp manual is now part of
159the distribution.
160
161This manual is now part of the standard distribution and is installed,
162together with the Emacs User Manual, into the Info directory. A menu
163item was added to the menu bar to make it easily accessible
164(Help->More Manuals->Introduction to Emacs Lisp).
165
166** Leim is now part of the Emacs distribution.
167You no longer need to download a separate tarball in order to build
168Emacs with Leim.
169
170** Support for MacOS X was added.
171See the files mac/README and mac/INSTALL for build instructions.
172
173** Mac OS 9 port now uses the Carbon API by default. You can also
174create a non-Carbon build by specifying `NonCarbon' as a target. See
175the files mac/README and mac/INSTALL for build instructions.
176
177** Support for a Cygwin build of Emacs was added.
178
179** Support for GNU/Linux systems on X86-64 machines was added.
180
181** Support for GNU/Linux systems on S390 machines was added.
182
183** Support for GNU/Linux systems on Tensilica Xtensa machines was added.
184
185** Support for FreeBSD/Alpha has been added.
186
187** New translations of the Emacs Tutorial are available in the
188following languages: Brasilian Portuguese, Bulgarian, Chinese (both
189with simplified and traditional characters), French, Russian, and
190Italian. Type `C-u C-h t' to choose one of them in case your language
191setup doesn't automatically select the right one.
192
193** New translations of the Emacs reference card are available in the
194Brasilian Portuguese and Russian. The corresponding PostScript files
195are also included.
196
197** A French translation of the `Emacs Survival Guide' is available.
198
199** Emacs now supports new configure options `--program-prefix',
200`--program-suffix' and `--program-transform-name' that affect the names of
201installed programs.
202
203** By default, Emacs now uses a setgid helper program to update game
204scores. The directory ${localstatedir}/games/emacs is the normal
205place for game scores to be stored. You can control this with the
206configure option `--with-game-dir'. The specific user that Emacs uses
207to own the game scores is controlled by `--with-game-user'. If access
208to a game user is not available, then scores will be stored separately
209in each user's home directory.
210
211** Emacs now includes support for loading image libraries on demand.
212(Currently this feature is only used on MS Windows.) You can configure
213the supported image types and their associated dynamic libraries by
214setting the variable `image-library-alist'.
215
216** Emacs can now be built without sound support.
217
218** Emacs Lisp source files are compressed by default if `gzip' is available.
219
220** All images used in Emacs have been consolidated in etc/images and subdirs.
221See also the changes to `find-image', documented below.
222
223** Emacs comes with a new set of icons.
224These icons are displayed on the taskbar and/or titlebar when Emacs
225runs in a graphical environment. Source files for these icons can be
226found in etc/images/icons. (You can't change the icons displayed by
227Emacs by changing these files directly. On X, the icon is compiled
228into the Emacs executable; see gnu.h in the source tree. On MS
229Windows, see nt/icons/emacs.ico.)
230
231** The `emacsserver' program has been removed, replaced with Lisp code.
232
233** The `yow' program has been removed.
234Use the corresponding Emacs feature instead.
235
236** The Emacs terminal emulation in term.el uses a different terminfo name.
237The Emacs terminal emulation in term.el now uses "eterm-color" as its
238terminfo name, since term.el now supports color.
239
240** The script etc/emacs-buffer.gdb can be used with gdb to retrieve the
241contents of buffers from a core dump and save them to files easily, should
242Emacs crash.
243
244** Building with -DENABLE_CHECKING does not automatically build with union
245types any more. Add -DUSE_LISP_UNION_TYPE if you want union types.
246
247** When pure storage overflows while dumping, Emacs now prints how
248much pure storage it will approximately need.
249
250\f
251* Startup Changes in Emacs 22.1
252
253** Init file changes
254If the init file ~/.emacs does not exist, Emacs will try
255~/.emacs.d/init.el or ~/.emacs.d/init.elc. Likewise, if the shell init file
256~/.emacs_SHELL is not found, Emacs will try ~/.emacs.d/init_SHELL.sh.
257
258** Emacs can now be invoked in full-screen mode on a windowed display.
259When Emacs is invoked on a window system, the new command-line options
260`--fullwidth', `--fullheight', and `--fullscreen' produce a frame
261whose width, height, or both width and height take up the entire
262screen size. (For now, this does not work with some window managers.)
263
264** Emacs now displays a splash screen by default even if command-line
265arguments were given. The new command-line option --no-splash
266disables the splash screen; see also the variable
267`inhibit-splash-screen' (which is also aliased as
268`inhibit-startup-message').
269
270** New user option `inhibit-startup-buffer-menu'.
271When loading many files, for instance with `emacs *', Emacs normally
272displays a buffer menu. This option turns the buffer menu off.
273
274** New command line option -nbc or --no-blinking-cursor disables
275the blinking cursor on graphical terminals.
276
277** The option --script FILE runs Emacs in batch mode and loads FILE.
278It is useful for writing Emacs Lisp shell script files, because they
279can start with this line:
280
281 #!/usr/bin/emacs --script
282
283** The -f option, used from the command line to call a function,
284now reads arguments for the function interactively if it is
285an interactively callable function.
286
287** The option --directory DIR now modifies `load-path' immediately.
288Directories are added to the front of `load-path' in the order they
289appear on the command line. For example, with this command line:
290
291 emacs -batch -L .. -L /tmp --eval "(require 'foo)"
292
293Emacs looks for library `foo' in the parent directory, then in /tmp, then
294in the other directories in `load-path'. (-L is short for --directory.)
295
296** When you specify a frame size with --geometry, the size applies to
297all frames you create. A position specified with --geometry only
298affects the initial frame.
299
300** Emacs built for MS-Windows now behaves like Emacs on X does,
301with respect to its frame position: if you don't specify a position
302(in your .emacs init file, in the Registry, or with the --geometry
303command-line option), Emacs leaves the frame position to the Windows'
304window manager.
305
306** The command line option --no-windows has been changed to
307--no-window-system. The old one still works, but is deprecated.
308
309** If the environment variable DISPLAY specifies an unreachable X display,
310Emacs will now startup as if invoked with the --no-window-system option.
311
312** Emacs now reads the standard abbrevs file ~/.abbrev_defs
313automatically at startup, if it exists. When Emacs offers to save
314modified buffers, it saves the abbrevs too if they have changed. It
315can do this either silently or asking for confirmation first,
316according to the value of `save-abbrevs'.
317
318** New command line option -Q or --quick.
319This is like using -q --no-site-file, but in addition it also disables
320the fancy startup screen.
321
322** New command line option -D or --basic-display.
323Disables the menu-bar, the tool-bar, the scroll-bars, tool tips, and
324the blinking cursor.
325
326** The default is now to use a bitmap as the icon.
327The command-line options --icon-type, -i have been replaced with
328options --no-bitmap-icon, -nbi to turn the bitmap icon off.
329
330** If the environment variable EMAIL is defined, Emacs now uses its value
331to compute the default value of `user-mail-address', in preference to
332concatenation of `user-login-name' with the name of your host machine.
333
334\f
335* Incompatible Editing Changes in Emacs 22.1
336
337** You can now follow links by clicking Mouse-1 on the link.
338
339See below for more details.
340
341** When the undo information of the current command gets really large
342(beyond the value of `undo-outer-limit'), Emacs discards it and warns
343you about it.
344
345** When Emacs prompts for file names, SPC no longer completes the file name.
346This is so filenames with embedded spaces could be input without the
347need to quote the space with a C-q. The underlying changes in the
348keymaps that are active in the minibuffer are described below under
349"New keymaps for typing file names".
350
5a95db21 351If you want the old behavior back, add these two key bindings to your
3ada466d
EZ
352~/.emacs init file:
353
354 (define-key minibuffer-local-filename-completion-map
355 " " 'minibuffer-complete-word)
356 (define-key minibuffer-local-must-match-filename-map
357 " " 'minibuffer-complete-word)
358
782f8379
GM
359** The completion commands TAB, SPC and ? in the minibuffer apply only
360to the text before point. If there is text in the buffer after point,
361it remains unchanged.
362
363** In incremental search, C-w is changed. M-%, C-M-w and C-M-y are special.
364
365See below under "incremental search changes".
366
367** M-g is now a prefix key.
368M-g g and M-g M-g run goto-line.
369M-g n and M-g M-n run next-error (like C-x `).
370M-g p and M-g M-p run previous-error.
371
372** C-u M-g M-g switches to the most recent previous buffer,
373and goes to the specified line in that buffer.
374
375When goto-line starts to execute, if there's a number in the buffer at
376point then it acts as the default argument for the minibuffer.
377
378** M-o now is the prefix key for setting text properties;
379M-o M-o requests refontification.
380
381** C-x C-f RET (find-file), typing nothing in the minibuffer, is no longer
382a special case.
383
384Since the default input is the current directory, this has the effect
385of specifying the current directory. Normally that means to visit the
386directory with Dired.
387
388You can get the old behavior by typing C-x C-f M-n RET, which fetches
389the actual file name into the minibuffer.
390
391** In Dired's ! command (dired-do-shell-command), `*' and `?' now
392control substitution of the file names only when they are surrounded
393by whitespace. This means you can now use them as shell wildcards
394too. If you want to use just plain `*' as a wildcard, type `*""'; the
395doublequotes make no difference in the shell, but they prevent
396special treatment in `dired-do-shell-command'.
397
782f8379
GM
398** The info-search bindings on C-h C-f, C-h C-k and C-h C-i
399have been moved to C-h F, C-h K and C-h S.
400
401** `apply-macro-to-region-lines' now operates on all lines that begin
402in the region, rather than on all complete lines in the region.
403
404** line-move-ignore-invisible now defaults to t.
405
406** Adaptive filling misfeature removed.
407It no longer treats `NNN.' or `(NNN)' as a prefix.
408
409** The old bindings C-M-delete and C-M-backspace have been deleted,
410since there are situations where one or the other will shut down
411the operating system or your X server.
412
413** The register compatibility key bindings (deprecated since Emacs 19)
414have been removed:
415 C-x / point-to-register (Use: C-x r SPC)
416 C-x j jump-to-register (Use: C-x r j)
417 C-x x copy-to-register (Use: C-x r s)
418 C-x g insert-register (Use: C-x r i)
419
420\f
421* Editing Changes in Emacs 22.1
422
423** The max size of buffers and integers has been doubled.
424On 32bit machines, it is now 256M (i.e. 268435455).
425
426** !MEM FULL! at the start of the mode line indicates that Emacs
427cannot get any more memory for Lisp data. This often means it could
428crash soon if you do things that use more memory. On most systems,
429killing buffers will get out of this state. If killing buffers does
430not make !MEM FULL! disappear, you should save your work and start
431a new Emacs.
432
433** `undo-only' does an undo which does not redo any previous undo.
434
435** Yanking text now discards certain text properties that can
436be inconvenient when you did not expect them. The variable
437`yank-excluded-properties' specifies which ones. Insertion
438of register contents and rectangles also discards these properties.
439
440** New command `kill-whole-line' kills an entire line at once.
441By default, it is bound to C-S-<backspace>.
442
443** M-SPC (just-one-space) when given a numeric argument N
444converts whitespace around point to N spaces.
445
446** You can now switch buffers in a cyclic order with C-x C-left
447(previous-buffer) and C-x C-right (next-buffer). C-x left and
448C-x right can be used as well. The functions keep a different buffer
449cycle for each frame, using the frame-local buffer list.
450
451** C-x 5 C-o displays a specified buffer in another frame
452but does not switch to that frame. It's the multi-frame
453analogue of C-x 4 C-o.
454
455** `special-display-buffer-names' and `special-display-regexps' now
456understand two new boolean pseudo-frame-parameters `same-frame' and
457`same-window'.
458
459** New commands to operate on pairs of open and close characters:
460`insert-pair', `delete-pair', `raise-sexp'.
461
462** M-x setenv now expands environment variable references.
463
464Substrings of the form `$foo' and `${foo}' in the specified new value
465now refer to the value of environment variable foo. To include a `$'
466in the value, use `$$'.
467
468** The default values of paragraph-start and indent-line-function have
469been changed to reflect those used in Text mode rather than those used
470in Paragraph-Indent Text mode.
471
472** The default for the paper size (variable ps-paper-type) is taken
473from the locale.
474
475** Help command changes:
476
477*** Changes in C-h bindings:
478
479C-h e displays the *Messages* buffer.
480
481C-h d runs apropos-documentation.
482
483C-h r visits the Emacs Manual in Info.
484
485C-h followed by a control character is used for displaying files
486 that do not change:
487
488C-h C-f displays the FAQ.
489C-h C-e displays the PROBLEMS file.
490
491The info-search bindings on C-h C-f, C-h C-k and C-h C-i
492have been moved to C-h F, C-h K and C-h S.
493
494C-h c, C-h k, C-h w, and C-h f now handle remapped interactive commands.
495- C-h c and C-h k report the actual command (after possible remapping)
496 run by the key sequence.
497- C-h w and C-h f on a command which has been remapped now report the
498 command it is remapped to, and the keys which can be used to run
499 that command.
500
501For example, if C-k is bound to kill-line, and kill-line is remapped
502to new-kill-line, these commands now report:
503- C-h c and C-h k C-k reports:
504 C-k runs the command new-kill-line
505- C-h w and C-h f kill-line reports:
506 kill-line is remapped to new-kill-line which is on C-k, <deleteline>
507- C-h w and C-h f new-kill-line reports:
508 new-kill-line is on C-k
509
510*** The apropos commands now accept a list of words to match.
511When more than one word is specified, at least two of those words must
512be present for an item to match. Regular expression matching is still
513available.
514
515*** The new option `apropos-sort-by-scores' causes the matching items
516to be sorted according to their score. The score for an item is a
517number calculated to indicate how well the item matches the words or
518regular expression that you entered to the apropos command. The best
519match is listed first, and the calculated score is shown for each
520matching item.
521
522*** Help commands `describe-function' and `describe-key' now show function
523arguments in lowercase italics on displays that support it. To change the
524default, customize face `help-argument-name' or redefine the function
525`help-default-arg-highlight'.
526
527*** C-h v and C-h f commands now include a hyperlink to the C source for
528variables and functions defined in C (if the C source is available).
529
530*** Help mode now only makes hyperlinks for faces when the face name is
531preceded or followed by the word `face'. It no longer makes
532hyperlinks for variables without variable documentation, unless
533preceded by one of the words `variable' or `option'. It now makes
534hyperlinks to Info anchors (or nodes) if the anchor (or node) name is
535enclosed in single quotes and preceded by `info anchor' or `Info
536anchor' (in addition to earlier `info node' and `Info node'). In
537addition, it now makes hyperlinks to URLs as well if the URL is
538enclosed in single quotes and preceded by `URL'.
539
540*** The new command `describe-char' (C-u C-x =) pops up a buffer with
541description various information about a character, including its
542encodings and syntax, its text properties, how to input, overlays, and
543widgets at point. You can get more information about some of them, by
544clicking on mouse-sensitive areas or moving there and pressing RET.
545
546*** The command `list-text-properties-at' has been deleted because
547C-u C-x = gives the same information and more.
548
549*** New command `display-local-help' displays any local help at point
550in the echo area. It is bound to `C-h .'. It normally displays the
551same string that would be displayed on mouse-over using the
552`help-echo' property, but, in certain cases, it can display a more
553keyboard oriented alternative.
554
73187b26 555*** New user option `help-at-pt-display-when-idle' allows you to
782f8379
GM
556automatically show the help provided by `display-local-help' on
557point-over, after suitable idle time. The amount of idle time is
558determined by the user option `help-at-pt-timer-delay' and defaults
559to one second. This feature is turned off by default.
560
561** Mark command changes:
562
563*** A prefix argument is no longer required to repeat a jump to a
236a4178
GM
564previous mark if you set `set-mark-command-repeat-pop' to t. I.e. C-u
565C-SPC C-SPC C-SPC ... cycles through the mark ring. Use C-u C-u C-SPC
566to set the mark immediately after a jump.
782f8379
GM
567
568*** Marking commands extend the region when invoked multiple times.
569
570If you type C-M-SPC (mark-sexp), M-@ (mark-word), M-h
571(mark-paragraph), or C-M-h (mark-defun) repeatedly, the marked region
572extends each time, so you can mark the next two sexps with M-C-SPC
573M-C-SPC, for example. This feature also works for
574mark-end-of-sentence, if you bind that to a key. It also extends the
575region when the mark is active in Transient Mark mode, regardless of
576the last command. To start a new region with one of marking commands
577in Transient Mark mode, you can deactivate the active region with C-g,
578or set the new mark with C-SPC.
579
580*** Some commands do something special in Transient Mark mode when the
581mark is active--for instance, they limit their operation to the
582region. Even if you don't normally use Transient Mark mode, you might
583want to get this behavior from a particular command. There are two
584ways you can enable Transient Mark mode and activate the mark, for one
585command only.
586
587One method is to type C-SPC C-SPC; this enables Transient Mark mode
588and sets the mark at point. The other method is to type C-u C-x C-x.
589This enables Transient Mark mode temporarily but does not alter the
590mark or the region.
591
592After these commands, Transient Mark mode remains enabled until you
593deactivate the mark. That typically happens when you type a command
594that alters the buffer, but you can also deactivate the mark by typing
595C-g.
596
597*** Movement commands `beginning-of-buffer', `end-of-buffer',
598`beginning-of-defun', `end-of-defun' do not set the mark if the mark
599is already active in Transient Mark mode.
600
601*** M-h (mark-paragraph) now accepts a prefix arg.
602
603With positive arg, M-h marks the current and the following paragraphs;
604if the arg is negative, it marks the current and the preceding
605paragraphs.
606
607** Incremental Search changes:
608
609*** M-% typed in isearch mode invokes `query-replace' or
610`query-replace-regexp' (depending on search mode) with the current
611search string used as the string to replace.
612
613*** C-w in incremental search now grabs either a character or a word,
614making the decision in a heuristic way. This new job is done by the
615command `isearch-yank-word-or-char'. To restore the old behavior,
616bind C-w to `isearch-yank-word' in `isearch-mode-map'.
617
618*** C-y in incremental search now grabs the next line if point is already
619at the end of a line.
620
621*** C-M-w deletes and C-M-y grabs a character in isearch mode.
622Another method to grab a character is to enter the minibuffer by `M-e'
623and to type `C-f' at the end of the search string in the minibuffer.
624
625*** Vertical scrolling is now possible within incremental search.
626To enable this feature, customize the new user option
627`isearch-allow-scroll'. User written commands which satisfy stringent
628constraints can be marked as "scrolling commands". See the Emacs manual
629for details.
630
631*** Isearch no longer adds `isearch-resume' commands to the command
632history by default. To enable this feature, customize the new
633user option `isearch-resume-in-command-history'.
634
635** Replace command changes:
636
637*** When used interactively, the commands `query-replace-regexp' and
638`replace-regexp' allow \,expr to be used in a replacement string,
639where expr is an arbitrary Lisp expression evaluated at replacement
640time. `\#' in a replacement string now refers to the count of
641replacements already made by the replacement command. All regular
642expression replacement commands now allow `\?' in the replacement
643string to specify a position where the replacement string can be
644edited for each replacement. `query-replace-regexp-eval' is now
645deprecated since it offers no additional functionality.
646
647*** query-replace uses isearch lazy highlighting when the new user option
648`query-replace-lazy-highlight' is non-nil.
649
650*** The current match in query-replace is highlighted in new face
651`query-replace' which by default inherits from isearch face.
652
653*** New user option `query-replace-skip-read-only': when non-nil,
654`query-replace' and related functions simply ignore
655a match if part of it has a read-only property.
656
657** Local variables lists:
658
659*** If the local variables list contains any variable-value pairs that
660are not known to be safe, Emacs shows a prompt asking whether to apply
661the local variables list as a whole. In earlier versions, a prompt
662was only issued for variables explicitly marked as risky (for the
663definition of risky variables, see `risky-local-variable-p').
664
665At the prompt, you can choose to save the contents of this local
666variables list to `safe-local-variable-values'. This new customizable
667option is a list of variable-value pairs that are known to be safe.
668Variables can also be marked as safe with the existing
669`safe-local-variable' property (see `safe-local-variable-p').
670However, risky variables will not be added to
671`safe-local-variable-values' in this way.
672
673*** The variable `enable-local-variables' controls how local variable
674lists are handled. t, the default, specifies the standard querying
675behavior. :safe means use only safe values, and ignore the rest.
676:all means set all variables, whether or not they are safe.
677nil means ignore them all. Anything else means always query.
678
679*** The variable `safe-local-eval-forms' specifies a list of forms that
680are ok to evaluate when they appear in an `eval' local variables
681specification. Normally Emacs asks for confirmation before evaluating
682such a form, but if the form appears in this list, no confirmation is
683needed.
684
685*** If a function has a non-nil `safe-local-eval-function' property,
686that means it is ok to evaluate some calls to that function when it
687appears in an `eval' local variables specification. If the property
688is t, then any form calling that function with constant arguments is
689ok. If the property is a function or list of functions, they are called
690with the form as argument, and if any returns t, the form is ok to call.
691
692If the form is not "ok to call", that means Emacs asks for
693confirmation as before.
694
695*** In processing a local variables list, Emacs strips the prefix and
696suffix from every line before processing all the lines.
697
698*** Text properties in local variables.
699
700A file local variables list cannot specify a string with text
701properties--any specified text properties are discarded.
702
703** File operation changes:
704
705*** Unquoted `$' in file names do not signal an error any more when
706the corresponding environment variable does not exist.
707Instead, the `$ENVVAR' text is left as is, so that `$$' quoting
708is only rarely needed.
709
710*** C-x C-f RET, typing nothing in the minibuffer, is no longer a special case.
711
712Since the default input is the current directory, this has the effect
713of specifying the current directory. Normally that means to visit the
714directory with Dired.
715
716*** C-x s (save-some-buffers) now offers an option `d' to diff a buffer
717against its file, so you can see what changes you would be saving.
718
719*** Auto Compression mode is now enabled by default.
720
721*** If the user visits a file larger than `large-file-warning-threshold',
722Emacs asks for confirmation.
723
724*** The commands copy-file, rename-file, make-symbolic-link and
725add-name-to-file, when given a directory as the "new name" argument,
726convert it to a file name by merging in the within-directory part of
727the existing file's name. (This is the same convention that shell
728commands cp, mv, and ln follow.) Thus, M-x copy-file RET ~/foo RET
729/tmp RET copies ~/foo to /tmp/foo.
730
731*** require-final-newline now has two new possible values:
732
733`visit' means add a newline (as an undoable change) if it's needed
734when visiting the file.
735
736`visit-save' means add a newline (as an undoable change) if it's
737needed when visiting the file, and also add a newline if it's needed
738when saving the file.
739
740*** The new option mode-require-final-newline controls how certain
741major modes enable require-final-newline. Any major mode that's
742designed for a kind of file that should normally end in a newline
743sets require-final-newline based on mode-require-final-newline.
744So you can customize mode-require-final-newline to control what these
745modes do.
746
747*** When you are root, and you visit a file whose modes specify
748read-only, the Emacs buffer is now read-only too. Type C-x C-q if you
749want to make the buffer writable. (As root, you can in fact alter the
750file.)
751
752*** find-file-read-only visits multiple files in read-only mode,
753when the file name contains wildcard characters.
754
755*** find-alternate-file replaces the current file with multiple files,
756when the file name contains wildcard characters. It now asks if you
757wish save your changes and not just offer to kill the buffer.
758
759*** When used interactively, `format-write-file' now asks for confirmation
760before overwriting an existing file, unless a prefix argument is
761supplied. This behavior is analogous to `write-file'.
762
763*** The variable `auto-save-file-name-transforms' now has a third element that
764controls whether or not the function `make-auto-save-file-name' will
765attempt to construct a unique auto-save name (e.g. for remote files).
766
767*** The new option `write-region-inhibit-fsync' disables calls to fsync
768in `write-region'. This can be useful on laptops to avoid spinning up
769the hard drive upon each file save. Enabling this variable may result
770in data loss, use with care.
771
772** Minibuffer changes:
773
774*** The completion commands TAB, SPC and ? in the minibuffer apply only
775to the text before point. If there is text in the buffer after point,
776it remains unchanged.
777
778*** The new file-name-shadow-mode is turned ON by default, so that when
779entering a file name, any prefix which Emacs will ignore is dimmed.
780
781*** There's a new face `minibuffer-prompt'.
782Emacs adds this face to the list of text properties stored in the
783variable `minibuffer-prompt-properties', which is used to display the
784prompt string.
785
786*** Enhanced visual feedback in `*Completions*' buffer.
787
788Completions lists use faces to highlight what all completions
789have in common and where they begin to differ.
790
791The common prefix shared by all possible completions uses the face
792`completions-common-part', while the first character that isn't the
793same uses the face `completions-first-difference'. By default,
794`completions-common-part' inherits from `default', and
795`completions-first-difference' inherits from `bold'. The idea of
796`completions-common-part' is that you can use it to make the common
797parts less visible than normal, so that the rest of the differing
798parts is, by contrast, slightly highlighted.
799
800Above fontification is always done when listing completions is
801triggered at minibuffer. If you want to fontify completions whose
802listing is triggered at the other normal buffer, you have to pass
803the common prefix of completions to `display-completion-list' as
804its second argument.
805
806*** File-name completion can now ignore specified directories.
807If an element of the list in `completion-ignored-extensions' ends in a
808slash `/', it indicates a subdirectory that should be ignored when
809completing file names. Elements of `completion-ignored-extensions'
810which do not end in a slash are never considered when a completion
811candidate is a directory.
812
813*** New user option `history-delete-duplicates'.
814If set to t when adding a new history element, all previous identical
815elements are deleted from the history list.
816
817** Redisplay changes:
818
819*** The new face `mode-line-inactive' is used to display the mode line
820of non-selected windows. The `mode-line' face is now used to display
821the mode line of the currently selected window.
822
823The new variable `mode-line-in-non-selected-windows' controls whether
824the `mode-line-inactive' face is used.
825
826*** The mode line position information now comes before the major mode.
827When the file is maintained under version control, that information
828appears between the position information and the major mode.
829
830*** You can now customize the use of window fringes. To control this
831for all frames, use M-x fringe-mode or the Show/Hide submenu of the
832top-level Options menu, or customize the `fringe-mode' variable. To
833control this for a specific frame, use the command M-x
834set-fringe-style.
835
836*** Angle icons in the fringes can indicate the buffer boundaries. In
837addition, up and down arrow bitmaps in the fringe indicate which ways
838the window can be scrolled.
839
840This behavior is activated by setting the buffer-local variable
841`indicate-buffer-boundaries' to a non-nil value. The default value of
842this variable is found in `default-indicate-buffer-boundaries'.
843
844If value is `left' or `right', both angle and arrow bitmaps are
845displayed in the left or right fringe, resp.
846
847The value can also be an alist which specifies the presence and
848position of each bitmap individually.
849
850For example, ((top . left) (t . right)) places the top angle bitmap
851in left fringe, the bottom angle bitmap in right fringe, and both
852arrow bitmaps in right fringe. To show just the angle bitmaps in the
853left fringe, but no arrow bitmaps, use ((top . left) (bottom . left)).
854
855*** On window systems, lines which are exactly as wide as the window
856(not counting the final newline character) are no longer broken into
857two lines on the display (with just the newline on the second line).
858Instead, the newline now "overflows" into the right fringe, and the
859cursor will be displayed in the fringe when positioned on that newline.
860
861The new user option 'overflow-newline-into-fringe' can be set to nil to
862revert to the old behavior of continuing such lines.
863
864*** A window can now have individual fringe and scroll-bar settings,
865in addition to the individual display margin settings.
866
867Such individual settings are now preserved when windows are split
868horizontally or vertically, a saved window configuration is restored,
869or when the frame is resized.
870
871*** When a window has display margin areas, the fringes are now
872displayed between the margins and the buffer's text area, rather than
873outside those margins.
874
875*** New face `escape-glyph' highlights control characters and escape glyphs.
876
877*** Non-breaking space and hyphens are now displayed with a special
878face, either nobreak-space or escape-glyph. You can turn this off or
879specify a different mode by setting the variable `nobreak-char-display'.
880
881*** The parameters of automatic hscrolling can now be customized.
882The variable `hscroll-margin' determines how many columns away from
883the window edge point is allowed to get before automatic hscrolling
884will horizontally scroll the window. The default value is 5.
885
886The variable `hscroll-step' determines how many columns automatic
887hscrolling scrolls the window when point gets too close to the
888window edge. If its value is zero, the default, Emacs scrolls the
889window so as to center point. If its value is an integer, it says how
890many columns to scroll. If the value is a floating-point number, it
891gives the fraction of the window's width to scroll the window.
892
893The variable `automatic-hscrolling' was renamed to
894`auto-hscroll-mode'. The old name is still available as an alias.
895
896*** Moving or scrolling through images (and other lines) taller than
897the window now works sensibly, by automatically adjusting the window's
898vscroll property.
899
900*** Preemptive redisplay now adapts to current load and bandwidth.
901
902To avoid preempting redisplay on fast computers, networks, and displays,
903the arrival of new input is now performed at regular intervals during
904redisplay. The new variable `redisplay-preemption-period' specifies
905the period; the default is to check for input every 0.1 seconds.
906
907*** The %c and %l constructs are now ignored in frame-title-format.
908Due to technical limitations in how Emacs interacts with windowing
909systems, these constructs often failed to render properly, and could
910even cause Emacs to crash.
911
912*** If value of `auto-resize-tool-bars' is `grow-only', the tool bar
913will expand as needed, but not contract automatically. To contract
914the tool bar, you must type C-l.
915
916*** New customize option `overline-margin' controls the space between
917overline and text.
918
919*** New variable `x-underline-at-descent-line' controls the relative
920position of the underline. When set, it overrides the
921`x-use-underline-position-properties' variables.
922
923** New faces:
924
925*** `mode-line-highlight' is the standard face indicating mouse sensitive
926elements on mode-line (and header-line) like `highlight' face on text
927areas.
928
929*** `mode-line-buffer-id' is the standard face for buffer identification
930parts of the mode line.
931
932*** `shadow' face defines the appearance of the "shadowed" text, i.e.
933the text which should be less noticeable than the surrounding text.
934This can be achieved by using shades of grey in contrast with either
935black or white default foreground color. This generic shadow face
936allows customization of the appearance of shadowed text in one place,
937so package-specific faces can inherit from it.
938
939*** `vertical-border' face is used for the vertical divider between windows.
940
941** Font-Lock (syntax highlighting) changes:
942
943*** All modes now support using M-x font-lock-mode to toggle
944fontification, even those such as Occur, Info, and comint-derived
945modes that do their own fontification in a special way.
946
947The variable `Info-fontify' is no longer applicable; to disable
948fontification in Info, remove `turn-on-font-lock' from
949`Info-mode-hook'.
950
951*** New standard font-lock face `font-lock-comment-delimiter-face'.
952
953*** New standard font-lock face `font-lock-preprocessor-face'.
954
955*** Easy to overlook single character negation can now be font-locked.
956You can use the new variable `font-lock-negation-char-face' and the face of
957the same name to customize this. Currently the cc-modes, sh-script-mode,
958cperl-mode and make-mode support this.
959
960*** Font-Lock mode: in major modes such as Lisp mode, where some Emacs
961features assume that an open-paren in column 0 is always outside of
962any string or comment, Font-Lock now highlights any such open-paren in
963bold-red if it is inside a string or a comment, to indicate that it
964can cause trouble. You should rewrite the string or comment so that
965the open-paren is not in column 0.
966
967*** M-o now is the prefix key for setting text properties;
968M-o M-o requests refontification.
969
970*** The default settings for JIT stealth lock parameters are changed.
971The default value for the user option jit-lock-stealth-time is now nil
972instead of 3. This setting of jit-lock-stealth-time disables stealth
973fontification: on today's machines, it may be a bug in font lock
974patterns if fontification otherwise noticeably degrades interactivity.
975If you find movement in infrequently visited buffers sluggish (and the
976major mode maintainer has no better idea), customizing
977jit-lock-stealth-time to a non-nil value will let Emacs fontify
978buffers in the background when it considers the system to be idle.
979jit-lock-stealth-nice is now 0.5 instead of 0.125 which is supposed to
980cause less load than the old defaults.
981
982*** jit-lock can now be delayed with `jit-lock-defer-time'.
983
984If this variable is non-nil, its value should be the amount of Emacs
985idle time in seconds to wait before starting fontification. For
986example, if you set `jit-lock-defer-time' to 0.25, fontification will
987only happen after 0.25s of idle time.
988
989*** contextual refontification is now separate from stealth fontification.
990
991jit-lock-defer-contextually is renamed jit-lock-contextually and
992jit-lock-context-time determines the delay after which contextual
993refontification takes place.
994
995*** lazy-lock is considered obsolete.
996
997The `lazy-lock' package is superseded by `jit-lock' and is considered
998obsolete. `jit-lock' is activated by default; if you wish to continue
999using `lazy-lock', activate it in your ~/.emacs like this:
1000 (setq font-lock-support-mode 'lazy-lock-mode)
1001
1002If you invoke `lazy-lock-mode' directly rather than through
1003`font-lock-support-mode', it now issues a warning:
1004 "Use font-lock-support-mode rather than calling lazy-lock-mode"
1005
1006** Menu support:
1007
1008*** A menu item "Show/Hide" was added to the top-level menu "Options".
1009This menu allows you to turn various display features on and off (such
1010as the fringes, the tool bar, the speedbar, and the menu bar itself).
1011You can also move the vertical scroll bar to either side here or turn
1012it off completely. There is also a menu-item to toggle displaying of
1013current date and time, current line and column number in the mode-line.
1014
1015*** Speedbar has moved from the "Tools" top level menu to "Show/Hide".
1016
1017*** The menu item "Open File..." has been split into two items, "New File..."
1018and "Open File...". "Open File..." now opens only existing files. This is
1019to support existing GUI file selection dialogs better.
1020
1021*** The file selection dialog for Gtk+, Mac, W32 and Motif/LessTif can be
1022disabled by customizing the variable `use-file-dialog'.
1023
1024*** The pop up menus for Lucid now stay up if you do a fast click and can
1025be navigated with the arrow keys (like Gtk+, Mac and W32).
1026
1027*** The menu bar for Motif/LessTif/Lucid/Gtk+ can be navigated with keys.
1028Pressing F10 shows the first menu in the menu bar. Navigation is done with
1029the arrow keys, select with the return key and cancel with the escape keys.
1030
1031*** The Lucid menus can display multilingual text in your locale. You have
1032to explicitly specify a fontSet resource for this to work, for example
1033`-xrm "Emacs*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*"'.
1034
1035*** Dialogs for Lucid/Athena and LessTif/Motif now pop down on pressing
1036ESC, like they do for Gtk+, Mac and W32.
1037
1038*** For the Gtk+ version, you can make Emacs use the old file dialog
1039by setting the variable `x-gtk-use-old-file-dialog' to t. Default is to use
1040the new dialog.
1041
1042*** You can exit dialog windows and menus by typing C-g.
1043
1044** Buffer Menu changes:
1045
1046*** The new options `buffers-menu-show-directories' and
1047`buffers-menu-show-status' let you control how buffers are displayed
1048in the menu dropped down when you click "Buffers" from the menu bar.
1049
1050`buffers-menu-show-directories' controls whether the menu displays
1051leading directories as part of the file name visited by the buffer.
1052If its value is `unless-uniquify', the default, directories are
1053shown unless uniquify-buffer-name-style' is non-nil. The value of nil
1054and t turn the display of directories off and on, respectively.
1055
1056`buffers-menu-show-status' controls whether the Buffers menu includes
1057the modified and read-only status of the buffers. By default it is
1058t, and the status is shown.
1059
1060Setting these variables directly does not take effect until next time
1061the Buffers menu is regenerated.
1062
1063*** New command `Buffer-menu-toggle-files-only' toggles display of file
1064buffers only in the Buffer Menu. It is bound to T in Buffer Menu
1065mode.
1066
1067*** `buffer-menu' and `list-buffers' now list buffers whose names begin
1068with a space, when those buffers are visiting files. Normally buffers
1069whose names begin with space are omitted.
1070
1071** Mouse changes:
1072
1073*** You can now follow links by clicking Mouse-1 on the link.
1074
1075Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2
1076click to follow a link, whereas most other applications use a Mouse-1
1077click for both purposes, depending on whether you click outside or
1078inside a link. Now the behavior of a Mouse-1 click has been changed
1079to match this context-sensitive dual behavior. (If you prefer the old
1080behavior, set the user option `mouse-1-click-follows-link' to nil.)
1081
1082Depending on the current mode, a Mouse-2 click in Emacs can do much
1083more than just follow a link, so the new Mouse-1 behavior is only
1084activated for modes which explicitly mark a clickable text as a "link"
1085(see the new function `mouse-on-link-p' for details). The Lisp
1086packages that are included in release 22.1 have been adapted to do
1087this, but external packages may not yet support this. However, there
1088is no risk in using such packages, as the worst thing that could
1089happen is that you get the original Mouse-1 behavior when you click
1090on a link, which typically means that you set point where you click.
1091
1092If you want to get the original Mouse-1 action also inside a link, you
1093just need to press the Mouse-1 button a little longer than a normal
1094click (i.e. press and hold the Mouse-1 button for half a second before
1095you release it).
1096
1097Dragging the Mouse-1 inside a link still performs the original
1098drag-mouse-1 action, typically copy the text.
1099
1100You can customize the new Mouse-1 behavior via the new user options
1101`mouse-1-click-follows-link' and `mouse-1-click-in-non-selected-windows'.
1102
1103*** If you set the new variable `mouse-autoselect-window' to a non-nil
1104value, windows are automatically selected as you move the mouse from
1105one Emacs window to another, even within a frame. A minibuffer window
1106can be selected only when it is active.
1107
1108*** On X, when the window manager requires that you click on a frame to
1109select it (give it focus), the selected window and cursor position
1110normally changes according to the mouse click position. If you set
1111the variable x-mouse-click-focus-ignore-position to t, the selected
1112window and cursor position do not change when you click on a frame
1113to give it focus.
1114
1115*** Emacs normally highlights mouse sensitive text whenever the mouse
1116is over the text. By setting the new variable `mouse-highlight', you
1117can optionally enable mouse highlighting only after you move the
1118mouse, so that highlighting disappears when you press a key. You can
1119also disable mouse highlighting.
1120
1121*** You can now customize if selecting a region by dragging the mouse
1122shall not copy the selected text to the kill-ring by setting the new
1123variable mouse-drag-copy-region to nil.
1124
1125*** Under X, mouse-wheel-mode is turned on by default.
1126
1127*** Emacs ignores mouse-2 clicks while the mouse wheel is being moved.
1128
1129People tend to push the mouse wheel (which counts as a mouse-2 click)
1130unintentionally while turning the wheel, so these clicks are now
1131ignored. You can customize this with the mouse-wheel-click-event and
1132mouse-wheel-inhibit-click-time variables.
1133
1134*** mouse-wheels can now scroll a specific fraction of the window
1135(rather than a fixed number of lines) and the scrolling is `progressive'.
1136
1137** Multilingual Environment (Mule) changes:
1138
1139*** You can disable character translation for a file using the -*-
1140construct. Include `enable-character-translation: nil' inside the
1141-*-...-*- to disable any character translation that may happen by
1142various global and per-coding-system translation tables. You can also
1143specify it in a local variable list at the end of the file. For
1144shortcut, instead of using this long variable name, you can append the
1145character "!" at the end of coding-system name specified in -*-
1146construct or in a local variable list. For example, if a file has the
1147following header, it is decoded by the coding system `iso-latin-1'
1148without any character translation:
1149;; -*- coding: iso-latin-1!; -*-
1150
1151*** Language environment and various default coding systems are setup
1152more correctly according to the current locale name. If the locale
1153name doesn't specify a charset, the default is what glibc defines.
1154This change can result in using the different coding systems as
1155default in some locale (e.g. vi_VN).
1156
1157*** The keyboard-coding-system is now automatically set based on your
1158current locale settings if you are not using a window system. This
1159can mean that the META key doesn't work but generates non-ASCII
1160characters instead, depending on how the terminal (or terminal
1161emulator) works. Use `set-keyboard-coding-system' (or customize
1162keyboard-coding-system) if you prefer META to work (the old default)
1163or if the locale doesn't describe the character set actually generated
1164by the keyboard. See Info node `Unibyte Mode'.
1165
1166*** The new command `set-file-name-coding-system' (C-x RET F) sets
1167coding system for encoding and decoding file names. A new menu item
1168(Options->Mule->Set Coding Systems->For File Name) invokes this
1169command.
1170
1171*** The new command `revert-buffer-with-coding-system' (C-x RET r)
1172revisits the current file using a coding system that you specify.
1173
1174*** New command `recode-region' decodes the region again by a specified
1175coding system.
1176
1177*** The new command `recode-file-name' changes the encoding of the name
1178of a file.
1179
1180*** New command `ucs-insert' inserts a character specified by its
1181unicode.
1182
1183*** New command quail-show-key shows what key (or key sequence) to type
1184in the current input method to input a character at point.
1185
1186*** Limited support for character `unification' has been added.
1187Emacs now knows how to translate between different representations of
1188the same characters in various Emacs charsets according to standard
1189Unicode mappings. This applies mainly to characters in the ISO 8859
1190sets plus some other 8-bit sets, but can be extended. For instance,
1191translation works amongst the Emacs ...-iso8859-... charsets and the
1192mule-unicode-... ones.
1193
1194By default this translation happens automatically on encoding.
1195Self-inserting characters are translated to make the input conformant
1196with the encoding of the buffer in which it's being used, where
1197possible.
1198
1199You can force a more complete unification with the user option
1200unify-8859-on-decoding-mode. That maps all the Latin-N character sets
1201into Unicode characters (from the latin-iso8859-1 and
1202mule-unicode-0100-24ff charsets) on decoding. Note that this mode
1203will often effectively clobber data with an iso-2022 encoding.
1204
1205*** New language environments (set up automatically according to the
1206locale): Belarusian, Bulgarian, Chinese-EUC-TW, Croatian, Esperanto,
1207French, Georgian, Italian, Latin-7, Latvian, Lithuanian, Malayalam,
1208Russian, Russian, Slovenian, Swedish, Tajik, Tamil, UTF-8,Ukrainian,
1209Welsh,Latin-6, Windows-1255.
1210
1211*** New input methods: latin-alt-postfix, latin-postfix, latin-prefix,
1212belarusian, bulgarian-bds, bulgarian-phonetic, chinese-sisheng (for
1213Chinese Pinyin characters), croatian, dutch, georgian, latvian-keyboard,
1214lithuanian-numeric, lithuanian-keyboard, malayalam-inscript, rfc1345,
1215russian-computer, sgml, slovenian, tamil-inscript, ukrainian-computer,
1216ucs, vietnamese-telex, welsh.
1217
1218*** There is support for decoding Greek and Cyrillic characters into
1219either Unicode (the mule-unicode charsets) or the iso-8859 charsets,
1220when possible. The latter are more space-efficient.
1221 This is controlled by user option utf-fragment-on-decoding.
1222
1223*** Improved Thai support. A new minor mode `thai-word-mode' (which is
1224automatically activated if you select Thai as a language
1225environment) changes key bindings of most word-oriented commands to
1226versions which recognize Thai words. Affected commands are
1227 M-f (forward-word)
1228 M-b (backward-word)
1229 M-d (kill-word)
1230 M-DEL (backward-kill-word)
1231 M-t (transpose-words)
1232 M-q (fill-paragraph)
1233
1234*** Indian support has been updated.
1235The in-is13194 coding system is now Unicode-based. CDAC fonts are
1236assumed. There is a framework for supporting various Indian scripts,
1237but currently only Devanagari, Malayalam and Tamil are supported.
1238
1239*** The utf-8/16 coding systems have been enhanced.
1240By default, untranslatable utf-8 sequences are simply composed into
1241single quasi-characters. User option `utf-translate-cjk-mode' (it is
1242turned on by default) arranges to translate many utf-8 CJK character
1243sequences into real Emacs characters in a similar way to the Mule-UCS
1244system. As this loads a fairly big data on demand, people who are not
1245interested in CJK characters may want to customize it to nil.
1246You can augment/amend the CJK translation via hash tables
1247`ucs-mule-cjk-to-unicode' and `ucs-unicode-to-mule-cjk'. The utf-8
1248coding system now also encodes characters from most of Emacs's
1249one-dimensional internal charsets, specifically the ISO-8859 ones.
1250The utf-16 coding system is affected similarly.
1251
1252*** A UTF-7 coding system is available in the library `utf-7'.
1253
1254*** A new coding system `euc-tw' has been added for traditional Chinese
1255in CNS encoding; it accepts both Big 5 and CNS as input; on saving,
1256Big 5 is then converted to CNS.
1257
1258*** Many new coding systems are available in the `code-pages' library.
1259These include complete versions of most of those in codepage.el, based
1260on Unicode mappings. `codepage-setup' is now obsolete and is used
1261only in the MS-DOS port of Emacs. All coding systems defined in
1262`code-pages' are auto-loaded.
1263
1264*** New variable `utf-translate-cjk-unicode-range' controls which
1265Unicode characters to translate in `utf-translate-cjk-mode'.
1266
1267*** iso-10646-1 (`Unicode') fonts can be used to display any range of
1268characters encodable by the utf-8 coding system. Just specify the
1269fontset appropriately.
1270
1271** Customize changes:
1272
1273*** Custom themes are collections of customize options. Create a
1274custom theme with M-x customize-create-theme. Use M-x load-theme to
1275load and enable a theme, and M-x disable-theme to disable it. Use M-x
1276enable-theme to enable a disabled theme.
1277
1278*** The commands M-x customize-face and M-x customize-face-other-window
1279now look at the character after point. If a face or faces are
1280specified for that character, the commands by default customize those
1281faces.
1282
1283*** The face-customization widget has been reworked to be less confusing.
1284In particular, when you enable a face attribute using the corresponding
1285check-box, there's no longer a redundant `*' option in value selection
1286for that attribute; the values you can choose are only those which make
1287sense for the attribute. When an attribute is de-selected by unchecking
1288its check-box, then the (now ignored, but still present temporarily in
1289case you re-select the attribute) value is hidden.
1290
1291*** When you set or reset a variable's value in a Customize buffer,
1292the previous value becomes the "backup value" of the variable.
1293You can go back to that backup value by selecting "Use Backup Value"
1294under the "[State]" button.
1295
1296** Dired mode:
1297
1298*** In Dired's ! command (dired-do-shell-command), `*' and `?' now
1299control substitution of the file names only when they are surrounded
1300by whitespace. This means you can now use them as shell wildcards
1301too. If you want to use just plain `*' as a wildcard, type `*""'; the
1302double quotes make no difference in the shell, but they prevent
1303special treatment in `dired-do-shell-command'.
1304
1305*** The Dired command `dired-goto-file' is now bound to j, not M-g.
1306This is to avoid hiding the global key binding of M-g.
1307
1308*** New faces dired-header, dired-mark, dired-marked, dired-flagged,
1309dired-ignored, dired-directory, dired-symlink, dired-warning
1310introduced for Dired mode instead of font-lock faces.
1311
1312*** New Dired command `dired-compare-directories' marks files
1313with different file attributes in two dired buffers.
1314
1315*** New Dired command `dired-do-touch' (bound to T) changes timestamps
1316of marked files with the value entered in the minibuffer.
1317
1318*** In Dired, the w command now stores the current line's file name
1319into the kill ring. With a zero prefix arg, it stores the absolute file name.
1320
1321*** In Dired-x, Omitting files is now a minor mode, dired-omit-mode.
1322
1323The mode toggling command is bound to M-o. A new command
1324dired-mark-omitted, bound to * O, marks omitted files. The variable
1325dired-omit-files-p is obsoleted, use the mode toggling function
1326instead.
1327
1328*** The variables dired-free-space-program and dired-free-space-args
1329have been renamed to directory-free-space-program and
1330directory-free-space-args, and they now apply whenever Emacs puts a
1331directory listing into a buffer.
1332
1333** Comint changes:
1334
1335*** The new INSIDE_EMACS environment variable is set to "t" in subshells
1336running inside Emacs. This supersedes the EMACS environment variable,
1337which will be removed in a future Emacs release. Programs that need
1338to know whether they are started inside Emacs should check INSIDE_EMACS
1339instead of EMACS.
1340
1341*** The comint prompt can now be made read-only, using the new user
1342option `comint-prompt-read-only'. This is not enabled by default,
1343except in IELM buffers. The read-only status of IELM prompts can be
1344controlled with the new user option `ielm-prompt-read-only', which
1345overrides `comint-prompt-read-only'.
1346
1347The new commands `comint-kill-whole-line' and `comint-kill-region'
1348support editing comint buffers with read-only prompts.
1349
1350`comint-kill-whole-line' is like `kill-whole-line', but ignores both
1351read-only and field properties. Hence, it always kill entire
1352lines, including any prompts.
1353
1354`comint-kill-region' is like `kill-region', except that it ignores
1355read-only properties, if it is safe to do so. This means that if any
1356part of a prompt is deleted, then the entire prompt must be deleted
1357and that all prompts must stay at the beginning of a line. If this is
1358not the case, then `comint-kill-region' behaves just like
1359`kill-region' if read-only properties are involved: it copies the text
1360to the kill-ring, but does not delete it.
1361
1362*** The new command `comint-insert-previous-argument' in comint-derived
1363modes (shell-mode, etc.) inserts arguments from previous command lines,
1364like bash's `ESC .' binding. It is bound by default to `C-c .', but
1365otherwise behaves quite similarly to the bash version.
1366
1367*** `comint-use-prompt-regexp-instead-of-fields' has been renamed
1368`comint-use-prompt-regexp'. The old name has been kept as an alias,
1369but declared obsolete.
1370
1371** M-x Compile changes:
1372
1373*** M-x compile has become more robust and reliable
1374
1375Quite a few more kinds of messages are recognized. Messages that are
1376recognized as warnings or informational come in orange or green, instead of
1377red. Informational messages are by default skipped with `next-error'
1378(controlled by `compilation-skip-threshold').
1379
1380Location data is collected on the fly as the *compilation* buffer changes.
1381This means you could modify messages to make them point to different files.
1382This also means you can not go to locations of messages you may have deleted.
1383
1384The variable `compilation-error-regexp-alist' has now become customizable. If
1385you had added your own regexps to this, you'll probably need to include a
1386leading `^', otherwise they'll match anywhere on a line. There is now also a
1387`compilation-mode-font-lock-keywords' and it nicely handles all the checks
1388that configure outputs and -o options so you see at a glance where you are.
1389
1390The new file etc/compilation.txt gives examples of each type of message.
1391
1392*** New user option `compilation-environment'.
1393This option allows you to specify environment variables for inferior
1394compilation processes without affecting the environment that all
1395subprocesses inherit.
1396
1397*** New user option `compilation-disable-input'.
1398If this is non-nil, send end-of-file as compilation process input.
1399
1400*** New options `next-error-highlight' and `next-error-highlight-no-select'
1401specify the method of highlighting of the corresponding source line
1402in new face `next-error'.
1403
1404*** A new minor mode `next-error-follow-minor-mode' can be used in
1405compilation-mode, grep-mode, occur-mode, and diff-mode (i.e. all the
1406modes that can use `next-error'). In this mode, cursor motion in the
1407buffer causes automatic display in another window of the corresponding
1408matches, compilation errors, etc. This minor mode can be toggled with
1409C-c C-f.
1410
1411*** When the left fringe is displayed, an arrow points to current message in
1412the compilation buffer.
1413
1414*** The new variable `compilation-context-lines' controls lines of leading
1415context before the current message. If nil and the left fringe is displayed,
1416it doesn't scroll the compilation output window. If there is no left fringe,
1417no arrow is displayed and a value of nil means display the message at the top
1418of the window.
1419
1420** Occur mode changes:
1421
1422*** The new command `multi-occur' is just like `occur', except it can
1423search multiple buffers. There is also a new command
1424`multi-occur-in-matching-buffers' which allows you to specify the
1425buffers to search by their filenames or buffer names. Internally,
1426Occur mode has been rewritten, and now uses font-lock, among other
1427changes.
1428
1429*** You can now use next-error (C-x `) and previous-error to advance to
1430the next/previous matching line found by M-x occur.
1431
1432*** In the *Occur* buffer, `o' switches to it in another window, and
1433C-o displays the current line's occurrence in another window without
1434switching to it.
1435
1436** Grep changes:
1437
1438*** Grep has been decoupled from compilation mode setup.
1439
1440There's a new separate package grep.el, with its own submenu and
1441customization group.
1442
1443*** `grep-find' is now also available under the name `find-grep' where
1444people knowing `find-grep-dired' would probably expect it.
1445
1446*** New commands `lgrep' (local grep) and `rgrep' (recursive grep) are
1447more user-friendly versions of `grep' and `grep-find', which prompt
1448separately for the regular expression to match, the files to search,
1449and the base directory for the search. Case sensitivity of the
1450search is controlled by the current value of `case-fold-search'.
1451
1452These commands build the shell commands based on the new variables
1453`grep-template' (lgrep) and `grep-find-template' (rgrep).
1454
1455The files to search can use aliases defined in `grep-files-aliases'.
1456
1457Subdirectories listed in `grep-find-ignored-directories' such as those
1458typically used by various version control systems, like CVS and arch,
1459are automatically skipped by `rgrep'.
1460
1461*** The grep commands provide highlighting support.
1462
1463Hits are fontified in green, and hits in binary files in orange. Grep buffers
1464can be saved and automatically revisited.
1465
1466*** New option `grep-highlight-matches' highlights matches in *grep*
1467buffer. It uses a special feature of some grep programs which accept
1468--color option to output markers around matches. When going to the next
1469match with `next-error' the exact match is highlighted in the source
1470buffer. Otherwise, if `grep-highlight-matches' is nil, the whole
1471source line is highlighted.
1472
1473*** New key bindings in grep output window:
1474SPC and DEL scrolls window up and down. C-n and C-p moves to next and
1475previous match in the grep window. RET jumps to the source line of
1476the current match. `n' and `p' shows next and previous match in
1477other window, but does not switch buffer. `{' and `}' jumps to the
1478previous or next file in the grep output. TAB also jumps to the next
1479file.
1480
1481*** M-x grep now tries to avoid appending `/dev/null' to the command line
1482by using GNU grep `-H' option instead. M-x grep automatically
1483detects whether this is possible or not the first time it is invoked.
1484When `-H' is used, the grep command line supplied by the user is passed
1485unchanged to the system to execute, which allows more complicated
1486command lines to be used than was possible before.
1487
1488*** The new variables `grep-window-height' and `grep-scroll-output' override
1489the corresponding compilation mode settings, for grep commands only.
1490
1491** Cursor display changes:
1492
1493*** Emacs can produce an underscore-like (horizontal bar) cursor.
1494The underscore cursor is set by putting `(cursor-type . hbar)' in
1495default-frame-alist. It supports variable heights, like the `bar'
1496cursor does.
1497
1498*** The variable `cursor-in-non-selected-windows' can now be set to any
1499of the recognized cursor types.
1500
1501*** Display of hollow cursors now obeys the buffer-local value (if any)
1502of `cursor-in-non-selected-windows' in the buffer that the cursor
1503appears in.
1504
1505*** On text terminals, the variable `visible-cursor' controls whether Emacs
1506uses the "very visible" cursor (the default) or the normal cursor.
1507
1508*** The X resource cursorBlink can be used to turn off cursor blinking.
1509
1510*** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is
1511now controlled by the variable `blink-cursor-alist'.
1512
1513** X Windows Support:
1514
1515*** Emacs now supports drag and drop for X. Dropping a file on a window
1516opens it, dropping text inserts the text. Dropping a file on a dired
1517buffer copies or moves the file to that directory.
1518
1519*** Under X11, it is possible to swap Alt and Meta (and Super and Hyper).
1520The new variables `x-alt-keysym', `x-hyper-keysym', `x-meta-keysym',
1521and `x-super-keysym' can be used to choose which keysyms Emacs should
1522use for the modifiers. For example, the following two lines swap
1523Meta and Alt:
1524 (setq x-alt-keysym 'meta)
1525 (setq x-meta-keysym 'alt)
1526
1527*** The X resource useXIM can be used to turn off use of XIM, which can
1528speed up Emacs with slow networking to the X server.
1529
1530If the configure option `--without-xim' was used to turn off use of
1531XIM by default, the X resource useXIM can be used to turn it on.
1532
1533*** The new variable `x-select-request-type' controls how Emacs
1534requests X selection. The default value is nil, which means that
1535Emacs requests X selection with types COMPOUND_TEXT and UTF8_STRING,
1536and use the more appropriately result.
1537
1538*** The scrollbar under LessTif or Motif has a smoother drag-scrolling.
1539On the other hand, the size of the thumb does not represent the actual
1540amount of text shown any more (only a crude approximation of it).
1541
1542** Xterm support:
1543
1544*** If you enable Xterm Mouse mode, Emacs will respond to mouse clicks
1545on the mode line, header line and display margin, when run in an xterm.
1546
1547*** Improved key bindings support when running in an xterm.
1548When Emacs is running in an xterm more key bindings are available.
1549The following should work:
1550{C,S,C-S,A}-{right,left,up,down,prior,next,delete,insert,F1-12}.
1551These key bindings work on xterm from X.org 6.8 (and later versions),
1552they might not work on some older versions of xterm, or on some
1553proprietary versions.
1554The various keys generated by xterm when the "modifyOtherKeys"
1555resource is set are also supported.
1556
1557** Character terminal color support changes:
1558
1559*** The new command-line option --color=MODE lets you specify a standard
1560mode for a tty color support. It is meant to be used on character
1561terminals whose capabilities are not set correctly in the terminal
1562database, or with terminal emulators which support colors, but don't
1563set the TERM environment variable to a name of a color-capable
1564terminal. "emacs --color" uses the same color commands as GNU `ls'
1565when invoked with "ls --color", so if your terminal can support colors
1566in "ls --color", it will support "emacs --color" as well. See the
1567user manual for the possible values of the MODE parameter.
1568
1569*** Emacs now supports several character terminals which provide more
1570than 8 colors. For example, for `xterm', 16-color, 88-color, and
1571256-color modes are supported. Emacs automatically notes at startup
1572the extended number of colors, and defines the appropriate entries for
1573all of these colors.
1574
1575*** Emacs now uses the full range of available colors for the default
1576faces when running on a color terminal, including 16-, 88-, and
1577256-color xterms. This means that when you run "emacs -nw" on an
157888-color or 256-color xterm, you will see essentially the same face
1579colors as on X.
1580
1581*** There's a new support for colors on `rxvt' terminal emulator.
1582
1583** ebnf2ps changes:
1584
1585*** New option `ebnf-arrow-extra-width' which specify extra width for arrow
1586shape drawing.
1587The extra width is used to avoid that the arrowhead and the terminal border
1588overlap. It depends on `ebnf-arrow-shape' and `ebnf-line-width'.
1589
1590*** New option `ebnf-arrow-scale' which specify the arrow scale.
1591Values lower than 1.0, shrink the arrow.
1592Values greater than 1.0, expand the arrow.
1593\f
1594* New Modes and Packages in Emacs 22.1
1595
1596** CUA mode is now part of the Emacs distribution.
1597
1598The new cua package provides CUA-like keybindings using C-x for
1599cut (kill), C-c for copy, C-v for paste (yank), and C-z for undo.
1600With cua, the region can be set and extended using shifted movement
1601keys (like pc-selection-mode) and typed text replaces the active
1602region (like delete-selection-mode). Do not enable these modes with
1603cua-mode. Customize the variable `cua-mode' to enable cua.
1604
1605The cua-selection-mode enables the CUA keybindings for the region but
1606does not change the bindings for C-z/C-x/C-c/C-v. It can be used as a
1607replacement for pc-selection-mode.
1608
1609In addition, cua provides unified rectangle support with visible
1610rectangle highlighting: Use C-return to start a rectangle, extend it
1611using the movement commands (or mouse-3), and cut or copy it using C-x
1612or C-c (using C-w and M-w also works).
1613
1614Use M-o and M-c to `open' or `close' the rectangle, use M-b or M-f, to
1615fill it with blanks or another character, use M-u or M-l to upcase or
1616downcase the rectangle, use M-i to increment the numbers in the
1617rectangle, use M-n to fill the rectangle with a numeric sequence (such
1618as 10 20 30...), use M-r to replace a regexp in the rectangle, and use
1619M-' or M-/ to restrict command on the rectangle to a subset of the
1620rows. See the commentary in cua-base.el for more rectangle commands.
1621
1622Cua also provides unified support for registers: Use a numeric
1623prefix argument between 0 and 9, i.e. M-0 .. M-9, for C-x, C-c, and
1624C-v to cut or copy into register 0-9, or paste from register 0-9.
1625
1626The last text deleted (not killed) is automatically stored in
1627register 0. This includes text deleted by typing text.
1628
1629Finally, cua provides a global mark which is set using S-C-space.
1630When the global mark is active, any text which is cut or copied is
1631automatically inserted at the global mark position. See the
1632commentary in cua-base.el for more global mark related commands.
1633
1634The features of cua also works with the standard Emacs bindings for
1635kill, copy, yank, and undo. If you want to use cua mode, but don't
1636want the C-x, C-c, C-v, and C-z bindings, you can customize the
1637`cua-enable-cua-keys' variable.
1638
1639Note: This version of cua mode is not backwards compatible with older
1640versions of cua.el and cua-mode.el. To ensure proper operation, you
1641must remove older versions of cua.el or cua-mode.el as well as the
1642loading and customization of those packages from the .emacs file.
1643
1644** Tramp is now part of the distribution.
1645
1646This package is similar to Ange-FTP: it allows you to edit remote
1647files. But whereas Ange-FTP uses FTP to access the remote host,
1648Tramp uses a shell connection. The shell connection is always used
1649for filename completion and directory listings and suchlike, but for
1650the actual file transfer, you can choose between the so-called
1651`inline' methods (which transfer the files through the shell
1652connection using base64 or uu encoding) and the `out-of-band' methods
1653(which invoke an external copying program such as `rcp' or `scp' or
1654`rsync' to do the copying).
1655
1656Shell connections can be acquired via `rsh', `ssh', `telnet' and also
1657`su' and `sudo'. Ange-FTP is still supported via the `ftp' method.
1658
1659If you want to disable Tramp you should set
1660
1661 (setq tramp-default-method "ftp")
1662
1663Removing Tramp, and re-enabling Ange-FTP, can be achieved by M-x
1664tramp-unload-tramp.
1665
1666** The image-dired.el package allows you to easily view, tag and in
1667other ways manipulate image files and their thumbnails, using dired as
1668the main interface. Image-Dired provides functionality to generate
1669simple image galleries.
1670
1671** Image files are normally visited in Image mode, which lets you toggle
1672between viewing the image and viewing the text using C-c C-c.
1673
1674** The new python.el package is used to edit Python and Jython programs.
1675
1676** The URL package (which had been part of W3) is now part of Emacs.
1677
1678** Calc is now part of the Emacs distribution.
1679
1680Calc is an advanced desk calculator and mathematical tool written in
1681Emacs Lisp. The prefix for Calc has been changed to `C-x *' and Calc
1682can be started with `C-x * *'. The Calc manual is separate from the
1683Emacs manual; within Emacs, type "C-h i m calc RET" to read the
1684manual. A reference card is available in `etc/calccard.tex' and
1685`etc/calccard.ps'.
1686
1687** Org mode is now part of the Emacs distribution
1688
1689Org mode is a mode for keeping notes, maintaining ToDo lists, and
1690doing project planning with a fast and effective plain-text system.
1691It also contains a plain-text table editor with spreadsheet-like
1692capabilities.
1693
1694The Org mode table editor can be integrated into any major mode by
1af74d06 1695activating the minor mode, Orgtbl mode.
782f8379
GM
1696
1697The documentation for org-mode is in a separate manual; within Emacs,
1698type "C-h i m org RET" to read that manual. A reference card is
1699available in `etc/orgcard.tex' and `etc/orgcard.ps'.
1700
1701** ERC is now part of the Emacs distribution.
1702
1703ERC is a powerful, modular, and extensible IRC client for Emacs.
1704
1705To see what modules are available, type
1706M-x customize-option erc-modules RET.
1707
1708To start an IRC session with ERC, type M-x erc, and follow the prompts
1709for server, port, and nick.
1710
1711** Rcirc is now part of the Emacs distribution.
1712
1713Rcirc is an Internet relay chat (IRC) client. It supports
1714simultaneous connections to multiple IRC servers. Each discussion
1715takes place in its own buffer. For each connection you can join
1716several channels (many-to-many) and participate in private
1717(one-to-one) chats. Both channel and private chats are contained in
1718separate buffers.
1719
1720To start an IRC session using the default parameters, type M-x irc.
1721If you type C-u M-x irc, it prompts you for the server, nick, port and
1722startup channel parameters before connecting.
1723
1724** The new package ibuffer provides a powerful, completely
1725customizable replacement for buff-menu.el.
1726
1727** Newsticker is now part of the Emacs distribution.
1728
1729Newsticker asynchronously retrieves headlines (RSS) from a list of news
1730sites, prepares these headlines for reading, and allows for loading the
1731corresponding articles in a web browser. Its documentation is in a
1732separate manual.
1733
1734** The wdired.el package allows you to use normal editing commands on Dired
1735buffers to change filenames, permissions, etc...
1736
1737** Ido mode is now part of the Emacs distribution.
1738
1739The ido (interactively do) package is an extension of the iswitchb
1740package to do interactive opening of files and directories in addition
1741to interactive buffer switching. Ido is a superset of iswitchb (with
1742a few exceptions), so don't enable both packages.
1743
1744** The new global minor mode `file-name-shadow-mode' modifies the way
1745filenames being entered by the user in the minibuffer are displayed, so
1746that it's clear when part of the entered filename will be ignored due to
1747Emacs' filename parsing rules. The ignored portion can be made dim,
1748invisible, or otherwise less visually noticeable. The display method can
1749be displayed by customizing the variable `file-name-shadow-properties'.
1750
1751** Emacs' keyboard macro facilities have been enhanced by the new
1752kmacro package.
1753
1754Keyboard macros are now defined and executed via the F3 and F4 keys:
1755F3 starts a macro, F4 ends the macro, and pressing F4 again executes
1756the last macro. While defining the macro, F3 inserts a counter value
1757which automatically increments every time the macro is executed.
1758
1759There is now a keyboard macro ring which stores the most recently
1760defined macros.
1761
1762The C-x C-k sequence is now a prefix for the kmacro keymap which
1763defines bindings for moving through the keyboard macro ring,
1764C-x C-k C-p and C-x C-k C-n, editing the last macro C-x C-k C-e,
1765manipulating the macro counter and format via C-x C-k C-c,
1766C-x C-k C-a, and C-x C-k C-f. See the commentary in kmacro.el
1767for more commands.
1768
1769The original macro bindings C-x (, C-x ), and C-x e are still
1770available, but they now interface to the keyboard macro ring too.
1771
1772The C-x e command now automatically terminates the current macro
1773before calling it, if used while defining a macro.
1774
1775In addition, when ending or calling a macro with C-x e, the macro can
1776be repeated immediately by typing just the `e'. You can customize
1777this behavior via the variables kmacro-call-repeat-key and
1778kmacro-call-repeat-with-arg.
1779
1780Keyboard macros can now be debugged and edited interactively.
1781C-x C-k SPC steps through the last keyboard macro one key sequence
1782at a time, prompting for the actions to take.
1783
1784** The new keypad setup package provides several common bindings for
1785the numeric keypad which is available on most keyboards. The numeric
1786keypad typically has the digits 0 to 9, a decimal point, keys marked
1787+, -, /, and *, an Enter key, and a NumLock toggle key. The keypad
1788package only controls the use of the digit and decimal keys.
1789
1790By customizing the variables `keypad-setup', `keypad-shifted-setup',
1791`keypad-numlock-setup', and `keypad-numlock-shifted-setup', or by
1792using the function `keypad-setup', you can rebind all digit keys and
1793the decimal key of the keypad in one step for each of the four
1794possible combinations of the Shift key state (not pressed/pressed) and
1795the NumLock toggle state (off/on).
1796
1797The choices for the keypad keys in each of the above states are:
1798`Plain numeric keypad' where the keys generates plain digits,
1799`Numeric keypad with decimal key' where the character produced by the
1800decimal key can be customized individually (for internationalization),
1801`Numeric Prefix Arg' where the keypad keys produce numeric prefix args
1802for Emacs editing commands, `Cursor keys' and `Shifted Cursor keys'
1803where the keys work like (shifted) arrow keys, home/end, etc., and
1804`Unspecified/User-defined' where the keypad keys (kp-0, kp-1, etc.)
1805are left unspecified and can be bound individually through the global
1806or local keymaps.
1807
1808** The printing package is now part of the Emacs distribution.
1809
1810If you enable the printing package by including (require 'printing) in
1811the .emacs file, the normal Print item on the File menu is replaced
1812with a Print sub-menu which allows you to preview output through
1813ghostview, use ghostscript to print (if you don't have a PostScript
1814printer) or send directly to printer a PostScript code generated by
1815`ps-print' package. Use M-x pr-help for more information.
1816
1817** The new package longlines.el provides a minor mode for editing text
1818files composed of long lines, based on the `use-hard-newlines'
1819mechanism. The long lines are broken up by inserting soft newlines,
1820which are automatically removed when saving the file to disk or
1821copying into the kill ring, clipboard, etc. By default, Longlines
1822mode inserts soft newlines automatically during editing, a behavior
1823referred to as "soft word wrap" in other text editors. This is
1824similar to Refill mode, but more reliable. To turn the word wrap
1825feature off, set `longlines-auto-wrap' to nil.
1826
1827** SES mode (ses-mode) is a new major mode for creating and editing
1828spreadsheet files. Besides the usual Emacs features (intuitive command
1829letters, undo, cell formulas in Lisp, plaintext files, etc.) it also offers
1830viral immunity and import/export of tab-separated values.
1831
1832** The new package table.el implements editable, WYSIWYG, embedded
1833`text tables' in Emacs buffers. It simulates the effect of putting
1834these tables in a special major mode. The package emulates WYSIWYG
1835table editing available in modern word processors. The package also
1836can generate a table source in typesetting and markup languages such
1837as latex and html from the visually laid out text table.
1838
1839** Filesets are collections of files. You can define a fileset in
1840various ways, such as based on a directory tree or based on
1841program files that include other program files.
1842
1843Once you have defined a fileset, you can perform various operations on
1844all the files in it, such as visiting them or searching and replacing
1845in them.
1846
1847** The minor mode Reveal mode makes text visible on the fly as you
1848move your cursor into hidden regions of the buffer.
1849It should work with any package that uses overlays to hide parts
1850of a buffer, such as outline-minor-mode, hs-minor-mode, hide-ifdef-mode, ...
1851
1852There is also Global Reveal mode which affects all buffers.
1853
1854** New minor mode, Visible mode, toggles invisibility in the current buffer.
1855When enabled, it makes all invisible text visible. When disabled, it
1856restores the previous value of `buffer-invisibility-spec'.
1857
1858** The new package flymake.el does on-the-fly syntax checking of program
1859source files. See the Flymake's Info manual for more details.
1860
1861** savehist saves minibuffer histories between sessions.
1862To use this feature, turn on savehist-mode in your `.emacs' file.
1863
1864** The ruler-mode.el library provides a minor mode for displaying an
1865"active" ruler in the header line. You can use the mouse to visually
1866change the `fill-column', `window-margins' and `tab-stop-list'
1867settings.
1868
1869** The file t-mouse.el is now part of Emacs and provides access to mouse
1870events from the console. It still requires gpm to work but has been updated
1871for Emacs 22. In particular, the mode-line is now position sensitive.
1872
1873** The new package scroll-lock.el provides the Scroll Lock minor mode
1874for pager-like scrolling. Keys which normally move point by line or
1875paragraph will scroll the buffer by the respective amount of lines
1876instead and point will be kept vertically fixed relative to window
1877boundaries during scrolling.
1878
1879** The new global minor mode `size-indication-mode' (off by default)
1880shows the size of accessible part of the buffer on the mode line.
1881
1882** The new package conf-mode.el handles thousands of configuration files, with
1883varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value,
1884var : value, var value or keyword var value) and sections ([section] or
1885section { }). Many files under /etc/, or with suffixes like .cf through
1886.config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are
1887recognized.
1888
1889** GDB-Script-mode is used for files like .gdbinit.
1890
1891** The new package dns-mode.el adds syntax highlighting of DNS master files.
1892It is a modern replacement for zone-mode.el, which is now obsolete.
1893
1894** `cfengine-mode' is a major mode for editing GNU Cfengine
1895configuration files.
1896
1897** The TCL package tcl-mode.el was replaced by tcl.el.
1898This was actually done in Emacs-21.1, and was not documented.
1899\f
1900* Changes in Specialized Modes and Packages in Emacs 22.1:
1901
1902** Changes in Dired
1903
1904*** Bindings for Image-Dired added.
1905Several new keybindings, all starting with the C-t prefix, have been
1906added to Dired. They are all bound to commands in Image-Dired. As a
1907starting point, mark some image files in a dired buffer and do C-t d
1908to display thumbnails of them in a separate buffer.
1909
1910** Info mode changes
1911
1912*** Images in Info pages are supported.
1913
1914Info pages show embedded images, in Emacs frames with image support.
1915Info documentation that includes images, processed with makeinfo
1916version 4.7 or newer, compiles to Info pages with embedded images.
1917
1918*** `Info-index' offers completion.
1919
1920*** http and ftp links in Info are now operational: they look like cross
1921references and following them calls `browse-url'.
1922
1923*** isearch in Info uses Info-search and searches through multiple nodes.
1924
1925Before leaving the initial Info node isearch fails once with the error
1926message [initial node], and with subsequent C-s/C-r continues through
1927other nodes. When isearch fails for the rest of the manual, it wraps
1928around the whole manual to the top/final node. The user option
1929`Info-isearch-search' controls whether to use Info-search for isearch,
1930or the default isearch search function that wraps around the current
1931Info node.
1932
1933*** New search commands: `Info-search-case-sensitively' (bound to S),
1934`Info-search-backward', and `Info-search-next' which repeats the last
1935search without prompting for a new search string.
1936
1937*** New command `info-apropos' searches the indices of the known
1938Info files on your system for a string, and builds a menu of the
1939possible matches.
1940
1941*** New command `Info-history-forward' (bound to r and new toolbar icon)
1942moves forward in history to the node you returned from after using
1943`Info-history-back' (renamed from `Info-last').
1944
1945*** New command `Info-history' (bound to L) displays a menu of visited nodes.
1946
1947*** New command `Info-toc' (bound to T) creates a node with table of contents
1948from the tree structure of menus of the current Info file.
1949
1950*** New command `Info-copy-current-node-name' (bound to w) copies
1951the current Info node name into the kill ring. With a zero prefix
1952arg, puts the node name inside the `info' function call.
1953
1954*** New face `info-xref-visited' distinguishes visited nodes from unvisited
1955and a new option `Info-fontify-visited-nodes' to control this.
1956
1957*** A numeric prefix argument of `info' selects an Info buffer
1958with the number appended to the `*info*' buffer name (e.g. "*info*<2>").
1959
1960*** Info now hides node names in menus and cross references by default.
1961
1962If you prefer the old behavior, you can set the new user option
1963`Info-hide-note-references' to nil.
1964
1965*** The default value for `Info-scroll-prefer-subnodes' is now nil.
1966
1967** Emacs server changes
1968
1969*** You can have several Emacs servers on the same machine.
1970
1971 % emacs --eval '(setq server-name "foo")' -f server-start &
1972 % emacs --eval '(setq server-name "bar")' -f server-start &
1973 % emacsclient -s foo file1
1974 % emacsclient -s bar file2
1975
1976*** The `emacsclient' command understands the options `--eval' and
1977`--display' which tell Emacs respectively to evaluate the given Lisp
1978expression and to use the given display when visiting files.
1979
1980*** User option `server-mode' can be used to start a server process.
1981
1982** Locate changes
1983
1984*** By default, reverting the *Locate* buffer now just runs the last
1985`locate' command back over again without offering to update the locate
1986database (which normally only works if you have root privileges). If
1987you prefer the old behavior, set the new customizable option
1988`locate-update-when-revert' to t.
1989
1990** Desktop package
1991
1992*** Desktop saving is now a minor mode, `desktop-save-mode'.
1993
1994*** The variable `desktop-enable' is obsolete.
1995
1996Customize `desktop-save-mode' to enable desktop saving.
1997
1998*** Buffers are saved in the desktop file in the same order as that in the
1999buffer list.
2000
2001*** The desktop package can be customized to restore only some buffers
2002immediately, remaining buffers are restored lazily (when Emacs is
2003idle).
2004
2005*** New command line option --no-desktop
2006
2007*** New commands:
2008 - desktop-revert reverts to the last loaded desktop.
2009 - desktop-change-dir kills current desktop and loads a new.
2010 - desktop-save-in-desktop-dir saves desktop in the directory from which
2011 it was loaded.
2012 - desktop-lazy-complete runs the desktop load to completion.
2013 - desktop-lazy-abort aborts lazy loading of the desktop.
2014
2015*** New customizable variables:
2016 - desktop-save. Determines whether the desktop should be saved when it is
2017 killed.
2018 - desktop-file-name-format. Format in which desktop file names should be saved.
2019 - desktop-path. List of directories in which to lookup the desktop file.
2020 - desktop-locals-to-save. List of local variables to save.
2021 - desktop-globals-to-clear. List of global variables that `desktop-clear' will clear.
2022 - desktop-clear-preserve-buffers-regexp. Regexp identifying buffers that `desktop-clear'
2023 should not delete.
2024 - desktop-restore-eager. Number of buffers to restore immediately. Remaining buffers are
2025 restored lazily (when Emacs is idle).
2026 - desktop-lazy-verbose. Verbose reporting of lazily created buffers.
2027 - desktop-lazy-idle-delay. Idle delay before starting to create buffers.
2028
2029*** New hooks:
2030 - desktop-after-read-hook run after a desktop is loaded.
2031 - desktop-no-desktop-file-hook run when no desktop file is found.
2032
2033** Recentf changes
2034
2035The recent file list is now automatically cleaned up when recentf mode is
2036enabled. The new option `recentf-auto-cleanup' controls when to do
2037automatic cleanup.
2038
2039The ten most recent files can be quickly opened by using the shortcut
2040keys 1 to 9, and 0, when the recent list is displayed in a buffer via
2041the `recentf-open-files', or `recentf-open-more-files' commands.
2042
2043The `recentf-keep' option replaces `recentf-keep-non-readable-files-p'
2044and provides a more general mechanism to customize which file names to
2045keep in the recent list.
2046
2047With the more advanced option `recentf-filename-handlers', you can
2048specify functions that successively transform recent file names. For
2049example, if set to `file-truename' plus `abbreviate-file-name', the
2050same file will not be in the recent list with different symbolic
2051links, and the file name will be abbreviated.
2052
2053To follow naming convention, `recentf-menu-append-commands-flag'
2054replaces the misnamed option `recentf-menu-append-commands-p'. The
2055old name remains available as alias, but has been marked obsolete.
2056
2057** Auto-Revert changes
2058
2059*** You can now use Auto Revert mode to `tail' a file.
2060
2061If point is at the end of a file buffer before reverting, Auto Revert
2062mode keeps it at the end after reverting. Similarly if point is
c07318f4
MB
2063displayed at the end of a file buffer in any window, it stays at the end
2064of the buffer in that window. This allows you to "tail" a file: just
2065put point at the end of the buffer and it stays there. This rule
2066applies to file buffers. For non-file buffers, the behavior can be mode
2067dependent.
782f8379
GM
2068
2069If you are sure that the file will only change by growing at the end,
2070then you can tail the file more efficiently by using the new minor
2071mode Auto Revert Tail mode. The function `auto-revert-tail-mode'
2072toggles this mode.
2073
2074*** Auto Revert mode is now more careful to avoid excessive reverts and
2075other potential problems when deciding which non-file buffers to
2076revert. This matters especially if Global Auto Revert mode is enabled
2077and `global-auto-revert-non-file-buffers' is non-nil. Auto Revert
2078mode only reverts a non-file buffer if the buffer has a non-nil
2079`revert-buffer-function' and a non-nil `buffer-stale-function', which
2080decides whether the buffer should be reverted. Currently, this means
2081that auto reverting works for Dired buffers (although this may not
2082work properly on all operating systems) and for the Buffer Menu.
2083
2084*** If the new user option `auto-revert-check-vc-info' is non-nil, Auto
2085Revert mode reliably updates version control info (such as the version
2086control number in the mode line), in all version controlled buffers in
2087which it is active. If the option is nil, the default, then this info
2088only gets updated whenever the buffer gets reverted.
2089
2090** Changes in Shell Mode
2091
2092*** Shell output normally scrolls so that the input line is at the
2093bottom of the window -- thus showing the maximum possible text. (This
2094is similar to the way sequential output to a terminal works.)
2095
2096** Changes in Hi Lock
2097
2098*** hi-lock-mode now only affects a single buffer, and a new function
2099`global-hi-lock-mode' enables Hi Lock in all buffers. By default, if
2100hi-lock-mode is used in what appears to be the initialization file, a
2101warning message suggests to use global-hi-lock-mode instead. However,
2102if the new variable `hi-lock-archaic-interface-deduce' is non-nil,
2103using hi-lock-mode in an initialization file will turn on Hi Lock in all
2104buffers and no warning will be issued (for compatibility with the
2105behavior in older versions of Emacs).
2106
2107** Changes in Allout
2108
2109*** Topic cryptography added, enabling easy gpg topic encryption and
2110decryption. Per-topic basis enables interspersing encrypted-text and
2111clear-text within a single file to your heart's content, using symmetric
2112and/or public key modes. Time-limited key caching, user-provided
2113symmetric key hinting and consistency verification, auto-encryption of
2114pending topics on save, and more, make it easy to use encryption in
2115powerful ways. Encryption behavior customization is collected in the
2116allout-encryption customization group.
2117
2118*** Default command prefix was changed to "\C-c " (control-c space), to
2119avoid intruding on user's keybinding space. Customize the
2120`allout-command-prefix' variable to your preference.
2121
2122*** Some previously rough topic-header format edge cases are reconciled.
2123Level 1 topics use the mode's comment format, and lines starting with the
2124asterisk - for instance, the comment close of some languages (eg, c's "*/"
2125or mathematica's "*)") - at the beginning of line are no longer are
2126interpreted as level 1 topics in those modes.
2127
2128*** Many or most commonly occurring "accidental" topics are disqualified.
2129Text in item bodies that looks like a low-depth topic is no longer mistaken
2130for one unless its first offspring (or that of its next sibling with
2131offspring) is only one level deeper.
2132
2133For example, pasting some text with a bunch of leading asterisks into a
2134topic that's followed by a level 3 or deeper topic will not cause the
2135pasted text to be mistaken for outline structure.
2136
2137The same constraint is applied to any level 2 or 3 topics.
2138
2139This settles an old issue where typed or pasted text needed to be carefully
2140reviewed, and sometimes doctored, to avoid accidentally disrupting the
2141outline structure. Now that should be generally unnecessary, as the most
2142prone-to-occur accidents are disqualified.
2143
2144*** Allout now refuses to create "containment discontinuities", where a
2145topic is shifted deeper than the offspring-depth of its container. On the
2146other hand, allout now operates gracefully with existing containment
2147discontinuities, revealing excessively contained topics rather than either
2148leaving them hidden or raising an error.
2149
2150*** Navigation within an item is easier. Repeated beginning-of-line and
2151end-of-line key commands (usually, ^A and ^E) cycle through the
2152beginning/end-of-line and then beginning/end of topic, etc. See new
2153customization vars `allout-beginning-of-line-cycles' and
2154`allout-end-of-line-cycles'.
2155
2156*** New or revised allout-mode activity hooks enable creation of
2157cooperative enhancements to allout mode without changes to the mode,
2158itself.
2159
2160See `allout-exposure-change-hook', `allout-structure-added-hook',
2161`allout-structure-deleted-hook', and `allout-structure-shifted-hook'.
2162
2163`allout-exposure-change-hook' replaces the existing
2164`allout-view-change-hook', which is being deprecated. Both are still
2165invoked, but `allout-view-change-hook' will eventually be ignored.
2166`allout-exposure-change-hook' is called with explicit arguments detailing
2167the specifics of each change (as are the other new hooks), making it easier
2168to use than the old version.
2169
2170There is a new mode deactivation hook, `allout-mode-deactivate-hook', for
2171coordinating with deactivation of allout-mode. Both that and the mode
2172activation hook, `allout-mode-hook' are now run after the `allout-mode'
2173variable is changed, rather than before.
2174
2175*** Allout now uses text overlay's `invisible' property for concealed text,
2176instead of selective-display. This simplifies the code, in particular
2177avoiding the need for kludges for isearch dynamic-display, discretionary
2178handling of edits of concealed text, undo concerns, etc.
2179
2180*** There are many other fixes and refinements, including:
2181
2182 - repaired inhibition of inadvertent edits to concealed text, without
2183 inhibiting undo; we now reveal undo changes within concealed text.
2184 - auto-fill-mode is now left inactive when allout-mode starts, if it
2185 already was inactive. also, `allout-inhibit-auto-fill' custom
2186 configuration variable makes it easy to disable auto fill in allout
2187 outlines in general or on a per-buffer basis.
2188 - allout now tolerates fielded text in outlines without disruption.
2189 - hot-spot navigation now is modularized with a new function,
2190 `allout-hotspot-key-handler', enabling easier use and enhancement of
2191 the functionality in allout addons.
2192 - repaired retention of topic body hanging indent upon topic depth shifts
2193 - bulleting variation is simpler and more accommodating, both in the
2194 default behavior and in ability to vary when creating new topics
2195 - mode deactivation now does cleans up effectively, more properly
2196 restoring affected variables and hooks to former state, removing
2197 overlays, etc. see `allout-add-resumptions' and
2198 `allout-do-resumptions', which replace the old `allout-resumptions'.
2199 - included a few unit-tests for interior functionality. developers can
2200 have them automatically run at the end of module load by customizing
2201 the option `allout-run-unit-tests-on-load'.
2202 - many, many other, more minor tweaks, fixes, and refinements.
2203 - version number incremented to 2.2
2204
2205** Hideshow mode changes
2206
2207*** New variable `hs-set-up-overlay' allows customization of the overlay
2208used to effect hiding for hideshow minor mode. Integration with isearch
2209handles the overlay property `display' specially, preserving it during
2210temporary overlay showing in the course of an isearch operation.
2211
2212*** New variable `hs-allow-nesting' non-nil means that hiding a block does
2213not discard the hidden state of any "internal" blocks; when the parent
2214block is later shown, the internal blocks remain hidden. Default is nil.
2215
2216** FFAP changes
2217
2218*** New ffap commands and keybindings:
2219
2220C-x C-r (`ffap-read-only'),
2221C-x C-v (`ffap-alternate-file'), C-x C-d (`ffap-list-directory'),
2222C-x 4 r (`ffap-read-only-other-window'), C-x 4 d (`ffap-dired-other-window'),
2223C-x 5 r (`ffap-read-only-other-frame'), C-x 5 d (`ffap-dired-other-frame').
2224
2225*** FFAP accepts wildcards in a file name by default.
2226
2227C-x C-f passes the file name to `find-file' with non-nil WILDCARDS
2228argument, which visits multiple files, and C-x d passes it to `dired'.
2229
2230** Changes in Skeleton
2231
2232*** In skeleton.el, `-' marks the `skeleton-point' without interregion interaction.
2233
2234`@' has reverted to only setting `skeleton-positions' and no longer
2235sets `skeleton-point'. Skeletons which used @ to mark
2236`skeleton-point' independent of `_' should now use `-' instead. The
2237updated `skeleton-insert' docstring explains these new features along
2238with other details of skeleton construction.
2239
2240*** The variables `skeleton-transformation', `skeleton-filter', and
2241`skeleton-pair-filter' have been renamed to
2242`skeleton-transformation-function', `skeleton-filter-function', and
2243`skeleton-pair-filter-function'. The old names are still available
2244as aliases.
2245
2246** HTML/SGML changes
2247
2248*** Emacs now tries to set up buffer coding systems for HTML/XML files
2249automatically.
2250
2251*** SGML mode has indentation and supports XML syntax.
2252The new variable `sgml-xml-mode' tells SGML mode to use XML syntax.
2253When this option is enabled, SGML tags are inserted in XML style,
2254i.e., there is always a closing tag.
2255By default, its setting is inferred on a buffer-by-buffer basis
2256from the file name or buffer contents.
2257
2258*** The variable `sgml-transformation' has been renamed to
2259`sgml-transformation-function'. The old name is still available as
2260alias.
2261
2262*** `xml-mode' is now an alias for `sgml-mode', which has XML support.
2263
2264** TeX modes
2265
2266*** New major mode Doctex mode, for *.dtx files.
2267
2268*** C-c C-c prompts for a command to run, and tries to offer a good default.
2269
2270*** The user option `tex-start-options-string' has been replaced
2271by two new user options: `tex-start-options', which should hold
2272command-line options to feed to TeX, and `tex-start-commands' which should hold
2273TeX commands to use at startup.
2274
2275*** verbatim environments are now highlighted in courier by font-lock
2276and super/sub-scripts are made into super/sub-scripts.
2277
2278** RefTeX mode changes
2279
2280*** Changes to RefTeX's table of contents
2281
2282The new command keys "<" and ">" in the TOC buffer promote/demote the
2283section at point or all sections in the current region, with full
2284support for multifile documents.
2285
2286The new command `reftex-toc-recenter' (`C-c -') shows the current
2287section in the TOC buffer without selecting the TOC window.
2288Recentering can happen automatically in idle time when the option
2289`reftex-auto-recenter-toc' is turned on. The highlight in the TOC
2290buffer stays when the focus moves to a different window. A dedicated
2291frame can show the TOC with the current section always automatically
2292highlighted. The frame is created and deleted from the toc buffer
2293with the `d' key.
2294
2295The toc window can be split off horizontally instead of vertically.
2296See new option `reftex-toc-split-windows-horizontally'.
2297
2298Labels can be renamed globally from the table of contents using the
2299key `M-%'.
2300
2301The new command `reftex-goto-label' jumps directly to a label
2302location.
2303
2304*** Changes related to citations and BibTeX database files
2305
2306Commands that insert a citation now prompt for optional arguments when
2307called with a prefix argument. Related new options are
2308`reftex-cite-prompt-optional-args' and `reftex-cite-cleanup-optional-args'.
2309
2310The new command `reftex-create-bibtex-file' creates a BibTeX database
2311with all entries referenced in the current document. The keys "e" and
2312"E" allow to produce a BibTeX database file from entries marked in a
2313citation selection buffer.
2314
2315The command `reftex-citation' uses the word in the buffer before the
2316cursor as a default search string.
2317
2318The support for chapterbib has been improved. Different chapters can
2319now use BibTeX or an explicit `thebibliography' environment.
2320
2321The macros which specify the bibliography file (like \bibliography)
2322can be configured with the new option `reftex-bibliography-commands'.
2323
2324Support for jurabib has been added.
2325
2326*** Global index matched may be verified with a user function.
2327
2328During global indexing, a user function can verify an index match.
2329See new option `reftex-index-verify-function'.
2330
2331*** Parsing documents with many labels can be sped up.
2332
2333Operating in a document with thousands of labels can be sped up
2334considerably by allowing RefTeX to derive the type of a label directly
2335from the label prefix like `eq:' or `fig:'. The option
2336`reftex-trust-label-prefix' needs to be configured in order to enable
2337this feature. While the speed-up is significant, this may reduce the
2338quality of the context offered by RefTeX to describe a label.
2339
2340*** Miscellaneous changes
2341
2342The macros which input a file in LaTeX (like \input, \include) can be
2343configured in the new option `reftex-include-file-commands'.
2344
2345RefTeX supports global incremental search.
2346
2347** BibTeX mode
2348
2349*** The new command `bibtex-url' browses a URL for the BibTeX entry at
2350point (bound to C-c C-l and mouse-2, RET on clickable fields).
2351
2352*** The new command `bibtex-entry-update' (bound to C-c C-u) updates
2353an existing BibTeX entry by inserting fields that may occur but are not
2354present.
2355
2356*** New `bibtex-entry-format' option `required-fields', enabled by default.
2357
2358*** `bibtex-maintain-sorted-entries' can take values `plain',
2359`crossref', and `entry-class' which control the sorting scheme used
2360for BibTeX entries. `bibtex-sort-entry-class' controls the sorting
2361scheme `entry-class'. TAB completion for reference keys and
2362automatic detection of duplicates does not require anymore that
2363`bibtex-maintain-sorted-entries' is non-nil.
2364
2365*** The new command `bibtex-complete' completes word fragment before
2366point according to context (bound to M-tab).
2367
2368*** In BibTeX mode the command `fill-paragraph' (M-q) fills
2369individual fields of a BibTeX entry.
2370
2371*** The new variable `bibtex-autofill-types' contains a list of entry
2372types for which fields are filled automatically (if possible).
2373
2374*** The new commands `bibtex-find-entry' and `bibtex-find-crossref'
2375locate entries and crossref'd entries (bound to C-c C-s and C-c C-x).
2376Crossref fields are clickable (bound to mouse-2, RET).
2377
2378*** The new variables `bibtex-files' and `bibtex-file-path' define a set
2379of BibTeX files that are searched for entry keys.
2380
2381*** The new command `bibtex-validate-globally' checks for duplicate keys
2382in multiple BibTeX files.
2383
2384*** If the new variable `bibtex-autoadd-commas' is non-nil,
2385automatically add missing commas at end of BibTeX fields.
2386
2387*** The new command `bibtex-copy-summary-as-kill' pushes summary
2388of BibTeX entry to kill ring (bound to C-c C-t).
2389
2390*** If the new variable `bibtex-parse-keys-fast' is non-nil,
2391use fast but simplified algorithm for parsing BibTeX keys.
2392
2393*** The new variables bibtex-expand-strings and
2394bibtex-autokey-expand-strings control the expansion of strings when
2395extracting the content of a BibTeX field.
2396
2397*** The variables `bibtex-autokey-name-case-convert' and
2398`bibtex-autokey-titleword-case-convert' have been renamed to
2399`bibtex-autokey-name-case-convert-function' and
2400`bibtex-autokey-titleword-case-convert-function'. The old names are
2401still available as aliases.
2402
2403** GUD changes
2404
2405*** The new package gdb-ui.el provides an enhanced graphical interface to
2406GDB. You can interact with GDB through the GUD buffer in the usual way, but
2407there are also further buffers which control the execution and describe the
2408state of your program. It can separate the input/output of your program from
2409that of GDB and watches expressions in the speedbar. It also uses features of
2410Emacs 21/22 such as the toolbar, and bitmaps in the fringe to indicate
2411breakpoints.
2412
2413To use this package just type M-x gdb. See the Emacs manual if you want the
2414old behaviour.
2415
2416*** GUD mode has its own tool bar for controlling execution of the inferior
2417and other common debugger commands.
2418
2419*** In GUD mode, when talking to GDB, C-x C-a C-j "jumps" the program
2420counter to the specified source line (the one where point is).
2421
2422*** The variable tooltip-gud-tips-p has been removed. GUD tooltips can now be
2423toggled independently of normal tooltips with the minor mode
2424`gud-tooltip-mode'.
2425
2426*** In graphical mode, with a C program, GUD Tooltips have been extended to
2427display the #define directive associated with an identifier when program is
2428not executing.
2429
2430*** GUD mode improvements for jdb:
2431
2432**** Search for source files using jdb classpath and class information.
2433Fast startup since there is no need to scan all source files up front.
2434There is also no need to create and maintain lists of source
2435directories to scan. Look at `gud-jdb-use-classpath' and
2436`gud-jdb-classpath' customization variables documentation.
2437
2438**** The previous method of searching for source files has been
2439preserved in case someone still wants/needs to use it.
2440Set `gud-jdb-use-classpath' to nil.
2441
2442**** Supports the standard breakpoint (gud-break, gud-clear)
2443set/clear operations from Java source files under the classpath, stack
2444traversal (gud-up, gud-down), and run until current stack finish
2445(gud-finish).
2446
2447**** Supports new jdb (Java 1.2 and later) in addition to oldjdb
2448(Java 1.1 jdb).
2449
2450*** Added jdb Customization Variables
2451
2452**** `gud-jdb-command-name'. What command line to use to invoke jdb.
2453
2454**** `gud-jdb-use-classpath'. Allows selection of java source file searching
2455method: set to t for new method, nil to scan `gud-jdb-directories' for
2456java sources (previous method).
2457
2458**** `gud-jdb-directories'. List of directories to scan and search for Java
2459classes using the original gud-jdb method (if `gud-jdb-use-classpath'
2460is nil).
2461
2462*** Minor Improvements
2463
2464**** The STARTTLS wrapper (starttls.el) can now use GNUTLS
2465instead of the OpenSSL based `starttls' tool. For backwards
2466compatibility, it prefers `starttls', but you can toggle
2467`starttls-use-gnutls' to switch to GNUTLS (or simply remove the
2468`starttls' tool).
2469
2470**** Do not allow debugger output history variable to grow without bounds.
2471
2472** Lisp mode changes
2473
2474*** Lisp mode now uses `font-lock-doc-face' for doc strings.
2475
2476*** C-u C-M-q in Emacs Lisp mode pretty-prints the list after point.
2477
2478*** New features in evaluation commands
2479
2480**** The function `eval-defun' (C-M-x) called on defface reinitializes
2481the face to the value specified in the defface expression.
2482
2483**** Typing C-x C-e twice prints the value of the integer result
2484in additional formats (octal, hexadecimal, character) specified
2485by the new function `eval-expression-print-format'. The same
2486function also defines the result format for `eval-expression' (M-:),
2487`eval-print-last-sexp' (C-j) and some edebug evaluation functions.
2488
2489** Changes to cmuscheme
2490
2491*** Emacs now offers to start Scheme if the user tries to
2492evaluate a Scheme expression but no Scheme subprocess is running.
2493
2494*** If the file ~/.emacs_NAME or ~/.emacs.d/init_NAME.scm (where NAME
2495is the name of the Scheme interpreter) exists, its contents are sent
2496to the Scheme subprocess upon startup.
2497
2498*** There are new commands to instruct the Scheme interpreter to trace
2499procedure calls (`scheme-trace-procedure') and to expand syntactic forms
2500(`scheme-expand-current-form'). The commands actually sent to the Scheme
2501subprocess are controlled by the user options `scheme-trace-command',
2502`scheme-untrace-command' and `scheme-expand-current-form'.
2503
2504** Ewoc changes
2505
2506*** The new function `ewoc-delete' deletes specified nodes.
2507
2508*** `ewoc-create' now takes optional arg NOSEP, which inhibits insertion of
2509a newline after each pretty-printed entry and after the header and footer.
2510This allows you to create multiple-entry ewocs on a single line and to
2511effect "invisible" nodes by arranging for the pretty-printer to not print
2512anything for those nodes.
2513
2514For example, these two sequences of expressions behave identically:
2515
2516;; NOSEP nil
2517(defun PP (data) (insert (format "%S" data)))
2518(ewoc-create 'PP "start\n")
2519
2520;; NOSEP t
2521(defun PP (data) (insert (format "%S\n" data)))
2522(ewoc-create 'PP "start\n\n" "\n" t)
2523
2524** CC mode changes
2525
2526*** The CC Mode manual has been extensively revised.
2527The information about using CC Mode has been separated from the larger
2528and more difficult chapters about configuration.
2529
2530*** New Minor Modes
2531**** Electric Minor Mode toggles the electric action of non-alphabetic keys.
2532The new command c-toggle-electric-mode is bound to C-c C-l. Turning the
2533mode off can be helpful for editing chaotically indented code and for
2534users new to CC Mode, who sometimes find electric indentation
2535disconcerting. Its current state is displayed in the mode line with an
2536'l', e.g. "C/al".
2537
2538**** Subword Minor Mode makes Emacs recognize word boundaries at upper case
2539letters in StudlyCapsIdentifiers. You enable this feature by C-c C-w. It can
2540also be used in non-CC Mode buffers. :-) Contributed by Masatake YAMATO.
2541
2542*** Support for the AWK language.
2543Support for the AWK language has been introduced. The implementation is
2544based around GNU AWK version 3.1, but it should work pretty well with
2545any AWK. As yet, not all features of CC Mode have been adapted for AWK.
2546Here is a summary:
2547
2548**** Indentation Engine
2549The CC Mode indentation engine fully supports AWK mode.
2550
2551AWK mode handles code formatted in the conventional AWK fashion: `{'s
2552which start actions, user-defined functions, or compound statements are
2553placed on the same line as the associated construct; the matching `}'s
2554are normally placed under the start of the respective pattern, function
2555definition, or structured statement.
2556
2557The predefined line-up functions haven't yet been adapted for AWK
2558mode, though some of them may work serendipitously. There shouldn't
2559be any problems writing custom indentation functions for AWK mode.
2560
2561**** Font Locking
2562There is a single level of font locking in AWK mode, rather than the
2563three distinct levels the other modes have. There are several
2564idiosyncrasies in AWK mode's font-locking due to the peculiarities of
2565the AWK language itself.
2566
2567**** Comment and Movement Commands
2568These commands all work for AWK buffers. The notion of "defun" has
2569been augmented to include AWK pattern-action pairs - the standard
2570"defun" commands on key sequences C-M-a, C-M-e, and C-M-h use this
2571extended definition.
2572
2573**** "awk" style, Auto-newline Insertion and Clean-ups
2574A new style, "awk" has been introduced, and this is now the default
2575style for AWK code. With auto-newline enabled, the clean-up
2576c-one-liner-defun (see above) is useful.
2577
2578*** Font lock support.
2579CC Mode now provides font lock support for all its languages. This
2580supersedes the font lock patterns that have been in the core font lock
2581package for C, C++, Java and Objective-C. Like indentation, font
2582locking is done in a uniform way across all languages (except the new
2583AWK mode - see below). That means that the new font locking will be
2584different from the old patterns in various details for most languages.
2585
2586The main goal of the font locking in CC Mode is accuracy, to provide a
2587dependable aid in recognizing the various constructs. Some, like
2588strings and comments, are easy to recognize while others like
2589declarations and types can be very tricky. CC Mode can go to great
2590lengths to recognize declarations and casts correctly, especially when
2591the types aren't recognized by standard patterns. This is a fairly
2592demanding analysis which can be slow on older hardware, and it can
2593therefore be disabled by choosing a lower decoration level with the
2594variable font-lock-maximum-decoration.
2595
2596Note that the most demanding font lock level has been tuned with lazy
2597fontification in mind; Just-In-Time-Lock mode should be enabled for
2598the highest font lock level (by default, it is). Fontifying a file
2599with several thousand lines in one go can take the better part of a
2600minute.
2601
2602**** The (c|c++|objc|java|idl|pike)-font-lock-extra-types variables
2603are now used by CC Mode to recognize identifiers that are certain to
2604be types. (They are also used in cases that aren't related to font
2605locking.) At the maximum decoration level, types are often recognized
2606properly anyway, so these variables should be fairly restrictive and
2607not contain patterns for uncertain types.
2608
2609**** Support for documentation comments.
2610There is a "plugin" system to fontify documentation comments like
2611Javadoc and the markup within them. It's independent of the host
2612language, so it's possible to e.g. turn on Javadoc font locking in C
2613buffers. See the variable c-doc-comment-style for details.
2614
2615Currently three kinds of doc comment styles are recognized: Sun's
2616Javadoc, Autodoc (which is used in Pike) and GtkDoc (used in C). (The
2617last was contributed by Masatake YAMATO). This is by no means a
2618complete list of the most common tools; if your doc comment extractor
2619of choice is missing then please drop a note to bug-cc-mode@gnu.org.
2620
2621**** Better handling of C++ templates.
2622As a side effect of the more accurate font locking, C++ templates are
2623now handled much better. The angle brackets that delimit them are
2624given parenthesis syntax so that they can be navigated like other
2625parens.
2626
2627This also improves indentation of templates, although there still is
2628work to be done in that area. E.g. it's required that multiline
2629template clauses are written in full and then refontified to be
2630recognized, and the indentation of nested templates is a bit odd and
2631not as configurable as it ought to be.
2632
2633**** Improved handling of Objective-C and CORBA IDL.
2634Especially the support for Objective-C and IDL has gotten an overhaul.
2635The special "@" declarations in Objective-C are handled correctly.
2636All the keywords used in CORBA IDL, PSDL, and CIDL are recognized and
2637handled correctly, also wrt indentation.
2638
2639*** Changes in Key Sequences
2640**** c-toggle-auto-hungry-state is no longer bound to C-c C-t.
2641
2642**** c-toggle-hungry-state is no longer bound to C-c C-d.
2643This binding has been taken over by c-hungry-delete-forwards.
2644
2645**** c-toggle-auto-state (C-c C-t) has been renamed to c-toggle-auto-newline.
2646c-toggle-auto-state remains as an alias.
2647
2648**** The new commands c-hungry-backspace and c-hungry-delete-forwards
2649have key bindings C-c C-DEL (or C-c DEL, for the benefit of TTYs) and
2650C-c C-d (or C-c C-<delete> or C-c <delete>) respectively. These
2651commands delete entire blocks of whitespace with a single
2652key-sequence. [N.B. "DEL" is the <backspace> key.]
2653
2654**** The new command c-toggle-electric-mode is bound to C-c C-l.
2655
2656**** The new command c-subword-mode is bound to C-c C-w.
2657
2658*** C-c C-s (`c-show-syntactic-information') now highlights the anchor
2659position(s).
2660
2661*** New syntactic symbols in IDL mode.
2662The top level constructs "module" and "composition" (from CIDL) are
2663now handled like "namespace" in C++: They are given syntactic symbols
2664module-open, module-close, inmodule, composition-open,
2665composition-close, and incomposition.
2666
2667*** New functions to do hungry delete without enabling hungry delete mode.
2668The new functions `c-hungry-backspace' and `c-hungry-delete-forward'
2669provide hungry deletion without having to toggle a mode. They are
2670bound to C-c C-DEL and C-c C-d (and several variants, for the benefit
2671of different keyboard setups. See "Changes in key sequences" above).
2672
2673*** Better control over `require-final-newline'.
2674
2675The variable `c-require-final-newline' specifies which of the modes
2676implemented by CC mode should insert final newlines. Its value is a
2677list of modes, and only those modes should do it. By default the list
2678includes C, C++ and Objective-C modes.
2679
2680Whichever modes are in this list will set `require-final-newline'
2681based on `mode-require-final-newline'.
2682
2683*** Format change for syntactic context elements.
2684
2685The elements in the syntactic context returned by `c-guess-basic-syntax'
2686and stored in `c-syntactic-context' has been changed somewhat to allow
2687attaching more information. They are now lists instead of single cons
2688cells. E.g. a line that previously had the syntactic analysis
2689
2690((inclass . 11) (topmost-intro . 13))
2691
2692is now analyzed as
2693
2694((inclass 11) (topmost-intro 13))
2695
2696In some cases there are more than one position given for a syntactic
2697symbol.
2698
2699This change might affect code that calls `c-guess-basic-syntax'
2700directly, and custom lineup functions if they use
2701`c-syntactic-context'. However, the argument given to lineup
2702functions is still a single cons cell with nil or an integer in the
2703cdr.
2704
2705*** API changes for derived modes.
2706
2707There have been extensive changes "under the hood" which can affect
2708derived mode writers. Some of these changes are likely to cause
2709incompatibilities with existing derived modes, but on the other hand
2710care has now been taken to make it possible to extend and modify CC
2711Mode with less risk of such problems in the future.
2712
2713**** New language variable system.
2714These are variables whose values vary between CC Mode's different
2715languages. See the comment blurb near the top of cc-langs.el.
2716
2717**** New initialization functions.
2718The initialization procedure has been split up into more functions to
2719give better control: `c-basic-common-init', `c-font-lock-init', and
2720`c-init-language-vars'.
2721
2722*** Changes in analysis of nested syntactic constructs.
2723The syntactic analysis engine has better handling of cases where
2724several syntactic constructs appear nested on the same line. They are
2725now handled as if each construct started on a line of its own.
2726
2727This means that CC Mode now indents some cases differently, and
2728although it's more consistent there might be cases where the old way
2729gave results that's more to one's liking. So if you find a situation
2730where you think that the indentation has become worse, please report
2731it to bug-cc-mode@gnu.org.
2732
2733**** New syntactic symbol substatement-label.
2734This symbol is used when a label is inserted between a statement and
2735its substatement. E.g:
2736
2737 if (x)
2738 x_is_true:
2739 do_stuff();
2740
2741*** Better handling of multiline macros.
2742
2743**** Syntactic indentation inside macros.
2744The contents of multiline #define's are now analyzed and indented
2745syntactically just like other code. This can be disabled by the new
2746variable `c-syntactic-indentation-in-macros'. A new syntactic symbol
2747`cpp-define-intro' has been added to control the initial indentation
2748inside `#define's.
2749
2750**** New lineup function `c-lineup-cpp-define'.
2751
2752Now used by default to line up macro continuation lines. The behavior
2753of this function closely mimics the indentation one gets if the macro
2754is indented while the line continuation backslashes are temporarily
2755removed. If syntactic indentation in macros is turned off, it works
2756much line `c-lineup-dont-change', which was used earlier, but handles
2757empty lines within the macro better.
2758
2759**** Automatically inserted newlines continues the macro if used within one.
2760This applies to the newlines inserted by the auto-newline mode, and to
2761`c-context-line-break' and `c-context-open-line'.
2762
2763**** Better alignment of line continuation backslashes.
2764`c-backslash-region' tries to adapt to surrounding backslashes. New
2765variable `c-backslash-max-column' puts a limit on how far out
2766backslashes can be moved.
2767
2768**** Automatic alignment of line continuation backslashes.
2769This is controlled by the new variable `c-auto-align-backslashes'. It
2770affects `c-context-line-break', `c-context-open-line' and newlines
2771inserted in Auto-Newline mode.
2772
2773**** Line indentation works better inside macros.
2774Regardless whether syntactic indentation and syntactic indentation
2775inside macros are enabled or not, line indentation now ignores the
2776line continuation backslashes. This is most noticeable when syntactic
2777indentation is turned off and there are empty lines (save for the
2778backslash) in the macro.
2779
2780*** indent-for-comment is more customizable.
2781The behavior of M-; (indent-for-comment) is now configurable through
2782the variable `c-indent-comment-alist'. The indentation behavior is
2783based on the preceding code on the line, e.g. to get two spaces after
2784#else and #endif but indentation to `comment-column' in most other
2785cases (something which was hardcoded earlier).
2786
2787*** New function `c-context-open-line'.
2788It's the open-line equivalent of `c-context-line-break'.
2789
2790*** New clean-ups
2791
2792**** `comment-close-slash'.
2793With this clean-up, a block (i.e. c-style) comment can be terminated by
2794typing a slash at the start of a line.
2795
2796**** `c-one-liner-defun'
2797This clean-up compresses a short enough defun (for example, an AWK
2798pattern/action pair) onto a single line. "Short enough" is configurable.
2799
2800*** New lineup functions
2801
2802**** `c-lineup-string-cont'
2803This lineup function lines up a continued string under the one it
2804continues. E.g:
2805
2806result = prefix + "A message "
2807 "string."; <- c-lineup-string-cont
2808
2809**** `c-lineup-cascaded-calls'
2810Lines up series of calls separated by "->" or ".".
2811
2812**** `c-lineup-knr-region-comment'
2813Gives (what most people think is) better indentation of comments in
2814the "K&R region" between the function header and its body.
2815
2816**** `c-lineup-gcc-asm-reg'
2817Provides better indentation inside asm blocks.
2818
2819**** `c-lineup-argcont'
2820Lines up continued function arguments after the preceding comma.
2821
2822*** Added toggle for syntactic indentation.
2823The function `c-toggle-syntactic-indentation' can be used to toggle
2824syntactic indentation.
2825
2826*** Better caching of the syntactic context.
2827CC Mode caches the positions of the opening parentheses (of any kind)
2828of the lists surrounding the point. Those positions are used in many
2829places as anchor points for various searches. The cache is now
2830improved so that it can be reused to a large extent when the point is
2831moved. The less it moves, the less needs to be recalculated.
2832
2833The effect is that CC Mode should be fast most of the time even when
2834opening parens are hung (i.e. aren't in column zero). It's typically
2835only the first time after the point is moved far down in a complex
2836file that it'll take noticeable time to find out the syntactic
2837context.
2838
2839*** Statements are recognized in a more robust way.
2840Statements are recognized most of the time even when they occur in an
2841"invalid" context, e.g. in a function argument. In practice that can
2842happen when macros are involved.
2843
2844*** Improved the way `c-indent-exp' chooses the block to indent.
2845It now indents the block for the closest sexp following the point
2846whose closing paren ends on a different line. This means that the
2847point doesn't have to be immediately before the block to indent.
2848Also, only the block and the closing line is indented; the current
2849line is left untouched.
2850
2851** Changes in Makefile mode
2852
2853*** Makefile mode has submodes for automake, gmake, makepp, BSD make and imake.
2854
2855The former two couldn't be differentiated before, and the latter three
2856are new. Font-locking is robust now and offers new customizable
2857faces.
2858
2859*** The variable `makefile-query-one-target-method' has been renamed
2860to `makefile-query-one-target-method-function'. The old name is still
2861available as alias.
2862
2863** Sql changes
2864
2865*** The variable `sql-product' controls the highlighting of different
2866SQL dialects. This variable can be set globally via Customize, on a
2867buffer-specific basis via local variable settings, or for the current
2868session using the new SQL->Product submenu. (This menu replaces the
2869SQL->Highlighting submenu.)
2870
2871The following values are supported:
2872
2873 ansi ANSI Standard (default)
2874 db2 DB2
2875 informix Informix
2876 ingres Ingres
2877 interbase Interbase
2878 linter Linter
2879 ms Microsoft
2880 mysql MySQL
2881 oracle Oracle
2882 postgres Postgres
2883 solid Solid
2884 sqlite SQLite
2885 sybase Sybase
2886
2887The current product name will be shown on the mode line following the
2888SQL mode indicator.
2889
2890The technique of setting `sql-mode-font-lock-defaults' directly in
2891your `.emacs' will no longer establish the default highlighting -- Use
2892`sql-product' to accomplish this.
2893
2894ANSI keywords are always highlighted.
2895
2896*** The function `sql-add-product-keywords' can be used to add
2897font-lock rules to the product specific rules. For example, to have
2898all identifiers ending in `_t' under MS SQLServer treated as a type,
2899you would use the following line in your .emacs file:
2900
2901 (sql-add-product-keywords 'ms
2902 '(("\\<\\w+_t\\>" . font-lock-type-face)))
2903
2904*** Oracle support includes keyword highlighting for Oracle 9i.
2905
2906Most SQL and PL/SQL keywords are implemented. SQL*Plus commands are
2907highlighted in `font-lock-doc-face'.
2908
2909*** Microsoft SQLServer support has been significantly improved.
2910
2911Keyword highlighting for SqlServer 2000 is implemented.
2912sql-interactive-mode defaults to use osql, rather than isql, because
2913osql flushes its error stream more frequently. Thus error messages
2914are displayed when they occur rather than when the session is
2915terminated.
2916
2917If the username and password are not provided to `sql-ms', osql is
2918called with the `-E' command line argument to use the operating system
2919credentials to authenticate the user.
2920
2921*** Postgres support is enhanced.
2922Keyword highlighting of Postgres 7.3 is implemented. Prompting for
2923the username and the pgsql `-U' option is added.
2924
2925*** MySQL support is enhanced.
2926Keyword highlighting of MySql 4.0 is implemented.
2927
2928*** Imenu support has been enhanced to locate tables, views, indexes,
2929packages, procedures, functions, triggers, sequences, rules, and
2930defaults.
2931
2932*** Added SQL->Start SQLi Session menu entry which calls the
2933appropriate `sql-interactive-mode' wrapper for the current setting of
2934`sql-product'.
2935
2936*** sql.el supports the SQLite interpreter--call 'sql-sqlite'.
2937
2938** Fortran mode changes
2939
2940*** F90 mode and Fortran mode have support for `hs-minor-mode' (hideshow).
2941It cannot deal with every code format, but ought to handle a sizeable
2942majority.
2943
2944*** F90 mode and Fortran mode have new navigation commands
2945`f90-end-of-block', `f90-beginning-of-block', `f90-next-block',
2946`f90-previous-block', `fortran-end-of-block',
2947`fortran-beginning-of-block'.
2948
2949*** Fortran mode does more font-locking by default. Use level 3
2950highlighting for the old default.
2951
2952*** Fortran mode has a new variable `fortran-directive-re'.
2953Adapt this to match the format of any compiler directives you use.
2954Lines that match are never indented, and are given distinctive font-locking.
2955
2956*** The new function `f90-backslash-not-special' can be used to change
2957the syntax of backslashes in F90 buffers.
2958
2959** Miscellaneous programming mode changes
2960
2961*** In sh-script, a continuation line is only indented if the backslash was
2962preceded by a SPC or a TAB.
2963
2964*** Perl mode has a new variable `perl-indent-continued-arguments'.
2965
2966*** The old Octave mode bindings C-c f and C-c i have been changed
2967to C-c C-f and C-c C-i. The C-c C-i subcommands now have duplicate
2968bindings on control characters--thus, C-c C-i C-b is the same as
2969C-c C-i b, and so on.
2970
2971*** Prolog mode has a new variable `prolog-font-lock-keywords'
2972to support use of font-lock.
2973
2974** VC Changes
2975
2976*** New backends for Subversion and Meta-CVS.
2977
2978*** The new variable `vc-cvs-global-switches' specifies switches that
2979are passed to any CVS command invoked by VC.
2980
2981These switches are used as "global options" for CVS, which means they
2982are inserted before the command name. For example, this allows you to
2983specify a compression level using the `-z#' option for CVS.
2984
2985*** The key C-x C-q only changes the read-only state of the buffer
2986(toggle-read-only). It no longer checks files in or out.
2987
2988We made this change because we held a poll and found that many users
2989were unhappy with the previous behavior. If you do prefer this
2990behavior, you can bind `vc-toggle-read-only' to C-x C-q in your
2991`.emacs' file:
2992
2993 (global-set-key "\C-x\C-q" 'vc-toggle-read-only)
2994
2995The function `vc-toggle-read-only' will continue to exist.
2996
2997*** VC-Annotate mode enhancements
2998
2999In VC-Annotate mode, you can now use the following key bindings for
3000enhanced functionality to browse the annotations of past revisions, or
3001to view diffs or log entries directly from vc-annotate-mode:
3002
3003 P: annotates the previous revision
3004 N: annotates the next revision
3005 J: annotates the revision at line
3006 A: annotates the revision previous to line
3007 D: shows the diff of the revision at line with its previous revision
3008 L: shows the log of the revision at line
3009 W: annotates the workfile (most up to date) version
3010
3011** pcl-cvs changes
3012
3013*** In pcl-cvs mode, there is a new `d y' command to view the diffs
3014between the local version of the file and yesterday's head revision
3015in the repository.
3016
3017*** In pcl-cvs mode, there is a new `d r' command to view the changes
3018anyone has committed to the repository since you last executed
3019`checkout', `update' or `commit'. That means using cvs diff options
3020-rBASE -rHEAD.
3021
3022** Diff changes
3023
3024*** M-x diff uses Diff mode instead of Compilation mode.
3025
3026*** Diff mode key bindings changed.
3027
3028These are the new bindings:
3029
3030C-c C-e diff-ediff-patch (old M-A)
3031C-c C-n diff-restrict-view (old M-r)
3032C-c C-r diff-reverse-direction (old M-R)
3033C-c C-u diff-context->unified (old M-U)
3034C-c C-w diff-refine-hunk (old C-c C-r)
3035
3036To convert unified to context format, use C-u C-c C-u.
3037In addition, C-c C-u now operates on the region
3038in Transient Mark mode when the mark is active.
3039
3040** EDiff changes.
3041
3042*** When comparing directories.
3043Typing D brings up a buffer that lists the differences between the contents of
3044directories. Now it is possible to use this buffer to copy the missing files
3045from one directory to another.
3046
3047*** When comparing files or buffers.
3048Typing the = key now offers to perform the word-by-word comparison of the
3049currently highlighted regions in an inferior Ediff session. If you answer 'n'
3050then it reverts to the old behavior and asks the user to select regions for
3051comparison.
3052
3053*** The new command `ediff-backup' compares a file with its most recent
3054backup using `ediff'. If you specify the name of a backup file,
3055`ediff-backup' compares it with the file of which it is a backup.
3056
3057** Etags changes.
3058
3059*** New regular expressions features
3060
3061**** New syntax for regular expressions, multi-line regular expressions.
3062
3063The syntax --ignore-case-regexp=/regex/ is now undocumented and retained
3064only for backward compatibility. The new equivalent syntax is
3065--regex=/regex/i. More generally, it is --regex=/TAGREGEX/TAGNAME/MODS,
3066where `/TAGNAME' is optional, as usual, and MODS is a string of 0 or
3067more characters among `i' (ignore case), `m' (multi-line) and `s'
3068(single-line). The `m' and `s' modifiers behave as in Perl regular
3069expressions: `m' allows regexps to match more than one line, while `s'
3070(which implies `m') means that `.' matches newlines. The ability to
3071span newlines allows writing of much more powerful regular expressions
3072and rapid prototyping for tagging new languages.
3073
3074**** Regular expressions can use char escape sequences as in GCC.
3075
3076The escaped character sequence \a, \b, \d, \e, \f, \n, \r, \t, \v,
3077respectively, stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL,
3078CR, TAB, VT.
3079
3080**** Regular expressions can be bound to a given language.
3081
3082The syntax --regex={LANGUAGE}REGEX means that REGEX is used to make tags
3083only for files of language LANGUAGE, and ignored otherwise. This is
3084particularly useful when storing regexps in a file.
3085
3086**** Regular expressions can be read from a file.
3087
3088The --regex=@regexfile option means read the regexps from a file, one
3089per line. Lines beginning with space or tab are ignored.
3090
3091*** New language parsing features
3092
3093**** New language HTML.
3094
3095Tags are generated for `title' as well as `h1', `h2', and `h3'. Also,
3096when `name=' is used inside an anchor and whenever `id=' is used.
3097
3098**** New language PHP.
3099
3100Functions, classes and defines are tags. If the --members option is
3101specified to etags, variables are tags also.
3102
3103**** New language Lua.
3104
3105All functions are tagged.
3106
3107**** The `::' qualifier triggers C++ parsing in C file.
3108
3109Previously, only the `template' and `class' keywords had this effect.
3110
3111**** The GCC __attribute__ keyword is now recognized and ignored.
3112
3113**** In C and derived languages, etags creates tags for #undef
3114
3115**** In Makefiles, constants are tagged.
3116
3117If you want the old behavior instead, thus avoiding to increase the
3118size of the tags file, use the --no-globals option.
3119
3120**** In Perl, packages are tags.
3121
3122Subroutine tags are named from their package. You can jump to sub tags
3123as you did before, by the sub name, or additionally by looking for
3124package::sub.
3125
3126**** In Prolog, etags creates tags for rules in addition to predicates.
3127
3128**** New default keywords for TeX.
3129
3130The new keywords are def, newcommand, renewcommand, newenvironment and
3131renewenvironment.
3132
3133*** Honor #line directives.
3134
3135When Etags parses an input file that contains C preprocessor's #line
3136directives, it creates tags using the file name and line number
3137specified in those directives. This is useful when dealing with code
3138created from Cweb source files. When Etags tags the generated file, it
3139writes tags pointing to the source file.
3140
3141*** New option --parse-stdin=FILE.
3142
3143This option is mostly useful when calling etags from programs. It can
3144be used (only once) in place of a file name on the command line. Etags
3145reads from standard input and marks the produced tags as belonging to
3146the file FILE.
3147
782f8379
GM
3148** Ctags changes.
3149
3150*** Ctags now allows duplicate tags
3151
3152** Rmail changes
3153
3154*** Support for `movemail' from GNU mailutils was added to Rmail.
3155
73187b26 3156This version of `movemail' allows you to read mail from a wide range of
782f8379
GM
3157mailbox formats, including remote POP3 and IMAP4 mailboxes with or
3158without TLS encryption. If GNU mailutils is installed on the system
3159and its version of `movemail' can be found in exec-path, it will be
3160used instead of the native one.
3161
3162*** The new commands rmail-end-of-message and rmail-summary end-of-message,
3163by default bound to `/', go to the end of the current mail message in
3164Rmail and Rmail summary buffers.
3165
3166*** Rmail now displays 5-digit message ids in its summary buffer.
3167
3168** Gnus package
3169
3170*** Gnus now includes Sieve and PGG
3171
3172Sieve is a library for managing Sieve scripts. PGG is a library to handle
3173PGP/MIME.
3174
3175*** There are many news features, bug fixes and improvements.
3176
3177See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details.
3178
3179** MH-E changes.
3180
3181Upgraded to MH-E version 8.0.3. There have been major changes since
3182version 5.0.2; see MH-E-NEWS for details.
3183
3184** Miscellaneous mail changes
3185
3186*** The new variable `mail-default-directory' specifies
3187`default-directory' for mail buffers. This directory is used for
3188auto-save files of mail buffers. It defaults to "~/".
3189
3190*** The mode line can indicate new mail in a directory or file.
3191
3192See the documentation of the user option `display-time-mail-directory'.
3193
3194** Calendar changes
3195
3196*** There is a new calendar package, icalendar.el, that can be used to
3197convert Emacs diary entries to/from the iCalendar format.
3198
3199*** The new package cal-html.el writes HTML files with calendar and
3200diary entries.
3201
3202*** The new functions `diary-from-outlook', `diary-from-outlook-gnus',
3203and `diary-from-outlook-rmail' can be used to import diary entries
3204from Outlook-format appointments in mail messages. The variable
3205`diary-outlook-formats' can be customized to recognize additional
3206formats.
3207
3208*** The procedure for activating appointment reminders has changed:
3209use the new function `appt-activate'. The new variable
3210`appt-display-format' controls how reminders are displayed, replacing
3211`appt-issue-message', `appt-visible', and `appt-msg-window'.
3212
3213*** The function `simple-diary-display' now by default sets a header line.
3214This can be controlled through the variables `diary-header-line-flag'
3215and `diary-header-line-format'.
3216
3217*** Diary sexp entries can have custom marking in the calendar.
3218Diary sexp functions which only apply to certain days (such as
3219`diary-block' or `diary-cyclic') now take an optional parameter MARK,
3220which is the name of a face or a single-character string indicating
3221how to highlight the day in the calendar display. Specifying a
3222single-character string as @var{mark} places the character next to the
3223day in the calendar. Specifying a face highlights the day with that
3224face. This lets you have different colors or markings for vacations,
3225appointments, paydays or anything else using a sexp.
3226
3227*** The meanings of C-x < and C-x > have been interchanged.
3228< means to scroll backward in time, and > means to scroll forward.
3229
3230*** You can now use < and >, instead of C-x < and C-x >, to scroll
3231the calendar left or right.
3232
3233*** The new function `calendar-goto-day-of-year' (g D) prompts for a
3234year and day number, and moves to that date. Negative day numbers
3235count backward from the end of the year.
3236
3237*** The new Calendar function `calendar-goto-iso-week' (g w)
3238prompts for a year and a week number, and moves to the first
3239day of that ISO week.
3240
3241*** The functions `holiday-easter-etc' and `holiday-advent' now take
3242optional arguments, in order to only report on the specified holiday
3243rather than all. This makes customization of variables such as
3244`christian-holidays' simpler.
3245
3246*** The new variable `calendar-minimum-window-height' affects the
3247window generated by the function `generate-calendar-window'.
3248
3249** Speedbar changes
3250
3251*** Speedbar items can now be selected by clicking mouse-1, based on
3252the `mouse-1-click-follows-link' mechanism.
3253
3254*** The new command `speedbar-toggle-line-expansion', bound to SPC,
3255contracts or expands the line under the cursor.
3256
3257*** New command `speedbar-create-directory', bound to `M'.
3258
3259*** The new commands `speedbar-expand-line-descendants' and
3260`speedbar-contract-line-descendants', bound to `[' and `]'
3261respectively, expand and contract the line under cursor with all of
3262its descendents.
3263
3264*** The new user option `speedbar-use-tool-tips-flag', if non-nil,
3265means to display tool-tips for speedbar items.
3266
3267*** The new user option `speedbar-query-confirmation-method' controls
3268how querying is performed for file operations. A value of 'always
3269means to always query before file operations; 'none-but-delete means
3270to not query before any file operations, except before a file
3271deletion.
3272
3273*** The new user option `speedbar-select-frame-method' specifies how
3274to select a frame for displaying a file opened with the speedbar. A
3275value of 'attached means to use the attached frame (the frame that
3276speedbar was started from.) A number such as 1 or -1 means to pass
3277that number to `other-frame'.
3278
3279*** SPC and DEL are no longer bound to scroll up/down in the speedbar
3280keymap.
3281
3282*** The frame management code in speedbar.el has been split into a new
3283`dframe' library. Emacs Lisp code that makes use of the speedbar
3284should use `dframe-attached-frame' instead of
3285`speedbar-attached-frame', `dframe-timer' instead of `speedbar-timer',
3286`dframe-close-frame' instead of `speedbar-close-frame', and
3287`dframe-activity-change-focus-flag' instead of
3288`speedbar-activity-change-focus-flag'. The variables
3289`speedbar-update-speed' and `speedbar-navigating-speed' are also
3290obsolete; use `dframe-update-speed' instead.
3291
3292** battery.el changes
3293
3294*** display-battery-mode replaces display-battery.
3295
3296*** battery.el now works on recent versions of OS X.
3297
3298** Games
3299
3300*** The game `mpuz' is enhanced.
3301
3302`mpuz' now allows the 2nd factor not to have two identical digits. By
3303default, all trivial operations involving whole lines are performed
3304automatically. The game uses faces for better visual feedback.
3305
3306** Obsolete and deleted packages
3307
3308*** fast-lock.el and lazy-lock.el are obsolete. Use jit-lock.el instead.
3309
3310*** iso-acc.el is now obsolete. Use one of the latin input methods instead.
3311
3312*** zone-mode.el is now obsolete. Use dns-mode.el instead.
3313
3314*** cplus-md.el has been deleted.
3315
3316** Miscellaneous
3317
3318*** The variable `woman-topic-at-point' is renamed
3319to `woman-use-topic-at-point' and behaves differently: if this
3320variable is non-nil, the `woman' command uses the word at point
3321automatically, without asking for a confirmation. Otherwise, the word
3322at point is suggested as default, but not inserted at the prompt.
3323
3324*** You can now customize `fill-nobreak-predicate' to control where
3325filling can break lines. The value is now normally a list of
3326functions, but it can also be a single function, for compatibility.
3327
3328Emacs provide two predicates, `fill-single-word-nobreak-p' and
3329`fill-french-nobreak-p', for use as the value of
3330`fill-nobreak-predicate'.
3331
3332*** M-x view-file and commands that use it now avoid interfering
3333with special modes such as Tar mode.
3334
3335*** `global-whitespace-mode' is a new alias for `whitespace-global-mode'.
3336
3337*** The saveplace.el package now filters out unreadable files.
3338
3339When you exit Emacs, the saved positions in visited files no longer
3340include files that aren't readable, e.g. files that don't exist.
3341Customize the new option `save-place-forget-unreadable-files' to nil
3342to get the old behavior. The new options `save-place-save-skipped'
3343and `save-place-skip-check-regexp' allow further fine-tuning of this
3344feature.
3345
3346*** Commands `winner-redo' and `winner-undo', from winner.el, are now
3347bound to C-c <left> and C-c <right>, respectively. This is an
3348incompatible change.
3349
3350*** The type-break package now allows `type-break-file-name' to be nil
3351and if so, doesn't store any data across sessions. This is handy if
3352you don't want the `.type-break' file in your home directory or are
3353annoyed by the need for interaction when you kill Emacs.
3354
3355*** `ps-print' can now print characters from the mule-unicode charsets.
3356
3357Printing text with characters from the mule-unicode-* sets works with
3358`ps-print', provided that you have installed the appropriate BDF
3359fonts. See the file INSTALL for URLs where you can find these fonts.
3360
3361*** New command `strokes-global-set-stroke-string'.
3362This is like `strokes-global-set-stroke', but it allows you to bind
3363the stroke directly to a string to insert. This is convenient for
3364using strokes as an input method.
3365
3366*** In Outline mode, `hide-body' no longer hides lines at the top
3367of the file that precede the first header line.
3368
3369*** `hide-ifdef-mode' now uses overlays rather than selective-display
3370to hide its text. This should be mostly transparent but slightly
3371changes the behavior of motion commands like C-e and C-p.
3372
3373*** In Artist mode the variable `artist-text-renderer' has been
3374renamed to `artist-text-renderer-function'. The old name is still
3375available as alias.
3376
3377*** In Enriched mode, `set-left-margin' and `set-right-margin' are now
3378by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l'
3379and `C-c C-r'.
3380
3381*** `partial-completion-mode' now handles partial completion on directory names.
3382
3383*** You can now disable pc-selection-mode after enabling it.
3384
3385M-x pc-selection-mode behaves like a proper minor mode, and with no
3386argument it toggles the mode. Turning off PC-Selection mode restores
3387the global key bindings that were replaced by turning on the mode.
3388
3389*** `uniquify-strip-common-suffix' tells uniquify to prefer
3390`file|dir1' and `file|dir2' to `file|dir1/subdir' and `file|dir2/subdir'.
3391
3392*** New user option `add-log-always-start-new-record'.
3393
3394When this option is enabled, M-x add-change-log-entry always
3395starts a new record regardless of when the last record is.
3396
3397*** M-x compare-windows now can automatically skip non-matching text to
3398resync points in both windows.
3399
3400*** PO translation files are decoded according to their MIME headers
3401when Emacs visits them.
3402
3403*** Telnet now prompts you for a port number with C-u M-x telnet.
3404
3405*** calculator.el now has radix grouping mode.
3406
3407To enable this, set `calculator-output-radix' non-nil. In this mode a
3408separator character is used every few digits, making it easier to see
3409byte boundaries etc. For more info, see the documentation of the
3410variable `calculator-radix-grouping-mode'.
3411
3412*** LDAP support now defaults to ldapsearch from OpenLDAP version 2.
3413
3414*** The terminal emulation code in term.el has been improved; it can
3415run most curses applications now.
3416
3417*** Support for `magic cookie' standout modes has been removed.
3418
3419Emacs still works on terminals that require magic cookies in order to
3420use standout mode, but they can no longer display mode-lines in
3421inverse-video.
3422
3423\f
3424* Changes in Emacs 22.1 on non-free operating systems
3425
3426** The HOME directory defaults to Application Data under the user profile.
3427
3428If you used a previous version of Emacs without setting the HOME
3429environment variable and a `.emacs' was saved, then Emacs will continue
3430using C:/ as the default HOME. But if you are installing Emacs afresh,
3431the default location will be the "Application Data" (or similar
3432localized name) subdirectory of your user profile. A typical location
3433of this directory is "C:\Documents and Settings\USERNAME\Application Data",
3434where USERNAME is your user name.
3435
3436This change means that users can now have their own `.emacs' files on
3437shared computers, and the default HOME directory is less likely to be
3438read-only on computers that are administered by someone else.
3439
3440** Images are now supported on MS Windows.
3441
3442PBM and XBM images are supported out of the box. Other image formats
3443depend on external libraries. All of these libraries have been ported
3444to Windows, and can be found in both source and binary form at
3445http://gnuwin32.sourceforge.net/. Note that libpng also depends on
3446zlib, and tiff depends on the version of jpeg that it was compiled
3447against. For additional information, see nt/INSTALL.
3448
3449** Sound is now supported on MS Windows.
3450
3451WAV format is supported on all versions of Windows, other formats such
3452as AU, AIFF and MP3 may be supported in the more recent versions of
3453Windows, or when other software provides hooks into the system level
3454sound support for those formats.
3455
3456** Tooltips now work on MS Windows.
3457
3458See the Emacs 21.1 NEWS entry for tooltips for details.
3459
3460** Pointing devices with more than 3 buttons are now supported on MS Windows.
3461
3462The new variable `w32-pass-extra-mouse-buttons-to-system' controls
3463whether Emacs should handle the extra buttons itself (the default), or
3464pass them to Windows to be handled with system-wide functions.
3465
3466** Passing resources on the command line now works on MS Windows.
3467
3468You can use --xrm to pass resource settings to Emacs, overriding any
3469existing values. For example:
3470
3471 emacs --xrm "Emacs.Background:red" --xrm "Emacs.Geometry:100x20"
3472
3473will start up Emacs on an initial frame of 100x20 with red background,
3474irrespective of geometry or background setting on the Windows registry.
3475
3476** Emacs takes note of colors defined in Control Panel on MS-Windows.
3477
3478The Control Panel defines some default colors for applications in much
3479the same way as wildcard X Resources do on X. Emacs now adds these
3480colors to the colormap prefixed by System (eg SystemMenu for the
3481default Menu background, SystemMenuText for the foreground), and uses
3482some of them to initialize some of the default faces.
3483`list-colors-display' shows the list of System color names, in case
3484you wish to use them in other faces.
3485
3486** Running in a console window in Windows now uses the console size.
3487
3488Previous versions of Emacs erred on the side of having a usable Emacs
3489through telnet, even though that was inconvenient if you use Emacs in
3490a local console window with a scrollback buffer. The default value of
3491w32-use-full-screen-buffer is now nil, which favors local console
3492windows. Recent versions of Windows telnet also work well with this
3493setting. If you are using an older telnet server then Emacs detects
3494that the console window dimensions that are reported are not sane, and
3495defaults to 80x25. If you use such a telnet server regularly at a size
3496other than 80x25, you can still manually set
3497w32-use-full-screen-buffer to t.
3498
3499** Different shaped mouse pointers are supported on MS Windows.
3500
3501The mouse pointer changes shape depending on what is under the pointer.
3502
3503** On MS Windows, the "system caret" now follows the cursor.
3504
3505This enables Emacs to work better with programs that need to track the
3506cursor, for example screen magnifiers and text to speech programs.
3507When such a program is in use, the system caret is made visible
3508instead of Emacs drawing its own cursor. This seems to be required by
3509some programs. The new variable w32-use-visible-system-caret allows
3510the caret visibility to be manually toggled.
3511
3512** On MS Windows NT/W2K/XP, Emacs uses Unicode for clipboard operations.
3513
3514Those systems use Unicode internally, so this allows Emacs to share
3515multilingual text with other applications. On other versions of
3516MS Windows, Emacs now uses the appropriate locale coding-system, so
3517the clipboard should work correctly for your local language without
3518any customizations.
3519
3520** On Mac OS, `keyboard-coding-system' changes based on the keyboard script.
3521
3522** The variable `mac-keyboard-text-encoding' and the constants
3523`kTextEncodingMacRoman', `kTextEncodingISOLatin1', and
3524`kTextEncodingISOLatin2' are obsolete.
3525
3526** The variable `mac-command-key-is-meta' is obsolete. Use
3527`mac-command-modifier' and `mac-option-modifier' instead.
3528\f
3529* Incompatible Lisp Changes in Emacs 22.1
3530
3531** Mode line display ignores text properties as well as the
3532:propertize and :eval forms in the value of a variable whose
3533`risky-local-variable' property is nil.
3534
3535The function `comint-send-input' now accepts 3 optional arguments:
3536
3537 (comint-send-input &optional no-newline artificial)
3538
3539Callers sending input not from the user should use bind the 3rd
3540argument `artificial' to a non-nil value, to prevent Emacs from
3541deleting the part of subprocess output that matches the input.
3542
3543** The `read-file-name' function now returns a null string if the
3544user just types RET.
3545
3546** The variables post-command-idle-hook and post-command-idle-delay have
3547been removed. Use run-with-idle-timer instead.
3548
3549** A hex or octal escape in a string constant forces the string to
3550be multibyte or unibyte, respectively.
3551
3552** The explicit method of creating a display table element by
3553combining a face number and a character code into a numeric
3554glyph code is deprecated.
3555
3556Instead, the new functions `make-glyph-code', `glyph-char', and
3557`glyph-face' must be used to create and decode glyph codes in
3558display tables.
3559
3560** `suppress-keymap' now works by remapping `self-insert-command' to
3561the command `undefined'. (In earlier Emacs versions, it used
3562`substitute-key-definition' to rebind self inserting characters to
3563`undefined'.)
3564
3565** The third argument of `accept-process-output' is now milliseconds.
3566It used to be microseconds.
3567
3568** The function find-operation-coding-system may be called with a cons
3569(FILENAME . BUFFER) in the second argument if the first argument
3570OPERATION is `insert-file-contents', and thus a function registered in
3571`file-coding-system-alist' is also called with such an argument.
3572
3573** When Emacs receives a USR1 or USR2 signal, this generates
3574input events: sigusr1 or sigusr2. Use special-event-map to
3575handle these events.
3576
3577** The variable `memory-full' now remains t until
3578there is no longer a shortage of memory.
3579
3580** Support for Mocklisp has been removed.
3581
3582\f
3583* Lisp Changes in Emacs 22.1
3584
3585** General Lisp changes:
3586
3587*** New syntax: \s now stands for the SPACE character.
3588
3589`?\s' is a new way to write the space character. You must make sure
3590it is not followed by a dash, since `?\s-...' indicates the "super"
3591modifier. However, it would be strange to write a character constant
3592and a following symbol (beginning with `-') with no space between
3593them.
3594
3595`\s' stands for space in strings, too, but it is not really meant for
3596strings; it is easier and nicer just to write a space.
3597
3598*** New syntax: \uXXXX and \UXXXXXXXX specify Unicode code points in hex.
3599
3600For instance, you can use "\u0428" to specify a string consisting of
3601CYRILLIC CAPITAL LETTER SHA, or `"U0001D6E2" to specify one consisting
3602of MATHEMATICAL ITALIC CAPITAL ALPHA (the latter is greater than
3603#xFFFF and thus needs the longer syntax).
3604
3605This syntax works for both character constants and strings.
3606
3607*** New function `unsafep' determines whether a Lisp form is safe.
3608
3609It returns nil if the given Lisp form can't possibly do anything
3610dangerous; otherwise it returns a reason why the form might be unsafe
3611(calls unknown function, alters global variable, etc.).
3612
3613*** The function `eql' is now available without requiring the CL package.
3614
3615*** The new function `memql' is like `memq', but uses `eql' for comparison,
3616that is, floats are compared by value and other elements with `eq'.
3617
3618*** New functions `string-or-null-p' and `booleanp'.
3619
37cc095b
MB
3620`string-or-null-p' returns non-nil if OBJECT is a string or nil.
3621`booleanp' returns non-nil if OBJECT is t or nil.
782f8379
GM
3622
3623*** `makehash' is now obsolete. Use `make-hash-table' instead.
3624
3625*** Minor change in the function `format'.
3626
3627Some flags that were accepted but not implemented (such as "*") are no
3628longer accepted.
3629
3630*** `add-to-list' takes an optional third argument, APPEND.
3631
3632If APPEND is non-nil, the new element gets added at the end of the
3633list instead of at the beginning. This change actually occurred in
3634Emacs 21.1, but was not documented then.
3635
3636*** New function `add-to-ordered-list' is like `add-to-list' but
3637associates a numeric ordering of each element added to the list.
3638
3639*** New function `add-to-history' adds an element to a history list.
3640
3641Lisp packages should use this function to add elements to their
3642history lists.
3643
3644If `history-delete-duplicates' is non-nil, it removes duplicates of
3645the new element from the history list it updates.
3646
3647*** New function `copy-tree' makes a copy of a tree.
3648
3649It recursively copies through both CARs and CDRs.
3650
3651*** New function `delete-dups' deletes `equal' duplicate elements from a list.
3652
3653It modifies the list destructively, like `delete'. Of several `equal'
3654occurrences of an element in the list, the one that's kept is the
3655first one.
3656
3657*** New function `rassq-delete-all'.
3658
3659(rassq-delete-all VALUE ALIST) deletes, from ALIST, each element whose
3660CDR is `eq' to the specified value.
3661
3662*** Functions `get' and `plist-get' no longer give errors for bad plists.
3663
3664They return nil for a malformed property list or if the list is
3665cyclic.
3666
3667*** New functions `lax-plist-get' and `lax-plist-put'.
3668
3669They are like `plist-get' and `plist-put', except that they compare
3670the property name using `equal' rather than `eq'.
3671
3672*** The function `number-sequence' makes a list of equally-separated numbers.
3673
3674For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). By
3675default, the separation is 1, but you can specify a different
3676separation as the third argument. (number-sequence 1.5 6 2) returns
3677(1.5 3.5 5.5).
3678
3679*** New variables `most-positive-fixnum' and `most-negative-fixnum'.
3680
3681They hold the largest and smallest possible integer values.
3682
3683*** The function `expt' handles negative exponents differently.
3684The value for `(expt A B)', if both A and B are integers and B is
3685negative, is now a float. For example: (expt 2 -2) => 0.25.
3686
3687*** The function `atan' now accepts an optional second argument.
3688
3689When called with 2 arguments, as in `(atan Y X)', `atan' returns the
3690angle in radians between the vector [X, Y] and the X axis. (This is
3691equivalent to the standard C library function `atan2'.)
3692
3693*** New macro `with-case-table'
3694
3695This executes the body with the case table temporarily set to a given
3696case table.
3697
3698*** New macro `with-local-quit' temporarily allows quitting.
3699
3700A quit inside the body of `with-local-quit' is caught by the
3701`with-local-quit' form itself, but another quit will happen later once
3702the code that has inhibited quitting exits.
3703
3704This is for use around potentially blocking or long-running code
3705inside timer functions and `post-command-hook' functions.
3706
3707*** New macro `define-obsolete-function-alias'.
3708
3709This combines `defalias' and `make-obsolete'.
3710
3711*** New macro `eval-at-startup' specifies expressions to
3712evaluate when Emacs starts up. If this is done after startup,
3713it evaluates those expressions immediately.
3714
3715This is useful in packages that can be preloaded.
3716
3717*** New function `macroexpand-all' expands all macros in a form.
3718
3719It is similar to the Common-Lisp function of the same name.
3720One difference is that it guarantees to return the original argument
3721if no expansion is done, which can be tested using `eq'.
3722
3723*** A function or macro's doc string can now specify the calling pattern.
3724
3725You put this info in the doc string's last line. It should be
3726formatted so as to match the regexp "\n\n(fn .*)\\'". If you don't
3727specify this explicitly, Emacs determines it from the actual argument
3728names. Usually that default is right, but not always.
3729
3730*** New variable `print-continuous-numbering'.
3731
3732When this is non-nil, successive calls to print functions use a single
3733numbering scheme for circular structure references. This is only
3734relevant when `print-circle' is non-nil.
3735
3736When you bind `print-continuous-numbering' to t, you should
3737also bind `print-number-table' to nil.
3738
3739*** `list-faces-display' takes an optional argument, REGEXP.
3740
3741If it is non-nil, the function lists only faces matching this regexp.
3742
3743*** New hook `command-error-function'.
3744
3745By setting this variable to a function, you can control
3746how the editor command loop shows the user an error message.
3747
3748*** `debug-on-entry' accepts primitive functions that are not special forms.
3749
3750** Lisp code indentation features:
3751
3752*** The `defmacro' form can contain indentation and edebug declarations.
3753
3754These declarations specify how to indent the macro calls in Lisp mode
3755and how to debug them with Edebug. You write them like this:
3756
3757 (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...)
3758
3759DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'. The
3760possible declaration specifiers are:
3761
3762(indent INDENT)
3763 Set NAME's `lisp-indent-function' property to INDENT.
3764
3765(edebug DEBUG)
3766 Set NAME's `edebug-form-spec' property to DEBUG. (This is
3767 equivalent to writing a `def-edebug-spec' for the macro,
3768 but this is cleaner.)
3769
3770*** cl-indent now allows customization of Indentation of backquoted forms.
3771
3772See the new user option `lisp-backquote-indentation'.
3773
3774*** cl-indent now handles indentation of simple and extended `loop' forms.
3775
3776The new user options `lisp-loop-keyword-indentation',
3777`lisp-loop-forms-indentation', and `lisp-simple-loop-indentation' can
3778be used to customize the indentation of keywords and forms in loop
3779forms.
3780
3781** Variable aliases:
3782
3783*** New function: defvaralias ALIAS-VAR BASE-VAR [DOCSTRING]
3784
3785This function defines the symbol ALIAS-VAR as a variable alias for
3786symbol BASE-VAR. This means that retrieving the value of ALIAS-VAR
3787returns the value of BASE-VAR, and changing the value of ALIAS-VAR
3788changes the value of BASE-VAR.
3789
3790DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has
3791the same documentation as BASE-VAR.
3792
3793*** The macro `define-obsolete-variable-alias' combines `defvaralias' and
3794`make-obsolete-variable'.
3795
3796*** New function: indirect-variable VARIABLE
3797
3798This function returns the variable at the end of the chain of aliases
3799of VARIABLE. If VARIABLE is not a symbol, or if VARIABLE is not
3800defined as an alias, the function returns VARIABLE.
3801
3802It might be noteworthy that variables aliases work for all kinds of
3803variables, including buffer-local and frame-local variables.
3804
3805** defcustom changes:
3806
3807*** The package-version keyword has been added to provide
3808`customize-changed-options' functionality to packages in the future.
3809Developers who make use of this keyword must also update the new
3810variable `customize-package-emacs-version-alist'.
3811
3812*** The new customization type `float' requires a floating point number.
3813
3814** String changes:
3815
3816*** A hex escape in a string constant forces the string to be multibyte.
3817
3818*** An octal escape in a string constant forces the string to be unibyte.
3819
3820*** New function `string-to-multibyte' converts a unibyte string to a
3821multibyte string with the same individual character codes.
3822
3823*** `split-string' now includes null substrings in the returned list if
3824the optional argument SEPARATORS is non-nil and there are matches for
3825SEPARATORS at the beginning or end of the string. If SEPARATORS is
3826nil, or if the new optional third argument OMIT-NULLS is non-nil, all
3827empty matches are omitted from the returned list.
3828
3829*** The new function `assoc-string' replaces `assoc-ignore-case' and
3830`assoc-ignore-representation', which are still available, but have
3831been declared obsolete.
3832
3833*** New function `substring-no-properties' returns a substring without
3834text properties.
3835
3836** Displaying warnings to the user.
3837
3838See the functions `warn' and `display-warning', or the Lisp Manual.
3839If you want to be sure the warning will not be overlooked, this
3840facility is much better than using `message', since it displays
3841warnings in a separate window.
3842
3843** Progress reporters.
3844
3845These provide a simple and uniform way for commands to present
3846progress messages for the user.
3847
3848See the new functions `make-progress-reporter',
3849`progress-reporter-update', `progress-reporter-force-update',
3850`progress-reporter-done', and `dotimes-with-progress-reporter'.
3851
3852** Buffer positions:
3853
3854*** Function `compute-motion' now calculates the usable window
3855width if the WIDTH argument is nil. If the TOPOS argument is nil,
3856the usable window height and width is used.
3857
3858*** The `line-move', `scroll-up', and `scroll-down' functions will now
3859modify the window vscroll to scroll through display rows that are
3860taller that the height of the window, for example in the presence of
3861large images. To disable this feature, bind the new variable
3862`auto-window-vscroll' to nil.
3863
3864*** The argument to `forward-word', `backward-word' is optional.
3865
3866It defaults to 1.
3867
3868*** Argument to `forward-to-indentation' and `backward-to-indentation' is optional.
3869
3870It defaults to 1.
3871
3872*** `field-beginning' and `field-end' take new optional argument, LIMIT.
3873
3874This argument tells them not to search beyond LIMIT. Instead they
3875give up and return LIMIT.
3876
3877*** New function `window-line-height' is an efficient way to get
3878information about a specific text line in a window provided that the
3879window's display is up-to-date.
3880
3881*** New function `line-number-at-pos' returns the line number of a position.
3882
3883It an optional buffer position argument that defaults to point.
3884
3885*** Function `pos-visible-in-window-p' now returns the pixel coordinates
3886and partial visibility state of the corresponding row, if the PARTIALLY
3887arg is non-nil.
3888
3889*** New functions `posn-at-point' and `posn-at-x-y' return
3890click-event-style position information for a given visible buffer
3891position or for a given window pixel coordinate.
3892
3893*** New function `mouse-on-link-p' tests if a position is in a clickable link.
3894
3895This is the function used by the new `mouse-1-click-follows-link'
3896functionality.
3897
3898** Text modification:
3899
3900*** The new function `buffer-chars-modified-tick' returns a buffer's
3901tick counter for changes to characters. Each time text in that buffer
3902is inserted or deleted, the character-change counter is updated to the
3903tick counter (`buffer-modified-tick'). Text property changes leave it
3904unchanged.
3905
3906*** The new function `insert-for-yank' normally works like `insert', but
3907removes the text properties in the `yank-excluded-properties' list
3908and handles the `yank-handler' text property.
3909
3910*** The new function `insert-buffer-substring-as-yank' is like
3911`insert-for-yank' except that it gets the text from another buffer as
3912in `insert-buffer-substring'.
3913
3914*** The new function `insert-buffer-substring-no-properties' is like
3915`insert-buffer-substring', but removes all text properties from the
3916inserted substring.
3917
3918*** The new function `filter-buffer-substring' extracts a buffer
3919substring, passes it through a set of filter functions, and returns
3920the filtered substring. Use it instead of `buffer-substring' or
3921`delete-and-extract-region' when copying text into a user-accessible
3922data structure, such as the kill-ring, X clipboard, or a register.
3923
3924The list of filter function is specified by the new variable
3925`buffer-substring-filters'. For example, Longlines mode adds to
3926`buffer-substring-filters' to remove soft newlines from the copied
3927text.
3928
3929*** Function `translate-region' accepts also a char-table as TABLE
3930argument.
3931
3932*** The new translation table `translation-table-for-input'
3933is used for customizing self-insertion. The character to
3934be inserted is translated through it.
3935
3936*** Text clones.
3937
3938The new function `text-clone-create'. Text clones are chunks of text
3939that are kept identical by transparently propagating changes from one
3940clone to the other.
3941
3942*** The function `insert-string' is now obsolete.
3943
3944** Filling changes.
3945
3946*** In determining an adaptive fill prefix, Emacs now tries the function in
3947`adaptive-fill-function' _before_ matching the buffer line against
3948`adaptive-fill-regexp' rather than _after_ it.
3949
3950** Atomic change groups.
3951
3952To perform some changes in the current buffer "atomically" so that
3953they either all succeed or are all undone, use `atomic-change-group'
3954around the code that makes changes. For instance:
3955
3956 (atomic-change-group
3957 (insert foo)
3958 (delete-region x y))
3959
3960If an error (or other nonlocal exit) occurs inside the body of
3961`atomic-change-group', it unmakes all the changes in that buffer that
3962were during the execution of the body. The change group has no effect
3963on any other buffers--any such changes remain.
3964
3965If you need something more sophisticated, you can directly call the
3966lower-level functions that `atomic-change-group' uses. Here is how.
3967
3968To set up a change group for one buffer, call `prepare-change-group'.
3969Specify the buffer as argument; it defaults to the current buffer.
3970This function returns a "handle" for the change group. You must save
3971the handle to activate the change group and then finish it.
3972
3973Before you change the buffer again, you must activate the change
3974group. Pass the handle to `activate-change-group' afterward to
3975do this.
3976
3977After you make the changes, you must finish the change group. You can
3978either accept the changes or cancel them all. Call
3979`accept-change-group' to accept the changes in the group as final;
3980call `cancel-change-group' to undo them all.
3981
3982You should use `unwind-protect' to make sure the group is always
3983finished. The call to `activate-change-group' should be inside the
3984`unwind-protect', in case the user types C-g just after it runs.
3985(This is one reason why `prepare-change-group' and
3986`activate-change-group' are separate functions.) Once you finish the
3987group, don't use the handle again--don't try to finish the same group
3988twice.
3989
3990To make a multibuffer change group, call `prepare-change-group' once
3991for each buffer you want to cover, then use `nconc' to combine the
3992returned values, like this:
3993
3994 (nconc (prepare-change-group buffer-1)
3995 (prepare-change-group buffer-2))
3996
3997You can then activate the multibuffer change group with a single call
3998to `activate-change-group', and finish it with a single call to
3999`accept-change-group' or `cancel-change-group'.
4000
4001Nested use of several change groups for the same buffer works as you
4002would expect. Non-nested use of change groups for the same buffer
4003will lead to undesirable results, so don't let it happen; the first
4004change group you start for any given buffer should be the last one
4005finished.
4006
4007** Buffer-related changes:
4008
4009*** The new function `buffer-local-value' returns the buffer-local
4010binding of VARIABLE (a symbol) in buffer BUFFER. If VARIABLE does not
4011have a buffer-local binding in buffer BUFFER, it returns the default
4012value of VARIABLE instead.
4013
4014*** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST.
4015
4016If it is non-nil, it specifies which buffers to list.
4017
4018*** `kill-buffer-hook' is now a permanent local.
4019
4020*** The function `frame-or-buffer-changed-p' now lets you maintain
4021various status records in parallel.
4022
4023It takes a variable (a symbol) as argument. If the variable is non-nil,
4024then its value should be a vector installed previously by
4025`frame-or-buffer-changed-p'. If the frame names, buffer names, buffer
4026order, or their read-only or modified flags have changed, since the
4027time the vector's contents were recorded by a previous call to
4028`frame-or-buffer-changed-p', then the function returns t. Otherwise
4029it returns nil.
4030
4031On the first call to `frame-or-buffer-changed-p', the variable's
4032value should be nil. `frame-or-buffer-changed-p' stores a suitable
4033vector into the variable and returns t.
4034
4035If the variable is itself nil, then `frame-or-buffer-changed-p' uses,
4036for compatibility, an internal variable which exists only for this
4037purpose.
4038
4039*** The function `read-buffer' follows the convention for reading from
4040the minibuffer with a default value: if DEF is non-nil, the minibuffer
4041prompt provided in PROMPT is edited to show the default value provided
4042in DEF before the terminal colon and space.
4043
4044** Searching and matching changes:
4045
4046*** New function `looking-back' checks whether a regular expression matches
4047the text before point. Specifying the LIMIT argument bounds how far
4048back the match can start; this is a way to keep it from taking too long.
4049
4050*** The new variable `search-spaces-regexp' controls how to search
4051for spaces in a regular expression. If it is non-nil, it should be a
4052regular expression, and any series of spaces stands for that regular
4053expression. If it is nil, spaces stand for themselves.
4054
4055Spaces inside of constructs such as `[..]' and inside loops such as
4056`*', `+', and `?' are never replaced with `search-spaces-regexp'.
4057
4058*** New regular expression operators, `\_<' and `\_>'.
4059
4060These match the beginning and end of a symbol. A symbol is a
4061non-empty sequence of either word or symbol constituent characters, as
4062specified by the syntax table.
4063
4064*** `skip-chars-forward' and `skip-chars-backward' now handle
4065character classes such as `[:alpha:]', along with individual
4066characters and ranges.
4067
4068*** In `replace-match', the replacement text no longer inherits
4069properties from surrounding text.
4070
4071*** The list returned by `(match-data t)' now has the buffer as a final
4072element, if the last match was on a buffer. `set-match-data'
4073accepts such a list for restoring the match state.
4074
4075*** Functions `match-data' and `set-match-data' now have an optional
4076argument `reseat'. When non-nil, all markers in the match data list
4077passed to these functions will be reseated to point to nowhere.
4078
4079*** rx.el has new corresponding `symbol-start' and `symbol-end' elements.
4080
4081*** The default value of `sentence-end' is now defined using the new
4082variable `sentence-end-without-space', which contains such characters
4083that end a sentence without following spaces.
4084
4085The function `sentence-end' should be used to obtain the value of the
4086variable `sentence-end'. If the variable `sentence-end' is nil, then
4087this function returns the regexp constructed from the variables
4088`sentence-end-without-period', `sentence-end-double-space' and
4089`sentence-end-without-space'.
4090
4091** Undo changes:
4092
4093*** `buffer-undo-list' allows programmable elements.
4094
4095These elements have the form (apply FUNNAME . ARGS), where FUNNAME is
4096a symbol other than t or nil. That stands for a high-level change
4097that should be undone by evaluating (apply FUNNAME ARGS).
4098
4099These entries can also have the form (apply DELTA BEG END FUNNAME . ARGS)
4100which indicates that the change which took place was limited to the
4101range BEG...END and increased the buffer size by DELTA.
4102
4103*** If the buffer's undo list for the current command gets longer than
4104`undo-outer-limit', garbage collection empties it. This is to prevent
4105it from using up the available memory and choking Emacs.
4106
4107** Killing and yanking changes:
4108
4109*** New `yank-handler' text property can be used to control how
4110previously killed text on the kill ring is reinserted.
4111
4112The value of the `yank-handler' property must be a list with one to four
4113elements with the following format:
4114 (FUNCTION PARAM NOEXCLUDE UNDO).
4115
4116The `insert-for-yank' function looks for a yank-handler property on
4117the first character on its string argument (typically the first
4118element on the kill-ring). If a `yank-handler' property is found,
4119the normal behavior of `insert-for-yank' is modified in various ways:
4120
4121 When FUNCTION is present and non-nil, it is called instead of `insert'
4122to insert the string. FUNCTION takes one argument--the object to insert.
4123 If PARAM is present and non-nil, it replaces STRING as the object
4124passed to FUNCTION (or `insert'); for example, if FUNCTION is
4125`yank-rectangle', PARAM should be a list of strings to insert as a
4126rectangle.
4127 If NOEXCLUDE is present and non-nil, the normal removal of the
4128`yank-excluded-properties' is not performed; instead FUNCTION is
4129responsible for removing those properties. This may be necessary
4130if FUNCTION adjusts point before or after inserting the object.
4131 If UNDO is present and non-nil, it is a function that will be called
4132by `yank-pop' to undo the insertion of the current object. It is
4133called with two arguments, the start and end of the current region.
4134FUNCTION can set `yank-undo-function' to override the UNDO value.
4135
4136*** The functions `kill-new', `kill-append', and `kill-region' now have an
4137optional argument to specify the `yank-handler' text property to put on
4138the killed text.
4139
4140*** The function `yank-pop' will now use a non-nil value of the variable
4141`yank-undo-function' (instead of `delete-region') to undo the previous
4142`yank' or `yank-pop' command (or a call to `insert-for-yank'). The function
4143`insert-for-yank' automatically sets that variable according to the UNDO
4144element of the string argument's `yank-handler' text property if present.
4145
4146*** The function `insert-for-yank' now supports strings where the
4147`yank-handler' property does not span the first character of the
4148string. The old behavior is available if you call
4149`insert-for-yank-1' instead.
4150
4151** Syntax table changes:
4152
4153*** The new function `syntax-ppss' provides an efficient way to find the
4154current syntactic context at point.
4155
4156*** The new function `syntax-after' returns the syntax code
4157of the character after a specified buffer position, taking account
4158of text properties as well as the character code.
4159
4160*** `syntax-class' extracts the class of a syntax code (as returned
4161by `syntax-after').
4162
4163*** The macro `with-syntax-table' no longer copies the syntax table.
4164
4165** File operation changes:
4166
4167*** New vars `exec-suffixes' and `load-suffixes' used when
4168searching for an executable or an Emacs Lisp file.
4169
4170*** New function `locate-file' searches for a file in a list of directories.
4171`locate-file' accepts a name of a file to search (a string), and two
4172lists: a list of directories to search in and a list of suffixes to
4173try; typical usage might use `exec-path' and `load-path' for the list
4174of directories, and `exec-suffixes' and `load-suffixes' for the list
4175of suffixes. The function also accepts a predicate argument to
4176further filter candidate files.
4177
4178One advantage of using this function is that the list of suffixes in
4179`exec-suffixes' is OS-dependant, so this function will find
4180executables without polluting Lisp code with OS dependencies.
4181
4182*** The new function `file-remote-p' tests a file name and returns
4183non-nil if it specifies a remote file (one that Emacs accesses using
4184its own special methods and not directly through the file system).
4185The value in that case is an identifier for the remote file system.
4186
4187*** The new hook `before-save-hook' is invoked by `basic-save-buffer'
4188before saving buffers. This allows packages to perform various final
4189tasks. For example, it can be used by the copyright package to make
4190sure saved files have the current year in any copyright headers.
4191
4192*** `file-chase-links' now takes an optional second argument LIMIT which
4193specifies the maximum number of links to chase through. If after that
4194many iterations the file name obtained is still a symbolic link,
4195`file-chase-links' returns it anyway.
4196
4197*** Functions `file-name-sans-extension' and `file-name-extension' now
4198ignore the leading dots in file names, so that file names such as
4199`.emacs' are treated as extensionless.
4200
4201*** If `buffer-save-without-query' is non-nil in some buffer,
4202`save-some-buffers' will always save that buffer without asking (if
4203it's modified).
4204
4205*** `buffer-auto-save-file-format' is the new name for what was
4206formerly called `auto-save-file-format'. It is now a permanent local.
4207
4208*** `visited-file-modtime' and `calendar-time-from-absolute' now return
4209a list of two integers, instead of a cons.
4210
4211*** The precedence of file name handlers has been changed.
4212
4213Instead of choosing the first handler that matches,
4214`find-file-name-handler' now gives precedence to a file name handler
4215that matches nearest the end of the file name. More precisely, the
4216handler whose (match-beginning 0) is the largest is chosen. In case
4217of ties, the old "first matched" rule applies.
4218
4219*** A file name handler can declare which operations it handles.
4220
4221You do this by putting an `operation' property on the handler name
4222symbol. The property value should be a list of the operations that
4223the handler really handles. It won't be called for any other
4224operations.
4225
4226This is useful for autoloaded handlers, to prevent them from being
4227autoloaded when not really necessary.
4228
4229*** The function `make-auto-save-file-name' is now handled by file
4230name handlers. This will be exploited for remote files mainly.
4231
4232*** The function `file-name-completion' accepts an optional argument
4233PREDICATE, and rejects completion candidates that don't satisfy PREDICATE.
4234
4235*** The new primitive `set-file-times' sets a file's access and
4236modification times. Magic file name handlers can handle this
4237operation.
4238
4239** Input changes:
4240
4241*** Functions `y-or-n-p', `read-char', `read-key-sequence' and the like, that
4242display a prompt but don't use the minibuffer, now display the prompt
4243using the text properties (esp. the face) of the prompt string.
4244
4245*** The functions `read-event', `read-char', and `read-char-exclusive'
4246have a new optional argument SECONDS. If non-nil, this specifies a
4247maximum time to wait for input, in seconds. If no input arrives after
4248this time elapses, the functions stop waiting and return nil.
4249
4250*** An interactive specification can now use the code letter `U' to get
4251the up-event that was discarded in case the last key sequence read for a
4252previous `k' or `K' argument was a down-event; otherwise nil is used.
4253
4254*** The new interactive-specification `G' reads a file name
4255much like `F', but if the input is a directory name (even defaulted),
4256it returns just the directory name.
4257
4258*** (while-no-input BODY...) runs BODY, but only so long as no input
4259arrives. If the user types or clicks anything, BODY stops as if a
4260quit had occurred. `while-no-input' returns the value of BODY, if BODY
4261finishes. It returns nil if BODY was aborted by a quit, and t if
4262BODY was aborted by arrival of input.
4263
4264*** `recent-keys' now returns the last 300 keys.
4265
4266** Minibuffer changes:
4267
4268*** The new function `minibufferp' returns non-nil if its optional
4269buffer argument is a minibuffer. If the argument is omitted, it
4270defaults to the current buffer.
4271
4272*** New function `minibuffer-selected-window' returns the window which
4273was selected when entering the minibuffer.
4274
4275*** The `read-file-name' function now takes an additional argument which
4276specifies a predicate which the file name read must satisfy. The
4277new variable `read-file-name-predicate' contains the predicate argument
4278while reading the file name from the minibuffer; the predicate in this
4279variable is used by read-file-name-internal to filter the completion list.
4280
4281*** The new variable `read-file-name-function' can be used by Lisp code
4282to override the built-in `read-file-name' function.
4283
4284*** The new variable `read-file-name-completion-ignore-case' specifies
4285whether completion ignores case when reading a file name with the
4286`read-file-name' function.
4287
4288*** The new function `read-directory-name' is for reading a directory name.
4289
4290It is like `read-file-name' except that the defaulting works better
4291for directories, and completion inside it shows only directories.
4292
4293*** The new variable `history-add-new-input' specifies whether to add new
4294elements in history. If set to nil, minibuffer reading functions don't
4295add new elements to the history list, so it is possible to do this
4296afterwards by calling `add-to-history' explicitly.
4297
4298** Completion changes:
4299
4300*** The new function `minibuffer-completion-contents' returns the contents
4301of the minibuffer just before point. That is what completion commands
4302operate on.
4303
4304*** The functions `all-completions' and `try-completion' now accept lists
4305of strings as well as hash-tables additionally to alists, obarrays
4306and functions. Furthermore, the function `test-completion' is now
4307exported to Lisp. The keys in alists and hash tables can be either
4308strings or symbols, which are automatically converted with to strings.
4309
4310*** The new macro `dynamic-completion-table' supports using functions
4311as a dynamic completion table.
4312
4313 (dynamic-completion-table FUN)
4314
4315FUN is called with one argument, the string for which completion is required,
4316and it should return an alist containing all the intended possible
4317completions. This alist can be a full list of possible completions so that FUN
4318can ignore the value of its argument. If completion is performed in the
4319minibuffer, FUN will be called in the buffer from which the minibuffer was
4320entered. `dynamic-completion-table' then computes the completion.
4321
4322*** The new macro `lazy-completion-table' initializes a variable
4323as a lazy completion table.
4324
4325 (lazy-completion-table VAR FUN)
4326
4327If the completion table VAR is used for the first time (e.g., by passing VAR
4328as an argument to `try-completion'), the function FUN is called with no
4329arguments. FUN must return the completion table that will be stored in VAR.
4330If completion is requested in the minibuffer, FUN will be called in the buffer
4331from which the minibuffer was entered. The return value of
4332`lazy-completion-table' must be used to initialize the value of VAR.
4333
4334** Abbrev changes:
4335
4336*** `define-abbrev' now accepts an optional argument SYSTEM-FLAG.
4337
4338If non-nil, this marks the abbrev as a "system" abbrev, which means
4339that it won't be stored in the user's abbrevs file if he saves the
4340abbrevs. Major modes that predefine some abbrevs should always
4341specify this flag.
4342
4343*** The new function `copy-abbrev-table' copies an abbrev table.
4344
4345It returns a new abbrev table that is a copy of a given abbrev table.
4346
4347** Enhancements to keymaps.
4348
4349*** Cleaner way to enter key sequences.
4350
4351You can enter a constant key sequence in a more natural format, the
4352same one used for saving keyboard macros, using the macro `kbd'. For
4353example,
4354
4355(kbd "C-x C-f") => "\^x\^f"
4356
4357Actually, this format has existed since Emacs 20.1.
4358
4359*** Interactive commands can be remapped through keymaps.
4360
4361This is an alternative to using `defadvice' or `substitute-key-definition'
4362to modify the behavior of a key binding using the normal keymap
4363binding and lookup functionality.
4364
4365When a key sequence is bound to a command, and that command is
4366remapped to another command, that command is run instead of the
4367original command.
4368
4369Example:
4370Suppose that minor mode `my-mode' has defined the commands
4371`my-kill-line' and `my-kill-word', and it wants C-k (and any other key
4372bound to `kill-line') to run the command `my-kill-line' instead of
4373`kill-line', and likewise it wants to run `my-kill-word' instead of
4374`kill-word'.
4375
4376Instead of rebinding C-k and the other keys in the minor mode map,
4377command remapping allows you to directly map `kill-line' into
4378`my-kill-line' and `kill-word' into `my-kill-word' using `define-key':
4379
4380 (define-key my-mode-map [remap kill-line] 'my-kill-line)
4381 (define-key my-mode-map [remap kill-word] 'my-kill-word)
4382
4383When `my-mode' is enabled, its minor mode keymap is enabled too. So
4384when the user types C-k, that runs the command `my-kill-line'.
4385
4386Only one level of remapping is supported. In the above example, this
4387means that if `my-kill-line' is remapped to `other-kill', then C-k still
4388runs `my-kill-line'.
4389
4390The following changes have been made to provide command remapping:
4391
4392- Command remappings are defined using `define-key' with a prefix-key
4393 `remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD
4394 to definition DEF in keymap MAP. The definition is not limited to
4395 another command; it can be anything accepted for a normal binding.
4396
4397- The new function `command-remapping' returns the binding for a
4398 remapped command in the current keymaps, or nil if not remapped.
4399
4400- `key-binding' now remaps interactive commands unless the optional
4401 third argument NO-REMAP is non-nil.
4402
4403- `where-is-internal' now returns nil for a remapped command (e.g.
4404 `kill-line', when `my-mode' is enabled), and the actual key binding for
4405 the command it is remapped to (e.g. C-k for my-kill-line).
4406 It also has a new optional fifth argument, NO-REMAP, which inhibits
4407 remapping if non-nil (e.g. it returns "C-k" for `kill-line', and
4408 "<kill-line>" for `my-kill-line').
4409
4410- The new variable `this-original-command' contains the original
4411 command before remapping. It is equal to `this-command' when the
4412 command was not remapped.
4413
4414*** The definition of a key-binding passed to define-key can use XEmacs-style
4415key-sequences, such as [(control a)].
4416
4417*** New keymaps for typing file names
4418
4419Two new keymaps, `minibuffer-local-filename-completion-map' and
4420`minibuffer-local-must-match-filename-map', apply whenever
4421Emacs reads a file name in the minibuffer. These key maps override
4422the usual binding of SPC to `minibuffer-complete-word' (so that file
4423names with embedded spaces could be typed without the need to quote
4424the spaces).
4425
4426*** New function `current-active-maps' returns a list of currently
4427active keymaps.
4428
4429*** New function `describe-buffer-bindings' inserts the list of all
4430defined keys and their definitions.
4431
4432*** New function `keymap-prompt' returns the prompt string of a keymap.
4433
4434*** If text has a `keymap' property, that keymap takes precedence
4435over minor mode keymaps.
4436
4437*** The `keymap' property now also works at the ends of overlays and
4438text properties, according to their stickiness. This also means that it
4439works with empty overlays. The same hold for the `local-map' property.
4440
4441*** `key-binding' will now look up mouse-specific bindings. The
4442keymaps consulted by `key-binding' will get adapted if the key
4443sequence is started with a mouse event. Instead of letting the click
4444position be determined from the key sequence itself, it is also
4445possible to specify it with an optional argument explicitly.
4446
4447*** `define-key-after' now accepts keys longer than 1.
4448
4449*** (map-keymap FUNCTION KEYMAP) applies the function to each binding
4450in the keymap.
4451
4452*** New variable `emulation-mode-map-alists'.
4453
4454Lisp packages using many minor mode keymaps can now maintain their own
4455keymap alist separate from `minor-mode-map-alist' by adding their
4456keymap alist to this list.
4457
4458*** Dense keymaps now handle inheritance correctly.
4459
4460Previously a dense keymap would hide all of the simple-char key
4461bindings of the parent keymap.
4462
4463** Enhancements to process support
4464
4465*** Adaptive read buffering of subprocess output.
4466
4467On some systems, when Emacs reads the output from a subprocess, the
4468output data is read in very small blocks, potentially resulting in
4469very poor performance. This behavior can be remedied to some extent
4470by setting the new variable `process-adaptive-read-buffering' to a
4471non-nil value (the default), as it will automatically delay reading
4472from such processes, allowing them to produce more output before
4473Emacs tries to read it.
4474
4475*** Processes now have an associated property list where programs can
4476maintain process state and other per-process related information.
4477
4478Use the new functions `process-get' and `process-put' to access, add,
4479and modify elements on this property list. Use the new functions
4480`process-plist' and `set-process-plist' to access and replace the
4481entire property list of a process.
4482
4483*** Function `list-processes' now has an optional argument; if non-nil,
4484it lists only the processes whose query-on-exit flag is set.
4485
4486*** New fns `set-process-query-on-exit-flag' and `process-query-on-exit-flag'.
4487
4488These replace the old function `process-kill-without-query'. That
4489function is still supported, but new code should use the new
4490functions.
4491
4492*** The new function `call-process-shell-command'.
4493
4494This executes a shell command synchronously in a separate process.
4495
4496*** The new function `process-file' is similar to `call-process', but
4497obeys file handlers. The file handler is chosen based on
4498`default-directory'.
4499
4500*** Function `signal-process' now accepts a process object or process
4501name in addition to a process id to identify the signaled process.
4502
4503*** Function `accept-process-output' has a new optional fourth arg
4504JUST-THIS-ONE. If non-nil, only output from the specified process
4505is handled, suspending output from other processes. If value is an
4506integer, also inhibit running timers. This feature is generally not
4507recommended, but may be necessary for specific applications, such as
4508speech synthesis.
4509
4510*** A process filter function gets the output as multibyte string
4511if the process specifies t for its filter's multibyteness.
4512
4513That multibyteness is decided by the value of
4514`default-enable-multibyte-characters' when the process is created, and
4515you can change it later with `set-process-filter-multibyte'.
4516
4517*** The new function `set-process-filter-multibyte' sets the
4518multibyteness of the strings passed to the process's filter.
4519
4520*** The new function `process-filter-multibyte-p' returns the
4521multibyteness of the strings passed to the process's filter.
4522
4523*** If a process's coding system is `raw-text' or `no-conversion' and its
4524buffer is multibyte, the output of the process is at first converted
4525to multibyte by `string-to-multibyte' then inserted in the buffer.
4526Previously, it was converted to multibyte by `string-as-multibyte',
4527which was not compatible with the behavior of file reading.
4528
4529** Enhanced networking support.
4530
4531*** The new `make-network-process' function makes network connections.
4532It allows opening of stream and datagram connections to a server, as well as
4533create a stream or datagram server inside Emacs.
4534
4535- A server is started using :server t arg.
4536- Datagram connection is selected using :type 'datagram arg.
4537- A server can open on a random port using :service t arg.
4538- Local sockets are supported using :family 'local arg.
4539- IPv6 is supported (when available). You may explicitly select IPv6
4540 using :family 'ipv6 arg.
4541- Non-blocking connect is supported using :nowait t arg.
4542- The process' property list can be initialized using :plist PLIST arg;
4543 a copy of the server process' property list is automatically inherited
4544 by new client processes created to handle incoming connections.
4545
4546To test for the availability of a given feature, use featurep like this:
4547 (featurep 'make-network-process '(:type datagram))
4548 (featurep 'make-network-process '(:family ipv6))
4549
4550*** The old `open-network-stream' now uses `make-network-process'.
4551
4552*** `process-contact' has an optional KEY argument.
4553
4554Depending on this argument, you can get the complete list of network
4555process properties or a specific property. Using :local or :remote as
4556the KEY, you get the address of the local or remote end-point.
4557
4558An Inet address is represented as a 5 element vector, where the first
45594 elements contain the IP address and the fifth is the port number.
4560
4561*** New functions `stop-process' and `continue-process'.
4562
4563These functions stop and restart communication through a network
4564connection. For a server process, no connections are accepted in the
4565stopped state. For a client process, no input is received in the
4566stopped state.
4567
4568*** New function `format-network-address'.
4569
4570This function reformats the Lisp representation of a network address
4571to a printable string. For example, an IP address A.B.C.D and port
4572number P is represented as a five element vector [A B C D P], and the
4573printable string returned for this vector is "A.B.C.D:P". See the doc
4574string for other formatting options.
4575
4576*** New function `network-interface-list'.
4577
4578This function returns a list of network interface names and their
4579current network addresses.
4580
4581*** New function `network-interface-info'.
4582
4583This function returns the network address, hardware address, current
4584status, and other information about a specific network interface.
4585
4586*** New functions `process-datagram-address', `set-process-datagram-address'.
4587
4588These functions are used with datagram-based network processes to get
4589and set the current address of the remote partner.
4590
4591*** Deleting a network process with `delete-process' calls the sentinel.
4592
4593The status message passed to the sentinel for a deleted network
4594process is "deleted". The message passed to the sentinel when the
4595connection is closed by the remote peer has been changed to
4596"connection broken by remote peer".
4597
4598** Using window objects:
4599
4600*** You can now make a window as short as one line.
4601
4602A window that is just one line tall does not display either a mode
4603line or a header line, even if the variables `mode-line-format' and
4604`header-line-format' call for them. A window that is two lines tall
4605cannot display both a mode line and a header line at once; if the
4606variables call for both, only the mode line actually appears.
4607
4608*** The new function `window-inside-edges' returns the edges of the
4609actual text portion of the window, not including the scroll bar or
4610divider line, the fringes, the display margins, the header line and
4611the mode line.
4612
4613*** The new functions `window-pixel-edges' and `window-inside-pixel-edges'
4614return window edges in units of pixels, rather than columns and lines.
4615
4616*** New function `window-body-height'.
4617
4618This is like `window-height' but does not count the mode line or the
4619header line.
4620
4621*** The new function `adjust-window-trailing-edge' moves the right
4622or bottom edge of a window. It does not move other window edges.
4623
4624*** The new macro `with-selected-window' temporarily switches the
4625selected window without impacting the order of `buffer-list'.
4626It saves and restores the current buffer, too.
4627
4628*** `select-window' takes an optional second argument NORECORD.
4629
4630This is like `switch-to-buffer'.
4631
4632*** `save-selected-window' now saves and restores the selected window
4633of every frame. This way, it restores everything that can be changed
4634by calling `select-window'. It also saves and restores the current
4635buffer.
4636
4637*** `set-window-buffer' has an optional argument KEEP-MARGINS.
4638
4639If non-nil, that says to preserve the window's current margin, fringe,
4640and scroll-bar settings.
4641
4642*** The new function `window-tree' returns a frame's window tree.
4643
4644*** The functions `get-lru-window' and `get-largest-window' take an optional
4645argument `dedicated'. If non-nil, those functions do not ignore
4646dedicated windows.
4647
4648** Customizable fringe bitmaps
4649
4650*** There are new display properties, `left-fringe' and `right-fringe',
4651that can be used to show a specific bitmap in the left or right fringe
4652bitmap of the display line.
4653
4654Format is `display (left-fringe BITMAP [FACE])', where BITMAP is a
4655symbol identifying a fringe bitmap, either built-in or defined with
4656`define-fringe-bitmap', and FACE is an optional face name to be used
4657for displaying the bitmap instead of the default `fringe' face.
4658When specified, FACE is automatically merged with the `fringe' face.
4659
4660*** New buffer-local variables `fringe-indicator-alist' and
4661`fringe-cursor-alist' maps between logical (internal) fringe indicator
4662and cursor symbols and the actual fringe bitmaps to be displayed.
4663This decouples the logical meaning of the fringe indicators from the
4664physical appearance, as well as allowing different fringe bitmaps to
4665be used in different windows showing different buffers.
4666
4667*** New function `define-fringe-bitmap' can now be used to create new
4668fringe bitmaps, as well as change the built-in fringe bitmaps.
4669
4670*** New function `destroy-fringe-bitmap' deletes a fringe bitmap
4671or restores a built-in one to its default value.
4672
4673*** New function `set-fringe-bitmap-face' specifies the face to be
4674used for a specific fringe bitmap. The face is automatically merged
4675with the `fringe' face, so normally, the face should only specify the
4676foreground color of the bitmap.
4677
4678*** New function `fringe-bitmaps-at-pos' returns the current fringe
4679bitmaps in the display line at a given buffer position.
4680
4681** Other window fringe features:
4682
4683*** Controlling the default left and right fringe widths.
4684
4685The default left and right fringe widths for all windows of a frame
4686can now be controlled by setting the `left-fringe' and `right-fringe'
4687frame parameters to an integer value specifying the width in pixels.
4688Setting the width to 0 effectively removes the corresponding fringe.
4689
4690The actual default fringe widths for the frame may deviate from the
4691specified widths, since the combined fringe widths must match an
4692integral number of columns. The extra width is distributed evenly
4693between the left and right fringe. To force a specific fringe width,
4694specify the width as a negative integer (if both widths are negative,
4695only the left fringe gets the specified width).
4696
4697Setting the width to nil (the default), restores the default fringe
4698width which is the minimum number of pixels necessary to display any
4699of the currently defined fringe bitmaps. The width of the built-in
4700fringe bitmaps is 8 pixels.
4701
4702*** Per-window fringe and scrollbar settings
4703
4704**** Windows can now have their own individual fringe widths and
4705position settings.
4706
4707To control the fringe widths of a window, either set the buffer-local
4708variables `left-fringe-width', `right-fringe-width', or call
4709`set-window-fringes'.
4710
4711To control the fringe position in a window, that is, whether fringes
4712are positioned between the display margins and the window's text area,
4713or at the edges of the window, either set the buffer-local variable
4714`fringes-outside-margins' or call `set-window-fringes'.
4715
4716The function `window-fringes' can be used to obtain the current
4717settings. To make `left-fringe-width', `right-fringe-width', and
4718`fringes-outside-margins' take effect, you must set them before
4719displaying the buffer in a window, or use `set-window-buffer' to force
4720an update of the display margins.
4721
4722**** Windows can now have their own individual scroll-bar settings
4723controlling the width and position of scroll-bars.
4724
4725To control the scroll-bar of a window, either set the buffer-local
4726variables `scroll-bar-mode' and `scroll-bar-width', or call
4727`set-window-scroll-bars'. The function `window-scroll-bars' can be
4728used to obtain the current settings. To make `scroll-bar-mode' and
4729`scroll-bar-width' take effect, you must set them before displaying
4730the buffer in a window, or use `set-window-buffer' to force an update
4731of the display margins.
4732
4733** Redisplay features:
4734
4735*** `sit-for' can now be called with args (SECONDS &optional NODISP).
4736
4737*** Iconifying or deiconifying a frame no longer makes sit-for return.
4738
4739*** New function `redisplay' causes an immediate redisplay if no input is
4740available, equivalent to (sit-for 0). The call (redisplay t) forces
4741an immediate redisplay even if input is pending.
4742
4743*** New function `force-window-update' can initiate a full redisplay of
4744one or all windows. Normally, this is not needed as changes in window
4745contents are detected automatically. However, certain implicit
4746changes to mode lines, header lines, or display properties may require
4747forcing an explicit window update.
4748
4749*** (char-displayable-p CHAR) returns non-nil if Emacs ought to be able
4750to display CHAR. More precisely, if the selected frame's fontset has
4751a font to display the character set that CHAR belongs to.
4752
4753Fontsets can specify a font on a per-character basis; when the fontset
4754does that, this value cannot be accurate.
4755
4756*** You can define multiple overlay arrows via the new
4757variable `overlay-arrow-variable-list'.
4758
4759It contains a list of variables which contain overlay arrow position
4760markers, including the original `overlay-arrow-position' variable.
4761
4762Each variable on this list can have individual `overlay-arrow-string'
4763and `overlay-arrow-bitmap' properties that specify an overlay arrow
4764string (for non-window terminals) or fringe bitmap (for window
4765systems) to display at the corresponding overlay arrow position.
4766If either property is not set, the default `overlay-arrow-string' or
4767'overlay-arrow-fringe-bitmap' will be used.
4768
4769*** New `line-height' and `line-spacing' properties for newline characters
4770
4771A newline can now have `line-height' and `line-spacing' text or overlay
4772properties that control the height of the corresponding display row.
4773
4774If the `line-height' property value is t, the newline does not
4775contribute to the height of the display row; instead the height of the
4776newline glyph is reduced. Also, a `line-spacing' property on this
4777newline is ignored. This can be used to tile small images or image
4778slices without adding blank areas between the images.
4779
4780If the `line-height' property value is a positive integer, the value
4781specifies the minimum line height in pixels. If necessary, the line
4782height it increased by increasing the line's ascent.
4783
4784If the `line-height' property value is a float, the minimum line
4785height is calculated by multiplying the default frame line height by
4786the given value.
4787
4788If the `line-height' property value is a cons (FACE . RATIO), the
4789minimum line height is calculated as RATIO * height of named FACE.
4790RATIO is int or float. If FACE is t, it specifies the current face.
4791
4792If the `line-height' property value is a cons (nil . RATIO), the line
4793height is calculated as RATIO * actual height of the line's contents.
4794
4795If the `line-height' value is a cons (HEIGHT . TOTAL), HEIGHT specifies
4796the line height as described above, while TOTAL is any of the forms
4797described above and specifies the total height of the line, causing a
4798varying number of pixels to be inserted after the line to make it line
4799exactly that many pixels high.
4800
4801If the `line-spacing' property value is an positive integer, the value
4802is used as additional pixels to insert after the display line; this
4803overrides the default frame `line-spacing' and any buffer local value of
4804the `line-spacing' variable.
4805
4806If the `line-spacing' property is a float or cons, the line spacing
4807is calculated as specified above for the `line-height' property.
4808
4809*** The buffer local `line-spacing' variable can now have a float value,
4810which is used as a height relative to the default frame line height.
4811
4812*** Enhancements to stretch display properties
4813
4814The display property stretch specification form `(space PROPS)', where
4815PROPS is a property list, now allows pixel based width and height
4816specifications, as well as enhanced horizontal text alignment.
4817
4818The value of these properties can now be a (primitive) expression
4819which is evaluated during redisplay. The following expressions
4820are supported:
4821
4822EXPR ::= NUM | (NUM) | UNIT | ELEM | POS | IMAGE | FORM
4823NUM ::= INTEGER | FLOAT | SYMBOL
4824UNIT ::= in | mm | cm | width | height
4825ELEM ::= left-fringe | right-fringe | left-margin | right-margin
4826 | scroll-bar | text
4827POS ::= left | center | right
4828FORM ::= (NUM . EXPR) | (OP EXPR ...)
4829OP ::= + | -
4830
4831The form `NUM' specifies a fractional width or height of the default
4832frame font size. The form `(NUM)' specifies an absolute number of
4833pixels. If a symbol is specified, its buffer-local variable binding
4834is used. The `in', `mm', and `cm' units specifies the number of
4835pixels per inch, milli-meter, and centi-meter, resp. The `width' and
4836`height' units correspond to the width and height of the current face
4837font. An image specification corresponds to the width or height of
4838the image.
4839
4840The `left-fringe', `right-fringe', `left-margin', `right-margin',
4841`scroll-bar', and `text' elements specify to the width of the
4842corresponding area of the window.
4843
4844The `left', `center', and `right' positions can be used with :align-to
4845to specify a position relative to the left edge, center, or right edge
4846of the text area. One of the above window elements (except `text')
4847can also be used with :align-to to specify that the position is
4848relative to the left edge of the given area. Once the base offset for
4849a relative position has been set (by the first occurrence of one of
4850these symbols), further occurrences of these symbols are interpreted as
4851the width of the area.
4852
4853For example, to align to the center of the left-margin, use
4854 :align-to (+ left-margin (0.5 . left-margin))
4855
4856If no specific base offset is set for alignment, it is always relative
4857to the left edge of the text area. For example, :align-to 0 in a
4858header line aligns with the first text column in the text area.
4859
4860The value of the form `(NUM . EXPR)' is the value of NUM multiplied by
4861the value of the expression EXPR. For example, (2 . in) specifies a
4862width of 2 inches, while (0.5 . IMAGE) specifies half the width (or
4863height) of the specified image.
4864
4865The form `(+ EXPR ...)' adds up the value of the expressions.
4866The form `(- EXPR ...)' negates or subtracts the value of the expressions.
4867
4868*** Normally, the cursor is displayed at the end of any overlay and
4869text property string that may be present at the current window
4870position. The cursor can now be placed on any character of such
4871strings by giving that character a non-nil `cursor' text property.
4872
4873*** The display space :width and :align-to text properties are now
4874supported on text terminals.
4875
4876*** Support for displaying image slices
4877
4878**** New display property (slice X Y WIDTH HEIGHT) can be used with
4879an image property to display only a specific slice of the image.
4880
4881**** Function `insert-image' has new optional fourth arg to
4882specify image slice (X Y WIDTH HEIGHT).
4883
4884**** New function `insert-sliced-image' inserts a given image as a
4885specified number of evenly sized slices (rows x columns).
4886
4887*** Images can now have an associated image map via the :map property.
4888
4889An image map is an alist where each element has the format (AREA ID PLIST).
4890An AREA is specified as either a rectangle, a circle, or a polygon:
4891A rectangle is a cons (rect . ((X0 . Y0) . (X1 . Y1))) specifying the
4892pixel coordinates of the upper left and bottom right corners.
4893A circle is a cons (circle . ((X0 . Y0) . R)) specifying the center
4894and the radius of the circle; R can be a float or integer.
4895A polygon is a cons (poly . [X0 Y0 X1 Y1 ...]) where each pair in the
4896vector describes one corner in the polygon.
4897
4898When the mouse pointer is above a hot-spot area of an image, the
4899PLIST of that hot-spot is consulted; if it contains a `help-echo'
4900property it defines a tool-tip for the hot-spot, and if it contains
4901a `pointer' property, it defines the shape of the mouse cursor when
4902it is over the hot-spot. See the variable `void-area-text-pointer'
4903for possible pointer shapes.
4904
4905When you click the mouse when the mouse pointer is over a hot-spot,
4906an event is composed by combining the ID of the hot-spot with the
4907mouse event, e.g. [area4 mouse-1] if the hot-spot's ID is `area4'.
4908
4909*** The function `find-image' now searches in etc/images/ and etc/.
4910The new variable `image-load-path' is a list of locations in which to
4911search for image files. The default is to search in etc/images, then
4912in etc/, and finally in the directories specified by `load-path'.
4913Subdirectories of etc/ and etc/images are not recursively searched; if
4914you put an image file in a subdirectory, you have to specify it
4915explicitly; for example, if an image is put in etc/images/foo/bar.xpm:
4916
4917 (defimage foo-image '((:type xpm :file "foo/bar.xpm")))
4918
4919Note that all images formerly located in the lisp directory have been
4920moved to etc/images.
4921
4922*** New function `image-load-path-for-library' returns a suitable
4923search path for images relative to library. This function is useful in
4924external packages to save users from having to update
4925`image-load-path'.
4926
4927*** The new variable `max-image-size' defines the maximum size of
4928images that Emacs will load and display.
4929
4930*** The new variable `display-mm-dimensions-alist' can be used to
4931override incorrect graphical display dimensions returned by functions
4932`display-mm-height' and `display-mm-width'.
4933
4934** Mouse pointer features:
4935
4936*** The mouse pointer shape in void text areas (i.e. after the end of a
4937line or below the last line in the buffer) of the text window is now
4938controlled by the new variable `void-text-area-pointer'. The default
4939is to use the `arrow' (non-text) pointer. Other choices are `text'
4940(or nil), `hand', `vdrag', `hdrag', `modeline', and `hourglass'.
4941
4942*** The mouse pointer shape over an image can now be controlled by the
4943:pointer image property.
4944
4945*** The mouse pointer shape over ordinary text or images can now be
4946controlled/overridden via the `pointer' text property.
4947
4948** Mouse event enhancements:
4949
4950*** All mouse events now include a buffer position regardless of where
4951you clicked. For mouse clicks in window margins and fringes, this is
4952a sensible buffer position corresponding to the surrounding text.
4953
4954*** Mouse events for clicks on window fringes now specify `left-fringe'
4955or `right-fringe' as the area.
4956
4957*** Mouse events include actual glyph column and row for all event types
4958and all areas.
4959
4960*** Mouse events can now indicate an image object clicked on.
4961
4962*** Mouse events include relative X and Y pixel coordinates relative to
4963the top left corner of the object (image or character) clicked on.
4964
4965*** Mouse events include the pixel width and height of the object
4966(image or character) clicked on.
4967
4968*** Function `mouse-set-point' now works for events outside text area.
4969
4970*** `posn-point' now returns buffer position for non-text area events.
4971
4972*** New function `posn-area' returns window area clicked on (nil means
4973text area).
4974
4975*** New function `posn-actual-col-row' returns the actual glyph coordinates
4976of the mouse event position.
4977
4978*** New functions 'posn-object', 'posn-object-x-y', 'posn-object-width-height'.
4979
4980These return the image or string object of a mouse click, the X and Y
4981pixel coordinates relative to the top left corner of that object, and
4982the total width and height of that object.
4983
4984** Text property and overlay changes:
4985
4986*** Arguments for `remove-overlays' are now optional, so that you can
4987remove all overlays in the buffer with just (remove-overlays).
4988
4989*** New variable `char-property-alias-alist'.
4990
4991This variable allows you to create alternative names for text
4992properties. It works at the same level as `default-text-properties',
4993although it applies to overlays as well. This variable was introduced
4994to implement the `font-lock-face' property.
4995
4996*** New function `get-char-property-and-overlay' accepts the same
4997arguments as `get-char-property' and returns a cons whose car is the
4998return value of `get-char-property' called with those arguments and
4999whose cdr is the overlay in which the property was found, or nil if
5000it was found as a text property or not found at all.
5001
5002*** The new function `remove-list-of-text-properties'.
5003
5004It is like `remove-text-properties' except that it takes a list of
5005property names as argument rather than a property list.
5006
5007** Face changes
5008
5009*** The variable `facemenu-unlisted-faces' has been removed.
5010Emacs has a lot more faces than in the past, and nearly all of them
5011needed to be excluded. The new variable `facemenu-listed-faces' lists
5012the faces to include in the face menu.
5013
5014*** The new face attribute condition `min-colors' can be used to tailor
5015the face color to the number of colors supported by a display, and
5016define the foreground and background colors accordingly so that they
5017look best on a terminal that supports at least this many colors. This
5018is now the preferred method for defining default faces in a way that
5019makes a good use of the capabilities of the display.
5020
5021*** New function `display-supports-face-attributes-p' can be used to test
5022whether a given set of face attributes is actually displayable.
5023
5024A new predicate `supports' has also been added to the `defface' face
5025specification language, which can be used to do this test for faces
5026defined with `defface'.
5027
5028*** The special treatment of faces whose names are of the form `fg:COLOR'
5029or `bg:COLOR' has been removed. Lisp programs should use the
5030`defface' facility for defining faces with specific colors, or use
5031the feature of specifying the face attributes :foreground and :background
5032directly in the `face' property instead of using a named face.
5033
5034*** The first face specification element in a defface can specify
5035`default' instead of frame classification. Then its attributes act as
5036defaults that apply to all the subsequent cases (and can be overridden
5037by them).
5038
5039*** The function `face-differs-from-default-p' now truly checks
5040whether the given face displays differently from the default face or
5041not (previously it did only a very cursory check).
5042
5043*** `face-attribute', `face-foreground', `face-background', `face-stipple'.
5044
5045These now accept a new optional argument, INHERIT, which controls how
5046face inheritance is used when determining the value of a face
5047attribute.
5048
5049*** New functions `face-attribute-relative-p' and `merge-face-attribute'
5050help with handling relative face attributes.
5051
5052*** The priority of faces in an :inherit attribute face list is reversed.
5053
5054If a face contains an :inherit attribute with a list of faces, earlier
5055faces in the list override later faces in the list; in previous
5056releases of Emacs, the order was the opposite. This change was made
5057so that :inherit face lists operate identically to face lists in text
5058`face' properties.
5059
5060*** The variable `face-font-rescale-alist' specifies how much larger
5061(or smaller) font we should use. For instance, if the value is
5062'((SOME-FONTNAME-PATTERN . 1.3)) and a face requests a font of 10
5063point, we actually use a font of 13 point if the font matches
5064SOME-FONTNAME-PATTERN.
5065
5066*** On terminals, faces with the :inverse-video attribute are displayed
5067with swapped foreground and background colors even when one of them is
5068not specified. In previous releases of Emacs, if either foreground
5069or background color was unspecified, colors were not swapped. This
5070was inconsistent with the face behavior under X.
5071
5072*** `set-fontset-font', `fontset-info', `fontset-font' now operate on
5073the default fontset if the argument NAME is nil..
5074
5075** Font-Lock changes:
5076
5077*** New special text property `font-lock-face'.
5078
5079This property acts like the `face' property, but it is controlled by
5080M-x font-lock-mode. It is not, strictly speaking, a builtin text
5081property. Instead, it is implemented inside font-core.el, using the
5082new variable `char-property-alias-alist'.
5083
5084*** font-lock can manage arbitrary text-properties beside `face'.
5085
5086**** the FACENAME returned in `font-lock-keywords' can be a list of the
5087form (face FACE PROP1 VAL1 PROP2 VAL2 ...) so you can set other
5088properties than `face'.
5089
5090**** `font-lock-extra-managed-props' can be set to make sure those
5091extra properties are automatically cleaned up by font-lock.
5092
5093*** jit-lock obeys a new text-property `jit-lock-defer-multiline'.
5094
5095If a piece of text with that property gets contextually refontified
5096(see `jit-lock-defer-contextually'), then all of that text will
5097be refontified. This is useful when the syntax of a textual element
5098depends on text several lines further down (and when `font-lock-multiline'
5099is not appropriate to solve that problem). For example in Perl:
5100
5101 s{
5102 foo
5103 }{
5104 bar
5105 }e
5106
5107Adding/removing the last `e' changes the `bar' from being a piece of
5108text to being a piece of code, so you'd put a `jit-lock-defer-multiline'
5109property over the second half of the command to force (deferred)
5110refontification of `bar' whenever the `e' is added/removed.
5111
5112*** `font-lock-extend-region-functions' makes it possible to alter the way
5113the fontification region is chosen. This can be used to prevent rounding
5114up to whole lines, or to extend the region to include all related lines
5115of multiline constructs so that such constructs get properly recognized.
5116
5117** Major mode mechanism changes:
5118
5119*** New variable `magic-mode-alist' determines major mode for a file by
5120looking at the file contents. It takes precedence over `auto-mode-alist'.
5121
5122*** New variable `magic-fallback-mode-alist' determines major mode for a file by
5123looking at the file contents. It is handled after `auto-mode-alist',
5124only if `auto-mode-alist' (and `magic-mode-alist') says nothing about the file.
5125
5126*** XML or SGML major mode is selected when file starts with an `<?xml'
5127or `<!DOCTYPE' declaration.
5128
5129*** An interpreter magic line (if present) takes precedence over the
5130file name when setting the major mode.
5131
5132*** If new variable `auto-mode-case-fold' is set to a non-nil value,
5133Emacs will perform a second case-insensitive search through
5134`auto-mode-alist' if the first case-sensitive search fails. This
5135means that a file FILE.TXT is opened in text-mode, and a file
5136PROG.HTML is opened in html-mode. Note however, that independent of
5137this setting, *.C files are usually recognized as C++ files. It also
5138has no effect on systems with case-insensitive file names.
5139
5140*** All major mode functions should now run the new normal hook
5141`after-change-major-mode-hook', at their very end, after the mode
5142hooks. `run-mode-hooks' does this automatically.
5143
5144*** Major modes can define `eldoc-documentation-function'
5145locally to provide Eldoc functionality by some method appropriate to
5146the language.
5147
5148*** Use the new function `run-mode-hooks' to run the major mode's mode hook.
5149
5150*** The new function `run-mode-hooks' and the new macro `delay-mode-hooks'
5151are used by `define-derived-mode' to make sure the mode hook for the
5152parent mode is run at the end of the child mode.
5153
5154*** `define-derived-mode' by default creates a new empty abbrev table.
5155It does not copy abbrevs from the parent mode's abbrev table.
5156
5157*** If a major mode function has a non-nil `no-clone-indirect'
5158property, `clone-indirect-buffer' signals an error if you use
5159it in that buffer.
5160
5161** Minor mode changes:
5162
5163*** `define-minor-mode' now accepts arbitrary additional keyword arguments
5164and simply passes them to `defcustom', if applicable.
5165
5166*** `define-globalized-minor-mode'.
5167
5168This is a new name for what was formerly called
5169`easy-mmode-define-global-mode'. The old name remains as an alias.
5170
5171*** `minor-mode-list' now holds a list of minor mode commands.
5172
5173** Command loop changes:
5174
5175*** The new function `called-interactively-p' does what many people
5176have mistakenly believed `interactive-p' to do: it returns t if the
5177calling function was called through `call-interactively'.
5178
5179Only use this when you cannot solve the problem by adding a new
5180INTERACTIVE argument to the command.
5181
5182*** The function `commandp' takes an additional optional argument.
5183
5184If it is non-nil, then `commandp' checks for a function that could be
5185called with `call-interactively', and does not return t for keyboard
5186macros.
5187
5188*** When a command returns, the command loop moves point out from
5189within invisible text, in the same way it moves out from within text
5190covered by an image or composition property.
5191
5192This makes it generally unnecessary to mark invisible text as intangible.
5193This is particularly good because the intangible property often has
5194unexpected side-effects since the property applies to everything
5195(including `goto-char', ...) whereas this new code is only run after
5196`post-command-hook' and thus does not care about intermediate states.
5197
5198*** If a command sets `transient-mark-mode' to `only', that
5199enables Transient Mark mode for the following command only.
5200During that following command, the value of `transient-mark-mode'
5201is `identity'. If it is still `identity' at the end of the command,
5202the next return to the command loop changes to nil.
5203
5204*** Both the variable and the function `disabled-command-hook' have
5205been renamed to `disabled-command-function'. The variable
5206`disabled-command-hook' has been kept as an obsolete alias.
5207
5208*** `emacsserver' now runs `pre-command-hook' and `post-command-hook'
5209when it receives a request from emacsclient.
5210
5211*** `current-idle-time' reports how long Emacs has been idle.
5212
5213** Lisp file loading changes:
5214
5215*** `load-history' can now have elements of the form (t . FUNNAME),
5216which means FUNNAME was previously defined as an autoload (before the
5217current file redefined it).
5218
5219*** `load-history' now records (defun . FUNNAME) when a function is
5220defined. For a variable, it records just the variable name.
5221
5222*** The function `symbol-file' can now search specifically for function,
5223variable or face definitions.
5224
5225*** `provide' and `featurep' now accept an optional second argument
5226to test/provide subfeatures. Also `provide' now checks `after-load-alist'
5227and runs any code associated with the provided feature.
5228
5229*** The variable `recursive-load-depth-limit' has been deleted.
5230Emacs now signals an error if the same file is loaded with more
5231than 3 levels of nesting.
5232
5233** Byte compiler changes:
5234
5235*** The byte compiler now displays the actual line and character
5236position of errors, where possible. Additionally, the form of its
5237warning and error messages have been brought into line with GNU standards
5238for these. As a result, you can use next-error and friends on the
5239compilation output buffer.
5240
5241*** The new macro `with-no-warnings' suppresses all compiler warnings
5242inside its body. In terms of execution, it is equivalent to `progn'.
5243
5244*** You can avoid warnings for possibly-undefined symbols with a
5245simple convention that the compiler understands. (This is mostly
5246useful in code meant to be portable to different Emacs versions.)
5247Write forms like the following, or code that macroexpands into such
5248forms:
5249
5250 (if (fboundp 'foo) <then> <else>)
5251 (if (boundp 'foo) <then> <else)
5252
5253In the first case, using `foo' as a function inside the <then> form
5254won't produce a warning if it's not defined as a function, and in the
5255second case, using `foo' as a variable won't produce a warning if it's
5256unbound. The test must be in exactly one of the above forms (after
5257macro expansion), but such tests can be nested. Note that `when' and
5258`unless' expand to `if', but `cond' doesn't.
5259
5260*** `(featurep 'xemacs)' is treated by the compiler as nil. This
5261helps to avoid noisy compiler warnings in code meant to run under both
5262Emacs and XEmacs and can sometimes make the result significantly more
5263efficient. Since byte code from recent versions of XEmacs won't
5264generally run in Emacs and vice versa, this optimization doesn't lose
5265you anything.
5266
5267*** The local variable `no-byte-compile' in Lisp files is now obeyed.
5268
5269*** When a Lisp file uses CL functions at run-time, compiling the file
5270now issues warnings about these calls, unless the file performs
5271(require 'cl) when loaded.
5272
5273** Frame operations:
5274
5275*** New functions `frame-current-scroll-bars' and `window-current-scroll-bars'.
5276
5277These functions return the current locations of the vertical and
5278horizontal scroll bars in a frame or window.
5279
5280*** The new function `modify-all-frames-parameters' modifies parameters
5281for all (existing and future) frames.
5282
5283*** The new frame parameter `tty-color-mode' specifies the mode to use
5284for color support on character terminal frames. Its value can be a
5285number of colors to support, or a symbol. See the Emacs Lisp
5286Reference manual for more detailed documentation.
5287
5288*** When using non-toolkit scroll bars with the default width,
5289the `scroll-bar-width' frame parameter value is nil.
5290
5291** Mode line changes:
5292
5293*** New function `format-mode-line'.
5294
5295This returns the mode line or header line of the selected (or a
5296specified) window as a string with or without text properties.
5297
5298*** The new mode-line construct `(:propertize ELT PROPS...)' can be
5299used to add text properties to mode-line elements.
5300
5301*** The new `%i' and `%I' constructs for `mode-line-format' can be used
5302to display the size of the accessible part of the buffer on the mode
5303line.
5304
5305*** Mouse-face on mode-line (and header-line) is now supported.
5306
5307** Menu manipulation changes:
5308
5309*** To manipulate the File menu using easy-menu, you must specify the
5310proper name "file". In previous Emacs versions, you had to specify
5311"files", even though the menu item itself was changed to say "File"
5312several versions ago.
5313
5314*** The dummy function keys made by easy-menu are now always lower case.
5315If you specify the menu item name "Ada", for instance, it uses `ada'
5316as the "key" bound by that key binding.
5317
5318This is relevant only if Lisp code looks for the bindings that were
5319made with easy-menu.
5320
5321*** `easy-menu-define' now allows you to use nil for the symbol name
5322if you don't need to give the menu a name. If you install the menu
5323into other keymaps right away (MAPS is non-nil), it usually doesn't
5324need to have a name.
5325
5326** Mule changes:
5327
5328*** Already true in Emacs 21.1, but not emphasized clearly enough:
5329
5330Multibyte buffers can now faithfully record all 256 character codes
5331from 0 to 255. As a result, most of the past reasons to use unibyte
5332buffers no longer exist. We only know of three reasons to use them
5333now:
5334
53351. If you prefer to use unibyte text all of the time.
5336
53372. For reading files into temporary buffers, when you want to avoid
5338the time it takes to convert the format.
5339
53403. For binary files where format conversion would be pointless and
5341wasteful.
5342
5343*** The new variable `auto-coding-functions' lets you specify functions
5344to examine a file being visited and deduce the proper coding system
5345for it. (If the coding system is detected incorrectly for a specific
5346file, you can put a `coding:' tags to override it.)
5347
5348*** The new variable `ascii-case-table' stores the case table for the
5349ascii character set. Language environments (such as Turkish) may
5350alter the case correspondences of ASCII characters. This variable
5351saves the original ASCII case table before any such changes.
5352
5353*** The new function `merge-coding-systems' fills in unspecified aspects
5354of one coding system from another coding system.
5355
5356*** New coding system property `mime-text-unsuitable' indicates that
5357the coding system's `mime-charset' is not suitable for MIME text
5358parts, e.g. utf-16.
5359
5360*** New function `decode-coding-inserted-region' decodes a region as if
5361it is read from a file without decoding.
5362
5363*** New CCL functions `lookup-character' and `lookup-integer' access
5364hash tables defined by the Lisp function `define-translation-hash-table'.
5365
5366*** New function `quail-find-key' returns a list of keys to type in the
5367current input method to input a character.
5368
5369*** `set-buffer-file-coding-system' now takes an additional argument,
5370NOMODIFY. If it is non-nil, it means don't mark the buffer modified.
5371
5372** Operating system access:
5373
5374*** The new primitive `get-internal-run-time' returns the processor
5375run time used by Emacs since start-up.
5376
5377*** Functions `user-uid' and `user-real-uid' now return floats if the
5378user UID doesn't fit in a Lisp integer. Function `user-full-name'
5379accepts a float as UID parameter.
5380
5381*** New function `locale-info' accesses locale information.
5382
5383*** On MS Windows, locale-coding-system is used to interact with the OS.
5384The Windows specific variable w32-system-coding-system, which was
5385formerly used for that purpose is now an alias for locale-coding-system.
5386
5387*** New function `redirect-debugging-output' can be used to redirect
5388debugging output on the stderr file handle to a file.
5389
5390** GC changes:
5391
5392*** New variable `gc-cons-percentage' automatically grows the GC cons threshold
5393as the heap size increases.
5394
5395*** New variables `gc-elapsed' and `gcs-done' provide extra information
5396on garbage collection.
5397
5398*** The normal hook `post-gc-hook' is run at the end of garbage collection.
5399
5400The hook is run with GC inhibited, so use it with care.
5401
5402** Miscellaneous:
5403
5404*** A number of hooks have been renamed to better follow the conventions:
5405
5406`find-file-hooks' to `find-file-hook',
5407`find-file-not-found-hooks' to `find-file-not-found-functions',
5408`write-file-hooks' to `write-file-functions',
5409`write-contents-hooks' to `write-contents-functions',
5410`x-lost-selection-hooks' to `x-lost-selection-functions',
5411`x-sent-selection-hooks' to `x-sent-selection-functions',
5412`delete-frame-hook' to `delete-frame-functions'.
5413
5414In each case the old name remains as an alias for the moment.
5415
5416*** Variable `local-write-file-hooks' is marked obsolete.
5417
5418Use the LOCAL arg of `add-hook'.
5419
5420*** New function `x-send-client-message' sends a client message when
5421running under X.
5422\f
5423* New Packages for Lisp Programming in Emacs 22.1
5424
5425** The new library button.el implements simple and fast `clickable
5426buttons' in Emacs buffers. Buttons are much lighter-weight than the
5427`widgets' implemented by widget.el, and can be used by lisp code that
5428doesn't require the full power of widgets. Emacs uses buttons for
5429such things as help and apropos buffers.
5430
5431** The new library tree-widget.el provides a widget to display a set
5432of hierarchical data as an outline. For example, the tree-widget is
5433well suited to display a hierarchy of directories and files.
5434
5435** The new library bindat.el provides functions to unpack and pack
5436binary data structures, such as network packets, to and from Lisp
5437data structures.
5438
5439** master-mode.el implements a minor mode for scrolling a slave
5440buffer without leaving your current buffer, the master buffer.
5441
5442It can be used by sql.el, for example: the SQL buffer is the master
5443and its SQLi buffer is the slave. This allows you to scroll the SQLi
5444buffer containing the output from the SQL buffer containing the
5445commands.
5446
5447This is how to use sql.el and master.el together: the variable
5448sql-buffer contains the slave buffer. It is a local variable in the
5449SQL buffer.
5450
5451(add-hook 'sql-mode-hook
5452 (function (lambda ()
5453 (master-mode t)
5454 (master-set-slave sql-buffer))))
5455(add-hook 'sql-set-sqli-hook
5456 (function (lambda ()
5457 (master-set-slave sql-buffer))))
5458
5459** The new library benchmark.el does timing measurements on Lisp code.
5460
5461This includes measuring garbage collection time.
5462
5463** The new library testcover.el does test coverage checking.
5464
5465This is so you can tell whether you've tested all paths in your Lisp
5466code. It works with edebug.
5467
5468The function `testcover-start' instruments all functions in a given
5469file. Then test your code. The function `testcover-mark-all' adds
5470overlay "splotches" to the Lisp file's buffer to show where coverage
5471is lacking. The command `testcover-next-mark' (bind it to a key!)
5472will move point forward to the next spot that has a splotch.
5473
5474Normally, a red splotch indicates the form was never completely
5475evaluated; a brown splotch means it always evaluated to the same
5476value. The red splotches are skipped for forms that can't possibly
5477complete their evaluation, such as `error'. The brown splotches are
5478skipped for forms that are expected to always evaluate to the same
5479value, such as (setq x 14).
5480
5481For difficult cases, you can add do-nothing macros to your code to
5482help out the test coverage tool. The macro `noreturn' suppresses a
5483red splotch. It is an error if the argument to `noreturn' does
5484return. The macro `1value' suppresses a brown splotch for its argument.
5485This macro is a no-op except during test-coverage -- then it signals
5486an error if the argument actually returns differing values.
5487
5488
5489\f
5490----------------------------------------------------------------------
5491This file is part of GNU Emacs.
5492
5493GNU Emacs is free software; you can redistribute it and/or modify
5494it under the terms of the GNU General Public License as published by
9aecacd0 5495the Free Software Foundation; either version 3, or (at your option)
782f8379
GM
5496any later version.
5497
5498GNU Emacs is distributed in the hope that it will be useful,
5499but WITHOUT ANY WARRANTY; without even the implied warranty of
5500MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5501GNU General Public License for more details.
5502
5503You should have received a copy of the GNU General Public License
5504along with GNU Emacs; see the file COPYING. If not, write to the
5505Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
5506Boston, MA 02110-1301, USA.
5507
5508\f
5509Local variables:
5510mode: outline
5511paragraph-separate: "[ \f]*$"
5512end:
5513
5514arch-tag: 1aca9dfa-2ac4-4d14-bebf-0007cee12793