*** empty log message ***
[bpt/emacs.git] / etc / NEWS
CommitLineData
404fa7d6
DL
1GNU Emacs NEWS -- history of user-visible changes. 5 Jan 2000
2Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
a933dad1
DL
3See the end for copying conditions.
4
5Please send Emacs bug reports to bug-gnu-emacs@gnu.org.
6For older news, see the file ONEWS.
7
8\f
251584f3
DL
9* Installation Changes in Emacs 21.1
10
11** `movemail' defaults to supporting POP. You can turn this off using
12the --without-pop configure option, should that be necessary.
13\f
a933dad1
DL
14* Changes in Emacs 21.1
15
559cee90
DL
16** New user option `read-mail-command' specifies a command to use to
17read mail from the menu etc.
18
19** Changes in Outline mode.
20
21There is now support for Imenu to index headings. A new command
22`outline-headers-as-kill' copies the visible headings in the region to
23the kill ring, e.g. to produce a table of contents.
24
404fa7d6
DL
25** New command M-x check-parens can be used to find unbalanced paren
26groups and strings in buffers in Lisp mode (or other modes).
27
8964fec7
SM
28** You can now easily create new *Info* buffers using either M-x clone-buffer
29or C-u m <entry> RET. M-x clone-buffer can also be used on *Help* and
30several other special buffers.
31
39783d73
WP
32** Emacs can now support 'wheeled' mice (such as the MS IntelliMouse)
33under XFree86. To enable this, simply put (mwheel-install) in your
34.emacs file.
35
36The variables `mwheel-follow-mouse' and `mwheel-scroll-amount'
37determine where and by how much buffers are scrolled.
38
d35fce81
GM
39** Listing buffers with M-x list-buffers (C-x C-b) now shows
40abbreviated file names. Abbreviations can be customized by changing
41`directory-abbrev-alist'.
42
df5a1902
GM
43** Reading from the mini-buffer now reads from standard input if Emacs
44is running in batch mode. For example,
45
46 (message "%s" (read t))
47
48will read a Lisp expression from standard input and print the result
49to standard output.
50
a933dad1
DL
51** Faces and frame parameters.
52
53There are four new faces `scroll-bar', `border', `cursor' and `mouse'.
54Setting the frame parameters `scroll-bar-foreground' and
55`scroll-bar-background' sets foreground and background color of face
56`scroll-bar' and vice versa. Setting frame parameter `border-color'
57sets the background color of face `border' and vice versa. Likewise
58for frame parameters `cursor-color' and face `cursor', and frame
59parameter `mouse-color' and face `mouse'.
60
61Changing frame parameter `font' sets font-related attributes of the
62`default' face and vice versa. Setting frame parameters
79214ddf 63`foreground-color' or `background-color' sets the colors of the
a933dad1
DL
64`default' face and vice versa.
65
f77a4a8a
GM
66** New face `menu'.
67
68The face `menu' can be used to change colors and font of Emacs' menus.
69Setting the font of LessTif/Motif menus is currently not supported;
70attempts to set the font are ignored in this case.
71
a933dad1
DL
72** New frame parameter `screen-gamma' for gamma correction.
73
74The new frame parameter `screen-gamma' specifies gamma-correction for
75colors. Its value may be nil, the default, in which case no gamma
76correction occurs, or a number > 0, usually a float, that specifies
77the screen gamma of a frame's display.
78
79PC monitors usually have a screen gamma of 2.2. smaller values result
80in darker colors. You might want to try a screen gamma of 1.5 for LCD
81color displays. The viewing gamma Emacs uses is 0.4545. (1/2.2).
82
83The X resource name of this parameter is `screenGamma', class
84`ScreenGamma'.
85
86** Emacs has a new redisplay engine.
87
88The new redisplay handles characters of variable width and height.
89Italic text can be used without redisplay problems. Fonts containing
90oversized characters, i.e. characters larger than the logical height
91of a font can be used. Images of various formats can be displayed in
92the text.
93
94** Emacs has a new face implementation.
95
96The new faces no longer fundamentally use X font names to specify the
97font. Instead, each face has several independent attributes--family,
98height, width, weight and slant--that it may or may not specify.
99These attributes can be merged from various faces, and then together
100specify a font.
101
102Faces are supported on terminals that can display color or fonts.
103These terminal capabilities are auto-detected. Details can be found
104under Lisp changes, below.
105
106** New default font is Courier 12pt.
107
108** When using a windowing terminal, Emacs window now has a cursor of
109its own. When the window is selected, the cursor is solid; otherwise,
110it is hollow.
111
112** Bitmap areas to the left and right of windows are used to display
113truncation marks, continuation marks, overlay arrows and alike. The
114foreground, background, and stipple of these areas can be changed by
115customizing face `fringe'.
116
117** The mode line under X is now drawn with shadows by default. You
118can change its appearance by modifying the face `modeline'.
119
120** LessTif support.
121
122Emacs now runs with LessTif (see <http://www.lesstif.org>). You will
123need a version 0.88.1 or later.
124
125** Toolkit scroll bars.
126
127Emacs now uses toolkit scrollbars if available. When configured for
128LessTif/Motif, it will use that toolkit's scrollbar. Otherwise, when
129configured for Lucid and Athena widgets, it will use the Xaw3d scroll
130bar if Xaw3d is available. You can turn off the use of toolkit scroll
131bars by specifying `--with-toolkit-scroll-bars=no' when configuring
132Emacs.
133
134When you encounter problems with the Xaw3d scroll bar, watch out how
135Xaw3d is compiled on your system. If the Makefile generated from
136Xaw3d's Imakefile contains a `-DNARROWPROTO' compiler option, and your
137Emacs system configuration file `s/your-system.h' does not contain a
138define for NARROWPROTO, you might consider adding it. Take
139`s/freebsd.h' as an example.
140
141Alternatively, if you don't have access to the Xaw3d source code, take
142a look at your system's imake configuration file, for example in the
143directory `/usr/X11R6/lib/X11/config' (paths are different on
144different systems). You will find files `*.cf' there. If your
145system's cf-file contains a line like `#define NeedWidePrototypes NO',
146add a `#define NARROWPROTO' to your Emacs system configuration file.
147
148The reason for this is that one Xaw3d function uses `double' or
149`float' function parameters depending on the setting of NARROWPROTO.
150This is not a problem when Imakefiles are used because each system's
151image configuration file contains the necessary information. Since
152Emacs doesn't use imake, this has do be done manually.
153
154** Toggle buttons and radio buttons in menus.
155
156When compiled with LessTif (or Motif) support, Emacs uses toolkit
157widgets for radio and toggle buttons in menus. When configured for
158Lucid, Emacs draws radio buttons and toggle buttons similar to Motif.
159
160** Highlighting of trailing whitespace.
161
162When `show-trailing-whitespace' is non-nil, Emacs displays trailing
163whitespace in the face `trailing-whitespace'. Trailing whitespace is
164defined as spaces or tabs at the end of a line. To avoid busy
165highlighting when entering new text, trailing whitespace is not
166displayed if point is at the end of the line containing the
167whitespace.
168
169** Busy-cursor.
170
171Emacs can optionally display a busy-cursor under X. You can turn the
172display on or off by customizing group `cursor'.
173
174** Blinking cursor
175
176M-x blink-cursor-mode toggles a blinking cursor under X and on
177terminals having terminal capabilities `vi', `vs', and `ve'. Blinking
178and related parameters like frequency and delay can be customized in
179the group `cursor'.
180
181** New font-lock support mode `jit-lock-mode'.
182
183This support mode is roughly equivalent to `lazy-lock' but is
184generally faster. It supports stealth and deferred fontification.
185See the documentation of the function `jit-lock-mode' for more
186details.
187
188Font-lock uses jit-lock-mode as default support mode, so you don't
189have to do anything to activate it.
190
191** Tabs and variable-width text.
192
193Tabs are now displayed with stretch properties; the width of a tab is
194defined as a multiple of the normal character width of a frame, and is
195independent of the fonts used in the text where the tab appears.
196Thus, tabs can be used to line up text in different fonts.
197
198** Enhancements of the Lucid menu bar
199
200*** The Lucid menu bar now supports the resource "margin".
201
202 emacs.pane.menubar.margin: 5
203
204The default margin is 4 which makes the menu bar appear like the Motif
205one.
206
207*** Arrows that indicate sub-menus are now drawn with shadows, like in
208Motif.
209
210** Hscrolling in C code.
211
212Horizontal scrolling now happens automatically.
213
214** Tool bar support.
215
216Emacs supports a tool bar at the top of a frame under X. For details
217how to define a tool bar, see the page describing Lisp-level changes.
218
219** Mouse-sensitive mode line.
220
221Different parts of the mode line under X have been made
222mouse-sensitive. Moving the mouse to a mouse-sensitive part in the mode
223line changes the appearance of the mouse pointer to an arrow, and help
224about available mouse actions is displayed either in the echo area, or
225in the tooltip window if you have enabled one.
226
227Currently, the following actions have been defined:
228
229- Mouse-1 on the buffer name in the mode line switches between two
230buffers.
231
232- Mouse-2 on the buffer-name switches to the next buffer, and
233M-mouse-2 switches to the previous buffer in the buffer list.
234
235- Mouse-3 on the buffer-name displays a buffer menu.
236
559cee90 237- Mouse-2 on the read-only status in the mode line (`%' or `*')
a933dad1
DL
238toggles the read-only status.
239
240- Mouse-3 on the mode name display a minor-mode menu.
241
242** LessTif/Motif file selection dialog.
243
244When Emacs is configured to use LessTif or Motif, reading a file name
e33b0397 245from a menu will pop up a file selection dialog if `use-dialog-box' is
a933dad1
DL
246non-nil.
247
248** Emacs can display faces on TTY frames.
249
250Emacs automatically detects terminals that are able to display colors.
251Faces with a weight greater than normal are displayed extra-bright, if
252the terminal supports it. Faces with a weight less than normal and
253italic faces are displayed dimmed, if the terminal supports it.
254Underlined faces are displayed underlined if possible. Other face
255attributes like overlines, strike-throught, box are ignored.
256
257** Sound support
258
259Emacs supports playing sound files on GNU/Linux and the free BSDs
260(Voxware driver and native BSD driver, aka as Luigi's driver).
261Currently supported file formats are RIFF-WAVE (*.wav) and Sun Audio
262(*.au). You must configure Emacs with the option `--with-sound=yes'
263to enable sound support.
264
265** A new variable, backup-by-copying-when-privileged-mismatch, gives
266the highest file uid for which backup-by-copying-when-mismatch will be
267forced on. The assumption is that uids less than or equal to this
268value are special uids (root, bin, daemon, etc.--not real system
269users) and that files owned by these users should not change ownership,
270even if your system policy allows users other than root to edit them.
271
272The default is 200; set the variable to nil to disable the feature.
273
274** A block cursor can be drawn as wide as the glyph under it under X.
275
276As an example: if a block cursor is over a tab character, it will be
277drawn as wide as that tab on the display. To do this, set
278`x-stretch-cursor' to a non-nil value.
279
280** Empty display lines at the end of a buffer may be marked with a
281bitmap (this is similar to the tilde displayed by vi).
282
283This behavior is activated by setting the buffer-local variable
284`indicate-empty-lines' to a non-nil value. The default value of this
285variable is found in `default-indicate-empty-lines'.
286
287** There is a new "aggressive" scrolling method.
288
289When scrolling up because point is above the window start, if the
290value of the buffer-local variable `scroll-up-aggessively' is a
291number, Emacs chooses a new window start so that point ends up that
292fraction of the window's height from the bottom of the window.
293
294When scrolling down because point is below the window end, if the
295value of the buffer-local variable `scroll-down-aggessively' is a
296number, Emacs chooses a new window start so that point ends up that
297fraction of the window's height from the top of the window.
298
299** The rectangle commands now avoid inserting undesirable spaces,
300notably at the end of lines.
301
302All these functions have been rewritten to avoid inserting unwanted
303spaces, and an optional prefix now allows them to behave the old way.
304
305** The new command M-x query-replace-regexp-eval acts like
306query-replace-regexp, but takes a Lisp expression which is evaluated
307after each match to get the replacement text.
308
309** Emacs now resizes mini-windows if appropriate.
310
311If a message is longer than one line, or mini-buffer contents are
312longer than one line, Emacs now resizes the mini-window unless it is
313on a frame of its own. You can control the maximum mini-window size
314by setting the following variable:
315
316- User option: max-mini-window-height
317
318Maximum height for resizing mini-windows. If a float, it specifies a
319fraction of the mini-window frame's height. If an integer, it
320specifies a number of lines. If nil, don't resize.
321
322Default is 0.25.
323
0d43b60d
GM
324** Changes to hideshow.el
325
326Hideshow is now at version 5.x. It uses a new algorithms for block
327selection and traversal and includes more isearch support.
328
329*** Generalized block selection and traversal
330
331A block is now recognized by three things: its start and end regexps
332(both strings), and a match-data selector (an integer) specifying
333which sub-expression in the start regexp serves as the place where a
334`forward-sexp'-like function can operate. Hideshow always adjusts
335point to this sub-expression before calling `hs-forward-sexp-func'
336(which for most modes evaluates to `forward-sexp').
337
338If the match-data selector is not specified, it defaults to zero,
339i.e., the entire start regexp is valid, w/ no prefix. This is
340backwards compatible with previous versions of hideshow. Please see
341the docstring for variable `hs-special-modes-alist' for details.
342
343*** Isearch support for updating mode line
344
345During incremental search, if Hideshow minor mode is active, hidden
346blocks are temporarily shown. The variable `hs-headline' records the
347line at the beginning of the opened block (preceding the hidden
348portion of the buffer), and the mode line is refreshed. When a block
349is re-hidden, the variable is set to nil.
350
351To show `hs-headline' in the mode line, you may wish to include
352something like this in your .emacs.
353
354 (add-hook 'hs-minor-mode-hook
355 (lambda ()
356 (add-to-list 'mode-line-format 'hs-headline)))
357
559cee90
DL
358** Changes to Change Log mode and Add-Log functions
359
360If you invoke `add-change-log-entry' from a backup file, it makes an
361entry appropriate for the file's parent. This is useful for making
362log entries by comparing a version with deleted functions.
363
364New command M-x change-log-merge merges another log into the current
365buffer, fixing old-style date formats if necessary.
eb2aac9d
GM
366
367Change Log mode now adds a file's version number to change log entries
368if user-option `change-log-version-info-enabled' is non-nil.
369
370The search for a file's version number is performed based on regular
371expressions from `change-log-version-number-regexp-list' which can be
372cutomized. Version numbers are only found in the first 10 percent of
373a file.
374
3476b54a
GM
375** Changes in Font Lock
376
377*** The new function `font-lock-remove-keywords' can be used to remove
378font-lock keywords from the current buffer or from a specific major
379mode.
380
b3b98592
GM
381** Comint (subshell) changes
382
383Comint now includes new features to send commands to running processes
384and redirect the output to a designated buffer or buffers.
385
386The command M-x comint-redirect-send-command reads a command and
387buffer name from the mini-buffer. The command is sent to the current
388buffer's process, and its output is inserted into the specified buffer.
389
390The command M-x comint-redirect-send-command-to-process acts like
391M-x comint-redirect-send-command but additionally reads the name of
392the buffer whose process should be used from the mini-buffer.
393
e26cec67
GM
394** Changes to Rmail mode
395
396RET is now bound in the Rmail summary to rmail-summary-goto-msg, like
397`j'.
398
400a1ed0
GM
399** Changes to TeX mode
400
401The default mode has been changed from `plain-tex-mode' to
402`latex-mode'.
403
a933dad1
DL
404** Changes to RefTeX mode
405
406*** RefTeX has new support for index generation. Index entries can be
407 created with `C-c <', with completion available on index keys.
408 Pressing `C-c /' indexes the word at the cursor with a default
409 macro. `C-c >' compiles all index entries into an alphabetically
410 sorted *Index* buffer which looks like the final index. Entries
411 can be edited from that buffer.
412
413*** Label and citation key selection now allow to select several
414 items and reference them together (use `m' to mark items, `a' or
415 `A' to use all marked entries).
416
417*** reftex.el has been split into a number of smaller files to reduce
418 memory use when only a part of RefTeX is being used.
419
420*** a new command `reftex-view-crossref-from-bibtex' (bound to `C-c &'
421 in BibTeX-mode) can be called in a BibTeX database buffer in order
422 to show locations in LaTeX documents where a particular entry has
423 been cited.
424
38de9631
GM
425** Emacs Lisp mode now allows multiple levels of outline headings.
426The level of a heading is determined from the number of leading
427semicolons in a heading line. Toplevel forms starting with a `('
428in column 1 are always made leaves.
429
a933dad1
DL
430** The M-x time-stamp command (most commonly used on write-file-hooks)
431has the following new features:
432
433*** The patterns for finding the time stamp and for updating a pattern
434may match text spanning multiple lines. For example, some people like
435to have the filename and date on separate lines. The new variable
436time-stamp-inserts-lines controls the matching for multi-line patterns.
437
438*** More than one time stamp can be updated in the same file. This
439feature is useful if you need separate time stamps in a program source
440file to both include in formatted documentation and insert in the
441compiled binary. The same time-stamp will be written at each matching
442pattern. The variable time-stamp-count enables this new feature; it
443defaults to 1.
444
445** Tooltips.
446
447Tooltips are small X windows displaying a help string at the current
448mouse position. To use them, use the Lisp package `tooltip' which you
449can access via the user option `tooltip-mode'.
450
451Tooltips also provides support for GUD debugging. If activated,
452variable values can be displayed in tooltips by pointing at them with
453the mouse in source buffers. You can customize various aspects of the
454tooltip display in the group `tooltip'.
455
456** Customize changes
457
458*** Customize now supports comments about customized items. Use the
34f94cf9
DL
459`State' menu to add comments. Note that customization comments will
460cause the customizations to fail in earlier versions of Emacs.
a933dad1
DL
461
462*** The new option `custom-buffer-done-function' says whether to kill
463Custom buffers when you've done with them or just bury them (the
464default).
465
0ae51efb
GM
466*** The keyword :set-after in defcustom allows to specify dependencies
467between custom options. Example:
468
469 (defcustom default-input-method nil
470 "*Default input method for multilingual text (a string).
471 This is the input method activated automatically by the command
472 `toggle-input-method' (\\[toggle-input-method])."
473 :group 'mule
474 :type '(choice (const nil) string)
475 :set-after '(current-language-environment))
476
477This specifies that default-input-method should be set after
478current-language-environment even if default-input-method appears
479first in a custom-set-variables statement.
480
a933dad1
DL
481** New features in evaluation commands
482
483The commands to evaluate Lisp expressions, such as C-M-x in Lisp
484modes, C-j in Lisp Interaction mode, and M-:, now bind the variables
485print-level, print-length, and debug-on-error based on the
486customizable variables eval-expression-print-level,
487eval-expression-print-length, and eval-expression-debug-on-error.
488
a933dad1
DL
489** Dired changes
490
491*** New variable `dired-recursive-deletes' determines if the delete
492command will delete non-empty directories recursively. The default
493is, delete only empty directories.
494
495*** New variable `dired-recursive-copies' determines if the copy
496command will copy directories recursively. The default is, do not
497copy directories recursively.
498
f6737cde
GM
499*** In command `dired-do-shell-command' (usually bound to `!') a `?'
500in the shell command has a special meaning similar to `*', but with
501the difference that the command will be run on each file individually.
502
a933dad1
DL
503** The variable mail-specify-envelope-from controls whether to
504use the -f option when sending mail.
505
b1c609b1
GM
506** CC mode changes.
507
508Note: This release contains changes that might not be compatible with
509current user setups (although it's believed that these
510incompatibilities will only show in very uncommon circumstances).
511However, since the impact is uncertain, these changes may be rolled
512back depending on user feedback. Therefore there's no forward
513compatibility guarantee wrt the new features introduced in this
514release.
515
516*** New initialization procedure for the style system.
517When the initial style for a buffer is determined by CC Mode (from the
518variable c-default-style), the global values of style variables now
519take precedence over the values specified by the chosen style. This
520is different than the old behavior: previously, the style-specific
521settings would override the global settings. This change makes it
522possible to do simple configuration in the intuitive way with
523Customize or with setq lines in one's .emacs file.
524
525By default, the global value of every style variable is the new
526special symbol set-from-style, which causes the value to be taken from
527the style system. This means that in effect, only an explicit setting
528of a style variable will cause the "overriding" behavior described
529above.
530
531Also note that global settings override style-specific settings *only*
532when the initial style of a buffer is chosen by a CC Mode major mode
533function. When a style is chosen in other ways --- for example, by a
534call like (c-set-style "gnu") in a hook, or via M-x c-set-style ---
535then the style-specific values take precedence over any global style
536values. In Lisp terms, global values override style-specific values
537only when the new second argument to c-set-style is non-nil; see the
538function documentation for more info.
539
540The purpose of these changes is to make it easier for users,
541especially novice users, to do simple customizations with Customize or
542with setq in their .emacs files. On the other hand, the new system is
543intended to be compatible with advanced users' customizations as well,
544such as those that choose styles in hooks or whatnot. This new system
545is believed to be almost entirely compatible with current
546configurations, in spite of the changed precedence between style and
547global variable settings when a buffer's default style is set.
548
549(Thanks to Eric Eide for clarifying this explanation a bit.)
550
551**** c-offsets-alist is now a customizable variable.
552This became possible as a result of the new initialization behavior.
553
554This variable is treated slightly differently from the other style
555variables; instead of using the symbol set-from-style, it will be
556completed with the syntactic symbols it doesn't already contain when
557the style is first initialized. This means it now defaults to the
558empty list to make all syntactic elements get their values from the
559style system.
560
561**** Compatibility variable to restore the old behavior.
562In case your configuration doesn't work with this change, you can set
563c-old-style-variable-behavior to non-nil to get the old behavior back
564as far as possible.
565
566*** Improvements to line breaking and text filling.
567CC Mode now handles this more intelligently and seamlessly wrt the
568surrounding code, especially inside comments. For details see the new
569chapter about this in the manual.
570
571**** New variable to recognize comment line prefix decorations.
572The variable c-comment-prefix-regexp has been added to properly
573recognize the line prefix in both block and line comments. It's
574primarily used to initialize the various paragraph recognition and
575adaptive filling variables that the text handling functions uses.
576
577**** New variable c-block-comment-prefix.
578This is a generalization of the now obsolete variable
579c-comment-continuation-stars to handle arbitrary strings.
580
581**** CC Mode now uses adaptive fill mode.
582This to make it adapt better to the paragraph style inside comments.
583
584It's also possible to use other adaptive filling packages inside CC
585Mode, notably Kyle E. Jones' Filladapt mode (http://wonderworks.com/).
586A new convenience function c-setup-filladapt sets up Filladapt for use
587inside CC Mode.
588
589Note though that the 2.12 version of Filladapt lacks a feature that
590causes it to work suboptimally when c-comment-prefix-regexp can match
591the empty string (which it commonly does). A patch for that is
592available from the CC Mode web site (http://www.python.org/emacs/
593cc-mode/).
594
595**** It's now possible to selectively turn off auto filling.
596The variable c-ignore-auto-fill is used to ignore auto fill mode in
597specific contexts, e.g. in preprocessor directives and in string
598literals.
599
600**** New context sensitive line break function c-context-line-break.
601It works like newline-and-indent in normal code, and adapts the line
602prefix according to the comment style when used inside comments. If
603you're normally using newline-and-indent, you might want to switch to
604this function.
605
606*** Fixes to IDL mode.
607It now does a better job in recognizing only the constructs relevant
608to IDL. E.g. it no longer matches "class" as the beginning of a
609struct block, but it does match the CORBA 2.3 "valuetype" keyword.
610Thanks to Eric Eide.
611
612*** Improvements to the Whitesmith style.
613It now keeps the style consistently on all levels and both when
614opening braces hangs and when they don't.
615
616**** New lineup function c-lineup-whitesmith-in-block.
617
618*** New lineup functions c-lineup-template-args and c-indent-multi-line-block.
619See their docstrings for details. c-lineup-template-args does a
620better job of tracking the brackets used as parens in C++ templates,
621and is used by default to line up continued template arguments.
622
623*** c-lineup-comment now preserves alignment with a comment on the
624previous line. It used to instead preserve comments that started in
625the column specified by comment-column.
626
627*** c-lineup-C-comments handles "free form" text comments.
628In comments with a long delimiter line at the start, the indentation
629is kept unchanged for lines that start with an empty comment line
630prefix. This is intended for the type of large block comments that
631contain documentation with its own formatting. In these you normally
632don't want CC Mode to change the indentation.
633
634*** The `c' syntactic symbol is now relative to the comment start
635instead of the previous line, to make integers usable as lineup
636arguments.
637
638*** All lineup functions have gotten docstrings.
639
640*** More preprocessor directive movement functions.
641c-down-conditional does the reverse of c-up-conditional.
642c-up-conditional-with-else and c-down-conditional-with-else are
643variants of these that also stops at "#else" lines (suggested by Don
644Provan).
645
646*** Minor improvements to many movement functions in tricky situations.
647
87be76f6
GM
648** Isearch changes
649
650*** In Isearch mode, mouse-2 in the echo area now yanks the current
a933dad1
DL
651selection into the search string rather than giving an error.
652
87be76f6
GM
653*** There is a new lazy highlighting feature in incremental search.
654
d35fce81 655Lazy highlighting is switched on/off by customizing variable
87be76f6
GM
656`isearch-lazy-highlight'. When active, all matches for the current
657search string are highlighted. The current match is highlighted as
658before using face `isearch' or `region'. All other matches are
659highlighted using face `isearch-lazy-highlight-face' which defaults to
660`secondary-selection'.
661
662The extra highlighting makes it easier to anticipate where the cursor
663will end up each time you press C-s or C-r to repeat a pending search.
664Highlighting of these additional matches happens in a deferred fashion
665using "idle timers," so the cycles needed do not rob isearch of its
666usual snappy response.
667
668If `isearch-lazy-highlight-cleanup' is set to t, highlights for
669matches are automatically cleared when you end the search. If it is
670set to nil, you can remove the highlights manually with `M-x
671isearch-lazy-highlight-cleanup'.
672
673
d67f47e4
DL
674** Ange-ftp allows you to specify of a port number in remote file
675names cleanly. It is appended to the host name, separated by a hash
676sign, e.g. `/foo@bar.org#666:mumble'. (This syntax comes from EFS.)
677
4b9347b3
GM
678** Shell script mode changes.
679
680Shell script mode (sh-script) can now indent scripts for shells
681derived from sh and rc. The indentation style is customizeable, and
682sh-script can attempt to "learn" the current buffer's style.
683
79214ddf
FP
684** Etags changes.
685
686*** In DOS, etags looks for file.cgz if it cannot find file.c.
687
aca0be23 688*** New option --ignore-case-regex is an alternative to --regex. It is now
8dc78b52
FP
689possible to bind a regexp to a language, by prepending the regexp with
690{lang}, where lang is one of the languages that `etags --help' prints out.
691This feature is useful especially for regex files, where each line contains
692a regular expression. The manual contains details.
aca0be23 693
79214ddf
FP
694*** In C and derived languages, etags creates tags for function
695declarations when given the --declarations option.
696
697*** In C++, tags are created for "operator". The tags have the form
aca0be23 698"operator+", without spaces between the keyword and the operator.
79214ddf
FP
699
700*** New language Ada: tags are functions, procedures, packages, tasks, and
701types.
702
703*** In Fortran, procedure is no more tagged.
704
705*** In Java, tags are created for "interface".
706
707*** In Lisp, "(defstruct (foo", "(defun (operator" and similar constructs
708are now tagged.
709
710*** In Perl, the --globals option tags global variables. my and local
711variables are tagged.
712
713*** New language Python: def and class at the beginning of a line are tags.
714
8dc78b52
FP
715*** .ss files are Scheme files, .pdb is Postscript with C syntax, .psw is
716for PSWrap.
79214ddf 717
f6737cde
GM
718** Changes in etags.el
719
720*** You can display additional output with M-x tags-apropos by setting
721the new variable tags-apropos-additional-actions.
722
723If non-nil, the variable's value should be a list of triples (TITLE
724FUNCTION TO-SEARCH). For each triple, M-x tags-apropos processes
725TO-SEARCH and lists tags from it. TO-SEARCH should be an alist,
726obarray, or symbol. If it is a symbol, the symbol's value is used.
727
728TITLE is a string to use to label the list of tags from TO-SEARCH.
729
730FUNCTION is a function to call when an entry is selected in the Tags
731List buffer. It is called with one argument, the selected symbol.
732
733A useful example value for this variable might be something like:
734
735 '(("Emacs Lisp" Info-goto-emacs-command-node obarray)
736 ("Common Lisp" common-lisp-hyperspec common-lisp-hyperspec-obarray)
737 ("SCWM" scwm-documentation scwm-obarray))
738
739*** The face tags-tag-face can be used to customize the appearance
740of tags in the output of M-x tags-apropos.
741
742*** Setting tags-apropos-verbose to a non-nil value displays the
743names of tags files in the *Tags List* buffer.
744
fbc164de
PE
745** Emacs now attempts to determine the initial language environment
746and preferred and locale coding systems systematically from the
747LC_ALL, LC_CTYPE, and LANG environment variables during startup.
748
59c1bf85
DL
749** New language environments `Latin-8' and `Latin-9'.
750These correspond respectively to the ISO character sets 8859-14
751(Celtic) and 8859-15 (updated Latin-1, with the Euro sign). There is
752currently no specific input method support for them.
753
e33b0397
DL
754** Fortran mode has a new command `fortran-strip-sqeuence-nos' to
755remove text past column 72. The syntax class of `\' in Fortran is now
756appropriate for C-style escape sequences in strings.
757
758** SGML mode's default `sgml-validate-command' is now `nsgmls'.
759
6f8ea2ae
DL
760** A new command `view-emacs-problems' (C-h P) displays the PROBLEMS file.
761
a933dad1
DL
762** New modes and packages
763
559cee90
DL
764*** `paragraph-indent-minor-mode' is a new minor mode supporting
765paragraphs in the same style as `paragraph-indent-text-mode'.
766
6448a6b3
GM
767*** bs.el is a new package for buffer selection similar to
768list-buffers or electric-buffer-list. Use M-x bs-show to display a
769buffer menu with this package. You can use M-x bs-customize to
770customize the package.
771
3476b54a
GM
772*** The minor modes cwarn-mode and global-cwarn-mode highlights
773suspicious C and C++ constructions. Currently, assignments inside
774expressions, semicolon following `if', `for' and `while' (except, of
775course, after a `do .. while' statement), and C++ functions with
776reference parameters are recognized. The modes require font-lock mode
777to be enabled.
778
8964fec7
SM
779*** smerge-mode.el provides `smerge-mode', a simple minor-mode for files
780containing diff3-style conflict markers, such as generated by RCS.
781
a933dad1
DL
782*** 5x5.el is a simple puzzle game.
783
784*** hl-line.el provides a minor mode to highlight the current line.
785
786*** ansi-color.el translates ANSI terminal escapes into text-properties.
787
788*** delphi.el provides a major mode for editing the Delphi (Object
789Pascal) language.
790
791*** quickurl.el provides a simple method of inserting a URL based on
792the text at point.
793
794*** sql.el provides an interface to SQL data bases.
795
8d54eb69
DL
796*** fortune.el uses the fortune program to create mail/news signatures.
797
a933dad1
DL
798*** whitespace.el ???
799
ebcfda83
GM
800*** PostScript mode (ps-mode) is a new major mode for editing PostScript
801files. It offers: interaction with a PostScript interpreter, including
802(very basic) error handling; fontification, easily customizable for
803interpreter messages; auto-indentation; insertion of EPSF templates and
804often used code snippets; viewing of BoundingBox; commenting out /
805uncommenting regions; conversion of 8bit characters to PostScript octal
806codes. All functionality is accessible through a menu.
807
808*** delim-col helps to prettify columns in a text region or rectangle.
809
810Here is an example of columns:
811
812horse apple bus
813dog pineapple car EXTRA
814porcupine strawberry airplane
815
816Doing the following settings:
817
818 (setq delimit-columns-str-before "[ ")
819 (setq delimit-columns-str-after " ]")
820 (setq delimit-columns-str-separator ", ")
821 (setq delimit-columns-separator "\t")
822
823
824Selecting the lines above and typing:
825
826 M-x delimit-columns-region
827
828It results:
829
830[ horse , apple , bus , ]
831[ dog , pineapple , car , EXTRA ]
832[ porcupine, strawberry, airplane, ]
833
834delim-col has the following options:
835
836 delimit-columns-str-before Specify a string to be inserted
837 before all columns.
838
839 delimit-columns-str-separator Specify a string to be inserted
840 between each column.
841
842 delimit-columns-str-after Specify a string to be inserted
843 after all columns.
844
845 delimit-columns-separator Specify a regexp which separates
846 each column.
847
848delim-col has the following commands:
849
850 delimit-columns-region Prettify all columns in a text region.
851 delimit-columns-rectangle Prettify all columns in a text rectangle.
852
f507826c
GM
853*** The package recentf.el maintains a menu for visiting files that
854were operated on recently. When enabled, a new "Open Recent" submenu
855is displayed in the "Files" menu.
856
857The recent files list is automatically saved across Emacs sessions.
858
859To enable/disable recentf use M-x recentf-mode.
860
861To enable recentf at Emacs startup use
862M-x customize-variable RET recentf-mode RET.
863
864To change the number of recent files displayed and others options use
865M-x customize-group RET recentf RET.
866
8062f458
DL
867*** elide-head.el provides a mechanism for eliding boilerplate header
868text.
869
36e24b82 870*** footnote.el provides `footnote-mode', a minor mode supporting use
91735437
DL
871of footnotes. It is intended for use with Message mode, but isn't
872specific to Message mode.
873
36e24b82
DL
874*** diff-mode.el provides `diff-mode', a major mode for
875viewing/editing context diffs (patches). It is selected for files
876with extension `.diff', `.diffs', `.patch' and `.rej'.
877
a933dad1
DL
878** Withdrawn packages
879
880*** mldrag.el has been removed. mouse.el provides the same
881functionality with aliases for the mldrag functions.
25a81338
DL
882
883*** eval-reg.el has been obsoleted by changes to edebug.el.
a933dad1
DL
884\f
885* Lisp changes in Emacs 21.1 (see following page for display-related features)
886
887Note that +++ before an item means the Lisp manual has been updated.
888--- means that I have decided it does not need to be in the Lisp manual.
889When you add a new item, please add it without either +++ or ---
890so I will know I still need to look at it -- rms.
891
7a85e4df
GM
892** The function `clear-this-command-keys' now also clears the vector
893returned by function `recent-keys'.
894
559cee90
DL
895** New function `keyword-p' is an efficient type predicate for keyword
896symbols.
897
404fa7d6
DL
898** Variables `beginning-of-defun' and `end-of-defun', can be used to
899define handlers for the functions of the same names. Major modes can
900define these locally instead of rebinding M-C-a etc. if the normal
901definitions of the functions are not appropriate for the mode.
902
8964fec7
SM
903** easy-mmode-define-minor-mode now takes an additional BODY argument
904and is renamed `define-minor-mode'.
905
30a009a5 906** If an abbrev has only a hook, and that hook has a non-nil
ef961722
GM
907`no-self-insert' property, the return value of the hook specifies
908whether an expansion has been done or not. If it returns nil, no
909expansion has been performed. The character leading to the call of
910the hook will then be self-inserted.
911
81da8b32
GM
912** The function `intern-soft' now accepts a symbol as first argument.
913In this case, that exact symbol is looked up in the specified obarray,
914and the function's value is nil if it is not found.
915
9e207b90
GM
916** The new macro `with-syntax-table' can be used to evaluate forms
917with the syntax table of the current buffer temporarily set to a
918specified table.
919
920 (with-syntax-table TABLE &rest BODY)
921
922Evaluate BODY with syntax table of current buffer set to a copy of
03d9c64c
GM
923TABLE. The current syntax table is saved, BODY is evaluated, and the
924saved table is restored, even in case of an abnormal exit. Value is
925what BODY returns.
9e207b90 926
8964fec7
SM
927** Regular expressions now support Perl's non-greedy *? +? and ??
928operators.
929
dde9e75a
GM
930** The optional argument BUFFER of function file-local-copy has been
931removed since it wasn't used by anything.
932
9da30515
GM
933** The file name argument of function `file-locked-p' is now required
934instead of being optional.
935
d20679eb
GM
936** The new built-in error `text-read-only' is signaled when trying to
937modify read-only text.
938
fbc164de
PE
939** New functions and variables for locales.
940
941The new variable `locale-coding-system' specifies how to encode and
942decode strings passed to low-level message functions like strerror and
b718982a
PE
943time functions like strftime. The new variables
944`system-messages-locale' and `system-time-locale' give the system
945locales to be used when invoking these two types of functions.
fbc164de
PE
946
947The new function `set-locale-environment' sets the language
948environment, preferred coding system, and locale coding system from
949the system locale as specified by the LC_ALL, LC_CTYPE, and LANG
b718982a
PE
950environment variables. Normally, it is invoked during startup and need
951not be invoked thereafter. It uses the new variables
952`locale-language-names', `locale-charset-language-names', and
953`locale-preferred-coding-systems' to make its decisions.
fbc164de 954
863476d1
SM
955** syntax tables now understand nested comments.
956To declare a comment syntax as allowing nesting, just add an `n'
957modifier to either of the characters of the comment end and the comment
958start sequences.
959
ef6d912c
GM
960** The function `pixmap-spec-p' has been renamed `bitmap-spec-p'
961because `bitmap' is more in line with the usual X terminology.
962
a933dad1
DL
963** New function `propertize'
964
965The new function `propertize' can be used to conveniently construct
966strings with text properties.
967
968- Function: propertize STRING &rest PROPERTIES
969
970Value is a copy of STRING with text properties assigned as specified
971by PROPERTIES. PROPERTIES is a sequence of pairs PROPERTY VALUE, with
972PROPERTY being the name of a text property and VALUE being the
973specified value of that property. Example:
974
975 (propertize "foo" 'face 'bold 'read-only t)
976
977+++
978** push and pop macros.
979
980A simple version of the push and pop macros of Common Lisp
981is now defined in Emacs Lisp. These macros allow only symbols
982as the place that holds the list to be changed.
983
984(push NEWELT LISTNAME) add NEWELT to the front of LISTNAME's value.
985(pop LISTNAME) return first elt of LISTNAME, and remove it
986 (thus altering the value of LISTNAME).
987
988+++
989** Regular expressions now support Posix character classes such
990as [:alpha:], [:space:] and so on.
991
992[:digit:] matches 0 through 9
993[:cntrl:] matches ASCII control characters
994[:xdigit:] matches 0 through 9, a through f and A through F.
995[:blank:] matches space and tab only
996[:graph:] matches graphic characters--everything except ASCII control chars,
997 space, and DEL.
998[:print:] matches printing characters--everything except ASCII control chars
999 and DEL.
1000[:alnum:] matches letters and digits.
1001 (But at present, for multibyte characters,
1002 it matches anything that has word syntax.)
1003[:alpha:] matches letters.
1004 (But at present, for multibyte characters,
1005 it matches anything that has word syntax.)
1006[:ascii:] matches ASCII (unibyte) characters.
1007[:nonascii:] matches non-ASCII (multibyte) characters.
1008[:lower:] matches anything lower-case.
1009[:punct:] matches punctuation.
1010 (But at present, for multibyte characters,
1011 it matches anything that has non-word syntax.)
1012[:space:] matches anything that has whitespace syntax.
1013[:upper:] matches anything upper-case.
1014[:word:] matches anything that has word syntax.
1015
1016+++
1017** Emacs now has built-in hash tables.
1018
1019The following functions are defined for hash tables:
1020
1021- Function: make-hash-table ARGS
1022
1023The argument list ARGS consists of keyword/argument pairs. All arguments
1024are optional. The following arguments are defined:
1025
1026:test TEST
1027
1028TEST must be a symbol specifying how to compare keys. Default is `eql'.
1029Predefined are `eq', `eql' and `equal'. If TEST is not predefined,
1030it must have been defined with `define-hash-table-test'.
1031
1032:size SIZE
1033
1034SIZE must be an integer > 0 giving a hint to the implementation how
1035many elements will be put in the hash table. Default size is 65.
1036
1037:rehash-size REHASH-SIZE
1038
1039REHASH-SIZE specifies by how much to grow a hash table once it becomes
1040full. If REHASH-SIZE is an integer, add that to the hash table's old
1041size to get the new size. Otherwise, REHASH-SIZE must be a float >
10421.0, and the new size is computed by multiplying REHASH-SIZE with the
1043old size. Default rehash size is 1.5.
1044
1045:rehash-threshold THRESHOLD
1046
1047THRESHOLD must be a float > 0 and <= 1.0 specifying when to resize the
1048hash table. It is resized when the ratio of (number of entries) /
1049(size of hash table) is >= THRESHOLD. Default threshold is 0.8.
1050
1051:weakness WEAK
1052
1053WEAK must be either nil, one of the symbols `key, `value', or t.
1054Entries are removed from weak tables during garbage collection if
1055their key and/or value are not referenced elsewhere outside of the
1056hash table. Default are non-weak hash tables.
1057
1058- Function: makehash &optional TEST
1059
1060Similar to make-hash-table, but only TEST can be specified.
1061
1062- Function: hash-table-p TABLE
1063
1064Returns non-nil if TABLE is a hash table object.
1065
1066- Function: copy-hash-table TABLE
1067
1068Returns a copy of TABLE. Only the table itself is copied, keys and
1069values are shared.
1070
1071- Function: hash-table-count TABLE
1072
1073Returns the number of entries in TABLE.
1074
1075- Function: hash-table-rehash-size TABLE
1076
1077Returns the rehash size of TABLE.
1078
1079- Function: hash-table-rehash-threshold TABLE
1080
1081Returns the rehash threshold of TABLE.
1082
1083- Function: hash-table-rehash-size TABLE
1084
1085Returns the size of TABLE.
1086
1087- Function: hash-table-rehash-test TABLE
1088
1089Returns the test TABLE uses to compare keys.
1090
1091- Function: hash-table-weakness TABLE
1092
1093Returns the weakness specified for TABLE.
1094
1095- Function: clrhash TABLE
1096
1097Clear TABLE.
1098
1099- Function: gethash KEY TABLE &optional DEFAULT
1100
1101Look up KEY in TABLE and return its associated VALUE or DEFAULT if
1102not found.
1103
79214ddf 1104- Function: puthash KEY VALUE TABLE
a933dad1
DL
1105
1106Associate KEY with VALUE in TABLE. If KEY is already associated with
1107another value, replace the old value with VALUE.
1108
1109- Function: remhash KEY TABLE
1110
1111Remove KEY from TABLE if it is there.
1112
1113- Function: maphash FUNCTION TABLE
1114
1115Call FUNCTION for all elements in TABLE. FUNCTION must take two
1116arguments KEY and VALUE.
1117
1118- Function: sxhash OBJ
1119
1120Return a hash code for Lisp object OBJ.
1121
1122- Function: define-hash-table-test NAME TEST-FN HASH-FN
1123
1124Define a new hash table test named NAME. If NAME is specified as
1125a test in `make-hash-table', the table created will use TEST-FN for
79214ddf 1126comparing keys, and HASH-FN to compute hash codes for keys. Test
a933dad1
DL
1127and hash function are stored as symbol property `hash-table-test'
1128of NAME with a value of (TEST-FN HASH-FN).
1129
1130TEST-FN must take two arguments and return non-nil if they are the same.
1131
1132HASH-FN must take one argument and return an integer that is the hash
1133code of the argument. The function should use the whole range of
1134integer values for hash code computation, including negative integers.
1135
1136Example: The following creates a hash table whose keys are supposed to
1137be strings that are compared case-insensitively.
1138
1139 (defun case-fold-string= (a b)
1140 (compare-strings a nil nil b nil nil t))
1141
1142 (defun case-fold-string-hash (a)
1143 (sxhash (upcase a)))
1144
79214ddf 1145 (define-hash-table-test 'case-fold 'case-fold-string=
a933dad1
DL
1146 'case-fold-string-hash))
1147
1148 (make-hash-table :test 'case-fold)
1149
1150+++
1151** The Lisp reader handles circular structure.
1152
1153It now works to use the #N= and #N# constructs to represent
1154circular structures. For example, #1=(a . #1#) represents
1155a cons cell which is its own cdr.
1156
1157+++
1158** The Lisp printer handles circular structure.
1159
1160If you bind print-circle to a non-nil value, the Lisp printer outputs
1161#N= and #N# constructs to represent circular and shared structure.
1162
a933dad1
DL
1163+++
1164** If the second argument to `move-to-column' is anything but nil or
1165t, that means replace a tab with spaces if necessary to reach the
1166specified column, but do not add spaces at the end of the line if it
1167is too short to reach that column.
1168
1169+++
1170** perform-replace has a new feature: the REPLACEMENTS argument may
1171now be a cons cell (FUNCTION . DATA). This means to call FUNCTION
1172after each match to get the replacement text. FUNCTION is called with
1173two arguments: DATA, and the number of replacements already made.
1174
1175If the FROM-STRING contains any upper-case letters,
1176perform-replace also turns off `case-fold-search' temporarily
1177and inserts the replacement text without altering case in it.
1178
1179+++
1180** The function buffer-size now accepts an optional argument
1181to specify which buffer to return the size of.
1182
1183+++
1184** The calendar motion commands now run the normal hook
1185calendar-move-hook after moving point.
1186
1187+++
1188** The new variable small-temporary-file-directory specifies a
1189directory to use for creating temporary files that are likely to be
1190small. (Certain Emacs features use this directory.) If
1191small-temporary-file-directory is nil, they use
1192temporary-file-directory instead.
1193
1194+++
1195** The variable `inhibit-modification-hooks', if non-nil, inhibits all
1196the hooks that track changes in the buffer. This affects
1197`before-change-functions' and `after-change-functions', as well as
1198hooks attached to text properties and overlay properties.
1199
1200+++
1201** assoc-delete-all is a new function that deletes all the
1202elements of an alist which have a particular value as the car.
1203
1204+++
1205** make-temp-file provides a more reliable way to create a temporary file.
1206
1207make-temp-file is used like make-temp-name, except that it actually
1208creates the file before it returns. This prevents a timing error,
1209ensuring that no other job can use the same name for a temporary file.
1210
1211+++
1212** New exclusive-open feature in `write-region'
1213
1214The optional seventh arg is now called MUSTBENEW. If non-nil, it insists
1215on a check for an existing file with the same name. If MUSTBENEW
1216is `excl', that means to get an error if the file already exists;
1217never overwrite. If MUSTBENEW is neither nil nor `excl', that means
1218ask for confirmation before overwriting, but do go ahead and
1219overwrite the file if the user gives confirmation.
1220
1221If the MUSTBENEW argument in `write-region' is `excl',
1222that means to use a special feature in the `open' system call
1223to get an error if the file exists at that time.
1224The error reported is `file-already-exists'.
1225
1226+++
1227** Function `format' now handles text properties.
1228
1229Text properties of the format string are applied to the result string.
1230If the result string is longer than the format string, text properties
1231ending at the end of the format string are extended to the end of the
1232result string.
1233
1234Text properties from string arguments are applied to the result
1235string where arguments appear in the result string.
1236
1237Example:
1238
1239 (let ((s1 "hello, %s")
1240 (s2 "world"))
1241 (put-text-property 0 (length s1) 'face 'bold s1)
1242 (put-text-property 0 (length s2) 'face 'italic s2)
b246b1f6 1243 (format s1 s2))
a933dad1
DL
1244
1245results in a bold-face string with an italic `world' at the end.
1246
1247+++
1248** Messages can now be displayed with text properties.
1249
1250Text properties are handled as described above for function `format'.
1251The following example displays a bold-face message with an italic
1252argument in it.
1253
1254 (let ((msg "hello, %s!")
1255 (arg "world"))
1256 (put-text-property 0 (length msg) 'face 'bold msg)
1257 (put-text-property 0 (length arg) 'face 'italic arg)
1258 (message msg arg))
1259
1260+++
1261** Sound support
1262
1263Emacs supports playing sound files on GNU/Linux and the free BSDs
1264(Voxware driver and native BSD driver, aka as Luigi's driver).
1265
1266Currently supported file formats are RIFF-WAVE (*.wav) and Sun Audio
1267(*.au). You must configure Emacs with the option `--with-sound=yes'
1268to enable sound support.
1269
1270Sound files can be played by calling (play-sound SOUND). SOUND is a
1271list of the form `(sound PROPERTY...)'. The function is only defined
1272when sound support is present for the system on which Emacs runs. The
1273functions runs `play-sound-functions' with one argument which is the
1274sound to play, before playing the sound.
1275
1276The following sound properties are supported:
1277
1278- `:file FILE'
1279
1280FILE is a file name. If FILE isn't an absolute name, it will be
1281searched relative to `data-directory'.
1282
6fb40beb
GM
1283- `:data DATA'
1284
1285DATA is a string containing sound data. Either :file or :data
1286may be present, but not both.
1287
a933dad1
DL
1288- `:volume VOLUME'
1289
1290VOLUME must be an integer in the range 0..100 or a float in the range
12910..1. This property is optional.
1292
1293Other properties are ignored.
1294
1295** `multimedia' is a new Finder keyword and Custom group.
356673d4
DL
1296
1297** keywordp is a new predicate to test efficiently for an object being
1298a keyword symbol.
fc91dc2d
GM
1299
1300** Changes to garbage collection
1301
1302*** The function garbage-collect now additionally returns the number
1303of live and free strings.
1304
1305*** There is a new variable `strings-consed' holding the number of
1306strings that have been consed so far.
1307
a933dad1
DL
1308\f
1309* New Lisp-level Display features in Emacs 21.1
1310
1311Note that +++ before an item means the Lisp manual has been updated.
1312--- means that I have decided it does not need to be in the Lisp manual.
1313When you add a new item, please add it without either +++ or ---
1314so I will know I still need to look at it -- rms.
1315
1316** New face implementation.
1317
1318Emacs faces have been reimplemented from scratch. They don't use XLFD
1319font names anymore and face merging now works as expected.
1320
1321+++
1322*** New faces.
1323
1324Each face can specify the following display attributes:
1325
1326 1. Font family or fontset alias name.
79214ddf 1327
a933dad1
DL
1328 2. Relative proportionate width, aka character set width or set
1329 width (swidth), e.g. `semi-compressed'.
79214ddf 1330
a933dad1 1331 3. Font height in 1/10pt
79214ddf 1332
a933dad1 1333 4. Font weight, e.g. `bold'.
79214ddf 1334
a933dad1 1335 5. Font slant, e.g. `italic'.
79214ddf 1336
a933dad1 1337 6. Foreground color.
79214ddf 1338
a933dad1
DL
1339 7. Background color.
1340
1341 8. Whether or not characters should be underlined, and in what color.
1342
1343 9. Whether or not characters should be displayed in inverse video.
1344
1345 10. A background stipple, a bitmap.
1346
1347 11. Whether or not characters should be overlined, and in what color.
1348
1349 12. Whether or not characters should be strike-through, and in what
1350 color.
1351
1352 13. Whether or not a box should be drawn around characters, its
1353 color, the width of the box lines, and 3D appearance.
1354
1355Faces are frame-local by nature because Emacs allows to define the
1356same named face (face names are symbols) differently for different
1357frames. Each frame has an alist of face definitions for all named
1358faces. The value of a named face in such an alist is a Lisp vector
1359with the symbol `face' in slot 0, and a slot for each each of the face
1360attributes mentioned above.
1361
1362There is also a global face alist `face-new-frame-defaults'. Face
1363definitions from this list are used to initialize faces of newly
1364created frames.
79214ddf 1365
a933dad1
DL
1366A face doesn't have to specify all attributes. Those not specified
1367have a nil value. Faces specifying all attributes are called
1368`fully-specified'.
1369
1370+++
1371*** Face merging.
1372
1373The display style of a given character in the text is determined by
1374combining several faces. This process is called `face merging'. Any
1375aspect of the display style that isn't specified by overlays or text
1376properties is taken from the `default' face. Since it is made sure
1377that the default face is always fully-specified, face merging always
1378results in a fully-specified face.
1379
1380+++
1381*** Face realization.
1382
1383After all face attributes for a character have been determined by
1384merging faces of that character, that face is `realized'. The
1385realization process maps face attributes to what is physically
1386available on the system where Emacs runs. The result is a `realized
1387face' in form of an internal structure which is stored in the face
1388cache of the frame on which it was realized.
1389
1390Face realization is done in the context of the charset of the
1391character to display because different fonts and encodings are used
1392for different charsets. In other words, for characters of different
1393charsets, different realized faces are needed to display them.
1394
1395Except for composite characters, faces are always realized for a
1396specific character set and contain a specific font, even if the face
1397being realized specifies a fontset. The reason is that the result of
1398the new font selection stage is better than what can be done with
1399statically defined font name patterns in fontsets.
1400
1401In unibyte text, Emacs' charsets aren't applicable; function
1402`char-charset' reports ASCII for all characters, including those >
14030x7f. The X registry and encoding of fonts to use is determined from
1404the variable `face-default-registry' in this case. The variable is
1405initialized at Emacs startup time from the font the user specified for
1406Emacs.
1407
1408Currently all unibyte text, i.e. all buffers with
1409`enable-multibyte-characters' nil are displayed with fonts of the same
1410registry and encoding `face-default-registry'. This is consistent
1411with the fact that languages can also be set globally, only.
1412
1413++++
1414**** Clearing face caches.
1415
1416The Lisp function `clear-face-cache' can be called to clear face caches
1417on all frames. If called with a non-nil argument, it will also unload
1418unused fonts.
1419
1420+++
1421*** Font selection.
79214ddf 1422
a933dad1
DL
1423Font selection tries to find the best available matching font for a
1424given (charset, face) combination. This is done slightly differently
1425for faces specifying a fontset, or a font family name.
1426
1427If the face specifies a fontset name, that fontset determines a
1428pattern for fonts of the given charset. If the face specifies a font
1429family, a font pattern is constructed. Charset symbols have a
1430property `x-charset-registry' for that purpose that maps a charset to
1431an XLFD registry and encoding in the font pattern constructed.
1432
1433Available fonts on the system on which Emacs runs are then matched
1434against the font pattern. The result of font selection is the best
1435match for the given face attributes in this font list.
1436
1437Font selection can be influenced by the user.
1438
1439The user can specify the relative importance he gives the face
1440attributes width, height, weight, and slant by setting
1441face-font-selection-order (faces.el) to a list of face attribute
1442names. The default is (:width :height :weight :slant), and means
1443that font selection first tries to find a good match for the font
1444width specified by a face, then---within fonts with that width---tries
1445to find a best match for the specified font height, etc.
1446
1447Setting `face-alternative-font-family-alist' allows the user to
1448specify alternative font families to try if a family specified by a
1449face doesn't exist.
1450
1451+++
1452**** Scalable fonts
1453
1454Emacs can make use of scalable fonts but doesn't do so by default,
1455since the use of too many or too big scalable fonts may crash XFree86
1456servers.
1457
1458To enable scalable font use, set the variable
b246b1f6 1459`scalable-fonts-allowed'. A value of nil, the default, means never use
a933dad1
DL
1460scalable fonts. A value of t means any scalable font may be used.
1461Otherwise, the value must be a list of regular expressions. A
1462scalable font may then be used if it matches a regular expression from
1463that list. Example:
1464
1465 (setq scalable-fonts-allowed '("muleindian-2$"))
1466
1467allows the use of scalable fonts with registry `muleindian-2'.
1468
1469+++
1470*** Functions and variables related to font selection.
1471
1472- Function: x-family-fonts &optional FAMILY FRAME
1473
1474Return a list of available fonts of family FAMILY on FRAME. If FAMILY
1475is omitted or nil, list all families. Otherwise, FAMILY must be a
1476string, possibly containing wildcards `?' and `*'.
1477
1478If FRAME is omitted or nil, use the selected frame. Each element of
1479the result is a vector [FAMILY WIDTH POINT-SIZE WEIGHT SLANT FIXED-P
1480FULL REGISTRY-AND-ENCODING]. FAMILY is the font family name.
1481POINT-SIZE is the size of the font in 1/10 pt. WIDTH, WEIGHT, and
1482SLANT are symbols describing the width, weight and slant of the font.
1483These symbols are the same as for face attributes. FIXED-P is non-nil
1484if the font is fixed-pitch. FULL is the full name of the font, and
1485REGISTRY-AND-ENCODING is a string giving the registry and encoding of
1486the font. The result list is sorted according to the current setting
1487of the face font sort order.
1488
79214ddf 1489- Function: x-font-family-list
a933dad1
DL
1490
1491Return a list of available font families on FRAME. If FRAME is
1492omitted or nil, use the selected frame. Value is a list of conses
1493(FAMILY . FIXED-P) where FAMILY is a font family, and FIXED-P is
1494non-nil if fonts of that family are fixed-pitch.
1495
1496- Variable: font-list-limit
1497
1498Limit for font matching. If an integer > 0, font matching functions
1499won't load more than that number of fonts when searching for a
1500matching font. The default is currently 100.
1501
1502+++
1503*** Setting face attributes.
1504
1505For the most part, the new face implementation is interface-compatible
1506with the old one. Old face attribute related functions are now
1507implemented in terms of the new functions `set-face-attribute' and
1508`face-attribute'.
1509
1510Face attributes are identified by their names which are keyword
1511symbols. All attributes can be set to `unspecified'.
1512
1513The following attributes are recognized:
1514
1515`:family'
1516
1517VALUE must be a string specifying the font family, e.g. ``courier'',
1518or a fontset alias name. If a font family is specified, wild-cards `*'
1519and `?' are allowed.
1520
1521`:width'
1522
1523VALUE specifies the relative proportionate width of the font to use.
1524It must be one of the symbols `ultra-condensed', `extra-condensed',
1525`condensed', `semi-condensed', `normal', `semi-expanded', `expanded',
1526`extra-expanded', or `ultra-expanded'.
1527
1528`:height'
1529
1530VALUE must be an integer specifying the height of the font to use in
15311/10 pt.
1532
1533`:weight'
1534
1535VALUE specifies the weight of the font to use. It must be one of the
1536symbols `ultra-bold', `extra-bold', `bold', `semi-bold', `normal',
1537`semi-light', `light', `extra-light', `ultra-light'.
1538
1539`:slant'
1540
1541VALUE specifies the slant of the font to use. It must be one of the
1542symbols `italic', `oblique', `normal', `reverse-italic', or
1543`reverse-oblique'.
1544
1545`:foreground', `:background'
1546
1547VALUE must be a color name, a string.
1548
1549`:underline'
1550
1551VALUE specifies whether characters in FACE should be underlined. If
1552VALUE is t, underline with foreground color of the face. If VALUE is
1553a string, underline with that color. If VALUE is nil, explicitly
1554don't underline.
1555
1556`:overline'
1557
1558VALUE specifies whether characters in FACE should be overlined. If
1559VALUE is t, overline with foreground color of the face. If VALUE is a
1560string, overline with that color. If VALUE is nil, explicitly don't
1561overline.
1562
1563`:strike-through'
1564
1565VALUE specifies whether characters in FACE should be drawn with a line
1566striking through them. If VALUE is t, use the foreground color of the
1567face. If VALUE is a string, strike-through with that color. If VALUE
1568is nil, explicitly don't strike through.
1569
1570`:box'
1571
1572VALUE specifies whether characters in FACE should have a box drawn
1573around them. If VALUE is nil, explicitly don't draw boxes. If
1574VALUE is t, draw a box with lines of width 1 in the foreground color
1575of the face. If VALUE is a string, the string must be a color name,
1576and the box is drawn in that color with a line width of 1. Otherwise,
1577VALUE must be a property list of the form `(:line-width WIDTH
1578:color COLOR :style STYLE)'. If a keyword/value pair is missing from
1579the property list, a default value will be used for the value, as
1580specified below. WIDTH specifies the width of the lines to draw; it
1581defaults to 1. COLOR is the name of the color to draw in, default is
1582the foreground color of the face for simple boxes, and the background
1583color of the face for 3D boxes. STYLE specifies whether a 3D box
1584should be draw. If STYLE is `released-button', draw a box looking
1585like a released 3D button. If STYLE is `pressed-button' draw a box
1586that appears like a pressed button. If STYLE is nil, the default if
1587the property list doesn't contain a style specification, draw a 2D
1588box.
1589
1590`:inverse-video'
1591
1592VALUE specifies whether characters in FACE should be displayed in
1593inverse video. VALUE must be one of t or nil.
1594
1595`:stipple'
1596
1597If VALUE is a string, it must be the name of a file of pixmap data.
1598The directories listed in the `x-bitmap-file-path' variable are
1599searched. Alternatively, VALUE may be a list of the form (WIDTH
1600HEIGHT DATA) where WIDTH and HEIGHT are the size in pixels, and DATA
1601is a string containing the raw bits of the bitmap. VALUE nil means
1602explicitly don't use a stipple pattern.
1603
1604For convenience, attributes `:family', `:width', `:height', `:weight',
1605and `:slant' may also be set in one step from an X font name:
1606
1607`:font'
1608
1609Set font-related face attributes from VALUE. VALUE must be a valid
1610XLFD font name. If it is a font name pattern, the first matching font
1611is used--this is for compatibility with the behavior of previous
1612versions of Emacs.
1613
1614For compatibility with Emacs 20, keywords `:bold' and `:italic' can
1615be used to specify that a bold or italic font should be used. VALUE
1616must be t or nil in that case. A value of `unspecified' is not allowed."
1617
1618Please see also the documentation of `set-face-attribute' and
1619`defface'.
1620
1621*** Face attributes and X resources
1622
1623The following X resource names can be used to set face attributes
1624from X resources:
1625
1626 Face attribute X resource class
1627-----------------------------------------------------------------------
1628 :family attributeFamily . Face.AttributeFamily
1629 :width attributeWidth Face.AttributeWidth
1630 :height attributeHeight Face.AttributeHeight
1631 :weight attributeWeight Face.AttributeWeight
1632 :slant attributeSlant Face.AttributeSlant
1633 foreground attributeForeground Face.AttributeForeground
1634 :background attributeBackground . Face.AttributeBackground
1635 :overline attributeOverline Face.AttributeOverline
1636 :strike-through attributeStrikeThrough Face.AttributeStrikeThrough
1637 :box attributeBox Face.AttributeBox
1638 :underline attributeUnderline Face.AttributeUnderline
1639 :inverse-video attributeInverse Face.AttributeInverse
1640 :stipple attributeStipple Face.AttributeStipple
79214ddf 1641 or attributeBackgroundPixmap
a933dad1
DL
1642 Face.AttributeBackgroundPixmap
1643 :font attributeFont Face.AttributeFont
1644 :bold attributeBold Face.AttributeBold
1645 :italic attributeItalic . Face.AttributeItalic
1646 :font attributeFont Face.AttributeFont
1647
1648+++
1649*** Text property `face'.
1650
1651The value of the `face' text property can now be a single face
1652specification or a list of such specifications. Each face
1653specification can be
1654
16551. A symbol or string naming a Lisp face.
1656
16572. A property list of the form (KEYWORD VALUE ...) where each
1658 KEYWORD is a face attribute name, and VALUE is an appropriate value
1659 for that attribute. Please see the doc string of `set-face-attribute'
1660 for face attribute names.
1661
16623. Conses of the form (FOREGROUND-COLOR . COLOR) or
1663 (BACKGROUND-COLOR . COLOR) where COLOR is a color name. This is
1664 for compatibility with previous Emacs versions.
1665
1666+++
1667** Support functions for colors on text-only terminals.
1668
acf3ecb7
EZ
1669The function `tty-color-define' can be used to define colors for use
1670on TTY and MSDOS frames. It maps a color name to a color number on
1671the terminal. Emacs defines a couple of common color mappings by
a933dad1 1672default. You can get defined colors with a call to
acf3ecb7 1673`defined-colors'. The function `tty-color-clear' can be
a933dad1
DL
1674used to clear the mapping table.
1675
acf3ecb7
EZ
1676** Unified support for colors independent of frame type.
1677
1678The new functions `defined-colors', `color-defined-p', `color-values',
1679and `display-color-p' work for any type of frame. On frames whose
1680type is neither x nor w32, these functions transparently map X-style
1681color specifications to the closest colors supported by the frame
1682display. Lisp programs should use these new functions instead of the
1683old `x-defined-colors', `x-color-defined-p', `x-color-values', and
1684`x-display-color-p'. (The old function names are still available for
1685compatibility; they are now aliases of the new names.) Lisp programs
1686should no more look at the value of the variable window-system to
1687modify their color-related behavior.
1688
1689The primitives `color-gray-p' and `color-supported-p' also work for
1690any frame type.
1691
a933dad1
DL
1692+++
1693** The minibuffer prompt is now actually inserted in the minibuffer.
a933dad1 1694
463cac2d 1695This makes it possible to scroll through the prompt, if you want to.
a933dad1
DL
1696
1697The function minubuffer-prompt-end returns the current position of the
1698end of the minibuffer prompt, if the minibuffer is current.
1699Otherwise, it returns zero.
1700
463cac2d
GM
1701** New `field' abstraction in buffers.
1702
1703There is now code to support an abstraction called `fields' in emacs
1704buffers. A field is a contiguous region of text with the same `field'
1705text-property.
1706
9a9dfda8 1707Many emacs functions, such as forward-word, forward-sentence,
463cac2d 1708forward-paragraph, beginning-of-line, etc., stop moving when they come
9a9dfda8 1709to the boundary between fields; beginning-of-line and end-of-line will
463cac2d 1710not let the point move past the field boundary, but other movement
fc7ac24f
GM
1711commands continue into the next field if repeated. Stopping at field
1712boundaries can be suppressed programmatically by binding
1713`inhibit-field-text-motion' to a non-nil value around calls to these
1714functions.
463cac2d
GM
1715
1716Now that the minibuffer prompt is inserted into the minibuffer, it is in
9a9dfda8 1717a separate field from the user-input part of the buffer, so that common
463cac2d 1718editing commands treat the user's text separately from the prompt.
a933dad1 1719
9a9dfda8
GM
1720The following functions are defined for operating on fields:
1721
1722- Function: constrain-to-field NEW-POS OLD-POS &optional ESCAPE-FROM-EDGE ONLY-IN-LINE
1723
1724Return the position closest to NEW-POS that is in the same field as OLD-POS.
1725A field is a region of text with the same `field' property.
1726If NEW-POS is nil, then the current point is used instead, and set to the
1727constrained position if that is is different.
1728
1729If OLD-POS is at the boundary of two fields, then the allowable
1730positions for NEW-POS depends on the value of the optional argument
1731ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is
1732constrained to the field that has the same `field' text-property
1733as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE
1734is non-nil, NEW-POS is constrained to the union of the two adjacent
1735fields.
1736
1737If the optional argument ONLY-IN-LINE is non-nil and constraining
1738NEW-POS would move it to a different line, NEW-POS is returned
1739unconstrained. This useful for commands that move by line, like
1740C-n or C-a, which should generally respect field boundaries
1741only in the case where they can still move to the right line.
1742
1743- Function: erase-field &optional POS
1744
1745Erases the field surrounding POS.
1746A field is a region of text with the same `field' property.
1747If POS is nil, the position of the current buffer's point is used.
1748
1749- Function: field-beginning &optional POS ESCAPE-FROM-EDGE
1750
1751Return the beginning of the field surrounding POS.
1752A field is a region of text with the same `field' property.
1753If POS is nil, the position of the current buffer's point is used.
1754If ESCAPE-FROM-EDGE is non-nil and POS is already at beginning of an
1755field, then the beginning of the *previous* field is returned.
1756
1757- Function: field-end &optional POS ESCAPE-FROM-EDGE
1758
1759Return the end of the field surrounding POS.
1760A field is a region of text with the same `field' property.
1761If POS is nil, the position of the current buffer's point is used.
1762If ESCAPE-FROM-EDGE is non-nil and POS is already at end of a field,
1763then the end of the *following* field is returned.
1764
1765- Function: field-string &optional POS
1766
1767Return the contents of the field surrounding POS as a string.
1768A field is a region of text with the same `field' property.
1769If POS is nil, the position of the current buffer's point is used.
1770
1771- Function: field-string-no-properties &optional POS
1772
1773Return the contents of the field around POS, without text-properties.
1774A field is a region of text with the same `field' property.
1775If POS is nil, the position of the current buffer's point is used.
1776
a933dad1
DL
1777+++
1778** Image support.
1779
1780Emacs can now display images. Images are inserted into text by giving
1781strings or buffer text a `display' text property containing one of
1782(AREA IMAGE) or IMAGE. The display of the `display' property value
1783replaces the display of the characters having that property.
1784
1785If the property value has the form (AREA IMAGE), AREA must be one of
1786`(margin left-margin)', `(margin right-margin)' or `(margin nil)'. If
1787AREA is `(margin nil)', IMAGE will be displayed in the text area of a
1788window, otherwise it will be displayed in the left or right marginal
1789area.
1790
1791IMAGE is an image specification.
1792
1793*** Image specifications
1794
1795Image specifications are lists of the form `(image PROPS)' where PROPS
1796is a property list whose keys are keyword symbols. Each
1797specifications must contain a property `:type TYPE' with TYPE being a
35a5514b
GM
1798symbol specifying the image type, e.g. `xbm'. Properties not
1799described below are ignored.
a933dad1
DL
1800
1801The following is a list of properties all image types share.
1802
1803`:ascent ASCENT'
1804
1805ASCENT must be a number in the range 0..100, and specifies the percentage
1806of the image's height to use for its ascent. Default is 50.
1807
1808`:margin MARGIN'
1809
79214ddf 1810MARGIN must be a number >= 0 specifying how many pixels to put as
a933dad1
DL
1811margin around the image. Default is 0.
1812
1813`:relief RELIEF'
1814
1815RELIEF is analogous to the `:relief' attribute of faces. Puts a relief
1816around an image.
1817
1818`:algorithm ALGO'
1819
1820Apply an image algorithm to the image before displaying it. ALGO must
1821be a symbol specifying the algorithm. Currently only `laplace' is
1822supported which applies a Laplace edge detection algorithm to an image
1823which is intended to display images "disabled."
1824
1825`:heuristic-mask BG'
1826
1827If BG is not nil, build a clipping mask for the image, so that the
1828background of a frame is visible behind the image. If BG is t,
1829determine the background color of the image by looking at the 4
1830corners of the image, assuming the most frequently occuring color from
1831the corners is the background color of the image. Otherwise, BG must
1832be a list `(RED GREEN BLUE)' specifying the color to assume for the
1833background of the image.
1834
1835`:file FILE'
1836
1837Load image from FILE. If FILE is not absolute after expanding it,
1838search for the image in `data-directory'. Some image types support
1839building images from data. When this is done, no `:file' property
1840may be present in the image specification.
1841
518df5c4
GM
1842`:data DATA'
1843
1844Get image data from DATA. (As of this writing, this is not yet
1845supported for image type `postscript'). Either :file or :data may be
1846present in an image specification, but not both. All image types
1847support strings as DATA, some types allow additional types of DATA.
1848
a933dad1
DL
1849*** Supported image types
1850
b246b1f6 1851**** XBM, image type `xbm'.
a933dad1
DL
1852
1853XBM images don't require an external library. Additional image
1854properties supported are
1855
1856`:foreground FG'
1857
1858FG must be a string specifying the image foreground color. Default
1859is the frame's foreground.
1860
1861`:background FG'
1862
1863BG must be a string specifying the image foreground color. Default is
1864the frame's background color.
1865
1866XBM images can be constructed from data instead of file. In this
1867case, the image specification must contain the following properties
1868instead of a `:file' property.
1869
1870`:width WIDTH'
1871
1872WIDTH specifies the width of the image in pixels.
1873
1874`:height HEIGHT'
1875
1876HEIGHT specifies the height of the image in pixels.
1877
1878`:data DATA'
1879
1880DATA must be either
1881
1882 1. a string large enough to hold the bitmap data, i.e. it must
1883 have a size >= (WIDTH + 7) / 8 * HEIGHT
1884
1885 2. a bool-vector of size >= WIDTH * HEIGHT
1886
1887 3. a vector of strings or bool-vectors, one for each line of the
1888 bitmap.
1889
1890**** XPM, image type `xpm'
1891
1892XPM images require the external library `libXpm', package
1893`xpm-3.4k.tar.gz', version 3.4k or later. Make sure the library is
1894found when Emacs is configured by supplying appropriate paths via
1895`--x-includes' and `--x-libraries'.
1896
1897Additional image properties supported are:
1898
1899`:color-symbols SYMBOLS'
1900
1901SYMBOLS must be a list of pairs (NAME . COLOR), with NAME being the
1902name of color as it appears in an XPM file, and COLOR being an X color
1903name.
1904
1905XPM images can be built from memory instead of files. In that case,
1906add a `:data' property instead of a `:file' property.
1907
a933dad1
DL
1908The XPM library uses libz in its implementation so that it is able
1909to display compressed images.
1910
1911**** PBM, image type `pbm'
1912
1913PBM images don't require an external library. Color, gray-scale and
1914mono images are supported. There are no additional image properties
1915defined.
1916
1917**** JPEG, image type `jpeg'
1918
1919Support for JPEG images requires the external library `libjpeg',
3bd37feb
GM
1920package `jpegsrc.v6a.tar.gz', or later. Additional image properties
1921are:
1922
a933dad1
DL
1923**** TIFF, image type `tiff'
1924
1925Support for TIFF images requires the external library `libtiff',
1926package `tiff-v3.4-tar.gz', or later. There are no additional image
1927properties defined.
1928
1929**** GIF, image type `gif'
1930
1931Support for GIF images requires the external library `libungif', package
1932`libungif-4.1.0', or later.
1933
1934Additional image properties supported are:
1935
1936`:index INDEX'
1937
1938INDEX must be an integer >= 0. Load image number INDEX from a
1939multi-image GIF file. An error is signalled if INDEX is too large.
1940
1941This could be used to implement limited support for animated GIFs.
1942For example, the following function displays a multi-image GIF file
1943at point-min in the current buffer, switching between sub-images
1944every 0.1 seconds.
1945
1946(defun show-anim (file max)
1947 "Display multi-image GIF file FILE which contains MAX subimages."
1948 (display-anim (current-buffer) file 0 max t))
1949
1950(defun display-anim (buffer file idx max first-time)
1951 (when (= idx max)
1952 (setq idx 0))
518df5c4 1953 (let ((img (create-image file nil nil :index idx)))
a933dad1
DL
1954 (save-excursion
1955 (set-buffer buffer)
1956 (goto-char (point-min))
1957 (unless first-time (delete-char 1))
1958 (insert-image img "x"))
1959 (run-with-timer 0.1 nil 'display-anim buffer file (1+ idx) max nil)))
1960
1961**** PNG, image type `png'
1962
1963Support for PNG images requires the external library `libpng',
1964package `libpng-1.0.2.tar.gz', or later. There are no additional image
1965properties defined.
1966
1967**** Ghostscript, image type `postscript'.
1968
1969Additional image properties supported are:
1970
1971`:pt-width WIDTH'
1972
1973WIDTH is width of the image in pt (1/72 inch). WIDTH must be an
b246b1f6 1974integer. This is a required property.
a933dad1
DL
1975
1976`:pt-height HEIGHT'
1977
1978HEIGHT specifies the height of the image in pt (1/72 inch). HEIGHT
b246b1f6 1979must be a integer. This is an required property.
a933dad1
DL
1980
1981`:bounding-box BOX'
1982
1983BOX must be a list or vector of 4 integers giving the bounding box of
1984the PS image, analogous to the `BoundingBox' comment found in PS
1985files. This is an required property.
1986
1987Part of the Ghostscript interface is implemented in Lisp. See
1988lisp/gs.el.
1989
1990*** Lisp interface.
1991
79214ddf
FP
1992The variable `image-types' contains a list of those image types
1993which are supported in the current configuration.
a933dad1
DL
1994
1995Images are stored in an image cache and removed from the cache when
1996they haven't been displayed for `image-cache-eviction-delay seconds.
1997The function `clear-image-cache' can be used to clear the image cache
1998manually.
1999
2000*** Simplified image API, image.el
2001
2002The new Lisp package image.el contains functions that simplify image
2003creation and putting images into text. The function `create-image'
2004can be used to create images. The macro `defimage' can be used to
2005define an image based on available image types. The functions
2006`put-image' and `insert-image' can be used to insert an image into a
2007buffer.
2008
2009+++
2010** Display margins.
2011
2012Windows can now have margins which are used for special text
2013and images.
2014
2015To give a window margins, either set the buffer-local variables
2016`left-margin-width' and `right-margin-width', or call
2017`set-window-margins'. The function `window-margins' can be used to
2018obtain the current settings. To make `left-margin-width' and
2019`right-margin-width' take effect, you must set them before displaying
2020the buffer in a window, or use `set-window-buffer' to force an update
2021of the display margins.
2022
2023You can put text in margins by giving it a `display' text property
2024containing a pair of the form `(LOCATION . VALUE)', where LOCATION is
2025one of `left-margin' or `right-margin' or nil. VALUE can be either a
2026string, an image specification or a stretch specification (see later
2027in this file).
2028
2029+++
2030** Help display
2031
2032Emacs displays short help messages in the echo area, when the mouse
2033moves over a tool-bar item or a piece of text that has a text property
2034`help-echo'. This feature also applies to strings in the mode line
2035that have a `help-echo' property.
2036
2037The value of the `help-echo' property must be a string. For tool-bar
2038items, their key definition is used to determine the help to display.
2039If their definition contains a property `:help FORM', FORM is
2040evaluated to determine the help string. Otherwise, the caption of the
2041tool-bar item is used.
2042
2043The hook `show-help-function' can be set to a function that displays
2044help differently. For example, enabling a tooltip window causes the
2045help display to appear there instead of in the echo area.
2046
2047+++
2048** Vertical fractional scrolling.
2049
2050The display of text in windows can be scrolled smoothly in pixels.
2051This is useful, for example, for making parts of large images visible.
2052
2053The function `window-vscroll' returns the current value of vertical
2054scrolling, a non-negative fraction of the canonical character height.
2055The function `set-window-vscroll' can be used to set the vertical
2056scrolling value. Here is an example of how these function might be
2057used.
2058
79214ddf
FP
2059 (global-set-key [A-down]
2060 #'(lambda ()
a933dad1 2061 (interactive)
79214ddf 2062 (set-window-vscroll (selected-window)
a933dad1 2063 (+ 0.5 (window-vscroll)))))
79214ddf 2064 (global-set-key [A-up]
a933dad1
DL
2065 #'(lambda ()
2066 (interactive)
79214ddf 2067 (set-window-vscroll (selected-window)
a933dad1
DL
2068 (- (window-vscroll) 0.5)))))
2069
2070+++
2071** New hook `fontification-functions'.
2072
2073Functions from `fontification-functions' are called from redisplay
2074when it encounters a region of text that is not yet fontified. This
2075variable automatically becomes buffer-local when set. Each function
2076is called with one argument, POS.
2077
2078At least one of the hook functions should fontify one or more
2079characters starting at POS in the current buffer. It should mark them
2080as fontified by giving them a non-nil value of the `fontified' text
2081property. It may be reasonable for these functions to check for the
2082`fontified' property and not put it back on, but they do not have to.
2083
2084+++
2085** Tool bar support.
2086
2087Emacs supports a tool bar at the top of a frame under X. The frame
2088parameter `tool-bar-lines' (X resource "toolBar", class "ToolBar")
2089controls how may lines to reserve for the tool bar. A zero value
2090suppresses the tool bar. If the value is non-zero and
2091`auto-resize-tool-bars' is non-nil the tool bar's size will be changed
2092automatically so that all tool bar items are visible.
2093
2094*** Tool bar item definitions
2095
2096Tool bar items are defined using `define-key' with a prefix-key
2097`tool-bar'. For example `(define-key global-map [tool-bar item1] ITEM)'
2098where ITEM is a list `(menu-item CAPTION BINDING PROPS...)'.
79214ddf 2099
a933dad1
DL
2100CAPTION is the caption of the item, If it's not a string, it is
2101evaluated to get a string. The caption is currently not displayed in
2102the tool bar, but it is displayed if the item doesn't have a `:help'
2103property (see below).
79214ddf 2104
a933dad1
DL
2105BINDING is the tool bar item's binding. Tool bar items with keymaps as
2106binding are currently ignored.
2107
2108The following properties are recognized:
2109
2110`:enable FORM'.
79214ddf 2111
a933dad1
DL
2112FORM is evaluated and specifies whether the tool bar item is enabled
2113or disabled.
79214ddf 2114
a933dad1 2115`:visible FORM'
79214ddf 2116
a933dad1 2117FORM is evaluated and specifies whether the tool bar item is displayed.
79214ddf 2118
a933dad1
DL
2119`:filter FUNCTION'
2120
2121FUNCTION is called with one parameter, the same list BINDING in which
2122FUNCTION is specified as the filter. The value FUNCTION returns is
2123used instead of BINDING to display this item.
79214ddf 2124
a933dad1
DL
2125`:button (TYPE SELECTED)'
2126
2127TYPE must be one of `:radio' or `:toggle'. SELECTED is evaluated
2128and specifies whether the button is selected (pressed) or not.
79214ddf 2129
a933dad1
DL
2130`:image IMAGES'
2131
2132IMAGES is either a single image specification or a vector of four
2133image specifications. If it is a vector, this table lists the
2134meaning of each of the four elements:
2135
2136 Index Use when item is
2137 ----------------------------------------
2138 0 enabled and selected
2139 1 enabled and deselected
2140 2 disabled and selected
2141 3 disabled and deselected
79214ddf 2142
a933dad1 2143`:help HELP-STRING'.
79214ddf 2144
a933dad1
DL
2145Gives a help string to display for the tool bar item. This help
2146is displayed when the mouse is moved over the item.
2147
2148*** Tool-bar-related variables.
2149
2150If `auto-resize-tool-bar' is non-nil, the tool bar will automatically
2151resize to show all defined tool bar items. It will never grow larger
2152than 1/4 of the frame's size.
2153
79214ddf 2154If `auto-raise-tool-bar-buttons' is non-nil, tool bar buttons will be
a933dad1
DL
2155raised when the mouse moves over them.
2156
2157You can add extra space between tool bar items by setting
2158`tool-bar-button-margin' to a positive integer specifying a number of
2159pixels. Default is 1.
2160
2161You can change the shadow thickness of tool bar buttons by setting
2162`tool-bar-button-relief' to an integer. Default is 3.
2163
2164*** Tool-bar clicks with modifiers.
2165
2166You can bind commands to clicks with control, shift, meta etc. on
79214ddf 2167a tool bar item. If
a933dad1
DL
2168
2169 (define-key global-map [tool-bar shell]
2170 '(menu-item "Shell" shell
2171 :image (image :type xpm :file "shell.xpm")))
2172
2173is the original tool bar item definition, then
2174
2175 (define-key global-map [tool-bar S-shell] 'some-command)
2176
2177makes a binding to run `some-command' for a shifted click on the same
2178item.
2179
2180** Mode line changes.
2181
2182+++
2183*** Mouse-sensitive mode line.
2184
2185The mode line can be made mouse-sensitive by displaying strings there
2186that have a `local-map' text property. There are three ways to display
2187a string with a `local-map' property in the mode line.
2188
21891. The mode line spec contains a variable whose string value has
2190a `local-map' text property.
2191
21922. The mode line spec contains a format specifier (e.g. `%12b'), and
2193that format specifier has a `local-map' property.
2194
21953. The mode line spec contains a list containing `:eval FORM'. FORM
2196is evaluated. If the result is a string, and that string has a
2197`local-map' property.
2198
2199The same mechanism is used to determine the `face' and `help-echo'
2200properties of strings in the mode line. See `bindings.el' for an
2201example.
2202
54522c9f
GM
2203*** If a mode line element has the form `(:eval FORM)', FORM is
2204evaluated and the result is used as mode line element.
2205
a933dad1
DL
2206+++
2207*** You can suppress mode-line display by setting the buffer-local
2208variable mode-line-format to nil.
2209
2210+++
2211*** A headerline can now be displayed at the top of a window.
2212
2213This mode line's contents are controlled by the new variable
2214`header-line-format' and `default-header-line-format' which are
2215completely analogous to `mode-line-format' and
2216`default-mode-line-format'. A value of nil means don't display a top
2217line.
2218
2219The appearance of top mode lines is controlled by the face
2220`header-line'.
2221
2222The function `coordinates-in-window-p' returns `header-line' for a
2223position in the header-line.
2224
2225+++
2226** Text property `display'
2227
2228The `display' text property is used to insert images into text, and
2229also control other aspects of how text displays. The value of the
2230`display' property should be a display specification, as described
2231below, or a list or vector containing display specifications.
2232
2233*** Variable width and height spaces
2234
2235To display a space of fractional width or height, use a display
2236specification of the form `(LOCATION STRECH)'. If LOCATION is
2237`(margin left-margin)', the space is displayed in the left marginal
2238area, if it is `(margin right-margin)', it is displayed in the right
2239marginal area, and if LOCATION is `(margin nil)' the space is
2240displayed in the text. In the latter case you can also use the
2241simpler form STRETCH as property value.
2242
2243The stretch specification STRETCH itself is a list of the form `(space
2244PROPS)', where PROPS is a property list which can contain the
2245properties described below.
2246
2247The display of the fractional space replaces the display of the
2248characters having the `display' property.
2249
2250- :width WIDTH
2251
2252Specifies that the space width should be WIDTH times the normal
2253character width. WIDTH can be an integer or floating point number.
2254
2255- :relative-width FACTOR
2256
2257Specifies that the width of the stretch should be computed from the
2258first character in a group of consecutive characters that have the
2259same `display' property. The computation is done by multiplying the
2260width of that character by FACTOR.
2261
2262- :align-to HPOS
2263
2264Specifies that the space should be wide enough to reach HPOS. The
2265value HPOS is measured in units of the normal character width.
2266
2267Exactly one of the above properties should be used.
2268
2269- :height HEIGHT
2270
2271Specifies the height of the space, as HEIGHT, measured in terms of the
2272normal line height.
2273
2274- :relative-height FACTOR
2275
2276The height of the space is computed as the product of the height
2277of the text having the `display' property and FACTOR.
2278
2279- :ascent ASCENT
2280
2281Specifies that ASCENT percent of the height of the stretch should be
2282used for the ascent of the stretch, i.e. for the part above the
2283baseline. The value of ASCENT must be a non-negative number less or
2284equal to 100.
2285
2286You should not use both `:height' and `:relative-height' together.
2287
2288*** Images
2289
2290A display specification for an image has the form `(LOCATION
2291. IMAGE)', where IMAGE is an image specification. The image replaces,
2292in the display, the characters having this display specification in
2293their `display' text property. If LOCATION is `(margin left-margin)',
2294the image will be displayed in the left marginal area, if it is
2295`(margin right-margin)' it will be displayed in the right marginal
2296area, and if LOCATION is `(margin nil)' the image will be displayed in
2297the text. In the latter case you can also use the simpler form IMAGE
2298as display specification.
2299
2300*** Other display properties
2301
2302- :space-width FACTOR
2303
2304Specifies that space characters in the text having that property
2305should be displayed FACTOR times as wide as normal; FACTOR must be an
2306integer or float.
2307
2308- :height HEIGHT
2309
2310Display text having this property in a font that is smaller or larger.
2311
2312If HEIGHT is a list of the form `(+ N)', where N is an integer, that
2313means to use a font that is N steps larger. If HEIGHT is a list of
2314the form `(- N)', that means to use a font that is N steps smaller. A
2315``step'' is defined by the set of available fonts; each size for which
2316a font is available counts as a step.
2317
2318If HEIGHT is a number, that means to use a font that is HEIGHT times
2319as tall as the frame's default font.
2320
2321If HEIGHT is a symbol, it is called as a function with the current
2322height as argument. The function should return the new height to use.
2323
2324Otherwise, HEIGHT is evaluated to get the new height, with the symbol
2325`height' bound to the current specified font height.
2326
2327- :raise FACTOR
2328
2329FACTOR must be a number, specifying a multiple of the current
2330font's height. If it is positive, that means to display the characters
2331raised. If it is negative, that means to display them lower down. The
2332amount of raising or lowering is computed without taking account of the
2333`:height' subproperty.
2334
2335*** Conditional display properties
2336
2337All display specifications can be conditionalized. If a specification
2338has the form `(:when CONDITION . SPEC)', the specification SPEC
2339applies only when CONDITION yields a non-nil value when evaluated.
2340During evaluattion, point is temporarily set to the end position of
2341the text having the `display' property.
2342
2343The normal specification consisting of SPEC only is equivalent to
2344`(:when t SPEC)'.
2345
2346+++
2347** New menu separator types.
2348
2349Emacs now supports more than one menu separator type. Menu items with
2350item names consisting of dashes only (including zero dashes) are
2351treated like before. In addition, the following item names are used
2352to specify other menu separator types.
2353
2354- `--no-line' or `--space', or `--:space', or `--:noLine'
2355
2356No separator lines are drawn, but a small space is inserted where the
2357separator occurs.
2358
2359- `--single-line' or `--:singleLine'
2360
2361A single line in the menu's foreground color.
2362
2363- `--double-line' or `--:doubleLine'
2364
2365A double line in the menu's foreground color.
2366
2367- `--single-dashed-line' or `--:singleDashedLine'
2368
2369A single dashed line in the menu's foreground color.
2370
2371- `--double-dashed-line' or `--:doubleDashedLine'
2372
2373A double dashed line in the menu's foreground color.
2374
2375- `--shadow-etched-in' or `--:shadowEtchedIn'
2376
2377A single line with 3D sunken appearance. This is the the form
2378displayed for item names consisting of dashes only.
2379
2380- `--shadow-etched-out' or `--:shadowEtchedOut'
2381
2382A single line with 3D raised appearance.
2383
2384- `--shadow-etched-in-dash' or `--:shadowEtchedInDash'
2385
2386A single dashed line with 3D sunken appearance.
2387
2388- `--shadow-etched-out-dash' or `--:shadowEtchedOutDash'
2389
2390A single dashed line with 3D raise appearance.
2391
2392- `--shadow-double-etched-in' or `--:shadowDoubleEtchedIn'
2393
2394Two lines with 3D sunken appearance.
2395
2396- `--shadow-double-etched-out' or `--:shadowDoubleEtchedOut'
2397
2398Two lines with 3D raised appearance.
2399
2400- `--shadow-double-etched-in-dash' or `--:shadowDoubleEtchedInDash'
2401
2402Two dashed lines with 3D sunken appearance.
2403
2404- `--shadow-double-etched-out-dash' or `--:shadowDoubleEtchedOutDash'
2405
2406Two dashed lines with 3D raised appearance.
2407
2408Under LessTif/Motif, the last four separator types are displayed like
2409the corresponding single-line separators.
2410
2411+++
2412** New frame parameters for scroll bar colors.
2413
2414The new frame parameters `scroll-bar-foreground' and
2415`scroll-bar-background' can be used to change scroll bar colors.
2416Their value must be either a color name, a string, or nil to specify
2417that scroll bars should use a default color. For toolkit scroll bars,
2418default colors are toolkit specific. For non-toolkit scroll bars, the
2419default background is the background color of the frame, and the
2420default foreground is black.
2421
2422The X resource name of these parameters are `scrollBarForeground'
2423(class ScrollBarForeground) and `scrollBarBackground' (class
2424`ScrollBarBackground').
2425
2426Setting these parameters overrides toolkit specific X resource
2427settings for scroll bar colors.
2428
2429+++
2430** You can set `redisplay-dont-pause' to a non-nil value to prevent
2431display updates from being interrupted when input is pending.
2432
2433---
2434** Changing a window's width may now change its window start if it
2435starts on a continuation line. The new window start is computed based
2436on the window's new width, starting from the start of the continued
2437line as the start of the screen line with the minimum distance from
2438the original window start.
2439
2440---
2441** The variable `hscroll-step' and the functions
2442`hscroll-point-visible' and `hscroll-window-column' have been removed
2443now that proper horizontal scrolling is implemented.
2444
2445+++
2446** Windows can now be made fixed-width and/or fixed-height.
2447
2448A window is fixed-size if its buffer has a buffer-local variable
2449`window-size-fixed' whose value is not nil. A value of `height' makes
2450windows fixed-height, a value of `width' makes them fixed-width, any
2451other non-nil value makes them both fixed-width and fixed-height.
2452
2453The following code makes all windows displaying the current buffer
2454fixed-width and fixed-height.
2455
2456 (set (make-local-variable 'window-size-fixed) t)
2457
2458A call to enlarge-window on a window gives an error if that window is
2459fixed-width and it is tried to change the window's width, or if the
2460window is fixed-height, and it is tried to change its height. To
2461change the size of a fixed-size window, bind `window-size-fixed'
2462temporarily to nil, for example
2463
2464 (let ((window-size-fixed nil))
2465 (enlarge-window 10))
2466
79214ddf 2467Likewise, an attempt to split a fixed-height window vertically,
a933dad1 2468or a fixed-width window horizontally results in a error.
e33b0397
DL
2469^L
2470* Emacs 20.5 is a bug-fix release with no user-visible changes.
2471
2472** Not new, but not mentioned before:
2473M-w when Transient Mark mode is enabled disables the mark.
a933dad1
DL
2474\f
2475* Changes in Emacs 20.4
2476
2477** Init file may be called .emacs.el.
2478
2479You can now call the Emacs init file `.emacs.el'.
2480Formerly the name had to be `.emacs'. If you use the name
2481`.emacs.el', you can byte-compile the file in the usual way.
2482
2483If both `.emacs' and `.emacs.el' exist, the latter file
2484is the one that is used.
2485
2486** shell-command, and shell-command-on-region, now return
2487the exit code of the command (unless it is asynchronous).
2488Also, you can specify a place to put the error output,
2489separate from the command's regular output.
2490Interactively, the variable shell-command-default-error-buffer
2491says where to put error output; set it to a buffer name.
2492In calls from Lisp, an optional argument ERROR-BUFFER specifies
2493the buffer name.
2494
2495When you specify a non-nil error buffer (or buffer name), any error
2496output is inserted before point in that buffer, with \f\n to separate
2497it from the previous batch of error output. The error buffer is not
2498cleared, so error output from successive commands accumulates there.
2499
2500** Setting the default value of enable-multibyte-characters to nil in
2501the .emacs file, either explicitly using setq-default, or via Custom,
2502is now essentially equivalent to using --unibyte: all buffers
2503created during startup will be made unibyte after loading .emacs.
2504
2505** C-x C-f now handles the wildcards * and ? in file names. For
2506example, typing C-x C-f c*.c RET visits all the files whose names
2507match c*.c. To visit a file whose name contains * or ?, add the
2508quoting sequence /: to the beginning of the file name.
2509
2510** The M-x commands keep-lines, flush-lines and count-matches
2511now have the same feature as occur and query-replace:
2512if the pattern contains any upper case letters, then
2513they never ignore case.
2514
2515** The end-of-line format conversion feature previously mentioned
2516under `* Emacs 20.1 changes for MS-DOS and MS-Windows' actually
2517applies to all operating systems. Emacs recognizes from the contents
2518of a file what convention it uses to separate lines--newline, CRLF, or
2519just CR--and automatically converts the contents to the normal Emacs
2520convention (using newline to separate lines) for editing. This is a
2521part of the general feature of coding system conversion.
2522
2523If you subsequently save the buffer, Emacs converts the text back to
2524the same format that was used in the file before.
2525
2526You can turn off end-of-line conversion by setting the variable
2527`inhibit-eol-conversion' to non-nil, e.g. with Custom in the MULE group.
2528
2529** The character set property `prefered-coding-system' has been
2530renamed to `preferred-coding-system', for the sake of correct spelling.
2531This is a fairly internal feature, so few programs should be affected.
2532
2533** Mode-line display of end-of-line format is changed.
2534The indication of the end-of-line format of the file visited by a
2535buffer is now more explicit when that format is not the usual one for
2536your operating system. For example, the DOS-style end-of-line format
2537is displayed as "(DOS)" on Unix and GNU/Linux systems. The usual
2538end-of-line format is still displayed as a single character (colon for
2539Unix, backslash for DOS and Windows, and forward slash for the Mac).
2540
2541The values of the variables eol-mnemonic-unix, eol-mnemonic-dos,
2542eol-mnemonic-mac, and eol-mnemonic-undecided, which are strings,
2543control what is displayed in the mode line for each end-of-line
2544format. You can now customize these variables.
2545
2546** In the previous version of Emacs, tar-mode didn't work well if a
2547filename contained non-ASCII characters. Now this is fixed. Such a
2548filename is decoded by file-name-coding-system if the default value of
2549enable-multibyte-characters is non-nil.
2550
2551** The command temp-buffer-resize-mode toggles a minor mode
2552in which temporary buffers (such as help buffers) are given
2553windows just big enough to hold the whole contents.
2554
2555** If you use completion.el, you must now run the function
2556dynamic-completion-mode to enable it. Just loading the file
2557doesn't have any effect.
2558
2559** In Flyspell mode, the default is now to make just one Ispell process,
2560not one per buffer.
2561
2562** If you use iswitchb but do not call (iswitchb-default-keybindings) to
2563use the default keybindings, you will need to add the following line:
2564 (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)
2565
2566** Auto-show mode is no longer enabled just by loading auto-show.el.
2567To control it, set `auto-show-mode' via Custom or use the
2568`auto-show-mode' command.
2569
2570** Handling of X fonts' ascent/descent parameters has been changed to
2571avoid redisplay problems. As a consequence, compared with previous
2572versions the line spacing and frame size now differ with some font
2573choices, typically increasing by a pixel per line. This change
2574occurred in version 20.3 but was not documented then.
2575
2576** If you select the bar cursor style, it uses the frame's
2577cursor-color, rather than the cursor foreground pixel.
2578
2579** In multibyte mode, Rmail decodes incoming MIME messages using the
2580character set specified in the message. If you want to disable this
2581feature, set the variable rmail-decode-mime-charset to nil.
2582
2583** Not new, but not mentioned previously in NEWS: when you use #! at
2584the beginning of a file to make it executable and specify an
2585interpreter program, Emacs looks on the second line for the -*- mode
2586and variable specification, as well as on the first line.
2587
2588** Support for IBM codepage encoding of non-ASCII characters.
2589
2590The new command M-x codepage-setup creates a special coding system
2591that can be used to convert text between a specific IBM codepage and
2592one of the character sets built into Emacs which matches that
2593codepage. For example, codepage 850 corresponds to Latin-1 character
2594set, codepage 855 corresponds to Cyrillic-ISO character set, etc.
2595
2596Windows codepages 1250, 1251 and some others, where Windows deviates
2597from the corresponding ISO character set, are also supported.
2598
2599IBM box-drawing characters and other glyphs which don't have
2600equivalents in the corresponding ISO character set, are converted to
2601a character defined by dos-unsupported-char-glyph on MS-DOS, and to
2602`?' on other systems.
2603
2604IBM codepages are widely used on MS-DOS and MS-Windows, so this
2605feature is most useful on those platforms, but it can also be used on
2606Unix.
2607
2608Emacs compiled for MS-DOS automatically loads the support for the
2609current codepage when it starts.
2610
2611** Mail changes
2612
2613*** The new variable default-sendmail-coding-system specifies the
2614default way to encode outgoing mail. This has higher priority than
2615default-buffer-file-coding-system but has lower priority than
2616sendmail-coding-system and the local value of
2617buffer-file-coding-system.
2618
2619You should not set this variable manually. Instead, set
2620sendmail-coding-system to specify a fixed encoding for all outgoing
2621mail.
2622
2623*** When you try to send a message that contains non-ASCII characters,
2624if the coding system specified by those variables doesn't handle them,
2625Emacs will ask you to select a suitable coding system while showing a
2626list of possible coding systems.
2627
2628** CC Mode changes
2629
2630*** c-default-style can now take an association list that maps major
2631modes to style names. When this variable is an alist, Java mode no
2632longer hardcodes a setting to "java" style. See the variable's
2633docstring for details.
2634
2635*** It's now possible to put a list as the offset on a syntactic
2636symbol. The list is evaluated recursively until a non-nil offset is
2637found. This is useful to combine several lineup functions to act in a
2638prioritized order on a single line. However, none of the supplied
2639lineup functions use this feature currently.
2640
2641*** New syntactic symbol catch-clause, which is used on the "catch" and
2642"finally" lines in try-catch constructs in C++ and Java.
2643
2644*** New cleanup brace-catch-brace on c-cleanup-list, which does for
2645"catch" lines what brace-elseif-brace does for "else if" lines.
2646
2647*** The braces of Java anonymous inner classes are treated separately
2648from the braces of other classes in auto-newline mode. Two new
2649symbols inexpr-class-open and inexpr-class-close may be used on
2650c-hanging-braces-alist to control the automatic newlines used for
2651anonymous classes.
2652
2653*** Support for the Pike language added, along with new Pike specific
2654syntactic symbols: inlambda, lambda-intro-cont
2655
2656*** Support for Java anonymous classes via new syntactic symbol
2657inexpr-class. New syntactic symbol inexpr-statement for Pike
2658support and gcc-style statements inside expressions. New lineup
2659function c-lineup-inexpr-block.
2660
2661*** New syntactic symbol brace-entry-open which is used in brace lists
2662(i.e. static initializers) when a list entry starts with an open
2663brace. These used to be recognized as brace-list-entry's.
2664c-electric-brace also recognizes brace-entry-open braces
2665(brace-list-entry's can no longer be electrified).
2666
2667*** New command c-indent-line-or-region, not bound by default.
2668
2669*** `#' is only electric when typed in the indentation of a line.
2670
2671*** Parentheses are now electric (via the new command c-electric-paren)
2672for auto-reindenting lines when parens are typed.
2673
2674*** In "gnu" style, inline-open offset is now set to zero.
2675
2676*** Uniform handling of the inclass syntactic symbol. The indentation
2677associated with it is now always relative to the class opening brace.
2678This means that the indentation behavior has changed in some
2679circumstances, but only if you've put anything besides 0 on the
2680class-open syntactic symbol (none of the default styles do that).
2681
2682** Gnus changes.
2683
2684*** New functionality for using Gnus as an offline newsreader has been
2685added. A plethora of new commands and modes have been added. See the
2686Gnus manual for the full story.
2687
2688*** The nndraft backend has returned, but works differently than
2689before. All Message buffers are now also articles in the nndraft
2690group, which is created automatically.
2691
2692*** `gnus-alter-header-function' can now be used to alter header
2693values.
2694
2695*** `gnus-summary-goto-article' now accept Message-ID's.
2696
2697*** A new Message command for deleting text in the body of a message
2698outside the region: `C-c C-v'.
2699
2700*** You can now post to component group in nnvirtual groups with
2701`C-u C-c C-c'.
2702
2703*** `nntp-rlogin-program' -- new variable to ease customization.
2704
2705*** `C-u C-c C-c' in `gnus-article-edit-mode' will now inhibit
2706re-highlighting of the article buffer.
2707
2708*** New element in `gnus-boring-article-headers' -- `long-to'.
2709
2710*** `M-i' symbolic prefix command. See the section "Symbolic
2711Prefixes" in the Gnus manual for details.
2712
2713*** `L' and `I' in the summary buffer now take the symbolic prefix
2714`a' to add the score rule to the "all.SCORE" file.
2715
2716*** `gnus-simplify-subject-functions' variable to allow greater
2717control over simplification.
2718
2719*** `A T' -- new command for fetching the current thread.
2720
2721*** `/ T' -- new command for including the current thread in the
2722limit.
2723
2724*** `M-RET' is a new Message command for breaking cited text.
2725
2726*** \\1-expressions are now valid in `nnmail-split-methods'.
2727
79214ddf 2728*** The `custom-face-lookup' function has been removed.
a933dad1
DL
2729If you used this function in your initialization files, you must
2730rewrite them to use `face-spec-set' instead.
2731
2732*** Cancelling now uses the current select method. Symbolic prefix
2733`a' forces normal posting method.
2734
2735*** New command to translate M******** sm*rtq**t*s into proper text
2736-- `W d'.
2737
2738*** For easier debugging of nntp, you can set `nntp-record-commands'
2739to a non-nil value.
2740
2741*** nntp now uses ~/.authinfo, a .netrc-like file, for controlling
2742where and how to send AUTHINFO to NNTP servers.
2743
2744*** A command for editing group parameters from the summary buffer
2745has been added.
2746
2747*** A history of where mails have been split is available.
2748
2749*** A new article date command has been added -- `article-date-iso8601'.
2750
2751*** Subjects can be simplified when threading by setting
2752`gnus-score-thread-simplify'.
2753
2754*** A new function for citing in Message has been added --
2755`message-cite-original-without-signature'.
2756
2757*** `article-strip-all-blank-lines' -- new article command.
2758
2759*** A new Message command to kill to the end of the article has
2760been added.
2761
2762*** A minimum adaptive score can be specified by using the
2763`gnus-adaptive-word-minimum' variable.
2764
2765*** The "lapsed date" article header can be kept continually
2766updated by the `gnus-start-date-timer' command.
2767
2768*** Web listserv archives can be read with the nnlistserv backend.
2769
2770*** Old dejanews archives can now be read by nnweb.
2771
2772*** `gnus-posting-styles' has been re-activated.
2773
2774** Changes to TeX and LaTeX mode
2775
2776*** The new variable `tex-start-options-string' can be used to give
2777options for the TeX run. The default value causes TeX to run in
2778nonstopmode. For an interactive TeX run set it to nil or "".
2779
2780*** The command `tex-feed-input' sends input to the Tex Shell. In a
2781TeX buffer it is bound to the keys C-RET, C-c RET, and C-c C-m (some
2782of these keys may not work on all systems). For instance, if you run
2783TeX interactively and if the TeX run stops because of an error, you
2784can continue it without leaving the TeX buffer by typing C-RET.
2785
2786*** The Tex Shell Buffer is now in `compilation-shell-minor-mode'.
2787All error-parsing commands of the Compilation major mode are available
2788but bound to keys that don't collide with the shell. Thus you can use
2789the Tex Shell for command line executions like a usual shell.
2790
2791*** The commands `tex-validate-region' and `tex-validate-buffer' check
2792the matching of braces and $'s. The errors are listed in a *Occur*
2793buffer and you can use C-c C-c or mouse-2 to go to a particular
2794mismatch.
2795
2796** Changes to RefTeX mode
2797
2798*** The table of contents buffer can now also display labels and
2799file boundaries in addition to sections. Use `l', `i', and `c' keys.
2800
2801*** Labels derived from context (the section heading) are now
2802lowercase by default. To make the label legal in LaTeX, latin-1
2803characters will lose their accent. All Mule characters will be
2804removed from the label.
2805
2806*** The automatic display of cross reference information can also use
2807a window instead of the echo area. See variable `reftex-auto-view-crossref'.
2808
2809*** kpsewhich can be used by RefTeX to find TeX and BibTeX files. See the
2810customization group `reftex-finding-files'.
2811
2812*** The option `reftex-bibfile-ignore-list' has been renamed to
2813`reftex-bibfile-ignore-regexps' and indeed can be fed with regular
79214ddf 2814expressions.
a933dad1
DL
2815
2816*** Multiple Selection buffers are now hidden buffers.
2817
2818** New/deleted modes and packages
2819
2820*** The package snmp-mode.el provides major modes for editing SNMP and
2821SNMPv2 MIBs. It has entries on `auto-mode-alist'.
2822
2823*** The package sql.el provides a major mode, M-x sql-mode, for
2824editing SQL files, and M-x sql-interactive-mode for interacting with
2825SQL interpreters. It has an entry on `auto-mode-alist'.
2826
2827*** M-x highlight-changes-mode provides a minor mode displaying buffer
2828changes with a special face.
2829
2830*** ispell4.el has been deleted. It got in the way of ispell.el and
2831this was hard to fix reliably. It has long been obsolete -- use
2832Ispell 3.1 and ispell.el.
2833\f
2834* MS-DOS changes in Emacs 20.4
2835
2836** Emacs compiled for MS-DOS now supports MULE features better.
2837This includes support for display of all ISO 8859-N character sets,
2838conversion to and from IBM codepage encoding of non-ASCII characters,
2839and automatic setup of the MULE environment at startup. For details,
2840check out the section `MS-DOS and MULE' in the manual.
2841
2842The MS-DOS installation procedure automatically configures and builds
2843Emacs with input method support if it finds an unpacked Leim
2844distribution when the config.bat script is run.
2845
2846** Formerly, the value of lpr-command did not affect printing on
2847MS-DOS unless print-region-function was set to nil, but now it
2848controls whether an external program is invoked or output is written
2849directly to a printer port. Similarly, in the previous version of
2850Emacs, the value of ps-lpr-command did not affect PostScript printing
2851on MS-DOS unless ps-printer-name was set to something other than a
2852string (eg. t or `pipe'), but now it controls whether an external
2853program is used. (These changes were made so that configuration of
2854printing variables would be almost identical across all platforms.)
2855
2856** In the previous version of Emacs, PostScript and non-PostScript
2857output was piped to external programs, but because most print programs
2858available for MS-DOS and MS-Windows cannot read data from their standard
2859input, on those systems the data to be output is now written to a
2860temporary file whose name is passed as the last argument to the external
2861program.
2862
2863An exception is made for `print', a standard program on Windows NT,
2864and `nprint', a standard program on Novell Netware. For both of these
2865programs, the command line is constructed in the appropriate syntax
2866automatically, using only the value of printer-name or ps-printer-name
2867as appropriate--the value of the relevant `-switches' variable is
2868ignored, as both programs have no useful switches.
2869
2870** The value of the variable dos-printer (cf. dos-ps-printer), if it has
2871a value, overrides the value of printer-name (cf. ps-printer-name), on
2872MS-DOS and MS-Windows only. This has been true since version 20.3, but
2873was not documented clearly before.
2874
2875** All the Emacs games now work on MS-DOS terminals.
2876This includes Tetris and Snake.
2877\f
2878* Lisp changes in Emacs 20.4
2879
2880** New functions line-beginning-position and line-end-position
2881return the position of the beginning or end of the current line.
2882They both accept an optional argument, which has the same
2883meaning as the argument to beginning-of-line or end-of-line.
2884
2885** find-file and allied functions now have an optional argument
2886WILDCARD. If this is non-nil, they do wildcard processing,
2887and visit all files that match the wildcard pattern.
2888
2889** Changes in the file-attributes function.
2890
2891*** The file size returned by file-attributes may be an integer or a float.
2892It is an integer if the size fits in a Lisp integer, float otherwise.
2893
2894*** The inode number returned by file-attributes may be an integer (if
2895the number fits in a Lisp integer) or a cons cell containing two
2896integers.
2897
2898** The new function directory-files-and-attributes returns a list of
2899files in a directory and their attributes. It accepts the same
2900arguments as directory-files and has similar semantics, except that
2901file names and attributes are returned.
2902
2903** The new function file-attributes-lessp is a helper function for
2904sorting the list generated by directory-files-and-attributes. It
2905accepts two arguments, each a list of a file name and its atttributes.
2906It compares the file names of each according to string-lessp and
2907returns the result.
2908
2909** The new function file-expand-wildcards expands a wildcard-pattern
2910to produce a list of existing files that match the pattern.
2911
2912** New functions for base64 conversion:
2913
2914The function base64-encode-region converts a part of the buffer
2915into the base64 code used in MIME. base64-decode-region
2916performs the opposite conversion. Line-breaking is supported
2917optionally.
2918
2919Functions base64-encode-string and base64-decode-string do a similar
2920job on the text in a string. They return the value as a new string.
2921
2922**
2923The new function process-running-child-p
2924will tell you if a subprocess has given control of its
2925terminal to its own child process.
2926
2927** interrupt-process and such functions have a new feature:
2928when the second argument is `lambda', they send a signal
2929to the running child of the subshell, if any, but if the shell
2930itself owns its terminal, no signal is sent.
2931
2932** There are new widget types `plist' and `alist' which can
2933be used for customizing variables whose values are plists or alists.
2934
2935** easymenu.el Now understands `:key-sequence' and `:style button'.
2936:included is an alias for :visible.
2937
2938easy-menu-add-item now understands the values returned by
2939easy-menu-remove-item and easy-menu-item-present-p. This can be used
2940to move or copy menu entries.
2941
2942** Multibyte editing changes
2943
2944*** The definitions of sref and char-bytes are changed. Now, sref is
2945an alias of aref and char-bytes always returns 1. This change is to
2946make some Emacs Lisp code which works on 20.2 and earlier also
2947work on the latest Emacs. Such code uses a combination of sref and
2948char-bytes in a loop typically as below:
2949 (setq char (sref str idx)
2950 idx (+ idx (char-bytes idx)))
2951The byte-compiler now warns that this is obsolete.
2952
2953If you want to know how many bytes a specific multibyte character
2954(say, CH) occupies in a multibyte buffer, use this code:
2955 (charset-bytes (char-charset ch))
2956
2957*** In multibyte mode, when you narrow a buffer to some region, and the
2958region is preceded or followed by non-ASCII codes, inserting or
2959deleting at the head or the end of the region may signal this error:
2960
2961 Byte combining across boundary of accessible buffer text inhibitted
2962
2963This is to avoid some bytes being combined together into a character
2964across the boundary.
2965
2966*** The functions find-charset-region and find-charset-string include
2967`unknown' in the returned list in the following cases:
2968 o The current buffer or the target string is unibyte and
2969 contains 8-bit characters.
2970 o The current buffer or the target string is multibyte and
2971 contains invalid characters.
2972
2973*** The functions decode-coding-region and encode-coding-region remove
2974text properties of the target region. Ideally, they should correctly
2975preserve text properties, but for the moment, it's hard. Removing
2976text properties is better than preserving them in a less-than-correct
2977way.
2978
2979*** prefer-coding-system sets EOL conversion of default coding systems.
2980If the argument to prefer-coding-system specifies a certain type of
2981end of line conversion, the default coding systems set by
2982prefer-coding-system will specify that conversion type for end of line.
2983
2984*** The new function thai-compose-string can be used to properly
2985compose Thai characters in a string.
2986
2987** The primitive `define-prefix-command' now takes an optional third
2988argument NAME, which should be a string. It supplies the menu name
2989for the created keymap. Keymaps created in order to be displayed as
2990menus should always use the third argument.
2991
2992** The meanings of optional second arguments for read-char,
2993read-event, and read-char-exclusive are flipped. Now the second
2994arguments are INHERIT-INPUT-METHOD. These functions use the current
2995input method (if any) if and only if INHERIT-INPUT-METHOD is non-nil.
2996
2997** The new function clear-this-command-keys empties out the contents
2998of the vector that (this-command-keys) returns. This is useful in
2999programs that read passwords, to prevent the passwords from echoing
3000inadvertently as part of the next command in certain cases.
3001
3002** The new macro `with-temp-message' displays a temporary message in
3003the echo area, while executing some Lisp code. Like `progn', it
3004returns the value of the last form, but it also restores the previous
3005echo area contents.
3006
3007 (with-temp-message MESSAGE &rest BODY)
3008
3009** The function `require' now takes an optional third argument
3010NOERROR. If it is non-nil, then there is no error if the
3011requested feature cannot be loaded.
3012
3013** In the function modify-face, an argument of (nil) for the
3014foreground color, background color or stipple pattern
79214ddf 3015means to clear out that attribute.
a933dad1
DL
3016
3017** The `outer-window-id' frame property of an X frame
3018gives the window number of the outermost X window for the frame.
3019
3020** Temporary buffers made with with-output-to-temp-buffer are now
3021read-only by default, and normally use the major mode Help mode
3022unless you put them in some other non-Fundamental mode before the
3023end of with-output-to-temp-buffer.
3024
3025** The new functions gap-position and gap-size return information on
3026the gap of the current buffer.
3027
3028** The new functions position-bytes and byte-to-position provide a way
3029to convert between character positions and byte positions in the
3030current buffer.
3031
3032** vc.el defines two new macros, `edit-vc-file' and `with-vc-file', to
3033facilitate working with version-controlled files from Lisp programs.
3034These macros check out a given file automatically if needed, and check
3035it back in after any modifications have been made.
3036\f
3037* Installation Changes in Emacs 20.3
3038
3039** The default value of load-path now includes most subdirectories of
3040the site-specific directories /usr/local/share/emacs/site-lisp and
3041/usr/local/share/emacs/VERSION/site-lisp, in addition to those
3042directories themselves. Both immediate subdirectories and
3043subdirectories multiple levels down are added to load-path.
3044
3045Not all subdirectories are included, though. Subdirectories whose
3046names do not start with a letter or digit are excluded.
3047Subdirectories named RCS or CVS are excluded. Also, a subdirectory
3048which contains a file named `.nosearch' is excluded. You can use
3049these methods to prevent certain subdirectories from being searched.
3050
3051Emacs finds these subdirectories and adds them to load-path when it
3052starts up. While it would be cleaner to find the subdirectories each
3053time Emacs loads a file, that would be much slower.
3054
3055This feature is an incompatible change. If you have stored some Emacs
3056Lisp files in a subdirectory of the site-lisp directory specifically
3057to prevent them from being used, you will need to rename the
3058subdirectory to start with a non-alphanumeric character, or create a
3059`.nosearch' file in it, in order to continue to achieve the desired
3060results.
3061
3062** Emacs no longer includes an old version of the C preprocessor from
3063GCC. This was formerly used to help compile Emacs with C compilers
3064that had limits on the significant length of an identifier, but in
3065fact we stopped supporting such compilers some time ago.
3066\f
3067* Changes in Emacs 20.3
3068
3069** The new command C-x z (repeat) repeats the previous command
3070including its argument. If you repeat the z afterward,
3071it repeats the command additional times; thus, you can
3072perform many repetitions with one keystroke per repetition.
3073
3074** Emacs now supports "selective undo" which undoes only within a
3075specified region. To do this, set point and mark around the desired
3076region and type C-u C-x u (or C-u C-_). You can then continue undoing
3077further, within the same region, by repeating the ordinary undo
3078command C-x u or C-_. This will keep undoing changes that were made
3079within the region you originally specified, until either all of them
3080are undone, or it encounters a change which crosses the edge of that
3081region.
3082
3083In Transient Mark mode, undoing when a region is active requests
3084selective undo.
3085
3086** If you specify --unibyte when starting Emacs, then all buffers are
3087unibyte, except when a Lisp program specifically creates a multibyte
3088buffer. Setting the environment variable EMACS_UNIBYTE has the same
3089effect. The --no-unibyte option overrides EMACS_UNIBYTE and directs
3090Emacs to run normally in multibyte mode.
3091
3092The option --unibyte does not affect the reading of Emacs Lisp files,
3093though. If you want a Lisp file to be read in unibyte mode, use
3094-*-unibyte: t;-*- on its first line. That will force Emacs to
3095load that file in unibyte mode, regardless of how Emacs was started.
3096
3097** toggle-enable-multibyte-characters no longer has a key binding and
3098no longer appears in the menu bar. We've realized that changing the
3099enable-multibyte-characters variable in an existing buffer is
3100something that most users not do.
3101
3102** You can specify a coding system to use for the next cut or paste
3103operations through the window system with the command C-x RET X.
3104The coding system can make a difference for communication with other
3105applications.
3106
3107C-x RET x specifies a coding system for all subsequent cutting and
3108pasting operations.
3109
3110** You can specify the printer to use for commands that do printing by
3111setting the variable `printer-name'. Just what a printer name looks
3112like depends on your operating system. You can specify a different
3113printer for the Postscript printing commands by setting
3114`ps-printer-name'.
3115
3116** Emacs now supports on-the-fly spell checking by the means of a
3117minor mode. It is called M-x flyspell-mode. You don't have to remember
3118any other special commands to use it, and you will hardly notice it
3119except when you make a spelling error. Flyspell works by highlighting
3120incorrect words as soon as they are completed or as soon as the cursor
3121hits a new word.
3122
3123Flyspell mode works with whichever dictionary you have selected for
3124Ispell in Emacs. In TeX mode, it understands TeX syntax so as not
3125to be confused by TeX commands.
3126
3127You can correct a misspelled word by editing it into something
3128correct. You can also correct it, or accept it as correct, by
3129clicking on the word with Mouse-2; that gives you a pop-up menu
3130of various alternative replacements and actions.
3131
3132Flyspell mode also proposes "automatic" corrections. M-TAB replaces
3133the current misspelled word with a possible correction. If several
3134corrections are made possible, M-TAB cycles through them in
3135alphabetical order, or in order of decreasing likelihood if
3136flyspell-sort-corrections is nil.
3137
3138Flyspell mode also flags an error when a word is repeated, if
3139flyspell-mark-duplications-flag is non-nil.
3140
3141** Changes in input method usage.
3142
3143Now you can use arrow keys (right, left, down, up) for selecting among
3144the alternatives just the same way as you do by C-f, C-b, C-n, and C-p
3145respectively.
3146
3147You can use the ENTER key to accept the current conversion.
3148
3149If you type TAB to display a list of alternatives, you can select one
3150of the alternatives with Mouse-2.
3151
3152The meaning of the variable `input-method-verbose-flag' is changed so
3153that you can set it to t, nil, `default', or `complex-only'.
3154
3155 If the value is nil, extra guidance is never given.
3156
3157 If the value is t, extra guidance is always given.
3158
3159 If the value is `complex-only', extra guidance is always given only
3160 when you are using complex input methods such as chinese-py.
3161
3162 If the value is `default' (this is the default), extra guidance is
79214ddf 3163 given in the following case:
a933dad1
DL
3164 o When you are using a complex input method.
3165 o When you are using a simple input method but not in the minibuffer.
3166
3167If you are using Emacs through a very slow line, setting
3168input-method-verbose-flag to nil or to complex-only is a good choice,
3169and if you are using an input method you are not familiar with,
3170setting it to t is helpful.
3171
3172The old command select-input-method is now called set-input-method.
3173
3174In the language environment "Korean", you can use the following
3175keys:
3176 Shift-SPC toggle-korean-input-method
3177 C-F9 quail-hangul-switch-symbol-ksc
3178 F9 quail-hangul-switch-hanja
3179These key bindings are canceled when you switch to another language
3180environment.
3181
3182** The minibuffer history of file names now records the specified file
3183names, not the entire minibuffer input. For example, if the
3184minibuffer starts out with /usr/foo/, you might type in /etc/passwd to
3185get
3186
3187 /usr/foo//etc/passwd
3188
3189which stands for the file /etc/passwd.
3190
3191Formerly, this used to put /usr/foo//etc/passwd in the history list.
3192Now this puts just /etc/passwd in the history list.
3193
3194** If you are root, Emacs sets backup-by-copying-when-mismatch to t
3195at startup, so that saving a file will be sure to preserve
3196its owner and group.
3197
3198** find-func.el can now also find the place of definition of Emacs
3199Lisp variables in user-loaded libraries.
3200
3201** C-x r t (string-rectangle) now deletes the existing rectangle
3202contents before inserting the specified string on each line.
3203
3204** There is a new command delete-whitespace-rectangle
3205which deletes whitespace starting from a particular column
3206in all the lines on a rectangle. The column is specified
3207by the left edge of the rectangle.
3208
3209** You can now store a number into a register with C-u NUMBER C-x r n REG,
3210increment it by INC with C-u INC C-x r + REG (to increment by one, omit
3211C-u INC), and insert it in the buffer with C-x r g REG. This is useful
3212for writing keyboard macros.
3213
3214** The new command M-x speedbar displays a frame in which directories,
3215files, and tags can be displayed, manipulated, and jumped to. The
3216frame defaults to 20 characters in width, and is the same height as
3217the frame that it was started from. Some major modes define
3218additional commands for the speedbar, including Rmail, GUD/GDB, and
3219info.
3220
3221** query-replace-regexp is now bound to C-M-%.
3222
3223** In Transient Mark mode, when the region is active, M-x
3224query-replace and the other replace commands now operate on the region
3225contents only.
3226
3227** M-x write-region, when used interactively, now asks for
3228confirmation before overwriting an existing file. When you call
3229the function from a Lisp program, a new optional argument CONFIRM
3230says whether to ask for confirmation in this case.
3231
3232** If you use find-file-literally and the file is already visited
3233non-literally, the command asks you whether to revisit the file
3234literally. If you say no, it signals an error.
3235
3236** Major modes defined with the "derived mode" feature
3237now use the proper name for the mode hook: WHATEVER-mode-hook.
3238Formerly they used the name WHATEVER-mode-hooks, but that is
3239inconsistent with Emacs conventions.
3240
3241** shell-command-on-region (and shell-command) reports success or
3242failure if the command produces no output.
3243
3244** Set focus-follows-mouse to nil if your window system or window
3245manager does not transfer focus to another window when you just move
3246the mouse.
3247
3248** mouse-menu-buffer-maxlen has been renamed to
3249mouse-buffer-menu-maxlen to be consistent with the other related
3250function and variable names.
3251
3252** The new variable auto-coding-alist specifies coding systems for
3253reading specific files. This has higher priority than
3254file-coding-system-alist.
3255
3256** If you set the variable unibyte-display-via-language-environment to
3257t, then Emacs displays non-ASCII characters are displayed by
3258converting them to the equivalent multibyte characters according to
3259the current language environment. As a result, they are displayed
3260according to the current fontset.
3261
3262** C-q's handling of codes in the range 0200 through 0377 is changed.
3263
3264The codes in the range 0200 through 0237 are inserted as one byte of
3265that code regardless of the values of nonascii-translation-table and
3266nonascii-insert-offset.
3267
3268For the codes in the range 0240 through 0377, if
3269enable-multibyte-characters is non-nil and nonascii-translation-table
3270nor nonascii-insert-offset can't convert them to valid multibyte
3271characters, they are converted to Latin-1 characters.
3272
3273** If you try to find a file that is not read-accessible, you now get
3274an error, rather than an empty buffer and a warning.
3275
3276** In the minibuffer history commands M-r and M-s, an upper case
3277letter in the regular expression forces case-sensitive search.
3278
3279** In the *Help* buffer, cross-references to commands and variables
3280are inferred and hyperlinked. Use C-h m in Help mode for the relevant
3281command keys.
3282
3283** M-x apropos-command, with a prefix argument, no longer looks for
3284user option variables--instead it looks for noninteractive functions.
3285
3286Meanwhile, the command apropos-variable normally searches for
3287user option variables; with a prefix argument, it looks at
3288all variables that have documentation.
3289
3290** When you type a long line in the minibuffer, and the minibuffer
3291shows just one line, automatically scrolling works in a special way
3292that shows you overlap with the previous line of text. The variable
3293minibuffer-scroll-overlap controls how many characters of overlap
3294it should show; the default is 20.
3295
3296Meanwhile, Resize Minibuffer mode is still available; in that mode,
3297the minibuffer grows taller (up to a point) as needed to show the whole
3298of your input.
3299
3300** The new command M-x customize-changed-options lets you customize
3301all the options whose meanings or default values have changed in
3302recent Emacs versions. You specify a previous Emacs version number as
3303argument, and the command creates a customization buffer showing all
3304the customizable options which were changed since that version.
3305Newly added options are included as well.
3306
3307If you don't specify a particular version number argument,
3308then the customization buffer shows all the customizable options
3309for which Emacs versions of changes are recorded.
3310
3311This function is also bound to the Changed Options entry in the
3312Customize menu.
3313
3314** When you run M-x grep with a prefix argument, it figures out
3315the tag around point and puts that into the default grep command.
3316
3317** The new command M-* (pop-tag-mark) pops back through a history of
3318buffer positions from which M-. or other tag-finding commands were
3319invoked.
3320
3321** The new variable comment-padding specifies the number of spaces
3322that `comment-region' will insert before the actual text of the comment.
3323The default is 1.
3324
3325** In Fortran mode the characters `.', `_' and `$' now have symbol
3326syntax, not word syntax. Fortran mode now supports `imenu' and has
3327new commands fortran-join-line (M-^) and fortran-narrow-to-subprogram
3328(C-x n d). M-q can be used to fill a statement or comment block
3329sensibly.
3330
3331** GUD now supports jdb, the Java debugger, and pdb, the Python debugger.
3332
3333** If you set the variable add-log-keep-changes-together to a non-nil
3334value, the command `C-x 4 a' will automatically notice when you make
3335two entries in one day for one file, and combine them.
3336
3337** You can use the command M-x diary-mail-entries to mail yourself a
3338reminder about upcoming diary entries. See the documentation string
3339for a sample shell script for calling this function automatically
3340every night.
3341
3342** All you need to do, to enable use of the Desktop package, is to set
3343the variable desktop-enable to t with Custom.
3344
3345** There is no need to do anything special, now, to enable Gnus to
3346read and post multi-lingual articles.
3347
3348** Outline mode has now support for showing hidden outlines when
3349doing an isearch. In order for this to happen search-invisible should
3350be set to open (the default). If an isearch match is inside a hidden
3351outline the outline is made visible. If you continue pressing C-s and
3352the match moves outside the formerly invisible outline, the outline is
79214ddf 3353made invisible again.
a933dad1
DL
3354
3355** Mail reading and sending changes
3356
3357*** The Rmail e command now switches to displaying the whole header of
3358the message before it lets you edit the message. This is so that any
3359changes you make in the header will not be lost if you subsequently
3360toggle.
3361
3362*** The w command in Rmail, which writes the message body into a file,
3363now works in the summary buffer as well. (The command to delete the
3364summary buffer is now Q.) The default file name for the w command, if
3365the message has no subject, is stored in the variable
3366rmail-default-body-file.
3367
3368*** Most of the commands and modes that operate on mail and netnews no
3369longer depend on the value of mail-header-separator. Instead, they
3370handle whatever separator the buffer happens to use.
3371
3372*** If you set mail-signature to a value which is not t, nil, or a string,
3373it should be an expression. When you send a message, this expression
3374is evaluated to insert the signature.
3375
3376*** The new Lisp library feedmail.el (version 8) enhances processing of
3377outbound email messages. It works in coordination with other email
3378handling packages (e.g., rmail, VM, gnus) and is responsible for
3379putting final touches on messages and actually submitting them for
3380transmission. Users of the emacs program "fakemail" might be
3381especially interested in trying feedmail.
3382
3383feedmail is not enabled by default. See comments at the top of
3384feedmail.el for set-up instructions. Among the bigger features
3385provided by feedmail are:
3386
3387**** you can park outgoing messages into a disk-based queue and
3388stimulate sending some or all of them later (handy for laptop users);
3389there is also a queue for draft messages
3390
3391**** you can get one last look at the prepped outbound message and
3392be prompted for confirmation
3393
3394**** does smart filling of address headers
3395
3396**** can generate a MESSAGE-ID: line and a DATE: line; the date can be
3397the time the message was written or the time it is being sent; this
3398can make FCC copies more closely resemble copies that recipients get
3399
3400**** you can specify an arbitrary function for actually transmitting
3401the message; included in feedmail are interfaces for /bin/[r]mail,
3402/usr/lib/sendmail, and elisp smtpmail; it's easy to write a new
3403function for something else (10-20 lines of elisp)
3404
3405** Dired changes
3406
3407*** The Dired function dired-do-toggle, which toggles marked and unmarked
3408files, is now bound to "t" instead of "T".
3409
3410*** dired-at-point has been added to ffap.el. It allows one to easily
3411run Dired on the directory name at point.
3412
3413*** Dired has a new command: %g. It searches the contents of
3414files in the directory and marks each file that contains a match
3415for a specified regexp.
3416
3417** VC Changes
3418
3419*** New option vc-ignore-vc-files lets you turn off version control
3420conveniently.
3421
3422*** VC Dired has been completely rewritten. It is now much
3423faster, especially for CVS, and works very similar to ordinary
3424Dired.
3425
3426VC Dired is invoked by typing C-x v d and entering the name of the
3427directory to display. By default, VC Dired gives you a recursive
3428listing of all files at or below the given directory which are
3429currently locked (for CVS, all files not up-to-date are shown).
3430
3431You can change the listing format by setting vc-dired-recurse to nil,
3432then it shows only the given directory, and you may also set
3433vc-dired-terse-display to nil, then it shows all files under version
3434control plus the names of any subdirectories, so that you can type `i'
3435on such lines to insert them manually, as in ordinary Dired.
3436
3437All Dired commands operate normally in VC Dired, except for `v', which
3438is redefined as the version control prefix. That means you may type
3439`v l', `v =' etc. to invoke `vc-print-log', `vc-diff' and the like on
3440the file named in the current Dired buffer line. `v v' invokes
3441`vc-next-action' on this file, or on all files currently marked.
3442
3443The new command `v t' (vc-dired-toggle-terse-mode) allows you to
3444toggle between terse display (only locked files) and full display (all
79214ddf 3445VC files plus subdirectories). There is also a special command,
a933dad1
DL
3446`* l', to mark all files currently locked.
3447
3448Giving a prefix argument to C-x v d now does the same thing as in
3449ordinary Dired: it allows you to supply additional options for the ls
3450command in the minibuffer, to fine-tune VC Dired's output.
3451
3452*** Under CVS, if you merge changes from the repository into a working
3453file, and CVS detects conflicts, VC now offers to start an ediff
3454session to resolve them.
3455
3456Alternatively, you can use the new command `vc-resolve-conflicts' to
3457resolve conflicts in a file at any time. It works in any buffer that
3458contains conflict markers as generated by rcsmerge (which is what CVS
3459uses as well).
3460
3461*** You can now transfer changes between branches, using the new
3462command vc-merge (C-x v m). It is implemented for RCS and CVS. When
3463you invoke it in a buffer under version-control, you can specify
3464either an entire branch or a pair of versions, and the changes on that
3465branch or between the two versions are merged into the working file.
3466If this results in any conflicts, they may be resolved interactively,
3467using ediff.
3468
3469** Changes in Font Lock
3470
3471*** The face and variable previously known as font-lock-reference-face
3472are now called font-lock-constant-face to better reflect their typical
3473use for highlighting constants and labels. (Its face properties are
3474unchanged.) The variable font-lock-reference-face remains for now for
3475compatibility reasons, but its value is font-lock-constant-face.
3476
3477** Frame name display changes
3478
3479*** The command set-frame-name lets you set the name of the current
3480frame. You can use the new command select-frame-by-name to select and
3481raise a frame; this is mostly useful on character-only terminals, or
3482when many frames are invisible or iconified.
3483
3484*** On character-only terminal (not a window system), changing the
3485frame name is now reflected on the mode line and in the Buffers/Frames
3486menu.
3487
3488** Comint (subshell) changes
3489
3490*** In Comint modes, the commands to kill, stop or interrupt a
3491subjob now also kill pending input. This is for compatibility
3492with ordinary shells, where the signal characters do this.
3493
3494*** There are new commands in Comint mode.
3495
3496C-c C-x fetches the "next" line from the input history;
3497that is, the line after the last line you got.
3498You can use this command to fetch successive lines, one by one.
3499
3500C-c SPC accumulates lines of input. More precisely, it arranges to
3501send the current line together with the following line, when you send
3502the following line.
3503
3504C-c C-a if repeated twice consecutively now moves to the process mark,
3505which separates the pending input from the subprocess output and the
3506previously sent input.
3507
3508C-c M-r now runs comint-previous-matching-input-from-input;
3509it searches for a previous command, using the current pending input
3510as the search string.
3511
3512*** New option compilation-scroll-output can be set to scroll
3513automatically in compilation-mode windows.
3514
3515** C mode changes
3516
3517*** Multiline macros are now handled, both as they affect indentation,
3518and as recognized syntax. New syntactic symbol cpp-macro-cont is
3519assigned to second and subsequent lines of a multiline macro
79214ddf 3520definition.
a933dad1
DL
3521
3522*** A new style "user" which captures all non-hook-ified
3523(i.e. top-level) .emacs file variable settings and customizations.
3524Style "cc-mode" is an alias for "user" and is deprecated. "gnu"
3525style is still the default however.
3526
3527*** "java" style now conforms to Sun's JDK coding style.
3528
3529*** There are new commands c-beginning-of-defun, c-end-of-defun which
3530are alternatives which you could bind to C-M-a and C-M-e if you prefer
3531them. They do not have key bindings by default.
3532
3533*** New and improved implementations of M-a (c-beginning-of-statement)
3534and M-e (c-end-of-statement).
3535
3536*** C++ namespace blocks are supported, with new syntactic symbols
3537namespace-open, namespace-close, and innamespace.
3538
3539*** File local variable settings of c-file-style and c-file-offsets
3540makes the style variables local to that buffer only.
3541
3542*** New indentation functions c-lineup-close-paren,
3543c-indent-one-line-block, c-lineup-dont-change.
3544
3545*** Improvements (hopefully!) to the way CC Mode is loaded. You
3546should now be able to do a (require 'cc-mode) to get the entire
3547package loaded properly for customization in your .emacs file. A new
3548variable c-initialize-on-load controls this and is t by default.
3549
3550** Changes to hippie-expand.
3551
79214ddf 3552*** New customization variable `hippie-expand-dabbrev-skip-space'. If
a933dad1
DL
3553non-nil, trailing spaces may be included in the abbreviation to search for,
3554which then gives the same behavior as the original `dabbrev-expand'.
3555
3556*** New customization variable `hippie-expand-dabbrev-as-symbol'. If
3557non-nil, characters of syntax '_' is considered part of the word when
3558expanding dynamically.
3559
3560*** New customization variable `hippie-expand-no-restriction'. If
3561non-nil, narrowed buffers are widened before they are searched.
3562
3563*** New customization variable `hippie-expand-only-buffers'. If
3564non-empty, buffers searched are restricted to the types specified in
3565this list. Useful for example when constructing new special-purpose
3566expansion functions with `make-hippie-expand-function'.
3567
3568*** Text properties of the expansion are no longer copied.
3569
3570** Changes in BibTeX mode.
3571
3572*** Any titleword matching a regexp in the new variable
3573bibtex-autokey-titleword-ignore (case sensitive) is ignored during
3574automatic key generation. This replaces variable
3575bibtex-autokey-titleword-first-ignore, which only checked for matches
3576against the first word in the title.
3577
3578*** Autokey generation now uses all words from the title, not just
3579capitalized words. To avoid conflicts with existing customizations,
3580bibtex-autokey-titleword-ignore is set up such that words starting with
79214ddf 3581lowerkey characters will still be ignored. Thus, if you want to use
a933dad1 3582lowercase words from the title, you will have to overwrite the
79214ddf 3583bibtex-autokey-titleword-ignore standard setting.
a933dad1
DL
3584
3585*** Case conversion of names and title words for automatic key
3586generation is more flexible. Variable bibtex-autokey-preserve-case is
3587replaced by bibtex-autokey-titleword-case-convert and
3588bibtex-autokey-name-case-convert.
3589
3590** Changes in vcursor.el.
3591
3592*** Support for character terminals is available: there is a new keymap
3593and the vcursor will appear as an arrow between buffer text. A
3594variable `vcursor-interpret-input' allows input from the vcursor to be
3595entered exactly as if typed. Numerous functions, including
3596`vcursor-compare-windows', have been rewritten to improve consistency
3597in the selection of windows and corresponding keymaps.
3598
3599*** vcursor options can now be altered with M-x customize under the
3600Editing group once the package is loaded.
3601
3602*** Loading vcursor now does not define keys by default, as this is
3603generally a bad side effect. Use M-x customize to set
3604vcursor-key-bindings to t to restore the old behaviour.
3605
3606*** vcursor-auto-disable can be `copy', which turns off copying from the
3607vcursor, but doesn't disable it, after any non-vcursor command.
3608
3609** Ispell changes.
3610
79214ddf
FP
3611*** You can now spell check comments and strings in the current
3612buffer with M-x ispell-comments-and-strings. Comments and strings
a933dad1
DL
3613are identified by syntax tables in effect.
3614
3615*** Generic region skipping implemented.
3616A single buffer can be broken into a number of regions where text will
3617and will not be checked. The definitions of the regions can be user
3618defined. New applications and improvements made available by this
79214ddf 3619include:
a933dad1
DL
3620
3621 o URLs are automatically skipped
3622 o EMail message checking is vastly improved.
3623
3624*** Ispell can highlight the erroneous word even on non-window terminals.
3625
3626** Changes to RefTeX mode
3627
3628RefTeX has been updated in order to make it more usable with very
3629large projects (like a several volume math book). The parser has been
3630re-written from scratch. To get maximum speed from RefTeX, check the
3631section `Optimizations' in the manual.
3632
3633*** New recursive parser.
3634
3635The old version of RefTeX created a single large buffer containing the
3636entire multifile document in order to parse the document. The new
3637recursive parser scans the individual files.
3638
3639*** Parsing only part of a document.
79214ddf 3640
a933dad1
DL
3641Reparsing of changed document parts can now be made faster by enabling
3642partial scans. To use this feature, read the documentation string of
3643the variable `reftex-enable-partial-scans' and set the variable to t.
3644
3645 (setq reftex-enable-partial-scans t)
3646
3647*** Storing parsing information in a file.
3648
3649This can improve startup times considerably. To turn it on, use
3650
3651 (setq reftex-save-parse-info t)
3652
3653*** Using multiple selection buffers
3654
3655If the creation of label selection buffers is too slow (this happens
3656for large documents), you can reuse these buffers by setting
3657
3658 (setq reftex-use-multiple-selection-buffers t)
3659
3660*** References to external documents.
3661
3662The LaTeX package `xr' allows to cross-reference labels in external
3663documents. RefTeX can provide information about the external
3664documents as well. To use this feature, set up the \externaldocument
3665macros required by the `xr' package and rescan the document with
3666RefTeX. The external labels can then be accessed with the `x' key in
3667the selection buffer provided by `reftex-reference' (bound to `C-c )').
3668The `x' key also works in the table of contents buffer.
3669
3670*** Many more labeled LaTeX environments are recognized by default.
3671
3672The builtin command list now covers all the standard LaTeX commands,
3673and all of the major packages included in the LaTeX distribution.
3674
3675Also, RefTeX now understands the \appendix macro and changes
3676the enumeration of sections in the *toc* buffer accordingly.
3677
3678*** Mouse support for selection and *toc* buffers
3679
3680The mouse can now be used to select items in the selection and *toc*
3681buffers. See also the new option `reftex-highlight-selection'.
3682
3683*** New keymaps for selection and table of contents modes.
3684
3685The selection processes for labels and citation keys, and the table of
3686contents buffer now have their own keymaps: `reftex-select-label-map',
3687`reftex-select-bib-map', `reftex-toc-map'. The selection processes
3688have a number of new keys predefined. In particular, TAB lets you
3689enter a label with completion. Check the on-the-fly help (press `?'
3690at the selection prompt) or read the Info documentation to find out
3691more.
3692
3693*** Support for the varioref package
3694
3695The `v' key in the label selection buffer toggles \ref versus \vref.
3696
3697*** New hooks
3698
3699Three new hooks can be used to redefine the way labels, references,
3700and citations are created. These hooks are
3701`reftex-format-label-function', `reftex-format-ref-function',
3702`reftex-format-cite-function'.
3703
3704*** Citations outside LaTeX
3705
3706The command `reftex-citation' may also be used outside LaTeX (e.g. in
3707a mail buffer). See the Info documentation for details.
3708
3709*** Short context is no longer fontified.
3710
3711The short context in the label menu no longer copies the
3712fontification from the text in the buffer. If you prefer it to be
3713fontified, use
3714
3715 (setq reftex-refontify-context t)
3716
3717** file-cache-minibuffer-complete now accepts a prefix argument.
3718With a prefix argument, it does not try to do completion of
3719the file name within its directory; it only checks for other
3720directories that contain the same file name.
3721
3722Thus, given the file name Makefile, and assuming that a file
3723Makefile.in exists in the same directory, ordinary
3724file-cache-minibuffer-complete will try to complete Makefile to
3725Makefile.in and will therefore never look for other directories that
3726have Makefile. A prefix argument tells it not to look for longer
3727names such as Makefile.in, so that instead it will look for other
3728directories--just as if the name were already complete in its present
3729directory.
3730
3731** New modes and packages
3732
3733*** There is a new alternative major mode for Perl, Cperl mode.
3734It has many more features than Perl mode, and some people prefer
3735it, but some do not.
3736
3737*** There is a new major mode, M-x vhdl-mode, for editing files of VHDL
3738code.
3739
3740*** M-x which-function-mode enables a minor mode that displays the
3741current function name continuously in the mode line, as you move
3742around in a buffer.
3743
3744Which Function mode is effective in major modes which support Imenu.
3745
3746*** Gametree is a major mode for editing game analysis trees. The author
3747uses it for keeping notes about his postal Chess games, but it should
3748be helpful for other two-player games as well, as long as they have an
3749established system of notation similar to Chess.
3750
3751*** The new minor mode checkdoc-minor-mode provides Emacs Lisp
3752documentation string checking for style and spelling. The style
3753guidelines are found in the Emacs Lisp programming manual.
3754
3755*** The net-utils package makes some common networking features
3756available in Emacs. Some of these functions are wrappers around
3757system utilities (ping, nslookup, etc); others are implementations of
3758simple protocols (finger, whois) in Emacs Lisp. There are also
3759functions to make simple connections to TCP/IP ports for debugging and
3760the like.
3761
3762*** highlight-changes-mode is a minor mode that uses colors to
3763identify recently changed parts of the buffer text.
3764
3765*** The new package `midnight' lets you specify things to be done
3766within Emacs at midnight--by default, kill buffers that you have not
3767used in a considerable time. To use this feature, customize
3768the user option `midnight-mode' to t.
3769
3770*** The file generic-x.el defines a number of simple major modes.
3771
3772 apache-generic-mode: For Apache and NCSA httpd configuration files
3773 samba-generic-mode: Samba configuration files
3774 fvwm-generic-mode: For fvwm initialization files
3775 x-resource-generic-mode: For X resource files
3776 hosts-generic-mode: For hosts files (.rhosts, /etc/hosts, etc)
3777 mailagent-rules-generic-mode: For mailagent .rules files
3778 javascript-generic-mode: For JavaScript files
3779 vrml-generic-mode: For VRML files
3780 java-manifest-generic-mode: For Java MANIFEST files
3781 java-properties-generic-mode: For Java property files
3782 mailrc-generic-mode: For .mailrc files
3783
3784 Platform-specific modes:
3785
3786 prototype-generic-mode: For Solaris/Sys V prototype files
3787 pkginfo-generic-mode: For Solaris/Sys V pkginfo files
3788 alias-generic-mode: For C shell alias files
3789 inf-generic-mode: For MS-Windows INF files
3790 ini-generic-mode: For MS-Windows INI files
3791 reg-generic-mode: For MS-Windows Registry files
3792 bat-generic-mode: For MS-Windows BAT scripts
3793 rc-generic-mode: For MS-Windows Resource files
3794 rul-generic-mode: For InstallShield scripts
3795\f
3796* Lisp changes in Emacs 20.3 since the Emacs Lisp Manual was published
3797
3798** If you want a Lisp file to be read in unibyte mode,
3799use -*-unibyte: t;-*- on its first line.
3800That will force Emacs to read that file in unibyte mode.
3801Otherwise, the file will be loaded and byte-compiled in multibyte mode.
3802
3803Thus, each lisp file is read in a consistent way regardless of whether
3804you started Emacs with --unibyte, so that a Lisp program gives
3805consistent results regardless of how Emacs was started.
3806
3807** The new function assoc-default is useful for searching an alist,
3808and using a default value if the key is not found there. You can
3809specify a comparison predicate, so this function is useful for
3810searching comparing a string against an alist of regular expressions.
3811
3812** The functions unibyte-char-to-multibyte and
3813multibyte-char-to-unibyte convert between unibyte and multibyte
3814character codes, in a way that is appropriate for the current language
3815environment.
3816
3817** The functions read-event, read-char and read-char-exclusive now
3818take two optional arguments. PROMPT, if non-nil, specifies a prompt
3819string. SUPPRESS-INPUT-METHOD, if non-nil, says to disable the
3820current input method for reading this one event.
3821
3822** Two new variables print-escape-nonascii and print-escape-multibyte
3823now control whether to output certain characters as
3824backslash-sequences. print-escape-nonascii applies to single-byte
3825non-ASCII characters; print-escape-multibyte applies to multibyte
3826characters. Both of these variables are used only when printing
3827in readable fashion (prin1 uses them, princ does not).
3828\f
3829* Lisp changes in Emacs 20.3 before the Emacs Lisp Manual was published
3830
3831** Compiled Emacs Lisp files made with the modified "MBSK" version
3832of Emacs 20.2 do not work in Emacs 20.3.
3833
3834** Buffer positions are now measured in characters, as they were
3835in Emacs 19 and before. This means that (forward-char 1)
3836always increases point by 1.
3837
3838The function chars-in-region now just subtracts its arguments. It is
3839considered obsolete. The function char-boundary-p has been deleted.
3840
3841See below for additional changes relating to multibyte characters.
3842
3843** defcustom, defface and defgroup now accept the keyword `:version'.
3844Use this to specify in which version of Emacs a certain variable's
3845default value changed. For example,
3846
3847 (defcustom foo-max 34 "*Maximum number of foo's allowed."
3848 :type 'integer
3849 :group 'foo
3850 :version "20.3")
3851
79214ddf 3852 (defgroup foo-group nil "The foo group."
a933dad1
DL
3853 :version "20.3")
3854
3855If an entire new group is added or the variables in it have the
3856default values changed, then just add a `:version' to that group. It
3857is recommended that new packages added to the distribution contain a
3858`:version' in the top level group.
3859
3860This information is used to control the customize-changed-options command.
3861
3862** It is now an error to change the value of a symbol whose name
3863starts with a colon--if it is interned in the standard obarray.
3864
3865However, setting such a symbol to its proper value, which is that
3866symbol itself, is not an error. This is for the sake of programs that
3867support previous Emacs versions by explicitly setting these variables
3868to themselves.
3869
3870If you set the variable keyword-symbols-constant-flag to nil,
3871this error is suppressed, and you can set these symbols to any
3872values whatever.
3873
3874** There is a new debugger command, R.
3875It evaluates an expression like e, but saves the result
3876in the buffer *Debugger-record*.
3877
3878** Frame-local variables.
3879
3880You can now make a variable local to various frames. To do this, call
3881the function make-variable-frame-local; this enables frames to have
3882local bindings for that variable.
3883
3884These frame-local bindings are actually frame parameters: you create a
3885frame-local binding in a specific frame by calling
3886modify-frame-parameters and specifying the variable name as the
3887parameter name.
3888
3889Buffer-local bindings take precedence over frame-local bindings.
3890Thus, if the current buffer has a buffer-local binding, that binding is
3891active; otherwise, if the selected frame has a frame-local binding,
3892that binding is active; otherwise, the default binding is active.
3893
3894It would not be hard to implement window-local bindings, but it is not
3895clear that this would be very useful; windows tend to come and go in a
3896very transitory fashion, so that trying to produce any specific effect
3897through a window-local binding would not be very robust.
3898
3899** `sregexq' and `sregex' are two new functions for constructing
3900"symbolic regular expressions." These are Lisp expressions that, when
3901evaluated, yield conventional string-based regexps. The symbolic form
3902makes it easier to construct, read, and maintain complex patterns.
3903See the documentation in sregex.el.
3904
3905** parse-partial-sexp's return value has an additional element which
3906is used to pass information along if you pass it to another call to
3907parse-partial-sexp, starting its scan where the first call ended.
3908The contents of this field are not yet finalized.
3909
3910** eval-region now accepts a fourth optional argument READ-FUNCTION.
3911If it is non-nil, that function is used instead of `read'.
3912
3913** unload-feature by default removes the feature's functions from
3914known hooks to avoid trouble, but a package providing FEATURE can
3915define a hook FEATURE-unload-hook to be run by unload-feature instead.
3916
3917** read-from-minibuffer no longer returns the argument DEFAULT-VALUE
3918when the user enters empty input. It now returns the null string, as
3919it did in Emacs 19. The default value is made available in the
3920history via M-n, but it is not applied here as a default.
3921
3922The other, more specialized minibuffer-reading functions continue to
3923return the default value (not the null string) when the user enters
3924empty input.
3925
3926** The new variable read-buffer-function controls which routine to use
3927for selecting buffers. For example, if you set this variable to
3928`iswitchb-read-buffer', iswitchb will be used to read buffer names.
3929Other functions can also be used if they accept the same arguments as
3930`read-buffer' and return the selected buffer name as a string.
3931
3932** The new function read-passwd reads a password from the terminal,
3933echoing a period for each character typed. It takes three arguments:
3934a prompt string, a flag which says "read it twice to make sure", and a
3935default password to use if the user enters nothing.
3936
3937** The variable fill-nobreak-predicate gives major modes a way to
3938specify not to break a line at certain places. Its value is a
3939function which is called with no arguments, with point located at the
3940place where a break is being considered. If the function returns
3941non-nil, then the line won't be broken there.
3942
3943** window-end now takes an optional second argument, UPDATE.
3944If this is non-nil, then the function always returns an accurate
3945up-to-date value for the buffer position corresponding to the
3946end of the window, even if this requires computation.
3947
3948** other-buffer now takes an optional argument FRAME
3949which specifies which frame's buffer list to use.
3950If it is nil, that means use the selected frame's buffer list.
3951
3952** The new variable buffer-display-time, always local in every buffer,
3953holds the value of (current-time) as of the last time that a window
3954was directed to display this buffer.
3955
3956** It is now meaningful to compare two window-configuration objects
3957with `equal'. Two window-configuration objects are equal if they
3958describe equivalent arrangements of windows, in the same frame--in
3959other words, if they would give the same results if passed to
3960set-window-configuration.
3961
3962** compare-window-configurations is a new function that compares two
3963window configurations loosely. It ignores differences in saved buffer
3964positions and scrolling, and considers only the structure and sizes of
3965windows and the choice of buffers to display.
3966
3967** The variable minor-mode-overriding-map-alist allows major modes to
3968override the key bindings of a minor mode. The elements of this alist
3969look like the elements of minor-mode-map-alist: (VARIABLE . KEYMAP).
3970
3971If the VARIABLE in an element of minor-mode-overriding-map-alist has a
3972non-nil value, the paired KEYMAP is active, and totally overrides the
3973map (if any) specified for the same variable in minor-mode-map-alist.
3974
3975minor-mode-overriding-map-alist is automatically local in all buffers,
3976and it is meant to be set by major modes.
3977
3978** The function match-string-no-properties is like match-string
3979except that it discards all text properties from the result.
3980
3981** The function load-average now accepts an optional argument
3982USE-FLOATS. If it is non-nil, the load average values are returned as
3983floating point numbers, rather than as integers to be divided by 100.
3984
3985** The new variable temporary-file-directory specifies the directory
3986to use for creating temporary files. The default value is determined
3987in a reasonable way for your operating system; on GNU and Unix systems
3988it is based on the TMP and TMPDIR environment variables.
3989
3990** Menu changes
3991
3992*** easymenu.el now uses the new menu item format and supports the
3993keywords :visible and :filter. The existing keyword :keys is now
3994better supported.
3995
3996The variable `easy-menu-precalculate-equivalent-keybindings' controls
3997a new feature which calculates keyboard equivalents for the menu when
3998you define the menu. The default is t. If you rarely use menus, you
3999can set the variable to nil to disable this precalculation feature;
4000then the calculation is done only if you use the menu bar.
4001
4002*** A new format for menu items is supported.
4003
4004In a keymap, a key binding that has the format
4005 (STRING . REAL-BINDING) or (STRING HELP-STRING . REAL-BINDING)
4006defines a menu item. Now a menu item definition may also be a list that
4007starts with the symbol `menu-item'.
4008
4009The format is:
4010 (menu-item ITEM-NAME) or
4011 (menu-item ITEM-NAME REAL-BINDING . ITEM-PROPERTY-LIST)
4012where ITEM-NAME is an expression which evaluates to the menu item
4013string, and ITEM-PROPERTY-LIST has the form of a property list.
4014The supported properties include
4015
4016:enable FORM Evaluate FORM to determine whether the
4017 item is enabled.
4018:visible FORM Evaluate FORM to determine whether the
4019 item should appear in the menu.
79214ddf 4020:filter FILTER-FN
a933dad1
DL
4021 FILTER-FN is a function of one argument,
4022 which will be REAL-BINDING.
4023 It should return a binding to use instead.
4024:keys DESCRIPTION
4025 DESCRIPTION is a string that describes an equivalent keyboard
4026 binding for for REAL-BINDING. DESCRIPTION is expanded with
4027 `substitute-command-keys' before it is used.
4028:key-sequence KEY-SEQUENCE
4029 KEY-SEQUENCE is a key-sequence for an equivalent
4030 keyboard binding.
4031:key-sequence nil
4032 This means that the command normally has no
4033 keyboard equivalent.
4034:help HELP HELP is the extra help string (not currently used).
4035:button (TYPE . SELECTED)
4036 TYPE is :toggle or :radio.
4037 SELECTED is a form, to be evaluated, and its
4038 value says whether this button is currently selected.
4039
4040Buttons are at the moment only simulated by prefixes in the menu.
4041Eventually ordinary X-buttons may be supported.
4042
4043(menu-item ITEM-NAME) defines unselectable item.
4044
4045** New event types
4046
4047*** The new event type `mouse-wheel' is generated by a wheel on a
4048mouse (such as the MS Intellimouse). The event contains a delta that
4049corresponds to the amount and direction that the wheel is rotated,
4050which is typically used to implement a scroll or zoom. The format is:
4051
4052 (mouse-wheel POSITION DELTA)
4053
4054where POSITION is a list describing the position of the event in the
4055same format as a mouse-click event, and DELTA is a signed number
4056indicating the number of increments by which the wheel was rotated. A
4057negative DELTA indicates that the wheel was rotated backwards, towards
4058the user, and a positive DELTA indicates that the wheel was rotated
4059forward, away from the user.
4060
4061As of now, this event type is generated only on MS Windows.
4062
4063*** The new event type `drag-n-drop' is generated when a group of
4064files is selected in an application outside of Emacs, and then dragged
4065and dropped onto an Emacs frame. The event contains a list of
4066filenames that were dragged and dropped, which are then typically
4067loaded into Emacs. The format is:
4068
4069 (drag-n-drop POSITION FILES)
4070
4071where POSITION is a list describing the position of the event in the
4072same format as a mouse-click event, and FILES is the list of filenames
4073that were dragged and dropped.
4074
4075As of now, this event type is generated only on MS Windows.
4076
4077** Changes relating to multibyte characters.
4078
4079*** The variable enable-multibyte-characters is now read-only;
4080any attempt to set it directly signals an error. The only way
4081to change this value in an existing buffer is with set-buffer-multibyte.
4082
4083*** In a string constant, `\ ' now stands for "nothing at all". You
4084can use it to terminate a hex escape which is followed by a character
4085that could otherwise be read as part of the hex escape.
4086
4087*** String indices are now measured in characters, as they were
4088in Emacs 19 and before.
4089
4090The function chars-in-string has been deleted.
4091The function concat-chars has been renamed to `string'.
4092
4093*** The function set-buffer-multibyte sets the flag in the current
4094buffer that says whether the buffer uses multibyte representation or
4095unibyte representation. If the argument is nil, it selects unibyte
4096representation. Otherwise it selects multibyte representation.
4097
4098This function does not change the contents of the buffer, viewed
4099as a sequence of bytes. However, it does change the contents
4100viewed as characters; a sequence of two bytes which is treated as
4101one character when the buffer uses multibyte representation
4102will count as two characters using unibyte representation.
4103
4104This function sets enable-multibyte-characters to record which
4105representation is in use. It also adjusts various data in the buffer
4106(including its markers, overlays and text properties) so that they are
4107consistent with the new representation.
4108
4109*** string-make-multibyte takes a string and converts it to multibyte
4110representation. Most of the time, you don't need to care
4111about the representation, because Emacs converts when necessary;
4112however, it makes a difference when you compare strings.
4113
4114The conversion of non-ASCII characters works by adding the value of
4115nonascii-insert-offset to each character, or by translating them
4116using the table nonascii-translation-table.
4117
4118*** string-make-unibyte takes a string and converts it to unibyte
4119representation. Most of the time, you don't need to care about the
4120representation, but it makes a difference when you compare strings.
4121
4122The conversion from multibyte to unibyte representation
4123loses information; the only time Emacs performs it automatically
4124is when inserting a multibyte string into a unibyte buffer.
4125
4126*** string-as-multibyte takes a string, and returns another string
4127which contains the same bytes, but treats them as multibyte.
4128
4129*** string-as-unibyte takes a string, and returns another string
4130which contains the same bytes, but treats them as unibyte.
4131
4132*** The new function compare-strings lets you compare
4133portions of two strings. Unibyte strings are converted to multibyte,
4134so that a unibyte string can match a multibyte string.
4135You can specify whether to ignore case or not.
4136
4137*** assoc-ignore-case now uses compare-strings so that
4138it can treat unibyte and multibyte strings as equal.
4139
4140*** Regular expression operations and buffer string searches now
4141convert the search pattern to multibyte or unibyte to accord with the
4142buffer or string being searched.
4143
4144One consequence is that you cannot always use \200-\377 inside of
4145[...] to match all non-ASCII characters. This does still work when
4146searching or matching a unibyte buffer or string, but not when
4147searching or matching a multibyte string. Unfortunately, there is no
4148obvious choice of syntax to use within [...] for that job. But, what
4149you want is just to match all non-ASCII characters, the regular
4150expression [^\0-\177] works for it.
4151
4152*** Structure of coding system changed.
4153
4154All coding systems (including aliases and subsidiaries) are named
4155by symbols; the symbol's `coding-system' property is a vector
4156which defines the coding system. Aliases share the same vector
4157as the principal name, so that altering the contents of this
4158vector affects the principal name and its aliases. You can define
4159your own alias name of a coding system by the function
4160define-coding-system-alias.
4161
4162The coding system definition includes a property list of its own. Use
4163the new functions `coding-system-get' and `coding-system-put' to
4164access such coding system properties as post-read-conversion,
4165pre-write-conversion, character-translation-table-for-decode,
4166character-translation-table-for-encode, mime-charset, and
4167safe-charsets. For instance, (coding-system-get 'iso-latin-1
4168'mime-charset) gives the corresponding MIME-charset parameter
4169`iso-8859-1'.
4170
4171Among the coding system properties listed above, safe-charsets is new.
4172The value of this property is a list of character sets which this
4173coding system can correctly encode and decode. For instance:
4174(coding-system-get 'iso-latin-1 'safe-charsets) => (ascii latin-iso8859-1)
4175
4176Here, "correctly encode" means that the encoded character sets can
4177also be handled safely by systems other than Emacs as far as they
4178are capable of that coding system. Though, Emacs itself can encode
4179the other character sets and read it back correctly.
4180
4181*** The new function select-safe-coding-system can be used to find a
4182proper coding system for encoding the specified region or string.
4183This function requires a user interaction.
4184
4185*** The new functions find-coding-systems-region and
4186find-coding-systems-string are helper functions used by
4187select-safe-coding-system. They return a list of all proper coding
4188systems to encode a text in some region or string. If you don't want
4189a user interaction, use one of these functions instead of
4190select-safe-coding-system.
4191
4192*** The explicit encoding and decoding functions, such as
4193decode-coding-region and encode-coding-string, now set
4194last-coding-system-used to reflect the actual way encoding or decoding
4195was done.
4196
4197*** The new function detect-coding-with-language-environment can be
4198used to detect a coding system of text according to priorities of
4199coding systems used by some specific language environment.
4200
4201*** The functions detect-coding-region and detect-coding-string always
4202return a list if the arg HIGHEST is nil. Thus, if only ASCII
4203characters are found, they now return a list of single element
4204`undecided' or its subsidiaries.
4205
4206*** The new functions coding-system-change-eol-conversion and
4207coding-system-change-text-conversion can be used to get a different
4208coding system than what specified only in how end-of-line or text is
4209converted.
4210
4211*** The new function set-selection-coding-system can be used to set a
4212coding system for communicating with other X clients.
4213
4214*** The function `map-char-table' now passes as argument only valid
4215character codes, plus generic characters that stand for entire
4216character sets or entire subrows of a character set. In other words,
4217each time `map-char-table' calls its FUNCTION argument, the key value
4218either will be a valid individual character code, or will stand for a
4219range of characters.
4220
4221*** The new function `char-valid-p' can be used for checking whether a
4222Lisp object is a valid character code or not.
4223
4224*** The new function `charset-after' returns a charset of a character
4225in the current buffer at position POS.
4226
4227*** Input methods are now implemented using the variable
4228input-method-function. If this is non-nil, its value should be a
4229function; then, whenever Emacs reads an input event that is a printing
4230character with no modifier bits, it calls that function, passing the
4231event as an argument. Often this function will read more input, first
4232binding input-method-function to nil.
4233
4234The return value should be a list of the events resulting from input
4235method processing. These events will be processed sequentially as
4236input, before resorting to unread-command-events. Events returned by
4237the input method function are not passed to the input method function,
4238not even if they are printing characters with no modifier bits.
4239
4240The input method function is not called when reading the second and
4241subsequent events of a key sequence.
4242
4243*** You can customize any language environment by using
4244set-language-environment-hook and exit-language-environment-hook.
4245
4246The hook `exit-language-environment-hook' should be used to undo
4247customizations that you made with set-language-environment-hook. For
4248instance, if you set up a special key binding for a specific language
4249environment by set-language-environment-hook, you should set up
4250exit-language-environment-hook to restore the normal key binding.
4251\f
4252* Changes in Emacs 20.1
4253
4254** Emacs has a new facility for customization of its many user
4255options. It is called M-x customize. With this facility you can look
4256at the many user options in an organized way; they are grouped into a
4257tree structure.
4258
4259M-x customize also knows what sorts of values are legitimate for each
4260user option and ensures that you don't use invalid values.
4261
4262With M-x customize, you can set options either for the present Emacs
4263session or permanently. (Permanent settings are stored automatically
4264in your .emacs file.)
4265
4266** Scroll bars are now on the left side of the window.
4267You can change this with M-x customize-option scroll-bar-mode.
4268
4269** The mode line no longer includes the string `Emacs'.
4270This makes more space in the mode line for other information.
4271
4272** When you select a region with the mouse, it is highlighted
4273immediately afterward. At that time, if you type the DELETE key, it
4274kills the region.
4275
4276The BACKSPACE key, and the ASCII character DEL, do not do this; they
4277delete the character before point, as usual.
4278
4279** In an incremental search the whole current match is highlighted
4280on terminals which support this. (You can disable this feature
4281by setting search-highlight to nil.)
4282
4283** In the minibuffer, in some cases, you can now use M-n to
4284insert the default value into the minibuffer as text. In effect,
4285the default value (if the minibuffer routines know it) is tacked
4286onto the history "in the future". (The more normal use of the
4287history list is to use M-p to insert minibuffer input used in the
4288past.)
4289
4290** In Text mode, now only blank lines separate paragraphs.
4291This makes it possible to get the full benefit of Adaptive Fill mode
4292in Text mode, and other modes derived from it (such as Mail mode).
4293TAB in Text mode now runs the command indent-relative; this
4294makes a practical difference only when you use indented paragraphs.
4295
4296As a result, the old Indented Text mode is now identical to Text mode,
4297and is an alias for it.
4298
4299If you want spaces at the beginning of a line to start a paragraph,
4300use the new mode, Paragraph Indent Text mode.
4301
4302** Scrolling changes
4303
4304*** Scroll commands to scroll a whole screen now preserve the screen
4305position of the cursor, if scroll-preserve-screen-position is non-nil.
4306
4307In this mode, if you scroll several screens back and forth, finishing
4308on the same screen where you started, the cursor goes back to the line
4309where it started.
4310
4311*** If you set scroll-conservatively to a small number, then when you
4312move point a short distance off the screen, Emacs will scroll the
4313screen just far enough to bring point back on screen, provided that
4314does not exceed `scroll-conservatively' lines.
4315
4316*** The new variable scroll-margin says how close point can come to the
4317top or bottom of a window. It is a number of screen lines; if point
4318comes within that many lines of the top or bottom of the window, Emacs
4319recenters the window.
4320
4321** International character set support (MULE)
4322
4323Emacs now supports a wide variety of international character sets,
4324including European variants of the Latin alphabet, as well as Chinese,
4325Devanagari (Hindi and Marathi), Ethiopian, Greek, IPA, Japanese,
4326Korean, Lao, Russian, Thai, Tibetan, and Vietnamese scripts. These
4327features have been merged from the modified version of Emacs known as
4328MULE (for "MULti-lingual Enhancement to GNU Emacs")
4329
4330Users of these scripts have established many more-or-less standard
4331coding systems for storing files. Emacs uses a single multibyte
4332character encoding within Emacs buffers; it can translate from a wide
4333variety of coding systems when reading a file and can translate back
4334into any of these coding systems when saving a file.
4335
4336Keyboards, even in the countries where these character sets are used,
4337generally don't have keys for all the characters in them. So Emacs
4338supports various "input methods", typically one for each script or
4339language, to make it possible to type them.
4340
4341The Emacs internal multibyte encoding represents a non-ASCII
4342character as a sequence of bytes in the range 0200 through 0377.
4343
4344The new prefix key C-x RET is used for commands that pertain
4345to multibyte characters, coding systems, and input methods.
4346
4347You can disable multibyte character support as follows:
4348
4349 (setq-default enable-multibyte-characters nil)
4350
4351Calling the function standard-display-european turns off multibyte
4352characters, unless you specify a non-nil value for the second
4353argument, AUTO. This provides compatibility for people who are
4354already using standard-display-european to continue using unibyte
4355characters for their work until they want to change.
4356
4357*** Input methods
4358
4359An input method is a kind of character conversion which is designed
4360specifically for interactive input. In Emacs, typically each language
4361has its own input method (though sometimes several languages which use
4362the same characters can share one input method). Some languages
4363support several input methods.
4364
4365The simplest kind of input method works by mapping ASCII letters into
4366another alphabet. This is how the Greek and Russian input methods
4367work.
4368
4369A more powerful technique is composition: converting sequences of
4370characters into one letter. Many European input methods use
4371composition to produce a single non-ASCII letter from a sequence which
4372consists of a letter followed by diacritics. For example, a' is one
4373sequence of two characters that might be converted into a single
4374letter.
4375
4376The input methods for syllabic scripts typically use mapping followed
4377by conversion. The input methods for Thai and Korean work this way.
4378First, letters are mapped into symbols for particular sounds or tone
4379marks; then, sequences of these which make up a whole syllable are
4380mapped into one syllable sign--most often a "composite character".
4381
4382None of these methods works very well for Chinese and Japanese, so
4383they are handled specially. First you input a whole word using
4384phonetic spelling; then, after the word is in the buffer, Emacs
4385converts it into one or more characters using a large dictionary.
4386
4387Since there is more than one way to represent a phonetically spelled
4388word using Chinese characters, Emacs can only guess which one to use;
4389typically these input methods give you a way to say "guess again" if
4390the first guess is wrong.
4391
4392*** The command C-x RET m (toggle-enable-multibyte-characters)
4393turns multibyte character support on or off for the current buffer.
4394
4395If multibyte character support is turned off in a buffer, then each
4396byte is a single character, even codes 0200 through 0377--exactly as
4397they did in Emacs 19.34. This includes the features for support for
4398the European characters, ISO Latin-1 and ISO Latin-2.
4399
4400However, there is no need to turn off multibyte character support to
4401use ISO Latin-1 or ISO Latin-2; the Emacs multibyte character set
4402includes all the characters in these character sets, and Emacs can
4403translate automatically to and from either one.
4404
4405*** Visiting a file in unibyte mode.
4406
4407Turning off multibyte character support in the buffer after visiting a
4408file with multibyte code conversion will display the multibyte
4409sequences already in the buffer, byte by byte. This is probably not
4410what you want.
4411
4412If you want to edit a file of unibyte characters (Latin-1, for
4413example), you can do it by specifying `no-conversion' as the coding
4414system when reading the file. This coding system also turns off
4415multibyte characters in that buffer.
4416
4417If you turn off multibyte character support entirely, this turns off
4418character conversion as well.
4419
4420*** Displaying international characters on X Windows.
4421
4422A font for X typically displays just one alphabet or script.
4423Therefore, displaying the entire range of characters Emacs supports
4424requires using many fonts.
4425
4426Therefore, Emacs now supports "fontsets". Each fontset is a
4427collection of fonts, each assigned to a range of character codes.
4428
4429A fontset has a name, like a font. Individual fonts are defined by
4430the X server; fontsets are defined within Emacs itself. But once you
4431have defined a fontset, you can use it in a face or a frame just as
4432you would use a font.
4433
4434If a fontset specifies no font for a certain character, or if it
4435specifies a font that does not exist on your system, then it cannot
4436display that character. It will display an empty box instead.
4437
4438The fontset height and width are determined by the ASCII characters
4439(that is, by the font in the fontset which is used for ASCII
4440characters). If another font in the fontset has a different height,
4441or the wrong width, then characters assigned to that font are clipped,
4442and displayed within a box if highlight-wrong-size-font is non-nil.
4443
4444*** Defining fontsets.
4445
4446Emacs does not use any fontset by default. Its default font is still
4447chosen as in previous versions. You can tell Emacs to use a fontset
4448with the `-fn' option or the `Font' X resource.
4449
4450Emacs creates a standard fontset automatically according to the value
4451of standard-fontset-spec. This fontset's short name is
4452`fontset-standard'. Bold, italic, and bold-italic variants of the
4453standard fontset are created automatically.
4454
4455If you specify a default ASCII font with the `Font' resource or `-fn'
4456argument, a fontset is generated from it. This works by replacing the
4457FOUNDARY, FAMILY, ADD_STYLE, and AVERAGE_WIDTH fields of the font name
4458with `*' then using this to specify a fontset. This fontset's short
4459name is `fontset-startup'.
4460
4461Emacs checks resources of the form Fontset-N where N is 0, 1, 2...
4462The resource value should have this form:
4463 FONTSET-NAME, [CHARSET-NAME:FONT-NAME]...
4464FONTSET-NAME should have the form of a standard X font name, except:
4465 * most fields should be just the wild card "*".
4466 * the CHARSET_REGISTRY field should be "fontset"
4467 * the CHARSET_ENCODING field can be any nickname of the fontset.
4468The construct CHARSET-NAME:FONT-NAME can be repeated any number
4469of times; each time specifies the font for one character set.
4470CHARSET-NAME should be the name name of a character set, and
4471FONT-NAME should specify an actual font to use for that character set.
4472
4473Each of these fontsets has an alias which is made from the
4474last two font name fields, CHARSET_REGISTRY and CHARSET_ENCODING.
4475You can refer to the fontset by that alias or by its full name.
4476
4477For any character sets that you don't mention, Emacs tries to choose a
4478font by substituting into FONTSET-NAME. For instance, with the
4479following resource,
4480 Emacs*Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-24
4481the font for ASCII is generated as below:
4482 -*-fixed-medium-r-normal-*-24-*-ISO8859-1
4483Here is the substitution rule:
4484 Change CHARSET_REGISTRY and CHARSET_ENCODING to that of the charset
4485 defined in the variable x-charset-registries. For instance, ASCII has
4486 the entry (ascii . "ISO8859-1") in this variable. Then, reduce
4487 sequences of wild cards -*-...-*- with a single wildcard -*-.
4488 (This is to prevent use of auto-scaled fonts.)
4489
4490The function which processes the fontset resource value to create the
4491fontset is called create-fontset-from-fontset-spec. You can also call
4492that function explicitly to create a fontset.
4493
4494With the X resource Emacs.Font, you can specify a fontset name just
4495like an actual font name. But be careful not to specify a fontset
4496name in a wildcard resource like Emacs*Font--that tries to specify the
4497fontset for other purposes including menus, and they cannot handle
4498fontsets.
4499
4500*** The command M-x set-language-environment sets certain global Emacs
4501defaults for a particular choice of language.
4502
4503Selecting a language environment typically specifies a default input
4504method and which coding systems to recognize automatically when
4505visiting files. However, it does not try to reread files you have
4506already visited; the text in those buffers is not affected. The
4507language environment may also specify a default choice of coding
4508system for new files that you create.
4509
4510It makes no difference which buffer is current when you use
4511set-language-environment, because these defaults apply globally to the
4512whole Emacs session.
4513
4514For example, M-x set-language-environment RET Latin-1 RET
4515chooses the Latin-1 character set. In the .emacs file, you can do this
4516with (set-language-environment "Latin-1").
4517
4518*** The command C-x RET f (set-buffer-file-coding-system)
4519specifies the file coding system for the current buffer. This
4520specifies what sort of character code translation to do when saving
4521the file. As an argument, you must specify the name of one of the
4522coding systems that Emacs supports.
4523
4524*** The command C-x RET c (universal-coding-system-argument)
4525lets you specify a coding system when you read or write a file.
4526This command uses the minibuffer to read a coding system name.
4527After you exit the minibuffer, the specified coding system
4528is used for *the immediately following command*.
4529
4530So if the immediately following command is a command to read or
4531write a file, it uses the specified coding system for that file.
4532
4533If the immediately following command does not use the coding system,
4534then C-x RET c ultimately has no effect.
4535
4536For example, C-x RET c iso-8859-1 RET C-x C-f temp RET
4537visits the file `temp' treating it as ISO Latin-1.
4538
4539*** You can specify the coding system for a file using the -*-
4540construct. Include `coding: CODINGSYSTEM;' inside the -*-...-*-
4541to specify use of coding system CODINGSYSTEM. You can also
4542specify the coding system in a local variable list at the end
4543of the file.
4544
4545*** The command C-x RET t (set-terminal-coding-system) specifies
4546the coding system for terminal output. If you specify a character
4547code for terminal output, all characters output to the terminal are
4548translated into that character code.
4549
4550This feature is useful for certain character-only terminals built in
4551various countries to support the languages of those countries.
4552
4553By default, output to the terminal is not translated at all.
4554
4555*** The command C-x RET k (set-keyboard-coding-system) specifies
4556the coding system for keyboard input.
4557
4558Character code translation of keyboard input is useful for terminals
4559with keys that send non-ASCII graphic characters--for example,
4560some terminals designed for ISO Latin-1 or subsets of it.
4561
4562By default, keyboard input is not translated at all.
4563
4564Character code translation of keyboard input is similar to using an
4565input method, in that both define sequences of keyboard input that
4566translate into single characters. However, input methods are designed
4567to be convenient for interactive use, while the code translations are
4568designed to work with terminals.
4569
4570*** The command C-x RET p (set-buffer-process-coding-system)
4571specifies the coding system for input and output to a subprocess.
4572This command applies to the current buffer; normally, each subprocess
4573has its own buffer, and thus you can use this command to specify
4574translation to and from a particular subprocess by giving the command
4575in the corresponding buffer.
4576
4577By default, process input and output are not translated at all.
4578
4579*** The variable file-name-coding-system specifies the coding system
4580to use for encoding file names before operating on them.
4581It is also used for decoding file names obtained from the system.
4582
4583*** The command C-\ (toggle-input-method) activates or deactivates
4584an input method. If no input method has been selected before, the
4585command prompts for you to specify the language and input method you
4586want to use.
4587
4588C-u C-\ (select-input-method) lets you switch to a different input
4589method. C-h C-\ (or C-h I) describes the current input method.
4590
4591*** Some input methods remap the keyboard to emulate various keyboard
4592layouts commonly used for particular scripts. How to do this
4593remapping properly depends on your actual keyboard layout. To specify
4594which layout your keyboard has, use M-x quail-set-keyboard-layout.
4595
4596*** The command C-h C (describe-coding-system) displays
4597the coding systems currently selected for various purposes, plus
4598related information.
4599
4600*** The command C-h h (view-hello-file) displays a file called
4601HELLO, which has examples of text in many languages, using various
4602scripts.
4603
4604*** The command C-h L (describe-language-support) displays
4605information about the support for a particular language.
4606You specify the language as an argument.
4607
4608*** The mode line now contains a letter or character that identifies
4609the coding system used in the visited file. It normally follows the
4610first dash.
4611
4612A dash indicates the default state of affairs: no code conversion
4613(except CRLF => newline if appropriate). `=' means no conversion
4614whatsoever. The ISO 8859 coding systems are represented by digits
46151 through 9. Other coding systems are represented by letters:
4616
4617 A alternativnyj (Russian)
4618 B big5 (Chinese)
4619 C cn-gb-2312 (Chinese)
4620 C iso-2022-cn (Chinese)
4621 D in-is13194-devanagari (Indian languages)
4622 E euc-japan (Japanese)
4623 I iso-2022-cjk or iso-2022-ss2 (Chinese, Japanese, Korean)
4624 J junet (iso-2022-7) or old-jis (iso-2022-jp-1978-irv) (Japanese)
4625 K euc-korea (Korean)
4626 R koi8 (Russian)
4627 Q tibetan
4628 S shift_jis (Japanese)
4629 T lao
4630 T tis620 (Thai)
4631 V viscii or vscii (Vietnamese)
4632 i iso-2022-lock (Chinese, Japanese, Korean)
4633 k iso-2022-kr (Korean)
4634 v viqr (Vietnamese)
4635 z hz (Chinese)
4636
4637When you are using a character-only terminal (not a window system),
4638two additional characters appear in between the dash and the file
4639coding system. These two characters describe the coding system for
4640keyboard input, and the coding system for terminal output.
4641
4642*** The new variable rmail-file-coding-system specifies the code
4643conversion to use for RMAIL files. The default value is nil.
4644
4645When you read mail with Rmail, each message is decoded automatically
4646into Emacs' internal format. This has nothing to do with
4647rmail-file-coding-system. That variable controls reading and writing
4648Rmail files themselves.
4649
4650*** The new variable sendmail-coding-system specifies the code
4651conversion for outgoing mail. The default value is nil.
4652
4653Actually, there are three different ways of specifying the coding system
4654for sending mail:
4655
4656- If you use C-x RET f in the mail buffer, that takes priority.
4657- Otherwise, if you set sendmail-coding-system non-nil, that specifies it.
4658- Otherwise, the default coding system for new files is used,
4659 if that is non-nil. That comes from your language environment.
4660- Otherwise, Latin-1 is used.
4661
4662*** The command C-h t (help-with-tutorial) accepts a prefix argument
4663to specify the language for the tutorial file. Currently, English,
4664Japanese, Korean and Thai are supported. We welcome additional
4665translations.
4666
4667** An easy new way to visit a file with no code or format conversion
4668of any kind: Use M-x find-file-literally. There is also a command
4669insert-file-literally which inserts a file into the current buffer
4670without any conversion.
4671
4672** C-q's handling of octal character codes is changed.
4673You can now specify any number of octal digits.
4674RET terminates the digits and is discarded;
4675any other non-digit terminates the digits and is then used as input.
4676
4677** There are new commands for looking up Info documentation for
4678functions, variables and file names used in your programs.
4679
4680Type M-x info-lookup-symbol to look up a symbol in the buffer at point.
4681Type M-x info-lookup-file to look up a file in the buffer at point.
4682
4683Precisely which Info files are used to look it up depends on the major
4684mode. For example, in C mode, the GNU libc manual is used.
4685
4686** M-TAB in most programming language modes now runs the command
4687complete-symbol. This command performs completion on the symbol name
4688in the buffer before point.
4689
4690With a numeric argument, it performs completion based on the set of
4691symbols documented in the Info files for the programming language that
4692you are using.
4693
4694With no argument, it does completion based on the current tags tables,
4695just like the old binding of M-TAB (complete-tag).
4696
4697** File locking works with NFS now.
4698
4699The lock file for FILENAME is now a symbolic link named .#FILENAME,
4700in the same directory as FILENAME.
4701
4702This means that collision detection between two different machines now
4703works reasonably well; it also means that no file server or directory
4704can become a bottleneck.
4705
4706The new method does have drawbacks. It means that collision detection
4707does not operate when you edit a file in a directory where you cannot
4708create new files. Collision detection also doesn't operate when the
4709file server does not support symbolic links. But these conditions are
4710rare, and the ability to have collision detection while using NFS is
4711so useful that the change is worth while.
4712
4713When Emacs or a system crashes, this may leave behind lock files which
4714are stale. So you may occasionally get warnings about spurious
4715collisions. When you determine that the collision is spurious, just
4716tell Emacs to go ahead anyway.
4717
4718** If you wish to use Show Paren mode to display matching parentheses,
4719it is no longer sufficient to load paren.el. Instead you must call
4720show-paren-mode.
4721
4722** If you wish to use Delete Selection mode to replace a highlighted
4723selection when you insert new text, it is no longer sufficient to load
4724delsel.el. Instead you must call the function delete-selection-mode.
4725
4726** If you wish to use Partial Completion mode to complete partial words
4727within symbols or filenames, it is no longer sufficient to load
4728complete.el. Instead you must call the function partial-completion-mode.
4729
4730** If you wish to use uniquify to rename buffers for you,
4731it is no longer sufficient to load uniquify.el. You must also
4732set uniquify-buffer-name-style to one of the non-nil legitimate values.
4733
4734** Changes in View mode.
4735
4736*** Several new commands are available in View mode.
4737Do H in view mode for a list of commands.
4738
4739*** There are two new commands for entering View mode:
4740view-file-other-frame and view-buffer-other-frame.
4741
4742*** Exiting View mode does a better job of restoring windows to their
4743previous state.
4744
4745*** New customization variable view-scroll-auto-exit. If non-nil,
4746scrolling past end of buffer makes view mode exit.
4747
4748*** New customization variable view-exits-all-viewing-windows. If
4749non-nil, view-mode will at exit restore all windows viewing buffer,
4750not just the selected window.
4751
4752*** New customization variable view-read-only. If non-nil, visiting a
4753read-only file automatically enters View mode, and toggle-read-only
4754turns View mode on or off.
4755
4756*** New customization variable view-remove-frame-by-deleting controls
4757how to remove a not needed frame at view mode exit. If non-nil,
4758delete the frame, if nil make an icon of it.
4759
4760** C-x v l, the command to print a file's version control log,
4761now positions point at the entry for the file's current branch version.
4762
4763** C-x v =, the command to compare a file with the last checked-in version,
4764has a new feature. If the file is currently not locked, so that it is
4765presumably identical to the last checked-in version, the command now asks
4766which version to compare with.
4767
4768** When using hideshow.el, incremental search can temporarily show hidden
79214ddf 4769blocks if a match is inside the block.
a933dad1
DL
4770
4771The block is hidden again if the search is continued and the next match
4772is outside the block. By customizing the variable
4773isearch-hide-immediately you can choose to hide all the temporarily
4774shown blocks only when exiting from incremental search.
4775
4776By customizing the variable hs-isearch-open you can choose what kind
4777of blocks to temporarily show during isearch: comment blocks, code
4778blocks, all of them or none.
4779
4780** The new command C-x 4 0 (kill-buffer-and-window) kills the
4781current buffer and deletes the selected window. It asks for
4782confirmation first.
4783
4784** C-x C-w, which saves the buffer into a specified file name,
4785now changes the major mode according to that file name.
4786However, the mode will not be changed if
4787(1) a local variables list or the `-*-' line specifies a major mode, or
4788(2) the current major mode is a "special" mode,
4789 not suitable for ordinary files, or
4790(3) the new file name does not particularly specify any mode.
4791
4792This applies to M-x set-visited-file-name as well.
4793
4794However, if you set change-major-mode-with-file-name to nil, then
4795these commands do not change the major mode.
4796
4797** M-x occur changes.
4798
4799*** If the argument to M-x occur contains upper case letters,
4800it performs a case-sensitive search.
4801
4802*** In the *Occur* buffer made by M-x occur,
4803if you type g or M-x revert-buffer, this repeats the search
4804using the same regular expression and the same buffer as before.
4805
4806** In Transient Mark mode, the region in any one buffer is highlighted
4807in just one window at a time. At first, it is highlighted in the
4808window where you set the mark. The buffer's highlighting remains in
4809that window unless you select to another window which shows the same
4810buffer--then the highlighting moves to that window.
4811
4812** The feature to suggest key bindings when you use M-x now operates
4813after the command finishes. The message suggesting key bindings
4814appears temporarily in the echo area. The previous echo area contents
4815come back after a few seconds, in case they contain useful information.
4816
4817** Each frame now independently records the order for recently
4818selected buffers, so that the default for C-x b is now based on the
4819buffers recently selected in the selected frame.
4820
4821** Outline mode changes.
4822
4823*** Outline mode now uses overlays (this is the former noutline.el).
4824
4825*** Incremental searches skip over invisible text in Outline mode.
4826
4827** When a minibuffer window is active but not the selected window, if
4828you try to use the minibuffer, you used to get a nested minibuffer.
4829Now, this not only gives an error, it also cancels the minibuffer that
4830was already active.
4831
4832The motive for this change is so that beginning users do not
4833unknowingly move away from minibuffers, leaving them active, and then
4834get confused by it.
4835
4836If you want to be able to have recursive minibuffers, you must
4837set enable-recursive-minibuffers to non-nil.
4838
4839** Changes in dynamic abbrevs.
4840
4841*** Expanding dynamic abbrevs with M-/ is now smarter about case
4842conversion. If the expansion has mixed case not counting the first
4843character, and the abbreviation matches the beginning of the expansion
4844including case, then the expansion is copied verbatim.
4845
4846The expansion is also copied verbatim if the abbreviation itself has
4847mixed case. And using SPC M-/ to copy an additional word always
4848copies it verbatim except when the previous copied word is all caps.
4849
4850*** The values of `dabbrev-case-replace' and `dabbrev-case-fold-search'
4851are no longer Lisp expressions. They have simply three possible
4852values.
4853
4854`dabbrev-case-replace' has these three values: nil (don't preserve
4855case), t (do), or `case-replace' (do like M-x query-replace).
4856`dabbrev-case-fold-search' has these three values: nil (don't ignore
4857case), t (do), or `case-fold-search' (do like search).
4858
4859** Minibuffer history lists are truncated automatically now to a
4860certain length. The variable history-length specifies how long they
4861can be. The default value is 30.
4862
4863** Changes in Mail mode.
4864
4865*** The key C-x m no longer runs the `mail' command directly.
4866Instead, it runs the command `compose-mail', which invokes the mail
4867composition mechanism you have selected with the variable
4868`mail-user-agent'. The default choice of user agent is
4869`sendmail-user-agent', which gives behavior compatible with the old
4870behavior.
4871
4872C-x 4 m now runs compose-mail-other-window, and C-x 5 m runs
4873compose-mail-other-frame.
4874
4875*** While composing a reply to a mail message, from Rmail, you can use
4876the command C-c C-r to cite just the region from the message you are
4877replying to. This copies the text which is the selected region in the
4878buffer that shows the original message.
4879
4880*** The command C-c C-i inserts a file at the end of the message,
4881with separator lines around the contents.
4882
4883*** The command M-x expand-mail-aliases expands all mail aliases
4884in suitable mail headers. Emacs automatically extracts mail alias
4885definitions from your mail alias file (e.g., ~/.mailrc). You do not
4886need to expand mail aliases yourself before sending mail.
4887
4888*** New features in the mail-complete command.
4889
4890**** The mail-complete command now inserts the user's full name,
4891for local users or if that is known. The variable mail-complete-style
4892controls the style to use, and whether to do this at all.
4893Its values are like those of mail-from-style.
4894
4895**** The variable mail-passwd-command lets you specify a shell command
4896to run to fetch a set of password-entries that add to the ones in
4897/etc/passwd.
4898
4899**** The variable mail-passwd-file now specifies a list of files to read
4900to get the list of user ids. By default, one file is used:
4901/etc/passwd.
4902
4903** You can "quote" a file name to inhibit special significance of
4904special syntax, by adding `/:' to the beginning. Thus, if you have a
4905directory named `/foo:', you can prevent it from being treated as a
4906reference to a remote host named `foo' by writing it as `/:/foo:'.
4907
4908Emacs uses this new construct automatically when necessary, such as
4909when you start it with a working directory whose name might otherwise
4910be taken to be magic.
4911
4912** There is a new command M-x grep-find which uses find to select
4913files to search through, and grep to scan them. The output is
4914available in a Compile mode buffer, as with M-x grep.
4915
4916M-x grep now uses the -e option if the grep program supports that.
4917(-e prevents problems if the search pattern starts with a dash.)
4918
4919** In Dired, the & command now flags for deletion the files whose names
4920suggest they are probably not needed in the long run.
4921
4922In Dired, * is now a prefix key for mark-related commands.
4923
4924new key dired.el binding old key
4925------- ---------------- -------
4926 * c dired-change-marks c
4927 * m dired-mark m
4928 * * dired-mark-executables * (binding deleted)
4929 * / dired-mark-directories / (binding deleted)
4930 * @ dired-mark-symlinks @ (binding deleted)
4931 * u dired-unmark u
4932 * DEL dired-unmark-backward DEL
4933 * ? dired-unmark-all-files M-C-?
4934 * ! dired-unmark-all-marks
4935 * % dired-mark-files-regexp % m
4936 * C-n dired-next-marked-file M-}
4937 * C-p dired-prev-marked-file M-{
4938
4939** Rmail changes.
4940
4941*** When Rmail cannot convert your incoming mail into Babyl format, it
4942saves the new mail in the file RMAILOSE.n, where n is an integer
4943chosen to make a unique name. This way, Rmail will not keep crashing
4944each time you run it.
4945
4946*** In Rmail, the variable rmail-summary-line-count-flag now controls
4947whether to include the line count in the summary. Non-nil means yes.
4948
4949*** In Rmail summary buffers, d and C-d (the commands to delete
4950messages) now take repeat counts as arguments. A negative argument
4951means to move in the opposite direction.
4952
4953*** In Rmail, the t command now takes an optional argument which lets
4954you specify whether to show the message headers in full or pruned.
4955
4956*** In Rmail, the new command w (rmail-output-body-to-file) writes
4957just the body of the current message into a file, without the headers.
4958It takes the file name from the message subject, by default, but you
4959can edit that file name in the minibuffer before it is actually used
4960for output.
4961
4962** Gnus changes.
4963
4964*** nntp.el has been totally rewritten in an asynchronous fashion.
4965
79214ddf
FP
4966*** Article prefetching functionality has been moved up into
4967Gnus.
a933dad1 4968
79214ddf 4969*** Scoring can now be performed with logical operators like
a933dad1
DL
4970`and', `or', `not', and parent redirection.
4971
4972*** Article washing status can be displayed in the
4973article mode line.
4974
4975*** gnus.el has been split into many smaller files.
4976
4977*** Suppression of duplicate articles based on Message-ID.
4978
4979(setq gnus-suppress-duplicates t)
4980
4981*** New variables for specifying what score and adapt files
4982are to be considered home score and adapt files. See
4983`gnus-home-score-file' and `gnus-home-adapt-files'.
4984
4985*** Groups can inherit group parameters from parent topics.
4986
4987*** Article editing has been revamped and is now usable.
4988
4989*** Signatures can be recognized in more intelligent fashions.
4990See `gnus-signature-separator' and `gnus-signature-limit'.
4991
4992*** Summary pick mode has been made to look more nn-like.
4993Line numbers are displayed and the `.' command can be
4994used to pick articles.
4995
4996*** Commands for moving the .newsrc.eld from one server to
4997another have been added.
4998
4999 `M-x gnus-change-server'
5000
5001*** A way to specify that "uninteresting" fields be suppressed when
5002generating lines in buffers.
5003
5004*** Several commands in the group buffer can be undone with
5005`M-C-_'.
5006
5007*** Scoring can be done on words using the new score type `w'.
5008
5009*** Adaptive scoring can be done on a Subject word-by-word basis:
5010
5011 (setq gnus-use-adaptive-scoring '(word))
5012
5013*** Scores can be decayed.
79214ddf 5014
a933dad1
DL
5015 (setq gnus-decay-scores t)
5016
5017*** Scoring can be performed using a regexp on the Date header. The
5018Date is normalized to compact ISO 8601 format first.
5019
5020*** A new command has been added to remove all data on articles from
5021the native server.
5022
5023 `M-x gnus-group-clear-data-on-native-groups'
5024
5025*** A new command for reading collections of documents
5026(nndoc with nnvirtual on top) has been added -- `M-C-d'.
5027
5028*** Process mark sets can be pushed and popped.
5029
5030*** A new mail-to-news backend makes it possible to post
5031even when the NNTP server doesn't allow posting.
5032
5033*** A new backend for reading searches from Web search engines
5034(DejaNews, Alta Vista, InReference) has been added.
5035
5036 Use the `G w' command in the group buffer to create such
5037 a group.
5038
5039*** Groups inside topics can now be sorted using the standard
5040sorting functions, and each topic can be sorted independently.
5041
5042 See the commands under the `T S' submap.
5043
5044*** Subsets of the groups can be sorted independently.
5045
5046 See the commands under the `G P' submap.
5047
5048*** Cached articles can be pulled into the groups.
79214ddf 5049
a933dad1
DL
5050 Use the `Y c' command.
5051
5052*** Score files are now applied in a more reliable order.
5053
5054*** Reports on where mail messages end up can be generated.
5055
5056 `M-x nnmail-split-history'
5057
5058*** More hooks and functions have been added to remove junk
5059from incoming mail before saving the mail.
79214ddf 5060
a933dad1
DL
5061 See `nnmail-prepare-incoming-header-hook'.
5062
5063*** The nnml mail backend now understands compressed article files.
5064
5065*** To enable Gnus to read/post multi-lingual articles, you must execute
5066the following code, for instance, in your .emacs.
5067
5068 (add-hook 'gnus-startup-hook 'gnus-mule-initialize)
5069
5070Then, when you start Gnus, it will decode non-ASCII text automatically
5071and show appropriate characters. (Note: if you are using gnus-mime
5072from the SEMI package, formerly known as TM, you should NOT add this
5073hook to gnus-startup-hook; gnus-mime has its own method of handling
5074this issue.)
5075
5076Since it is impossible to distinguish all coding systems
5077automatically, you may need to specify a choice of coding system for a
5078particular news group. This can be done by:
5079
5080 (gnus-mule-add-group NEWSGROUP 'CODING-SYSTEM)
5081
5082Here NEWSGROUP should be a string which names a newsgroup or a tree
5083of newsgroups. If NEWSGROUP is "XXX.YYY", all news groups under
5084"XXX.YYY" (including "XXX.YYY.ZZZ") will use the specified coding
5085system. CODING-SYSTEM specifies which coding system to use (for both
5086for reading and posting).
5087
5088CODING-SYSTEM can also be a cons cell of the form
5089 (READ-CODING-SYSTEM . POST-CODING-SYSTEM)
5090Then READ-CODING-SYSTEM is used when you read messages from the
5091newsgroups, while POST-CODING-SYSTEM is used when you post messages
5092there.
5093
5094Emacs knows the right coding systems for certain newsgroups by
5095default. Here are some of these default settings:
5096
5097 (gnus-mule-add-group "fj" 'iso-2022-7)
5098 (gnus-mule-add-group "alt.chinese.text" 'hz-gb-2312)
5099 (gnus-mule-add-group "alt.hk" 'hz-gb-2312)
5100 (gnus-mule-add-group "alt.chinese.text.big5" 'cn-big5)
5101 (gnus-mule-add-group "soc.culture.vietnamese" '(nil . viqr))
5102
5103When you reply by mail to an article, these settings are ignored;
5104the mail is encoded according to sendmail-coding-system, as usual.
5105
5106** CC mode changes.
5107
5108*** If you edit primarily one style of C (or C++, Objective-C, Java)
5109code, you may want to make the CC Mode style variables have global
5110values so that you can set them directly in your .emacs file. To do
5111this, set c-style-variables-are-local-p to nil in your .emacs file.
5112Note that this only takes effect if you do it *before* cc-mode.el is
5113loaded.
5114
5115If you typically edit more than one style of C (or C++, Objective-C,
79214ddf 5116Java) code in a single Emacs session, you may want to make the CC Mode
a933dad1 5117style variables have buffer local values. By default, all buffers
79214ddf
FP
5118share the same style variable settings; to make them buffer local, set
5119c-style-variables-are-local-p to t in your .emacs file. Note that you
a933dad1
DL
5120must do this *before* CC Mode is loaded.
5121
5122*** The new variable c-indentation-style holds the C style name
5123of the current buffer.
5124
5125*** The variable c-block-comments-indent-p has been deleted, because
5126it is no longer necessary. C mode now handles all the supported styles
5127of block comments, with no need to say which one you will use.
5128
5129*** There is a new indentation style "python", which specifies the C
5130style that the Python developers like.
5131
5132*** There is a new c-cleanup-list option: brace-elseif-brace.
5133This says to put ...} else if (...) {... on one line,
5134just as brace-else-brace says to put ...} else {... on one line.
5135
5136** VC Changes [new]
5137
5138** In vc-retrieve-snapshot (C-x v r), if you don't specify a snapshot
5139name, it retrieves the *latest* versions of all files in the current
5140directory and its subdirectories (aside from files already locked).
5141
5142This feature is useful if your RCS directory is a link to a common
5143master directory, and you want to pick up changes made by other
5144developers.
5145
5146You can do the same thing for an individual file by typing C-u C-x C-q
5147RET in a buffer visiting that file.
5148
5149*** VC can now handle files under CVS that are being "watched" by
5150other developers. Such files are made read-only by CVS. To get a
5151writable copy, type C-x C-q in a buffer visiting such a file. VC then
5152calls "cvs edit", which notifies the other developers of it.
5153
5154*** vc-version-diff (C-u C-x v =) now suggests reasonable defaults for
5155version numbers, based on the current state of the file.
5156
5157** Calendar changes.
5158
5159A new function, list-holidays, allows you list holidays or subclasses
5160of holidays for ranges of years. Related menu items allow you do this
5161for the year of the selected date, or the following/previous years.
5162
5163** ps-print changes
5164
79214ddf 5165There are some new user variables for customizing the page layout.
a933dad1
DL
5166
5167*** Paper size, paper orientation, columns
5168
5169The variable `ps-paper-type' determines the size of paper ps-print
5170formats for; it should contain one of the symbols:
5171`a4' `a3' `letter' `legal' `letter-small' `tabloid'
5172`ledger' `statement' `executive' `a4small' `b4' `b5'
5173It defaults to `letter'.
5174If you need other sizes, see the variable `ps-page-dimensions-database'.
5175
5176The variable `ps-landscape-mode' determines the orientation
79214ddf 5177of the printing on the page. nil, the default, means "portrait" mode,
a933dad1
DL
5178non-nil means "landscape" mode.
5179
5180The variable `ps-number-of-columns' must be a positive integer.
5181It determines the number of columns both in landscape and portrait mode.
79214ddf 5182It defaults to 1.
a933dad1
DL
5183
5184*** Horizontal layout
5185
5186The horizontal layout is determined by the variables
5187`ps-left-margin', `ps-inter-column', and `ps-right-margin'.
5188All are measured in points.
5189
5190*** Vertical layout
5191
5192The vertical layout is determined by the variables
5193`ps-bottom-margin', `ps-top-margin', and `ps-header-offset'.
5194All are measured in points.
5195
5196*** Headers
5197
5198If the variable `ps-print-header' is nil, no header is printed. Then
5199`ps-header-offset' is not relevant and `ps-top-margin' represents the
5200margin above the text.
5201
79214ddf 5202If the variable `ps-print-header-frame' is non-nil, a gaudy
a933dad1
DL
5203framing box is printed around the header.
5204
5205The contents of the header are determined by `ps-header-lines',
5206`ps-show-n-of-n', `ps-left-header' and `ps-right-header'.
5207
79214ddf
FP
5208The height of the header is determined by `ps-header-line-pad',
5209`ps-header-font-family', `ps-header-title-font-size' and
a933dad1
DL
5210`ps-header-font-size'.
5211
5212*** Font managing
5213
5214The variable `ps-font-family' determines which font family is to be
5215used for ordinary text. Its value must be a key symbol in the alist
5216`ps-font-info-database'. You can add other font families by adding
5217elements to this alist.
5218
79214ddf 5219The variable `ps-font-size' determines the size of the font
a933dad1
DL
5220for ordinary text. It defaults to 8.5 points.
5221
5222** hideshow changes.
5223
5224*** now supports hiding of blocks of single line comments (like // for
79214ddf 5225C++, ; for lisp).
a933dad1
DL
5226
5227*** Support for java-mode added.
5228
5229*** When doing `hs-hide-all' it is now possible to also hide the comments
5230in the file if `hs-hide-comments-when-hiding-all' is set.
5231
5232*** The new function `hs-hide-initial-comment' hides the the comments at
5233the beginning of the files. Finally those huge RCS logs don't stay in your
5234way! This is run by default when entering the `hs-minor-mode'.
5235
5236*** Now uses overlays instead of `selective-display', so is more
5237robust and a lot faster.
5238
79214ddf 5239*** A block beginning can span multiple lines.
a933dad1
DL
5240
5241*** The new variable `hs-show-hidden-short-form' if t, directs hideshow
5242to show only the beginning of a block when it is hidden. See the
5243documentation for more details.
5244
5245** Changes in Enriched mode.
5246
5247*** When you visit a file in enriched-mode, Emacs will make sure it is
5248filled to the current fill-column. This behavior is now independent
5249of the size of the window. When you save the file, the fill-column in
5250use is stored as well, so that the whole buffer need not be refilled
5251the next time unless the fill-column is different.
5252
5253*** use-hard-newlines is now a minor mode. When it is enabled, Emacs
5254distinguishes between hard and soft newlines, and treats hard newlines
5255as paragraph boundaries. Otherwise all newlines inserted are marked
5256as soft, and paragraph boundaries are determined solely from the text.
5257
5258** Font Lock mode
5259
5260*** Custom support
5261
5262The variables font-lock-face-attributes, font-lock-display-type and
5263font-lock-background-mode are now obsolete; the recommended way to specify the
5264faces to use for Font Lock mode is with M-x customize-group on the new custom
5265group font-lock-highlighting-faces. If you set font-lock-face-attributes in
5266your ~/.emacs file, Font Lock mode will respect its value. However, you should
5267consider converting from setting that variable to using M-x customize.
5268
5269You can still use X resources to specify Font Lock face appearances.
5270
5271*** Maximum decoration
5272
5273Fontification now uses the maximum level of decoration supported by
5274default. Previously, fontification used a mode-specific default level
5275of decoration, which is typically the minimum level of decoration
5276supported. You can set font-lock-maximum-decoration to nil
5277to get the old behavior.
5278
5279*** New support
5280
5281Support is now provided for Java, Objective-C, AWK and SIMULA modes.
5282
5283Note that Font Lock mode can be turned on without knowing exactly what modes
5284support Font Lock mode, via the command global-font-lock-mode.
5285
5286*** Configurable support
5287
5288Support for C, C++, Objective-C and Java can be more easily configured for
5289additional types and classes via the new variables c-font-lock-extra-types,
5290c++-font-lock-extra-types, objc-font-lock-extra-types and, you guessed it,
5291java-font-lock-extra-types. These value of each of these variables should be a
5292list of regexps matching the extra type names. For example, the default value
5293of c-font-lock-extra-types is ("\\sw+_t") which means fontification follows the
5294convention that C type names end in _t. This results in slower fontification.
5295
5296Of course, you can change the variables that specify fontification in whatever
5297way you wish, typically by adding regexps. However, these new variables make
5298it easier to make specific and common changes for the fontification of types.
5299
5300*** Adding highlighting patterns to existing support
5301
5302You can use the new function font-lock-add-keywords to add your own
5303highlighting patterns, such as for project-local or user-specific constructs,
5304for any mode.
5305
5306For example, to highlight `FIXME:' words in C comments, put:
5307
5308 (font-lock-add-keywords 'c-mode '(("\\<FIXME:" 0 font-lock-warning-face t)))
5309
5310in your ~/.emacs.
5311
5312*** New faces
5313
5314Font Lock now defines two new faces, font-lock-builtin-face and
5315font-lock-warning-face. These are intended to highlight builtin keywords,
5316distinct from a language's normal keywords, and objects that should be brought
5317to user attention, respectively. Various modes now use these new faces.
5318
5319*** Changes to fast-lock support mode
5320
5321The fast-lock package, one of the two Font Lock support modes, can now process
5322cache files silently. You can use the new variable fast-lock-verbose, in the
5323same way as font-lock-verbose, to control this feature.
5324
5325*** Changes to lazy-lock support mode
5326
5327The lazy-lock package, one of the two Font Lock support modes, can now fontify
5328according to the true syntactic context relative to other lines. You can use
5329the new variable lazy-lock-defer-contextually to control this feature. If
5330non-nil, changes to the buffer will cause subsequent lines in the buffer to be
5331refontified after lazy-lock-defer-time seconds of idle time. If nil, then only
5332the modified lines will be refontified; this is the same as the previous Lazy
5333Lock mode behaviour and the behaviour of Font Lock mode.
5334
5335This feature is useful in modes where strings or comments can span lines.
5336For example, if a string or comment terminating character is deleted, then if
5337this feature is enabled subsequent lines in the buffer will be correctly
5338refontified to reflect their new syntactic context. Previously, only the line
5339containing the deleted character would be refontified and you would have to use
5340the command M-g M-g (font-lock-fontify-block) to refontify some lines.
5341
5342As a consequence of this new feature, two other variables have changed:
5343
5344Variable `lazy-lock-defer-driven' is renamed `lazy-lock-defer-on-scrolling'.
5345Variable `lazy-lock-defer-time' can now only be a time, i.e., a number.
5346Buffer modes for which on-the-fly deferral applies can be specified via the
5347new variable `lazy-lock-defer-on-the-fly'.
5348
5349If you set these variables in your ~/.emacs, then you may have to change those
5350settings.
5351
5352** Ada mode changes.
5353
5354*** There is now better support for using find-file.el with Ada mode.
5355If you switch between spec and body, the cursor stays in the same
5356procedure (modulo overloading). If a spec has no body file yet, but
5357you try to switch to its body file, Ada mode now generates procedure
5358stubs.
5359
5360*** There are two new commands:
5361 - `ada-make-local' : invokes gnatmake on the current buffer
5362 - `ada-check-syntax' : check syntax of current buffer.
5363
5364The user options `ada-compiler-make', `ada-make-options',
5365`ada-language-version', `ada-compiler-syntax-check', and
79214ddf 5366`ada-compile-options' are used within these commands.
a933dad1
DL
5367
5368*** Ada mode can now work with Outline minor mode. The outline level
5369is calculated from the indenting, not from syntactic constructs.
5370Outlining does not work if your code is not correctly indented.
5371
5372*** The new function `ada-gnat-style' converts the buffer to the style of
5373formatting used in GNAT. It places two blanks after a comment start,
5374places one blank between a word end and an opening '(', and puts one
5375space between a comma and the beginning of a word.
5376
5377** Scheme mode changes.
5378
5379*** Scheme mode indentation now uses many of the facilities of Lisp
5380mode; therefore, the variables to customize it are the variables used
5381for Lisp mode which have names starting with `lisp-'. The variables
5382with names starting with `scheme-' which used to do this no longer
5383have any effect.
5384
5385If you want to use different indentation for Scheme and Lisp, this is
5386still possible, but now you must do it by adding a hook to
5387scheme-mode-hook, which could work by setting the `lisp-' indentation
5388variables as buffer-local variables.
5389
5390*** DSSSL mode is a variant of Scheme mode, for editing DSSSL scripts.
5391Use M-x dsssl-mode.
5392
133c9e59
GM
5393** Changes to the emacsclient program
5394
5395*** The emacsclient program now accepts an option --no-wait which tells
a933dad1
DL
5396it to return immediately without waiting for you to "finish" the
5397buffer in Emacs.
5398
133c9e59
GM
5399*** The new option --alternate-editor allows to specify an editor to
5400use if Emacs is not running. The environment variable
5401ALTERNATE_EDITOR can be used for the same effect; the command line
5402option takes precedence.
5403
a933dad1
DL
5404** M-x eldoc-mode enables a minor mode in which the echo area
5405constantly shows the parameter list for function being called at point
5406(in Emacs Lisp and Lisp Interaction modes only).
5407
5408** C-x n d now runs the new command narrow-to-defun,
5409which narrows the accessible parts of the buffer to just
5410the current defun.
5411
5412** Emacs now handles the `--' argument in the standard way; all
5413following arguments are treated as ordinary file names.
5414
5415** On MSDOS and Windows, the bookmark file is now called _emacs.bmk,
5416and the saved desktop file is now called _emacs.desktop (truncated if
5417necessary).
5418
5419** When you kill a buffer that visits a file,
5420if there are any registers that save positions in the file,
5421these register values no longer become completely useless.
5422If you try to go to such a register with C-x j, then you are
5423asked whether to visit the file again. If you say yes,
5424it visits the file and then goes to the same position.
5425
5426** When you visit a file that changes frequently outside Emacs--for
5427example, a log of output from a process that continues to run--it may
5428be useful for Emacs to revert the file without querying you whenever
5429you visit the file afresh with C-x C-f.
5430
5431You can request this behavior for certain files by setting the
5432variable revert-without-query to a list of regular expressions. If a
5433file's name matches any of these regular expressions, find-file and
5434revert-buffer revert the buffer without asking for permission--but
5435only if you have not edited the buffer text yourself.
5436
5437** set-default-font has been renamed to set-frame-font
5438since it applies only to the current frame.
5439
5440** In TeX mode, you can use the variable tex-main-file to specify the
5441file for tex-file to run TeX on. (By default, tex-main-file is nil,
5442and tex-file runs TeX on the current visited file.)
5443
5444This is useful when you are editing a document that consists of
5445multiple files. In each of the included files, you can set up a local
5446variable list which specifies the top-level file of your document for
5447tex-main-file. Then tex-file will run TeX on the whole document
5448instead of just the file you are editing.
5449
5450** RefTeX mode
5451
5452RefTeX mode is a new minor mode with special support for \label, \ref
5453and \cite macros in LaTeX documents. RefTeX distinguishes labels of
5454different environments (equation, figure, ...) and has full support for
5455multifile documents. To use it, select a buffer with a LaTeX document and
5456turn the mode on with M-x reftex-mode. Here are the main user commands:
5457
79214ddf 5458C-c ( reftex-label
a933dad1
DL
5459 Creates a label semi-automatically. RefTeX is context sensitive and
5460 knows which kind of label is needed.
5461
5462C-c ) reftex-reference
5463 Offers in a menu all labels in the document, along with context of the
5464 label definition. The selected label is referenced as \ref{LABEL}.
5465
5466C-c [ reftex-citation
5467 Prompts for a regular expression and displays a list of matching BibTeX
5468 database entries. The selected entry is cited with a \cite{KEY} macro.
5469
5470C-c & reftex-view-crossref
5471 Views the cross reference of a \ref or \cite command near point.
5472
5473C-c = reftex-toc
5474 Shows a table of contents of the (multifile) document. From there you
5475 can quickly jump to every section.
79214ddf 5476
a933dad1
DL
5477Under X, RefTeX installs a "Ref" menu in the menu bar, with additional
5478commands. Press `?' to get help when a prompt mentions this feature.
5479Full documentation and customization examples are in the file
5480reftex.el. You can use the finder to view the file documentation:
5481C-h p --> tex --> reftex.el
5482
5483** Changes in BibTeX mode.
5484
5485*** Info documentation is now available.
5486
5487*** Don't allow parentheses in string constants anymore. This confused
5488both the BibTeX program and Emacs BibTeX mode.
5489
5490*** Renamed variable bibtex-mode-user-optional-fields to
5491bibtex-user-optional-fields.
5492
5493*** Removed variable bibtex-include-OPTannote
5494(use bibtex-user-optional-fields instead).
5495
5496*** New interactive functions to copy and kill fields and complete
5497entries to the BibTeX kill ring, from where they can be yanked back by
5498appropriate functions.
5499
5500*** New interactive functions for repositioning and marking of
5501entries. They are bound by default to M-C-l and M-C-h.
5502
5503*** New hook bibtex-clean-entry-hook. It is called after entry has
5504been cleaned.
5505
5506*** New variable bibtex-field-delimiters, which replaces variables
5507bibtex-field-{left|right}-delimiter.
5508
5509*** New variable bibtex-entry-delimiters to determine how entries
5510shall be delimited.
5511
5512*** Allow preinitialization of fields. See documentation of
5513bibtex-user-optional-fields, bibtex-entry-field-alist, and
5514bibtex-include-OPTkey for details.
5515
5516*** Book and InBook entries require either an author or an editor
5517field. This is now supported by bibtex.el. Alternative fields are
5518prefixed with `ALT'.
5519
5520*** New variable bibtex-entry-format, which replaces variable
5521bibtex-clean-entry-zap-empty-opts and allows specification of many
5522formatting options performed on cleaning an entry (see variable
5523documentation).
5524
5525*** Even more control on how automatic keys are generated. See
5526documentation of bibtex-generate-autokey for details. Transcriptions
5527for foreign languages other than German are now handled, too.
5528
5529*** New boolean user option bibtex-comma-after-last-field to decide if
5530comma should be inserted at end of last field.
5531
5532*** New boolean user option bibtex-align-at-equal-sign to determine if
5533alignment should be made at left side of field contents or at equal
5534signs. New user options to control entry layout (e.g. indentation).
5535
5536*** New function bibtex-fill-entry to realign entries.
5537
5538*** New function bibtex-reformat to reformat region or buffer.
5539
5540*** New function bibtex-convert-alien to convert a BibTeX database
5541from alien sources.
5542
5543*** New function bibtex-complete-key (similar to bibtex-complete-string)
5544to complete prefix to a key defined in buffer. Mainly useful in
5545crossref entries.
5546
5547*** New function bibtex-count-entries to count entries in buffer or
5548region.
5549
5550*** Added support for imenu.
5551
5552*** The function `bibtex-validate' now checks current region instead
5553of buffer if mark is active. Now it shows all errors of buffer in a
5554`compilation mode' buffer. You can use the normal commands (e.g.
5555`next-error') for compilation modes to jump to errors.
5556
5557*** New variable `bibtex-string-file-path' to determine where the files
5558from `bibtex-string-files' are searched.
5559
5560** Iso Accents mode now supports Latin-3 as an alternative.
5561
30a009a5 5562** The command next-error now opens blocks hidden by hideshow.
047f434a 5563
a933dad1
DL
5564** The function using-unix-filesystems has been replaced by the
5565functions add-untranslated-filesystem and remove-untranslated-filesystem.
5566Each of these functions takes the name of a drive letter or directory
5567as an argument.
5568
5569When a filesystem is added as untranslated, all files on it are read
5570and written in binary mode (no cr/lf translation is performed).
5571
5572** browse-url changes
5573
5574*** New methods for: Grail (browse-url-generic), MMM (browse-url-mmm),
5575Lynx in a separate xterm (browse-url-lynx-xterm) or in an Emacs window
5576(browse-url-lynx-emacs), remote W3 (browse-url-w3-gnudoit), generic
5577non-remote-controlled browsers (browse-url-generic) and associated
5578customization variables.
5579
5580*** New commands `browse-url-of-region' and `browse-url'.
5581
5582*** URLs marked up with <URL:...> (RFC1738) work if broken across
5583lines. Browsing methods can be associated with URL regexps
5584(e.g. mailto: URLs) via `browse-url-browser-function'.
5585
5586** Changes in Ediff
5587
5588*** Clicking Mouse-2 on a brief command description in Ediff control panel
5589pops up the Info file for this command.
5590
5591*** There is now a variable, ediff-autostore-merges, which controls whether
5592the result of a merge is saved in a file. By default, this is done only when
5593merge is done from a session group (eg, when merging files in two different
5594directories).
5595
5596*** Since Emacs 19.31 (this hasn't been announced before), Ediff can compare
5597and merge groups of files residing in different directories, or revisions of
5598files in the same directory.
5599
5600*** Since Emacs 19.31, Ediff can apply multi-file patches interactively.
5601The patches must be in the context format or GNU unified format. (The bug
5602related to the GNU format has now been fixed.)
5603
5604** Changes in Viper
5605
5606*** The startup file is now .viper instead of .vip
79214ddf 5607*** All variable/function names have been changed to start with viper-
a933dad1
DL
5608 instead of vip-.
5609*** C-\ now simulates the meta-key in all Viper states.
79214ddf 5610*** C-z in Insert state now escapes to Vi for the duration of the next
a933dad1
DL
5611Viper command. In Vi and Insert states, C-z behaves as before.
5612*** C-c \ escapes to Vi for one command if Viper is in Insert or Emacs states.
5613*** _ is no longer the meta-key in Vi state.
5614*** The variable viper-insert-state-cursor-color can be used to change cursor
5615color when Viper is in insert state.
5616*** If search lands the cursor near the top or the bottom of the window,
5617Viper pulls the window up or down to expose more context. The variable
5618viper-adjust-window-after-search controls this behavior.
5619
5620** Etags changes.
5621
5622*** In C, C++, Objective C and Java, Etags tags global variables by
5623default. The resulting tags files are inflated by 30% on average.
5624Use --no-globals to turn this feature off. Etags can also tag
5625variables which are members of structure-like constructs, but it does
5626not by default. Use --members to turn this feature on.
5627
5628*** C++ member functions are now recognized as tags.
5629
5630*** Java is tagged like C++. In addition, "extends" and "implements"
5631constructs are tagged. Files are recognised by the extension .java.
5632
5633*** Etags can now handle programs written in Postscript. Files are
5634recognised by the extensions .ps and .pdb (Postscript with C syntax).
5635In Postscript, tags are lines that start with a slash.
5636
5637*** Etags now handles Objective C and Objective C++ code. The usual C and
5638C++ tags are recognized in these languages; in addition, etags
5639recognizes special Objective C syntax for classes, class categories,
5640methods and protocols.
5641
5642*** Etags also handles Cobol. Files are recognised by the extension
5643.cobol. The tagged lines are those containing a word that begins in
5644column 8 and ends in a full stop, i.e. anything that could be a
5645paragraph name.
5646
5647*** Regexps in Etags now support intervals, as in ed or grep. The syntax of
5648an interval is \{M,N\}, and it means to match the preceding expression
5649at least M times and as many as N times.
5650
5651** The format for specifying a custom format for time-stamp to insert
5652in files has changed slightly.
5653
5654With the new enhancements to the functionality of format-time-string,
5655time-stamp-format will change to be eventually compatible with it.
5656This conversion is being done in two steps to maintain compatibility
5657with old time-stamp-format values.
5658
5659In the new scheme, alternate case is signified by the number-sign
5660(`#') modifier, rather than changing the case of the format character.
5661This feature is as yet incompletely implemented for compatibility
5662reasons.
5663
5664In the old time-stamp-format, all numeric fields defaulted to their
5665natural width. (With format-time-string, each format has a
5666fixed-width default.) In this version, you can specify the colon
5667(`:') modifier to a numeric conversion to mean "give me the historical
5668time-stamp-format width default." Do not use colon if you are
5669specifying an explicit width, as in "%02d".
5670
5671Numbers are no longer truncated to the requested width, except in the
5672case of "%02y", which continues to give a two-digit year. Digit
5673truncation probably wasn't being used for anything else anyway.
5674
5675The new formats will work with old versions of Emacs. New formats are
5676being recommended now to allow time-stamp-format to change in the
5677future to be compatible with format-time-string. The new forms being
5678recommended now will continue to work then.
5679
5680See the documentation string for the variable time-stamp-format for
5681details.
5682
5683** There are some additional major modes:
5684
5685dcl-mode, for editing VMS DCL files.
5686m4-mode, for editing files of m4 input.
5687meta-mode, for editing MetaFont and MetaPost source files.
5688
5689** In Shell mode, the command shell-copy-environment-variable lets you
5690copy the value of a specified environment variable from the subshell
5691into Emacs.
5692
5693** New Lisp packages include:
5694
5695*** battery.el displays battery status for laptops.
5696
5697*** M-x bruce (named after Lenny Bruce) is a program that might
5698be used for adding some indecent words to your email.
5699
5700*** M-x crisp-mode enables an emulation for the CRiSP editor.
5701
5702*** M-x dirtrack arranges for better tracking of directory changes
5703in shell buffers.
5704
5705*** The new library elint.el provides for linting of Emacs Lisp code.
5706See the documentation for `elint-initialize', `elint-current-buffer'
5707and `elint-defun'.
5708
5709*** M-x expand-add-abbrevs defines a special kind of abbrev which is
5710meant for programming constructs. These abbrevs expand like ordinary
5711ones, when you type SPC, but only at the end of a line and not within
5712strings or comments.
5713
5714These abbrevs can act as templates: you can define places within an
5715abbrev for insertion of additional text. Once you expand the abbrev,
5716you can then use C-x a p and C-x a n to move back and forth to these
5717insertion points. Thus you can conveniently insert additional text
5718at these points.
5719
5720*** filecache.el remembers the location of files so that you
5721can visit them by short forms of their names.
5722
5723*** find-func.el lets you find the definition of the user-loaded
5724Emacs Lisp function at point.
5725
5726*** M-x handwrite converts text to a "handwritten" picture.
5727
5728*** M-x iswitchb-buffer is a command for switching to a buffer, much like
5729switch-buffer, but it reads the argument in a more helpful way.
5730
5731*** M-x landmark implements a neural network for landmark learning.
5732
5733*** M-x locate provides a convenient interface to the `locate' program.
5734
5735*** M4 mode is a new mode for editing files of m4 input.
5736
5737*** mantemp.el creates C++ manual template instantiations
5738from the GCC error messages which indicate which instantiations are needed.
5739
5740*** mouse-copy.el provides a one-click copy and move feature.
5741You can drag a region with M-mouse-1, and it is automatically
5742inserted at point. M-Shift-mouse-1 deletes the text from its
5743original place after inserting the copy.
5744
5745*** mouse-drag.el lets you do scrolling by dragging Mouse-2
5746on the buffer.
5747
5748You click the mouse and move; that distance either translates into the
5749velocity to scroll (with mouse-drag-throw) or the distance to scroll
5750(with mouse-drag-drag). Horizontal scrolling is enabled when needed.
5751
5752Enable mouse-drag with:
5753 (global-set-key [down-mouse-2] 'mouse-drag-throw)
5754-or-
5755 (global-set-key [down-mouse-2] 'mouse-drag-drag)
5756
5757*** mspools.el is useful for determining which mail folders have
5758mail waiting to be read in them. It works with procmail.
5759
5760*** Octave mode is a major mode for editing files of input for Octave.
5761It comes with a facility for communicating with an Octave subprocess.
5762
5763*** ogonek
5764
5765The ogonek package provides functions for changing the coding of
5766Polish diacritic characters in buffers. Codings known from various
5767platforms are supported such as ISO8859-2, Mazovia, IBM Latin2, and
5768TeX. For example, you can change the coding from Mazovia to
5769ISO8859-2. Another example is a change of coding from ISO8859-2 to
5770prefix notation (in which `/a' stands for the aogonek character, for
5771instance) and vice versa.
5772
5773To use this package load it using
5774 M-x load-library [enter] ogonek
5775Then, you may get an explanation by calling one of
79214ddf 5776 M-x ogonek-jak -- in Polish
a933dad1
DL
5777 M-x ogonek-how -- in English
5778The info specifies the commands and variables provided as well as the
5779ways of customization in `.emacs'.
5780
5781*** Interface to ph.
5782
5783Emacs provides a client interface to CCSO Nameservers (ph/qi)
5784
5785The CCSO nameserver is used in many universities to provide directory
5786services about people. ph.el provides a convenient Emacs interface to
5787these servers.
5788
5789*** uce.el is useful for replying to unsolicited commercial email.
5790
5791*** vcursor.el implements a "virtual cursor" feature.
5792You can move the virtual cursor with special commands
5793while the real cursor does not move.
5794
5795*** webjump.el is a "hot list" package which you can set up
5796for visiting your favorite web sites.
5797
5798*** M-x winner-mode is a minor mode which saves window configurations,
5799so you can move back to other configurations that you have recently used.
5800
5801** movemail change
5802
5803Movemail no longer needs to be installed setuid root in order for POP
5804mail retrieval to function properly. This is because it no longer
5805supports the RPOP (reserved-port POP) protocol; instead, it uses the
5806user's POP password to authenticate to the mail server.
5807
5808This change was made earlier, but not reported in NEWS before.
5809\f
5810* Emacs 20.1 changes for MS-DOS and MS-Windows.
5811
5812** Changes in handling MS-DOS/MS-Windows text files.
5813
5814Emacs handles three different conventions for representing
5815end-of-line: CRLF for MSDOS, LF for Unix and GNU, and CR (used on the
5816Macintosh). Emacs determines which convention is used in a specific
5817file based on the contents of that file (except for certain special
5818file names), and when it saves the file, it uses the same convention.
5819
5820To save the file and change the end-of-line convention, you can use
5821C-x RET f (set-buffer-file-coding-system) to specify a different
5822coding system for the buffer. Then, when you save the file, the newly
5823specified coding system will take effect. For example, to save with
5824LF, specify undecided-unix (or some other ...-unix coding system); to
5825save with CRLF, specify undecided-dos.
5826\f
5827* Lisp Changes in Emacs 20.1
5828
5829** Byte-compiled files made with Emacs 20 will, in general, work in
5830Emacs 19 as well, as long as the source code runs in Emacs 19. And
5831vice versa: byte-compiled files made with Emacs 19 should also run in
5832Emacs 20, as long as the program itself works in Emacs 20.
5833
5834** Windows-specific functions and variables have been renamed
5835to start with w32- instead of win32-.
5836
5837In hacker language, calling something a "win" is a form of praise. We
5838don't want to praise a non-free Microsoft system, so we don't call it
5839"win".
5840
5841** Basic Lisp changes
5842
5843*** A symbol whose name starts with a colon now automatically
5844evaluates to itself. Therefore such a symbol can be used as a constant.
5845
5846*** The defined purpose of `defconst' has been changed. It should now
5847be used only for values that should not be changed whether by a program
5848or by the user.
5849
5850The actual behavior of defconst has not been changed.
5851
5852*** There are new macros `when' and `unless'
5853
5854(when CONDITION BODY...) is short for (if CONDITION (progn BODY...))
5855(unless CONDITION BODY...) is short for (if CONDITION nil BODY...)
5856
5857*** Emacs now defines functions caar, cadr, cdar and cddr with their
5858usual Lisp meanings. For example, caar returns the car of the car of
5859its argument.
5860
5861*** equal, when comparing strings, now ignores their text properties.
5862
5863*** The new function `functionp' tests whether an object is a function.
5864
5865*** arrayp now returns t for char-tables and bool-vectors.
5866
5867*** Certain primitives which use characters (as integers) now get an
5868error if the integer is not a valid character code. These primitives
5869include insert-char, char-to-string, and the %c construct in the
5870`format' function.
5871
5872*** The `require' function now insists on adding a suffix, either .el
5873or .elc, to the file name. Thus, (require 'foo) will not use a file
5874whose name is just foo. It insists on foo.el or foo.elc.
5875
5876*** The `autoload' function, when the file name does not contain
5877either a directory name or the suffix .el or .elc, insists on
5878adding one of these suffixes.
5879
5880*** string-to-number now takes an optional second argument BASE
5881which specifies the base to use when converting an integer.
79214ddf 5882If BASE is omitted, base 10 is used.
a933dad1
DL
5883
5884We have not implemented other radices for floating point numbers,
5885because that would be much more work and does not seem useful.
5886
5887*** substring now handles vectors as well as strings.
5888
5889*** The Common Lisp function eql is no longer defined normally.
5890You must load the `cl' library to define it.
5891
5892*** The new macro `with-current-buffer' lets you evaluate an expression
5893conveniently with a different current buffer. It looks like this:
5894
5895 (with-current-buffer BUFFER BODY-FORMS...)
5896
5897BUFFER is the expression that says which buffer to use.
5898BODY-FORMS say what to do in that buffer.
5899
5900*** The new primitive `save-current-buffer' saves and restores the
5901choice of current buffer, like `save-excursion', but without saving or
5902restoring the value of point or the mark. `with-current-buffer'
5903works using `save-current-buffer'.
5904
5905*** The new macro `with-temp-file' lets you do some work in a new buffer and
5906write the output to a specified file. Like `progn', it returns the value
5907of the last form.
5908
5909*** The new macro `with-temp-buffer' lets you do some work in a new buffer,
5910which is discarded after use. Like `progn', it returns the value of the
5911last form. If you wish to return the buffer contents, use (buffer-string)
5912as the last form.
5913
5914*** The new function split-string takes a string, splits it at certain
5915characters, and returns a list of the substrings in between the
5916matches.
5917
5918For example, (split-string "foo bar lose" " +") returns ("foo" "bar" "lose").
5919
5920*** The new macro with-output-to-string executes some Lisp expressions
5921with standard-output set up so that all output feeds into a string.
5922Then it returns that string.
5923
5924For example, if the current buffer name is `foo',
5925
5926(with-output-to-string
5927 (princ "The buffer is ")
5928 (princ (buffer-name)))
5929
5930returns "The buffer is foo".
5931
5932** Non-ASCII characters are now supported, if enable-multibyte-characters
5933is non-nil.
5934
5935These characters have character codes above 256. When inserted in the
5936buffer or stored in a string, they are represented as multibyte
5937characters that occupy several buffer positions each.
5938
5939*** When enable-multibyte-characters is non-nil, a single character in
5940a buffer or string can be two or more bytes (as many as four).
5941
5942Buffers and strings are still made up of unibyte elements;
5943character positions and string indices are always measured in bytes.
5944Therefore, moving forward one character can increase the buffer
5945position by 2, 3 or 4. The function forward-char moves by whole
5946characters, and therefore is no longer equivalent to
5947 (lambda (n) (goto-char (+ (point) n))).
5948
5949ASCII characters (codes 0 through 127) are still single bytes, always.
5950Sequences of byte values 128 through 255 are used to represent
5951non-ASCII characters. These sequences are called "multibyte
5952characters".
5953
5954The first byte of a multibyte character is always in the range 128
5955through 159 (octal 0200 through 0237). These values are called
5956"leading codes". The second and subsequent bytes are always in the
5957range 160 through 255 (octal 0240 through 0377). The first byte, the
5958leading code, determines how many bytes long the sequence is.
5959
5960*** The function forward-char moves over characters, and therefore
5961(forward-char 1) may increase point by more than 1 if it moves over a
5962multibyte character. Likewise, delete-char always deletes a
5963character, which may be more than one buffer position.
5964
5965This means that some Lisp programs, which assume that a character is
5966always one buffer position, need to be changed.
5967
5968However, all ASCII characters are always one buffer position.
79214ddf 5969
a933dad1
DL
5970*** The regexp [\200-\377] no longer matches all non-ASCII characters,
5971because when enable-multibyte-characters is non-nil, these characters
5972have codes that are not in the range octal 200 to octal 377. However,
5973the regexp [^\000-\177] does match all non-ASCII characters,
5974guaranteed.
5975
5976*** The function char-boundary-p returns non-nil if position POS is
5977between two characters in the buffer (not in the middle of a
5978character).
5979
5980When the value is non-nil, it says what kind of character follows POS:
5981
5982 0 if POS is at an ASCII character or at the end of range,
5983 1 if POS is before a 2-byte length multi-byte form,
5984 2 if POS is at a head of 3-byte length multi-byte form,
5985 3 if POS is at a head of 4-byte length multi-byte form,
5986 4 if POS is at a head of multi-byte form of a composite character.
5987
5988*** The function char-bytes returns how many bytes the character CHAR uses.
5989
5990*** Strings can contain multibyte characters. The function
5991`length' returns the string length counting bytes, which may be
5992more than the number of characters.
5993
5994You can include a multibyte character in a string constant by writing
5995it literally. You can also represent it with a hex escape,
5996\xNNNNNNN..., using as many digits as necessary. Any character which
5997is not a valid hex digit terminates this construct. If you want to
5998follow it with a character that is a hex digit, write backslash and
5999newline in between; that will terminate the hex escape.
6000
6001*** The function concat-chars takes arguments which are characters
6002and returns a string containing those characters.
6003
6004*** The function sref access a multibyte character in a string.
6005(sref STRING INDX) returns the character in STRING at INDEX. INDEX
6006counts from zero. If INDEX is at a position in the middle of a
6007character, sref signals an error.
6008
6009*** The function chars-in-string returns the number of characters
6010in a string. This is less than the length of the string, if the
6011string contains multibyte characters (the length counts bytes).
6012
6013*** The function chars-in-region returns the number of characters
6014in a region from BEG to END. This is less than (- END BEG) if the
6015region contains multibyte characters (the length counts bytes).
6016
6017*** The function string-to-list converts a string to a list of
6018the characters in it. string-to-vector converts a string
6019to a vector of the characters in it.
6020
6021*** The function store-substring alters part of the contents
6022of a string. You call it as follows:
6023
6024 (store-substring STRING IDX OBJ)
6025
6026This says to alter STRING, by storing OBJ starting at index IDX in
6027STRING. OBJ may be either a character or a (smaller) string.
6028This function really does alter the contents of STRING.
6029Since it is impossible to change the length of an existing string,
6030it is an error if OBJ doesn't fit within STRING's actual length.
6031
6032*** char-width returns the width (in columns) of the character CHAR,
6033if it were displayed in the current buffer and the selected window.
6034
6035*** string-width returns the width (in columns) of the text in STRING,
6036if it were displayed in the current buffer and the selected window.
6037
6038*** truncate-string-to-width shortens a string, if necessary,
6039to fit within a certain number of columns. (Of course, it does
6040not alter the string that you give it; it returns a new string
6041which contains all or just part of the existing string.)
6042
6043(truncate-string-to-width STR END-COLUMN &optional START-COLUMN PADDING)
6044
6045This returns the part of STR up to column END-COLUMN.
6046
6047The optional argument START-COLUMN specifies the starting column.
6048If this is non-nil, then the first START-COLUMN columns of the string
6049are not included in the resulting value.
6050
6051The optional argument PADDING, if non-nil, is a padding character to be added
6052at the beginning and end the resulting string, to extend it to exactly
6053WIDTH columns. If PADDING is nil, that means do not pad; then, if STRING
6054is narrower than WIDTH, the value is equal to STRING.
6055
6056If PADDING and START-COLUMN are both non-nil, and if there is no clean
6057place in STRING that corresponds to START-COLUMN (because one
6058character extends across that column), then the padding character
6059PADDING is added one or more times at the beginning of the result
6060string, so that its columns line up as if it really did start at
6061column START-COLUMN.
6062
6063*** When the functions in the list after-change-functions are called,
6064the third argument is the number of bytes in the pre-change text, not
6065necessarily the number of characters. It is, in effect, the
6066difference in buffer position between the beginning and the end of the
6067changed text, before the change.
6068
6069*** The characters Emacs uses are classified in various character
6070sets, each of which has a name which is a symbol. In general there is
6071one character set for each script, not for each language.
6072
6073**** The function charsetp tests whether an object is a character set name.
6074
6075**** The variable charset-list holds a list of character set names.
6076
6077**** char-charset, given a character code, returns the name of the character
6078set that the character belongs to. (The value is a symbol.)
6079
6080**** split-char, given a character code, returns a list containing the
6081name of the character set, followed by one or two byte-values
6082which identify the character within that character set.
6083
6084**** make-char, given a character set name and one or two subsequent
6085byte-values, constructs a character code. This is roughly the
6086opposite of split-char.
6087
6088**** find-charset-region returns a list of the character sets
6089of all the characters between BEG and END.
6090
6091**** find-charset-string returns a list of the character sets
6092of all the characters in a string.
6093
6094*** Here are the Lisp facilities for working with coding systems
6095and specifying coding systems.
6096
6097**** The function coding-system-list returns a list of all coding
6098system names (symbols). With optional argument t, it returns a list
6099of all distinct base coding systems, not including variants.
6100(Variant coding systems are those like latin-1-dos, latin-1-unix
6101and latin-1-mac which specify the end-of-line conversion as well
6102as what to do about code conversion.)
6103
6104**** coding-system-p tests a symbol to see if it is a coding system
6105name. It returns t if so, nil if not.
6106
6107**** file-coding-system-alist specifies which coding systems to use
6108for certain file names. It works like network-coding-system-alist,
6109except that the PATTERN is matched against the file name.
6110
6111Each element has the format (PATTERN . VAL), where PATTERN determines
6112which file names the element applies to. PATTERN should be a regexp
6113to match against a file name.
6114
6115VAL is a coding system, a cons cell containing two coding systems, or
6116a function symbol. If VAL is a coding system, it is used for both
6117decoding what received from the network stream and encoding what sent
6118to the network stream. If VAL is a cons cell containing two coding
6119systems, the car specifies the coding system for decoding, and the cdr
6120specifies the coding system for encoding.
6121
6122If VAL is a function symbol, the function must return a coding system
6123or a cons cell containing two coding systems, which is used as above.
6124
6125**** The variable network-coding-system-alist specifies
6126the coding system to use for network sockets.
6127
6128Each element has the format (PATTERN . VAL), where PATTERN determines
6129which network sockets the element applies to. PATTERN should be
6130either a port number or a regular expression matching some network
6131service names.
6132
6133VAL is a coding system, a cons cell containing two coding systems, or
6134a function symbol. If VAL is a coding system, it is used for both
6135decoding what received from the network stream and encoding what sent
6136to the network stream. If VAL is a cons cell containing two coding
6137systems, the car specifies the coding system for decoding, and the cdr
6138specifies the coding system for encoding.
6139
6140If VAL is a function symbol, the function must return a coding system
6141or a cons cell containing two coding systems, which is used as above.
6142
6143**** process-coding-system-alist specifies which coding systems to use
6144for certain subprocess. It works like network-coding-system-alist,
6145except that the PATTERN is matched against the program name used to
6146start the subprocess.
6147
6148**** The variable default-process-coding-system specifies the coding
6149systems to use for subprocess (and net connection) input and output,
6150when nothing else specifies what to do. The value is a cons cell
6151(OUTPUT-CODING . INPUT-CODING). OUTPUT-CODING applies to output
6152to the subprocess, and INPUT-CODING applies to input from it.
6153
6154**** The variable coding-system-for-write, if non-nil, specifies the
6155coding system to use for writing a file, or for output to a synchronous
6156subprocess.
6157
6158It also applies to any asynchronous subprocess or network connection,
6159but in a different way: the value of coding-system-for-write when you
6160start the subprocess or connection affects that subprocess or
6161connection permanently or until overridden.
6162
6163The variable coding-system-for-write takes precedence over
6164file-coding-system-alist, process-coding-system-alist and
6165network-coding-system-alist, and all other methods of specifying a
6166coding system for output. But most of the time this variable is nil.
6167It exists so that Lisp programs can bind it to a specific coding
6168system for one operation at a time.
6169
6170**** coding-system-for-read applies similarly to input from
6171files, subprocesses or network connections.
6172
6173**** The function process-coding-system tells you what
6174coding systems(s) an existing subprocess is using.
6175The value is a cons cell,
6176 (DECODING-CODING-SYSTEM . ENCODING-CODING-SYSTEM)
6177where DECODING-CODING-SYSTEM is used for decoding output from
6178the subprocess, and ENCODING-CODING-SYSTEM is used for encoding
6179input to the subprocess.
6180
6181**** The function set-process-coding-system can be used to
6182change the coding systems in use for an existing subprocess.
6183
6184** Emacs has a new facility to help users manage the many
6185customization options. To make a Lisp program work with this facility,
6186you need to use the new macros defgroup and defcustom.
6187
6188You use defcustom instead of defvar, for defining a user option
6189variable. The difference is that you specify two additional pieces of
6190information (usually): the "type" which says what values are
6191legitimate, and the "group" which specifies the hierarchy for
6192customization.
6193
6194Thus, instead of writing
6195
6196 (defvar foo-blurgoze nil
6197 "*Non-nil means that foo will act very blurgozely.")
6198
6199you would now write this:
6200
6201 (defcustom foo-blurgoze nil
6202 "*Non-nil means that foo will act very blurgozely."
6203 :type 'boolean
6204 :group foo)
6205
6206The type `boolean' means that this variable has only
6207two meaningful states: nil and non-nil. Other type values
6208describe other possibilities; see the manual for Custom
6209for a description of them.
6210
6211The "group" argument is used to specify a group which the option
6212should belong to. You define a new group like this:
6213
6214 (defgroup ispell nil
6215 "Spell checking using Ispell."
6216 :group 'processes)
6217
6218The "group" argument in defgroup specifies the parent group. The root
6219group is called `emacs'; it should not contain any variables itself,
6220but only other groups. The immediate subgroups of `emacs' correspond
6221to the keywords used by C-h p. Under these subgroups come
6222second-level subgroups that belong to individual packages.
6223
6224Each Emacs package should have its own set of groups. A simple
6225package should have just one group; a more complex package should
6226have a hierarchy of its own groups. The sole or root group of a
6227package should be a subgroup of one or more of the "keyword"
6228first-level subgroups.
6229
6230** New `widget' library for inserting UI components in buffers.
6231
6232This library, used by the new custom library, is documented in a
6233separate manual that accompanies Emacs.
6234
6235** easy-mmode
6236
6237The easy-mmode package provides macros and functions that make
6238developing minor modes easier. Roughly, the programmer has to code
6239only the functionality of the minor mode. All the rest--toggles,
6240predicate, and documentation--can be done in one call to the macro
6241`easy-mmode-define-minor-mode' (see the documentation). See also
6242`easy-mmode-define-keymap'.
6243
6244** Text property changes
6245
6246*** The `intangible' property now works on overlays as well as on a
6247text property.
6248
6249*** The new functions next-char-property-change and
6250previous-char-property-change scan through the buffer looking for a
6251place where either a text property or an overlay might change. The
6252functions take two arguments, POSITION and LIMIT. POSITION is the
6253starting position for the scan. LIMIT says where to stop the scan.
6254
6255If no property change is found before LIMIT, the value is LIMIT. If
6256LIMIT is nil, scan goes to the beginning or end of the accessible part
6257of the buffer. If no property change is found, the value is the
6258position of the beginning or end of the buffer.
6259
6260*** In the `local-map' text property or overlay property, the property
6261value can now be a symbol whose function definition is a keymap. This
6262is an alternative to using the keymap itself.
6263
6264** Changes in invisibility features
6265
6266*** Isearch can now temporarily show parts of the buffer which are
6267hidden by an overlay with a invisible property, when the search match
6268is inside that portion of the buffer. To enable this the overlay
6269should have a isearch-open-invisible property which is a function that
6270would be called having the overlay as an argument, the function should
6271make the overlay visible.
6272
6273During incremental search the overlays are shown by modifying the
6274invisible and intangible properties, if beside this more actions are
6275needed the overlay should have a isearch-open-invisible-temporary
6276which is a function. The function is called with 2 arguments: one is
6277the overlay and the second is nil when it should show the overlay and
6278t when it should hide it.
6279
6280*** add-to-invisibility-spec, remove-from-invisibility-spec
6281
6282Modes that use overlays to hide portions of a buffer should set the
79214ddf
FP
6283invisible property of the overlay to the mode's name (or another symbol)
6284and modify the `buffer-invisibility-spec' to include that symbol.
a933dad1 6285Use `add-to-invisibility-spec' and `remove-from-invisibility-spec' to
79214ddf 6286manipulate the `buffer-invisibility-spec'.
a933dad1
DL
6287Here is an example of how to do this:
6288
6289 ;; If we want to display an ellipsis:
79214ddf 6290 (add-to-invisibility-spec '(my-symbol . t))
a933dad1 6291 ;; If you don't want ellipsis:
79214ddf 6292 (add-to-invisibility-spec 'my-symbol)
a933dad1
DL
6293
6294 ...
6295 (overlay-put (make-overlay beginning end) 'invisible 'my-symbol)
6296
6297 ...
6298 ;; When done with the overlays:
6299 (remove-from-invisibility-spec '(my-symbol . t))
6300 ;; Or respectively:
6301 (remove-from-invisibility-spec 'my-symbol)
6302
6303** Changes in syntax parsing.
6304
6305*** The syntax-directed buffer-scan functions (such as
6306`parse-partial-sexp', `forward-word' and similar functions) can now
6307obey syntax information specified by text properties, if the variable
6308`parse-sexp-lookup-properties' is non-nil.
6309
6310If the value of `parse-sexp-lookup-properties' is nil, the behavior
6311is as before: the syntax-table of the current buffer is always
6312used to determine the syntax of the character at the position.
6313
6314When `parse-sexp-lookup-properties' is non-nil, the syntax of a
6315character in the buffer is calculated thus:
6316
6317 a) if the `syntax-table' text-property of that character
6318 is a cons, this cons becomes the syntax-type;
6319
6320 Valid values of `syntax-table' text-property are: nil, a valid
6321 syntax-table, and a valid syntax-table element, i.e.,
6322 a cons cell of the form (SYNTAX-CODE . MATCHING-CHAR).
6323
6324 b) if the character's `syntax-table' text-property
6325 is a syntax table, this syntax table is used
6326 (instead of the syntax-table of the current buffer) to
6327 determine the syntax type of the character.
6328
6329 c) otherwise the syntax-type is determined by the syntax-table
6330 of the current buffer.
6331
6332*** The meaning of \s in regular expressions is also affected by the
6333value of `parse-sexp-lookup-properties'. The details are the same as
6334for the syntax-directed buffer-scan functions.
6335
6336*** There are two new syntax-codes, `!' and `|' (numeric values 14
6337and 15). A character with a code `!' starts a comment which is ended
6338only by another character with the same code (unless quoted). A
6339character with a code `|' starts a string which is ended only by
6340another character with the same code (unless quoted).
6341
6342These codes are mainly meant for use as values of the `syntax-table'
6343text property.
6344
6345*** The function `parse-partial-sexp' has new semantics for the sixth
6346arg COMMENTSTOP. If it is `syntax-table', parse stops after the start
6347of a comment or a string, or after end of a comment or a string.
6348
6349*** The state-list which the return value from `parse-partial-sexp'
6350(and can also be used as an argument) now has an optional ninth
6351element: the character address of the start of last comment or string;
6352nil if none. The fourth and eighth elements have special values if the
6353string/comment is started by a "!" or "|" syntax-code.
6354
6355*** Since new features of `parse-partial-sexp' allow a complete
6356syntactic parsing, `font-lock' no longer supports
6357`font-lock-comment-start-regexp'.
6358
6359** Changes in face features
6360
6361*** The face functions are now unconditionally defined in Emacs, even
6362if it does not support displaying on a device that supports faces.
6363
6364*** The function face-documentation returns the documentation string
6365of a face (or nil if it doesn't have one).
6366
6367*** The function face-bold-p returns t if a face should be bold.
6368set-face-bold-p sets that flag.
6369
6370*** The function face-italic-p returns t if a face should be italic.
6371set-face-italic-p sets that flag.
6372
6373*** You can now specify foreground and background colors for text
6374by adding elements of the form (foreground-color . COLOR-NAME)
6375and (background-color . COLOR-NAME) to the list of faces in
6376the `face' property (either the character's text property or an
6377overlay property).
6378
6379This means that you no longer need to create named faces to use
6380arbitrary colors in a Lisp package.
6381
6382** Changes in file-handling functions
6383
6384*** File-access primitive functions no longer discard an extra redundant
6385directory name from the beginning of the file name. In other words,
6386they no longer do anything special with // or /~. That conversion
6387is now done only in substitute-in-file-name.
6388
6389This makes it possible for a Lisp program to open a file whose name
6390begins with ~.
6391
6392*** If copy-file is unable to set the date of the output file,
6393it now signals an error with the condition file-date-error.
6394
6395*** The inode number returned by file-attributes may be an integer (if
6396the number fits in a Lisp integer) or a list of integers.
6397
6398*** insert-file-contents can now read from a special file,
6399as long as the arguments VISIT and REPLACE are nil.
6400
6401*** The RAWFILE arg to find-file-noselect, if non-nil, now suppresses
6402character code conversion as well as other things.
6403
6404Meanwhile, this feature does work with remote file names
6405(formerly it did not).
6406
6407*** Lisp packages which create temporary files should use the TMPDIR
6408environment variable to decide which directory to put them in.
6409
6410*** interpreter-mode-alist elements now specify regexps
6411instead of constant strings.
6412
6413*** expand-file-name no longer treats `//' or `/~' specially. It used
6414to delete all the text of a file name up through the first slash of
6415any `//' or `/~' sequence. Now it passes them straight through.
6416
6417substitute-in-file-name continues to treat those sequences specially,
6418in the same way as before.
6419
6420*** The variable `format-alist' is more general now.
6421The FROM-FN and TO-FN in a format definition can now be strings
6422which specify shell commands to use as filters to perform conversion.
6423
6424*** The new function access-file tries to open a file, and signals an
6425error if that fails. If the open succeeds, access-file does nothing
6426else, and returns nil.
6427
6428*** The function insert-directory now signals an error if the specified
6429directory cannot be listed.
6430
6431** Changes in minibuffer input
6432
6433*** The functions read-buffer, read-variable, read-command, read-string
6434read-file-name, read-from-minibuffer and completing-read now take an
6435additional argument which specifies the default value. If this
6436argument is non-nil, it should be a string; that string is used in two
6437ways:
6438
6439 It is returned if the user enters empty input.
6440 It is available through the history command M-n.
6441
6442*** The functions read-string, read-from-minibuffer,
6443read-no-blanks-input and completing-read now take an additional
6444argument INHERIT-INPUT-METHOD. If this is non-nil, then the
6445minibuffer inherits the current input method and the setting of
6446enable-multibyte-characters from the previously current buffer.
6447
6448In an interactive spec, you can use M instead of s to read an
6449argument in this way.
6450
6451*** All minibuffer input functions discard text properties
6452from the text you enter in the minibuffer, unless the variable
6453minibuffer-allow-text-properties is non-nil.
6454
6455** Echo area features
6456
6457*** Clearing the echo area now runs the normal hook
6458echo-area-clear-hook. Note that the echo area can be used while the
6459minibuffer is active; in that case, the minibuffer is still active
6460after the echo area is cleared.
6461
6462*** The function current-message returns the message currently displayed
6463in the echo area, or nil if there is none.
6464
6465** Keyboard input features
6466
6467*** tty-erase-char is a new variable that reports which character was
6468set up as the terminal's erase character when time Emacs was started.
6469
6470*** num-nonmacro-input-events is the total number of input events
6471received so far from the terminal. It does not count those generated
6472by keyboard macros.
6473
6474** Frame-related changes
6475
6476*** make-frame runs the normal hook before-make-frame-hook just before
6477creating a frame, and just after creating a frame it runs the abnormal
6478hook after-make-frame-functions with the new frame as arg.
6479
6480*** The new hook window-configuration-change-hook is now run every time
6481the window configuration has changed. The frame whose configuration
6482has changed is the selected frame when the hook is run.
6483
6484*** Each frame now independently records the order for recently
6485selected buffers, in its buffer-list frame parameter, so that the
6486value of other-buffer is now based on the buffers recently displayed
6487in the selected frame.
6488
6489*** The value of the frame parameter vertical-scroll-bars
6490is now `left', `right' or nil. A non-nil value specifies
6491which side of the window to put the scroll bars on.
6492
6493** X Windows features
6494
6495*** You can examine X resources for other applications by binding
6496x-resource-class around a call to x-get-resource. The usual value of
6497x-resource-class is "Emacs", which is the correct value for Emacs.
6498
6499*** In menus, checkboxes and radio buttons now actually work.
6500The menu displays the current status of the box or button.
6501
6502*** The function x-list-fonts now takes an optional fourth argument
6503MAXIMUM which sets a limit on how many matching fonts to return.
6504A smaller value of MAXIMUM makes the function faster.
6505
6506If the only question is whether *any* font matches the pattern,
6507it is good to supply 1 for this argument.
6508
6509** Subprocess features
6510
6511*** A reminder: it is no longer necessary for subprocess filter
6512functions and sentinels to do save-match-data, because Emacs does this
6513automatically.
6514
6515*** The new function shell-command-to-string executes a shell command
6516and returns the output from the command as a string.
6517
6518*** The new function process-contact returns t for a child process,
6519and (HOSTNAME SERVICE) for a net connection.
6520
6521** An error in running pre-command-hook or post-command-hook
6522does clear the variable to nil. The documentation was wrong before.
6523
6524** In define-key-after, if AFTER is t, the new binding now always goes
6525at the end of the keymap. If the keymap is a menu, this means it
6526goes after the other menu items.
6527
6528** If you have a program that makes several changes in the same area
79214ddf 6529of the buffer, you can use the macro combine-after-change-calls
a933dad1
DL
6530around that Lisp code to make it faster when after-change hooks
6531are in use.
6532
6533The macro arranges to call the after-change functions just once for a
6534series of several changes--if that seems safe.
6535
6536Don't alter the variables after-change-functions and
6537after-change-function within the body of a combine-after-change-calls
6538form.
6539
6540** If you define an abbrev (with define-abbrev) whose EXPANSION
6541is not a string, then the abbrev does not expand in the usual sense,
6542but its hook is still run.
6543
6544** Normally, the Lisp debugger is not used (even if you have enabled it)
6545for errors that are handled by condition-case.
6546
6547If you set debug-on-signal to a non-nil value, then the debugger is called
6548regardless of whether there is a handler for the condition. This is
6549useful for debugging problems that happen inside of a condition-case.
6550
6551This mode of operation seems to be unreliable in other ways. Errors that
6552are normal and ought to be handled, perhaps in timers or process
6553filters, will instead invoke the debugger. So don't say you weren't
6554warned.
6555
6556** The new variable ring-bell-function lets you specify your own
6557way for Emacs to "ring the bell".
6558
6559** If run-at-time's TIME argument is t, the action is repeated at
6560integral multiples of REPEAT from the epoch; this is useful for
6561functions like display-time.
6562
6563** You can use the function locate-library to find the precise file
6564name of a Lisp library. This isn't new, but wasn't documented before.
6565
6566** Commands for entering view mode have new optional arguments that
6567can be used from Lisp. Low-level entrance to and exit from view mode
6568is done by functions view-mode-enter and view-mode-exit.
6569
6570** batch-byte-compile-file now makes Emacs return a nonzero status code
6571if there is an error in compilation.
6572
6573** pop-to-buffer, switch-to-buffer-other-window and
6574switch-to-buffer-other-frame now accept an additional optional
6575argument NORECORD, much like switch-to-buffer. If it is non-nil,
6576they don't put the buffer at the front of the buffer list.
6577
6578** If your .emacs file leaves the *scratch* buffer non-empty,
6579Emacs does not display the startup message, so as to avoid changing
6580the *scratch* buffer.
6581
6582** The new function regexp-opt returns an efficient regexp to match a string.
6583The arguments are STRINGS and (optionally) PAREN. This function can be used
6584where regexp matching or searching is intensively used and speed is important,
6585e.g., in Font Lock mode.
6586
6587** The variable buffer-display-count is local to each buffer,
6588and is incremented each time the buffer is displayed in a window.
6589It starts at 0 when the buffer is created.
6590
6591** The new function compose-mail starts composing a mail message
6592using the user's chosen mail composition agent (specified with the
6593variable mail-user-agent). It has variants compose-mail-other-window
6594and compose-mail-other-frame.
6595
6596** The `user-full-name' function now takes an optional parameter which
6597can either be a number (the UID) or a string (the login name). The
6598full name of the specified user will be returned.
6599
6600** Lisp packages that load files of customizations, or any other sort
6601of user profile, should obey the variable init-file-user in deciding
6602where to find it. They should load the profile of the user name found
6603in that variable. If init-file-user is nil, meaning that the -q
6604option was used, then Lisp packages should not load the customization
6605files at all.
6606
6607** format-time-string now allows you to specify the field width
6608and type of padding. This works as in printf: you write the field
6609width as digits in the middle of a %-construct. If you start
6610the field width with 0, it means to pad with zeros.
6611
6612For example, %S normally specifies the number of seconds since the
6613minute; %03S means to pad this with zeros to 3 positions, %_3S to pad
6614with spaces to 3 positions. Plain %3S pads with zeros, because that
6615is how %S normally pads to two positions.
6616
6617** thing-at-point now supports a new kind of "thing": url.
6618
6619** imenu.el changes.
6620
6621You can now specify a function to be run when selecting an
79214ddf 6622item from menu created by imenu.
a933dad1
DL
6623
6624An example of using this feature: if we define imenu items for the
6625#include directives in a C file, we can open the included file when we
6626select one of those items.
6627\f
6628* Emacs 19.34 is a bug-fix release with no user-visible changes.
6629\f
6630* Changes in Emacs 19.33.
6631
6632** Bibtex mode no longer turns on Auto Fill automatically. (No major
6633mode should do that--it is the user's choice.)
6634
6635** The variable normal-auto-fill-function specifies the function to
6636use for auto-fill-function, if and when Auto Fill is turned on.
6637Major modes can set this locally to alter how Auto Fill works.
6638\f
6639* Editing Changes in Emacs 19.32
6640
6641** C-x f with no argument now signals an error.
6642To set the fill column at the current column, use C-u C-x f.
6643
6644** Expanding dynamic abbrevs with M-/ is now smarter about case
6645conversion. If you type the abbreviation with mixed case, and it
6646matches the beginning of the expansion including case, then the
6647expansion is copied verbatim. Using SPC M-/ to copy an additional
6648word always copies it verbatim except when the previous copied word is
6649all caps.
6650
6651** On a non-windowing terminal, which can display only one Emacs frame
6652at a time, creating a new frame with C-x 5 2 also selects that frame.
6653
6654When using a display that can show multiple frames at once, C-x 5 2
6655does make the frame visible, but does not select it. This is the same
6656as in previous Emacs versions.
6657
6658** You can use C-x 5 2 to create multiple frames on MSDOS, just as on a
6659non-X terminal on Unix. Of course, only one frame is visible at any
6660time, since your terminal doesn't have the ability to display multiple
6661frames.
6662
6663** On Windows, set win32-pass-alt-to-system to a non-nil value
6664if you would like tapping the Alt key to invoke the Windows menu.
6665This feature is not enabled by default; since the Alt key is also the
6666Meta key, it is too easy and painful to activate this feature by
6667accident.
6668
6669** The command apply-macro-to-region-lines repeats the last defined
6670keyboard macro once for each complete line within the current region.
6671It does this line by line, by moving point to the beginning of that
6672line and then executing the macro.
6673
6674This command is not new, but was never documented before.
6675
6676** You can now use Mouse-1 to place the region around a string constant
6677(something surrounded by doublequote characters or other delimiter
6678characters of like syntax) by double-clicking on one of the delimiting
6679characters.
6680
6681** Font Lock mode
6682
6683*** Font Lock support modes
6684
6685Font Lock can be configured to use Fast Lock mode and Lazy Lock mode (see
6686below) in a flexible way. Rather than adding the appropriate function to the
6687hook font-lock-mode-hook, you can use the new variable font-lock-support-mode
6688to control which modes have Fast Lock mode or Lazy Lock mode turned on when
6689Font Lock mode is enabled.
6690
6691For example, to use Fast Lock mode when Font Lock mode is turned on, put:
6692
6693 (setq font-lock-support-mode 'fast-lock-mode)
6694
6695in your ~/.emacs.
6696
6697*** lazy-lock
6698
6699The lazy-lock package speeds up Font Lock mode by making fontification occur
6700only when necessary, such as when a previously unfontified part of the buffer
6701becomes visible in a window. When you create a buffer with Font Lock mode and
6702Lazy Lock mode turned on, the buffer is not fontified. When certain events
6703occur (such as scrolling), Lazy Lock makes sure that the visible parts of the
6704buffer are fontified. Lazy Lock also defers on-the-fly fontification until
6705Emacs has been idle for a given amount of time.
6706
6707To use this package, put in your ~/.emacs:
6708
6709 (setq font-lock-support-mode 'lazy-lock-mode)
6710
6711To control the package behaviour, see the documentation for `lazy-lock-mode'.
6712
6713** Changes in BibTeX mode.
6714
6715*** For all entries allow spaces and tabs between opening brace or
6716paren and key.
6717
6718*** Non-escaped double-quoted characters (as in `Sch"of') are now
6719supported.
6720
6721** Gnus changes.
6722
6723Gnus, the Emacs news reader, has undergone further rewriting. Many new
6724commands and variables have been added. There should be no
6725significant incompatibilities between this Gnus version and the
6726previously released version, except in the message composition area.
6727
6728Below is a list of the more user-visible changes. Coding changes
6729between Gnus 5.1 and 5.2 are more extensive.
6730
79214ddf 6731*** A new message composition mode is used. All old customization
a933dad1
DL
6732variables for mail-mode, rnews-reply-mode and gnus-msg are now
6733obsolete.
6734
6735*** Gnus is now able to generate "sparse" threads -- threads where
6736missing articles are represented by empty nodes.
6737
6738 (setq gnus-build-sparse-threads 'some)
6739
6740*** Outgoing articles are stored on a special archive server.
6741
6742 To disable this: (setq gnus-message-archive-group nil)
6743
6744*** Partial thread regeneration now happens when articles are
79214ddf 6745referred.
a933dad1
DL
6746
6747*** Gnus can make use of GroupLens predictions:
6748
6749 (setq gnus-use-grouplens t)
6750
6751*** A trn-line tree buffer can be displayed.
6752
6753 (setq gnus-use-trees t)
6754
6755*** An nn-like pick-and-read minor mode is available for the summary
79214ddf 6756buffers.
a933dad1
DL
6757
6758 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
6759
6760*** In binary groups you can use a special binary minor mode:
6761
6762 `M-x gnus-binary-mode'
6763
6764*** Groups can be grouped in a folding topic hierarchy.
6765
6766 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
6767
6768*** Gnus can re-send and bounce mail.
6769
6770 Use the `S D r' and `S D b'.
6771
6772*** Groups can now have a score, and bubbling based on entry frequency
6773is possible.
6774
6775 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
6776
6777*** Groups can be process-marked, and commands can be performed on
6778groups of groups.
6779
6780*** Caching is possible in virtual groups.
6781
6782*** nndoc now understands all kinds of digests, mail boxes, rnews news
79214ddf 6783batches, ClariNet briefs collections, and just about everything else.
a933dad1
DL
6784
6785*** Gnus has a new backend (nnsoup) to create/read SOUP packets.
6786
6787*** The Gnus cache is much faster.
6788
6789*** Groups can be sorted according to many criteria.
6790
6791 For instance: (setq gnus-group-sort-function 'gnus-group-sort-by-rank)
6792
6793*** New group parameters have been introduced to set list-address and
6794expiration times.
6795
6796*** All formatting specs allow specifying faces to be used.
6797
6798*** There are several more commands for setting/removing/acting on
6799process marked articles on the `M P' submap.
6800
6801*** The summary buffer can be limited to show parts of the available
6802articles based on a wide range of criteria. These commands have been
6803bound to keys on the `/' submap.
6804
6805*** Articles can be made persistent -- as an alternative to saving
6806articles with the `*' command.
6807
6808*** All functions for hiding article elements are now toggles.
6809
6810*** Article headers can be buttonized.
6811
6812 (add-hook 'gnus-article-display-hook 'gnus-article-add-buttons-to-head)
6813
6814*** All mail backends support fetching articles by Message-ID.
6815
79214ddf 6816*** Duplicate mail can now be treated properly. See the
a933dad1
DL
6817`nnmail-treat-duplicates' variable.
6818
6819*** All summary mode commands are available directly from the article
79214ddf 6820buffer.
a933dad1
DL
6821
6822*** Frames can be part of `gnus-buffer-configuration'.
6823
6824*** Mail can be re-scanned by a daemonic process.
6825
6826*** Gnus can make use of NoCeM files to filter spam.
6827
6828 (setq gnus-use-nocem t)
6829
79214ddf 6830*** Groups can be made permanently visible.
a933dad1
DL
6831
6832 (setq gnus-permanently-visible-groups "^nnml:")
6833
79214ddf 6834*** Many new hooks have been introduced to make customizing easier.
a933dad1
DL
6835
6836*** Gnus respects the Mail-Copies-To header.
6837
79214ddf 6838*** Threads can be gathered by looking at the References header.
a933dad1 6839
79214ddf 6840 (setq gnus-summary-thread-gathering-function
a933dad1
DL
6841 'gnus-gather-threads-by-references)
6842
6843*** Read articles can be stored in a special backlog buffer to avoid
79214ddf 6844refetching.
a933dad1
DL
6845
6846 (setq gnus-keep-backlog 50)
6847
6848*** A clean copy of the current article is always stored in a separate
6849buffer to allow easier treatment.
6850
6851*** Gnus can suggest where to save articles. See `gnus-split-methods'.
6852
6853*** Gnus doesn't have to do as much prompting when saving.
6854
6855 (setq gnus-prompt-before-saving t)
6856
6857*** gnus-uu can view decoded files asynchronously while fetching
79214ddf 6858articles.
a933dad1
DL
6859
6860 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
6861
79214ddf 6862*** Filling in the article buffer now works properly on cited text.
a933dad1
DL
6863
6864*** Hiding cited text adds buttons to toggle hiding, and how much
6865cited text to hide is now customizable.
6866
6867 (setq gnus-cited-lines-visible 2)
6868
6869*** Boring headers can be hidden.
6870
6871 (add-hook 'gnus-article-display-hook 'gnus-article-hide-boring-headers)
6872
6873*** Default scoring values can now be set from the menu bar.
6874
6875*** Further syntax checking of outgoing articles have been added.
6876
6877The Gnus manual has been expanded. It explains all these new features
6878in greater detail.
6879\f
6880* Lisp Changes in Emacs 19.32
6881
6882** The function set-visited-file-name now accepts an optional
6883second argument NO-QUERY. If it is non-nil, then the user is not
6884asked for confirmation in the case where the specified file already
6885exists.
6886
6887** The variable print-length applies to printing vectors and bitvectors,
6888as well as lists.
6889
6890** The new function keymap-parent returns the parent keymap
6891of a given keymap.
6892
6893** The new function set-keymap-parent specifies a new parent for a
6894given keymap. The arguments are KEYMAP and PARENT. PARENT must be a
6895keymap or nil.
6896
6897** Sometimes menu keymaps use a command name, a symbol, which is really
6898an automatically generated alias for some other command, the "real"
6899name. In such a case, you should give that alias symbol a non-nil
6900menu-alias property. That property tells the menu system to look for
6901equivalent keys for the real name instead of equivalent keys for the
6902alias.
6903\f
6904* Editing Changes in Emacs 19.31
6905
6906** Freedom of the press restricted in the United States.
6907
6908Emacs has been censored in accord with the Communications Decency Act.
6909This includes removing some features of the doctor program. That law
6910was described by its supporters as a ban on pornography, but it bans
6911far more than that. The Emacs distribution has never contained any
6912pornography, but parts of it were nonetheless prohibited.
6913
6914For information on US government censorship of the Internet, and what
6915you can do to bring back freedom of the press, see the web site
6916`http://www.vtw.org/'.
6917
6918** A note about C mode indentation customization.
6919
6920The old (Emacs 19.29) ways of specifying a C indentation style
6921do not normally work in the new implementation of C mode.
6922It has its own methods of customizing indentation, which are
6923much more powerful than the old C mode. See the Editing Programs
6924chapter of the manual for details.
6925
6926However, you can load the library cc-compat to make the old
6927customization variables take effect.
6928
6929** Marking with the mouse.
6930
6931When you mark a region with the mouse, the region now remains
6932highlighted until the next input event, regardless of whether you are
6933using M-x transient-mark-mode.
6934
6935** Improved Windows NT/95 support.
6936
6937*** Emacs now supports scroll bars on Windows NT and Windows 95.
6938
6939*** Emacs now supports subprocesses on Windows 95. (Subprocesses used
6940to work on NT only and not on 95.)
6941
6942*** There are difficulties with subprocesses, though, due to problems
6943in Windows, beyond the control of Emacs. They work fine as long as
6944you run Windows applications. The problems arise when you run a DOS
6945application in a subprocesses. Since current shells run as DOS
6946applications, these problems are significant.
6947
6948If you run a DOS application in a subprocess, then the application is
6949likely to busy-wait, which means that your machine will be 100% busy.
6950However, if you don't mind the temporary heavy load, the subprocess
6951will work OK as long as you tell it to terminate before you start any
6952other DOS application as a subprocess.
6953
6954Emacs is unable to terminate or interrupt a DOS subprocess.
6955You have to do this by providing input directly to the subprocess.
6956
6957If you run two DOS applications at the same time in two separate
6958subprocesses, even if one of them is asynchronous, you will probably
6959have to reboot your machine--until then, it will remain 100% busy.
6960Windows simply does not cope when one Windows process tries to run two
6961separate DOS subprocesses. Typing CTL-ALT-DEL and then choosing
6962Shutdown seems to work although it may take a few minutes.
6963
6964** M-x resize-minibuffer-mode.
6965
6966This command, not previously mentioned in NEWS, toggles a mode in
6967which the minibuffer window expands to show as many lines as the
6968minibuffer contains.
6969
6970** `title' frame parameter and resource.
6971
6972The `title' X resource now specifies just the frame title, nothing else.
6973It does not affect the name used for looking up other X resources.
6974It works by setting the new `title' frame parameter, which likewise
6975affects just the displayed title of the frame.
6976
6977The `name' parameter continues to do what it used to do:
6978it specifies the frame name for looking up X resources,
6979and also serves as the default for the displayed title
6980when the `title' parameter is unspecified or nil.
6981
6982** Emacs now uses the X toolkit by default, if you have a new
6983enough version of X installed (X11R5 or newer).
6984
6985** When you compile Emacs with the Motif widget set, Motif handles the
6986F10 key by activating the menu bar. To avoid confusion, the usual
6987Emacs binding of F10 is replaced with a no-op when using Motif.
6988
6989If you want to be able to use F10 in Emacs, you can rebind the Motif
6990menubar to some other key which you don't use. To do so, add
6991something like this to your X resources file. This example rebinds
6992the Motif menu bar activation key to S-F12:
6993
6994 Emacs*defaultVirtualBindings: osfMenuBar : Shift<Key>F12
6995
6996** In overwrite mode, DEL now inserts spaces in most cases
6997to replace the characters it "deletes".
6998
6999** The Rmail summary now shows the number of lines in each message.
7000
7001** Rmail has a new command M-x unforward-rmail-message, which extracts
7002a forwarded message from the message that forwarded it. To use it,
7003select a message which contains a forwarded message and then type the command.
7004It inserts the forwarded message as a separate Rmail message
7005immediately after the selected one.
7006
7007This command also undoes the textual modifications that are standardly
7008made, as part of forwarding, by Rmail and other mail reader programs.
7009
7010** Turning off saving of .saves-... files in your home directory.
7011
7012Each Emacs session writes a file named .saves-... in your home
7013directory to record which files M-x recover-session should recover.
7014If you exit Emacs normally with C-x C-c, it deletes that file. If
7015Emacs or the operating system crashes, the file remains for M-x
7016recover-session.
7017
7018You can turn off the writing of these files by setting
7019auto-save-list-file-name to nil. If you do this, M-x recover-session
7020will not work.
7021
7022Some previous Emacs versions failed to delete these files even on
7023normal exit. This is fixed now. If you are thinking of turning off
7024this feature because of past experiences with versions that had this
7025bug, it would make sense to check whether you still want to do so
7026now that the bug is fixed.
7027
7028** Changes to Version Control (VC)
7029
7030There is a new variable, vc-follow-symlinks. It indicates what to do
7031when you visit a link to a file that is under version control.
7032Editing the file through the link bypasses the version control system,
7033which is dangerous and probably not what you want.
7034
7035If this variable is t, VC follows the link and visits the real file,
7036telling you about it in the echo area. If it is `ask' (the default),
7037VC asks for confirmation whether it should follow the link. If nil,
7038the link is visited and a warning displayed.
7039
7040** iso-acc.el now lets you specify a choice of language.
7041Languages include "latin-1" (the default) and "latin-2" (which
7042is designed for entering ISO Latin-2 characters).
7043
7044There are also choices for specific human languages such as French and
7045Portuguese. These are subsets of Latin-1, which differ in that they
7046enable only the accent characters needed for particular language.
7047The other accent characters, not needed for the chosen language,
7048remain normal.
7049
7050** Posting articles and sending mail now has M-TAB completion on various
7051header fields (Newsgroups, To, CC, ...).
7052
7053Completion in the Newsgroups header depends on the list of groups
7054known to your news reader. Completion in the Followup-To header
7055offers those groups which are in the Newsgroups header, since
7056Followup-To usually just holds one of those.
7057
7058Completion in fields that hold mail addresses works based on the list
7059of local users plus your aliases. Additionally, if your site provides
7060a mail directory or a specific host to use for any unrecognized user
7061name, you can arrange to query that host for completion also. (See the
7062documentation of variables `mail-directory-process' and
7063`mail-directory-stream'.)
7064
7065** A greatly extended sgml-mode offers new features such as (to be configured)
7066skeletons with completing read for tags and attributes, typing named
7067characters including optionally all 8bit characters, making tags invisible
7068with optional alternate display text, skipping and deleting tag(pair)s.
7069
7070Note: since Emacs' syntax feature cannot limit the special meaning of ', " and
7071- to inside <>, for some texts the result, especially of font locking, may be
7072wrong (see `sgml-specials' if you get wrong results).
7073
7074The derived html-mode configures this with tags and attributes more or
7075less HTML3ish. It also offers optional quick keys like C-c 1 for
7076headline or C-c u for unordered list (see `html-quick-keys'). Edit /
7077Text Properties / Face or M-g combinations create tags as applicable.
7078Outline minor mode is supported and level 1 font-locking tries to
7079fontify tag contents (which only works when they fit on one line, due
7080to a limitation in font-lock).
7081
7082External viewing via browse-url can occur automatically upon saving.
7083
7084** M-x imenu-add-to-menubar now adds to the menu bar for the current
7085buffer only. If you want to put an Imenu item in the menu bar for all
7086buffers that use a particular major mode, use the mode hook, as in
7087this example:
7088
7089 (add-hook 'emacs-lisp-mode-hook
7090 '(lambda () (imenu-add-to-menubar "Index")))
7091
7092** Changes in BibTeX mode.
7093
7094*** Field names may now contain digits, hyphens, and underscores.
7095
7096*** Font Lock mode is now supported.
7097
7098*** bibtex-make-optional-field is no longer interactive.
7099
7100*** If bibtex-maintain-sorted-entries is non-nil, inserting new
7101entries is now done with a faster algorithm. However, inserting
7102will fail in this case if the buffer contains invalid entries or
7103isn't in sorted order, so you should finish each entry with C-c C-c
7104(bibtex-close-entry) after you have inserted or modified it.
7105The default value of bibtex-maintain-sorted-entries is nil.
7106
7107*** Function `show-all' is no longer bound to a key, since C-u C-c C-q
7108does the same job.
7109
7110*** Entries with quotes inside quote-delimited fields (as `author =
7111"Stefan Sch{\"o}f"') are now supported.
7112
7113*** Case in field names doesn't matter anymore when searching for help
7114text.
7115
7116** Font Lock mode
7117
7118*** Global Font Lock mode
7119
7120Font Lock mode can be turned on globally, in buffers that support it, by the
7121new command global-font-lock-mode. You can use the new variable
7122font-lock-global-modes to control which modes have Font Lock mode automagically
7123turned on. By default, this variable is set so that Font Lock mode is turned
7124on globally where the buffer mode supports it.
7125
7126For example, to automagically turn on Font Lock mode where supported, put:
7127
7128 (global-font-lock-mode t)
7129
7130in your ~/.emacs.
7131
7132*** Local Refontification
7133
7134In Font Lock mode, editing a line automatically refontifies that line only.
7135However, if your change alters the syntactic context for following lines,
7136those lines remain incorrectly fontified. To refontify them, use the new
7137command M-g M-g (font-lock-fontify-block).
7138
7139In certain major modes, M-g M-g refontifies the entire current function.
7140(The variable font-lock-mark-block-function controls how to find the
7141current function.) In other major modes, M-g M-g refontifies 16 lines
7142above and below point.
7143
7144With a prefix argument N, M-g M-g refontifies N lines above and below point.
7145
7146** Follow mode
7147
7148Follow mode is a new minor mode combining windows showing the same
7149buffer into one tall "virtual window". The windows are typically two
7150side-by-side windows. Follow mode makes them scroll together as if
7151they were a unit. To use it, go to a frame with just one window,
7152split it into two side-by-side windows using C-x 3, and then type M-x
7153follow-mode.
7154
7155M-x follow-mode turns off Follow mode if it is already enabled.
7156
7157To display two side-by-side windows and activate Follow mode, use the
7158command M-x follow-delete-other-windows-and-split.
7159
7160** hide-show changes.
7161
7162The hooks hs-hide-hooks and hs-show-hooks have been renamed
7163to hs-hide-hook and hs-show-hook, to follow the convention for
7164normal hooks.
7165
7166** Simula mode now has a menu containing the most important commands.
7167The new command simula-indent-exp is bound to C-M-q.
7168
7169** etags can now handle programs written in Erlang. Files are
7170recognised by the extensions .erl and .hrl. The tagged lines are
7171those that begin a function, record, or macro.
7172
7173** MSDOS Changes
7174
7175*** It is now possible to compile Emacs with the version 2 of DJGPP.
7176Compilation with DJGPP version 1 also still works.
7177
7178*** The documentation of DOS-specific aspects of Emacs was rewritten
7179and expanded; see the ``MS-DOS'' node in the on-line docs.
7180
7181*** Emacs now uses ~ for backup file names, not .bak.
7182
7183*** You can simulate mouse-3 on two-button mice by simultaneously
7184pressing both mouse buttons.
7185
7186*** A number of packages and commands which previously failed or had
7187restricted functionality on MS-DOS, now work. The most important ones
79214ddf 7188are:
a933dad1
DL
7189
7190**** Printing (both with `M-x lpr-buffer' and with `ps-print' package)
7191now works.
7192
7193**** `Ediff' works (in a single-frame mode).
7194
7195**** `M-x display-time' can be used on MS-DOS (due to the new
7196implementation of Emacs timers, see below).
7197
7198**** `Dired' supports Unix-style shell wildcards.
7199
7200**** The `c-macro-expand' command now works as on other platforms.
7201
7202**** `M-x recover-session' works.
7203
7204**** `M-x list-colors-display' displays all the available colors.
7205
7206**** The `TPU-EDT' package works.
7207\f
7208* Lisp changes in Emacs 19.31.
7209
7210** The function using-unix-filesystems on Windows NT and Windows 95
7211tells Emacs to read and write files assuming that they reside on a
7212remote Unix filesystem. No CR/LF translation is done on any files in
7213this case. Invoking using-unix-filesystems with t activates this
7214behavior, and invoking it with any other value deactivates it.
7215
7216** Change in system-type and system-configuration values.
7217
7218The value of system-type on a Linux-based GNU system is now `lignux',
7219not `linux'. This means that some programs which use `system-type'
7220need to be changed. The value of `system-configuration' will also
7221be different.
7222
7223It is generally recommended to use `system-configuration' rather
7224than `system-type'.
7225
7226See the file LINUX-GNU in this directory for more about this.
7227
7228** The functions shell-command and dired-call-process
7229now run file name handlers for default-directory, if it has them.
7230
7231** Undoing the deletion of text now restores the positions of markers
7232that pointed into or next to the deleted text.
7233
7234** Timers created with run-at-time now work internally to Emacs, and
7235no longer use a separate process. Therefore, they now work more
7236reliably and can be used for shorter time delays.
7237
7238The new function run-with-timer is a convenient way to set up a timer
7239to run a specified amount of time after the present. A call looks
7240like this:
7241
7242 (run-with-timer SECS REPEAT FUNCTION ARGS...)
7243
7244SECS says how many seconds should elapse before the timer happens.
7245It may be an integer or a floating point number. When the timer
7246becomes ripe, the action is to call FUNCTION with arguments ARGS.
7247
7248REPEAT gives the interval for repeating the timer (measured in
7249seconds). It may be an integer or a floating point number. nil or 0
7250means don't repeat at all--call FUNCTION just once.
7251
7252*** with-timeout provides an easy way to do something but give
7253up if too much time passes.
7254
7255 (with-timeout (SECONDS TIMEOUT-FORMS...) BODY...)
7256
7257This executes BODY, but gives up after SECONDS seconds.
7258If it gives up, it runs the TIMEOUT-FORMS and returns the value
7259of the last one of them. Normally it returns the value of the last
7260form in BODY.
7261
7262*** You can now arrange to call a function whenever Emacs is idle for
7263a certain length of time. To do this, call run-with-idle-timer. A
7264call looks like this:
7265
7266 (run-with-idle-timer SECS REPEAT FUNCTION ARGS...)
7267
7268SECS says how many seconds of idleness should elapse before the timer
7269runs. It may be an integer or a floating point number. When the
7270timer becomes ripe, the action is to call FUNCTION with arguments
7271ARGS.
7272
7273Emacs becomes idle whenever it finishes executing a keyboard or mouse
7274command. It remains idle until it receives another keyboard or mouse
7275command.
7276
7277REPEAT, if non-nil, means this timer should be activated again each
7278time Emacs becomes idle and remains idle for SECS seconds The timer
7279does not repeat if Emacs *remains* idle; it runs at most once after
7280each time Emacs becomes idle.
7281
7282If REPEAT is nil, the timer runs just once, the first time Emacs is
7283idle for SECS seconds.
7284
7285*** post-command-idle-hook is now obsolete; you shouldn't use it at
7286all, because it interferes with the idle timer mechanism. If your
7287programs use post-command-idle-hook, convert them to use idle timers
7288instead.
7289
7290*** y-or-n-p-with-timeout lets you ask a question but give up if
7291there is no answer within a certain time.
7292
7293 (y-or-n-p-with-timeout PROMPT SECONDS DEFAULT-VALUE)
7294
7295asks the question PROMPT (just like y-or-n-p). If the user answers
7296within SECONDS seconds, it returns the answer that the user gave.
7297Otherwise it gives up after SECONDS seconds, and returns DEFAULT-VALUE.
7298
7299** Minor change to `encode-time': you can now pass more than seven
7300arguments. If you do that, the first six arguments have the usual
7301meaning, the last argument is interpreted as the time zone, and the
7302arguments in between are ignored.
7303
7304This means that it works to use the list returned by `decode-time' as
7305the list of arguments for `encode-time'.
7306
7307** The default value of load-path now includes the directory
7308/usr/local/share/emacs/VERSION/site-lisp In addition to
7309/usr/local/share/emacs/site-lisp. You can use this new directory for
7310site-specific Lisp packages that belong with a particular Emacs
7311version.
7312
7313It is not unusual for a Lisp package that works well in one Emacs
7314version to cause trouble in another. Sometimes packages need updating
7315for incompatible changes; sometimes they look at internal data that
7316has changed; sometimes the package has been installed in Emacs itself
7317and the installed version should be used. Whatever the reason for the
7318problem, this new feature makes it easier to solve.
7319
7320** When your program contains a fixed file name (like .completions or
7321.abbrev.defs), the file name usually needs to be different on operating
7322systems with limited file name syntax.
7323
7324Now you can avoid ad-hoc conditionals by using the function
7325convert-standard-filename to convert the file name to a proper form
7326for each operating system. Here is an example of use, from the file
7327completions.el:
7328
7329(defvar save-completions-file-name
7330 (convert-standard-filename "~/.completions")
7331 "*The filename to save completions to.")
7332
7333This sets the variable save-completions-file-name to a value that
7334depends on the operating system, because the definition of
7335convert-standard-filename depends on the operating system. On
7336Unix-like systems, it returns the specified file name unchanged. On
7337MS-DOS, it adapts the name to fit the limitations of that system.
7338
7339** The interactive spec N now returns the numeric prefix argument
7340rather than the raw prefix argument. (It still reads a number using the
7341minibuffer if there is no prefix argument at all.)
7342
7343** When a process is deleted, this no longer disconnects the process
7344marker from its buffer position.
7345
7346** The variable garbage-collection-messages now controls whether
7347Emacs displays a message at the beginning and end of garbage collection.
7348The default is nil, meaning there are no messages.
7349
7350** The variable debug-ignored-errors specifies certain kinds of errors
7351that should not enter the debugger. Its value is a list of error
7352condition symbols and/or regular expressions. If the error has any
7353of the condition symbols listed, or if any of the regular expressions
7354matches the error message, then that error does not enter the debugger,
7355regardless of the value of debug-on-error.
7356
7357This variable is initialized to match certain common but uninteresting
7358errors that happen often during editing.
7359
7360** The new function error-message-string converts an error datum
7361into its error message. The error datum is what condition-case
7362puts into the variable, to describe the error that happened.
7363
7364** Anything that changes which buffer appears in a given window
7365now runs the window-scroll-functions for that window.
7366
7367** The new function get-buffer-window-list returns a list of windows displaying
7368a buffer. The function is called with the buffer (a buffer object or a buffer
7369name) and two optional arguments specifying the minibuffer windows and frames
7370to search. Therefore this function takes optional args like next-window etc.,
7371and not get-buffer-window.
7372
7373** buffer-substring now runs the hook buffer-access-fontify-functions,
7374calling each function with two arguments--the range of the buffer
7375being accessed. buffer-substring-no-properties does not call them.
7376
7377If you use this feature, you should set the variable
7378buffer-access-fontified-property to a non-nil symbol, which is a
7379property name. Then, if all the characters in the buffer range have a
7380non-nil value for that property, the buffer-access-fontify-functions
7381are not called. When called, these functions should put a non-nil
7382property on the text that they fontify, so that they won't get called
7383over and over for the same text.
7384
7385** Changes in lisp-mnt.el
7386
7387*** The lisp-mnt package can now recognize file headers that are written
7388in the formats used by the `what' command and the RCS `ident' command:
7389
7390;; @(#) HEADER: text
7391;; $HEADER: text $
7392
7393in addition to the normal
7394
7395;; HEADER: text
7396
7397*** The commands lm-verify and lm-synopsis are now interactive. lm-verify
7398checks that the library file has proper sections and headers, and
7399lm-synopsis extracts first line "synopsis'"information.
7400\f
7401* For older news, see the file ONEWS.
7402
7403----------------------------------------------------------------------
7404Copyright information:
7405
404fa7d6 7406Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
a933dad1
DL
7407
7408 Permission is granted to anyone to make or distribute verbatim copies
7409 of this document as received, in any medium, provided that the
7410 copyright notice and this permission notice are preserved,
7411 thus giving the recipient permission to redistribute in turn.
7412
7413 Permission is granted to distribute modified versions
7414 of this document, or of portions of it,
7415 under the above conditions, provided also that they
7416 carry prominent notices stating who last changed them.
7417\f
7418Local variables:
7419mode: outline
7420paragraph-separate: "[ \f]*$"
7421end: