comparison etc/NEWS @ 62324:f1bee922ac7c

Rearrangements and cleanups. Don't mention defaulting of :group.
author Richard M. Stallman <rms@gnu.org>
date Sat, 14 May 2005 13:15:35 +0000
parents c3422068dcdc
children 13d3be64499c
comparison
equal deleted inserted replaced
62323:402cf3db9550 62324:f1bee922ac7c
950 --- 950 ---
951 *** mouse-wheels can now scroll a specific fraction of the window 951 *** mouse-wheels can now scroll a specific fraction of the window
952 (rather than a fixed number of lines) and the scrolling is `progressive'. 952 (rather than a fixed number of lines) and the scrolling is `progressive'.
953 953
954 --- 954 ---
955 *** Unexpected yanking of text due to accidental clicking on the mouse 955 *** Emacs ignores mouse-2 clicks while the mouse wheel is being moved.
956 wheel button (typically mouse-2) during wheel scrolling is now avoided. 956
957 This behavior can be customized via the mouse-wheel-click-event and 957 People tend to push the mouse wheel (which counts as a mouse-2 click)
958 unintentionally while turning the wheel, so these clicks are now
959 ignored. You can customize this with the mouse-wheel-click-event and
958 mouse-wheel-inhibit-click-time variables. 960 mouse-wheel-inhibit-click-time variables.
959 961
960 +++ 962 +++
961 *** Under X, mouse-wheel-mode is turned on by default. 963 *** Under X, mouse-wheel-mode is turned on by default.
962 964
1422 *** There's a new support for colors on `rxvt' terminal emulator. 1424 *** There's a new support for colors on `rxvt' terminal emulator.
1423 1425
1424 * New Modes and Packages in Emacs 22.1 1426 * New Modes and Packages in Emacs 22.1
1425 1427
1426 +++ 1428 +++
1427 ** New package benchmark.el contains simple support for convenient
1428 timing measurements of code (including the garbage collection component).
1429
1430 +++
1431 ** Filesets are collections of files. You can define a fileset in 1429 ** Filesets are collections of files. You can define a fileset in
1432 various ways, such as based on a directory tree or based on 1430 various ways, such as based on a directory tree or based on
1433 program files that include other program files. 1431 program files that include other program files.
1434 1432
1435 Once you have defined a fileset, you can perform various operations on 1433 Once you have defined a fileset, you can perform various operations on
1443 Emacs Lisp. Its documentation is in a separate manual; within Emacs, 1441 Emacs Lisp. Its documentation is in a separate manual; within Emacs,
1444 type "C-h i m calc RET" to read that manual. A reference card is 1442 type "C-h i m calc RET" to read that manual. A reference card is
1445 available in `etc/calccard.tex' and `etc/calccard.ps'. 1443 available in `etc/calccard.tex' and `etc/calccard.ps'.
1446 1444
1447 --- 1445 ---
1448 ** `cfengine-mode' is a major mode for editing GNU Cfengine 1446 ** The new package ibuffer provides a powerful, completely
1449 configuration files. 1447 customizable replacement for buff-menu.el.
1450 1448
1451 +++ 1449 ---
1452 ** The new package conf-mode.el handles thousands of configuration files, with 1450 ** Ido mode is now part of the Emacs distribution.
1453 varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value, 1451
1454 var : value, var value or keyword var value) and sections ([section] or 1452 The ido (interactively do) package is an extension of the iswitchb
1455 section { }). Many files under /etc/, or with suffixes like .cf through 1453 package to do interactive opening of files and directories in addition
1456 .config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are 1454 to interactive buffer switching. Ido is a superset of iswitchb (with
1457 recognized. 1455 a few exceptions), so don't enable both packages.
1456
1457 +++
1458 ** Image files are normally visited in Image mode, which lets you toggle
1459 between viewing the image and viewing the text using C-c C-c.
1458 1460
1459 --- 1461 ---
1460 ** CUA mode is now part of the Emacs distribution. 1462 ** CUA mode is now part of the Emacs distribution.
1461 1463
1462 The new cua package provides CUA-like keybindings using C-x for 1464 The new cua package provides CUA-like keybindings using C-x for
1515 be displayed by customizing the variable `file-name-shadow-properties'. 1517 be displayed by customizing the variable `file-name-shadow-properties'.
1516 1518
1517 +++ 1519 +++
1518 ** The new package flymake.el does on-the-fly syntax checking of program 1520 ** The new package flymake.el does on-the-fly syntax checking of program
1519 source files. See the Flymake's Info manual for more details. 1521 source files. See the Flymake's Info manual for more details.
1520
1521 ---
1522 ** The new Lisp library fringe.el controls the appearance of fringes.
1523
1524 ---
1525 ** GDB-Script-mode is used for files like .gdbinit.
1526
1527 ---
1528 ** The new package ibuffer provides a powerful, completely
1529 customizable replacement for buff-menu.el.
1530
1531 ---
1532 ** Ido mode is now part of the Emacs distribution.
1533
1534 The ido (interactively do) package is an extension of the iswitchb
1535 package to do interactive opening of files and directories in addition
1536 to interactive buffer switching. Ido is a superset of iswitchb (with
1537 a few exceptions), so don't enable both packages.
1538
1539 +++
1540 ** Image files are normally visited in Image mode, which lets you toggle
1541 between viewing the image and viewing the text using C-c C-c.
1542 1522
1543 +++ 1523 +++
1544 ** The new keypad setup package provides several common bindings for 1524 ** The new keypad setup package provides several common bindings for
1545 the numeric keypad which is available on most keyboards. The numeric 1525 the numeric keypad which is available on most keyboards. The numeric
1546 keypad typically has the digits 0 to 9, a decimal point, keys marked 1526 keypad typically has the digits 0 to 9, a decimal point, keys marked
1597 1577
1598 Keyboard macros can now be debugged and edited interactively. 1578 Keyboard macros can now be debugged and edited interactively.
1599 C-x C-k SPC steps through the last keyboard macro one key sequence 1579 C-x C-k SPC steps through the last keyboard macro one key sequence
1600 at a time, prompting for the actions to take. 1580 at a time, prompting for the actions to take.
1601 1581
1582 ---
1583 ** New minor mode, Visible mode, toggles invisibility in the current buffer.
1584 When enabled, it makes all invisible text visible. When disabled, it
1585 restores the previous value of `buffer-invisibility-spec'.
1586
1587 +++
1588 ** The wdired.el package allows you to use normal editing commands on Dired
1589 buffers to change filenames, permissions, etc...
1590
1602 +++ 1591 +++
1603 ** The new package longlines.el provides a minor mode for editing text 1592 ** The new package longlines.el provides a minor mode for editing text
1604 files composed of long lines, based on the `use-hard-newlines' 1593 files composed of long lines, based on the `use-hard-newlines'
1605 mechanism. The long lines are broken up by inserting soft newlines, 1594 mechanism. The long lines are broken up by inserting soft newlines,
1606 which are automatically removed when saving the file to disk or 1595 which are automatically removed when saving the file to disk or
1617 with a Print sub-menu which allows you to preview output through 1606 with a Print sub-menu which allows you to preview output through
1618 ghostview, use ghostscript to print (if you don't have a PostScript 1607 ghostview, use ghostscript to print (if you don't have a PostScript
1619 printer) or send directly to printer a PostScript code generated by 1608 printer) or send directly to printer a PostScript code generated by
1620 `ps-print' package. Use M-x pr-help for more information. 1609 `ps-print' package. Use M-x pr-help for more information.
1621 1610
1622 +++
1623 ** The new python.el package is used to edit Python and Jython programs.
1624
1625 --- 1611 ---
1626 ** The minor mode Reveal mode makes text visible on the fly as you 1612 ** The minor mode Reveal mode makes text visible on the fly as you
1627 move your cursor into hidden regions of the buffer. 1613 move your cursor into hidden regions of the buffer.
1628 It should work with any package that uses overlays to hide parts 1614 It should work with any package that uses overlays to hide parts
1629 of a buffer, such as outline-minor-mode, hs-minor-mode, hide-ifdef-mode, ... 1615 of a buffer, such as outline-minor-mode, hs-minor-mode, hide-ifdef-mode, ...
1677 If you want to disable Tramp you should set 1663 If you want to disable Tramp you should set
1678 1664
1679 (setq tramp-default-method "ftp") 1665 (setq tramp-default-method "ftp")
1680 1666
1681 --- 1667 ---
1682 ** The library tree-widget.el provides a new widget to display a set
1683 of hierarchical data as an outline. For example, the tree-widget is
1684 well suited to display a hierarchy of directories and files.
1685
1686 ---
1687 ** The URL package (which had been part of W3) is now part of Emacs. 1668 ** The URL package (which had been part of W3) is now part of Emacs.
1688 1669
1689 --- 1670 ---
1690 ** New minor mode, Visible mode, toggles invisibility in the current buffer. 1671 ** `cfengine-mode' is a major mode for editing GNU Cfengine
1691 When enabled, it makes all invisible text visible. When disabled, it 1672 configuration files.
1692 restores the previous value of `buffer-invisibility-spec'. 1673
1693 1674 +++
1694 +++ 1675 ** The new package conf-mode.el handles thousands of configuration files, with
1695 ** The wdired.el package allows you to use normal editing commands on Dired 1676 varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value,
1696 buffers to change filenames, permissions, etc... 1677 var : value, var value or keyword var value) and sections ([section] or
1678 section { }). Many files under /etc/, or with suffixes like .cf through
1679 .config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are
1680 recognized.
1681
1682 ---
1683 ** GDB-Script-mode is used for files like .gdbinit.
1684
1685 +++
1686 ** The new python.el package is used to edit Python and Jython programs.
1697 1687
1698 --- 1688 ---
1699 ** The TCL package tcl-mode.el was replaced by tcl.el. 1689 ** The TCL package tcl-mode.el was replaced by tcl.el.
1700 This was actually done in Emacs-21.1, and was not documented. 1690 This was actually done in Emacs-21.1, and was not documented.
1701
1702 ** The new package bindat.el provides functions to unpack and pack
1703 binary data structures, such as network packets, to and from Lisp
1704 data structures.
1705
1706 +++
1707 ** The new package button.el implements simple and fast `clickable buttons'
1708 in emacs buffers. `buttons' are much lighter-weight than the `widgets'
1709 implemented by widget.el, and can be used by lisp code that doesn't
1710 require the full power of widgets. Emacs uses buttons for such things
1711 as help and apropos buffers.
1712
1713 ---
1714 ** master-mode.el implements a minor mode for scrolling a slave
1715 buffer without leaving your current buffer, the master buffer.
1716
1717 It can be used by sql.el, for example: the SQL buffer is the master
1718 and its SQLi buffer is the slave. This allows you to scroll the SQLi
1719 buffer containing the output from the SQL buffer containing the
1720 commands.
1721
1722 This is how to use sql.el and master.el together: the variable
1723 sql-buffer contains the slave buffer. It is a local variable in the
1724 SQL buffer.
1725
1726 (add-hook 'sql-mode-hook
1727 (function (lambda ()
1728 (master-mode t)
1729 (master-set-slave sql-buffer))))
1730 (add-hook 'sql-set-sqli-hook
1731 (function (lambda ()
1732 (master-set-slave sql-buffer))))
1733
1734 +++
1735 ** New Lisp library testcover.el works with edebug to help you determine
1736 whether you've tested all your Lisp code. Function testcover-start
1737 instruments all functions in a given file. Then test your code. Function
1738 testcover-mark-all adds overlay "splotches" to the Lisp file's buffer to
1739 show where coverage is lacking. Command testcover-next-mark (bind it to
1740 a key!) will move point forward to the next spot that has a splotch.
1741
1742 Normally, a red splotch indicates the form was never completely
1743 evaluated; a brown splotch means it always evaluated to the same
1744 value. The red splotches are skipped for forms that can't possibly
1745 complete their evaluation, such as `error'. The brown splotches are
1746 skipped for forms that are expected to always evaluate to the same
1747 value, such as (setq x 14).
1748
1749 For difficult cases, you can add do-nothing macros to your code to
1750 help out the test coverage tool. The macro `noreturn' suppresses a
1751 red splotch. It is an error if the argument to `noreturn' does
1752 return. The macro 1value suppresses a brown splotch for its argument.
1753 This macro is a no-op except during test-coverage -- then it signals
1754 an error if the argument actually returns differing values.
1755 1691
1756 * Changes in Specialized Modes and Packages in Emacs 22.1: 1692 * Changes in Specialized Modes and Packages in Emacs 22.1:
1757 1693
1758 ** Makefile mode has now been split up into specialized modes for automake, 1694 ** Makefile mode has now been split up into specialized modes for automake,
1759 gmake, makepp and BSD make. The former two couldn't be differentiated before, 1695 gmake, makepp and BSD make. The former two couldn't be differentiated before,
3020 2956
3021 +++ 2957 +++
3022 *** `makehash' is now obsolete. Use `make-hash-table' instead. 2958 *** `makehash' is now obsolete. Use `make-hash-table' instead.
3023 2959
3024 +++ 2960 +++
3025 *** If optional third argument APPEND to `add-to-list' is non-nil, a 2961 *** `add-to-list' takes an optional third argument, APPEND.
3026 new element gets added at the end of the list instead of at the 2962
3027 beginning. This change actually occurred in Emacs-21.1, but was not 2963 If APPEND is non-nil, the new element gets added at the end of the
3028 documented. 2964 list instead of at the beginning. This change actually occurred in
3029 2965 Emacs 21.1, but was not documented then.
3030 +++ 2966
3031 *** New function `copy-tree' makes a copy of a tree, recursively copying 2967 +++
3032 both cars and cdrs. 2968 *** New function `copy-tree' makes a copy of a tree.
3033 2969
3034 +++ 2970 It recursively copyies through both CARs and CDRs.
3035 *** New function `delete-dups' destructively removes `equal' 2971
3036 duplicates from a list. Of several `equal' occurrences of an element 2972 +++
3037 in the list, the first one is kept. 2973 *** New function `delete-dups' deletes `equal' duplicate elements from a list.
3038 2974
3039 +++ 2975 It modifies the list destructively, like `delete'. Of several `equal'
3040 *** `declare' is now a macro. This change was made mostly for 2976 occurrences of an element in the list, the one that's kept is the
3041 documentation purposes and should have no real effect on Lisp code. 2977 first one.
3042 2978
3043 +++ 2979 +++
3044 *** The new function `rassq-delete-all' deletes all elements from an 2980 *** New function `rassq-delete-all'.
3045 alist whose cdr is `eq' to a specified value. 2981
3046 2982 (rassq-delete-all VALUE ALIST) deletes, from ALIST, each element whose
3047 +++ 2983 CDR is `eq' to the specified value.
3048 *** The function `number-sequence' returns a list of equally-separated 2984
3049 numbers. For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). 2985 +++
3050 By default, the separation is 1, but you can specify a different separation 2986 *** The function `number-sequence' makes a list of equally-separated numbers.
3051 as the third argument. (number-sequence 1.5 6 2) returns (1.5 3.5 5.5). 2987
3052 2988 For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). By
3053 +++ 2989 default, the separation is 1, but you can specify a different
3054 *** The variables `most-positive-fixnum' and `most-negative-fixnum' 2990 separation as the third argument. (number-sequence 1.5 6 2) returns
3055 hold the largest and smallest possible integer values. 2991 (1.5 3.5 5.5).
3056 2992
3057 +++ 2993 +++
3058 *** The flags, width, and precision options for %-specifications in function 2994 *** New variables `most-positive-fixnum' and `most-negative-fixnum'.
3059 `format' are now documented. Some flags that were accepted but not 2995
3060 implemented (such as "*") are no longer accepted. 2996 They hold the largest and smallest possible integer values.
3061 2997
3062 +++ 2998 +++
3063 *** Functions `get' and `plist-get' no longer signals an error for 2999 *** Minor change in the function `format'.
3064 a malformed property list. They also detect cyclic lists. 3000
3065 3001 Some flags that were accepted but not implemented (such as "*") are no
3066 +++ 3002 longer accepted.
3067 *** The new functions `lax-plist-get' and `lax-plist-put' are like 3003
3068 `plist-get' and `plist-put', except that they compare the property 3004 +++
3069 name using `equal' rather than `eq'. 3005 *** Functions `get' and `plist-get' no longer give errors for bad plists.
3070 3006
3071 +++ 3007 They return nil for a malformed property list or if the list is
3072 *** The new variable `print-continuous-numbering', when non-nil, says 3008 cyclic.
3073 that successive calls to print functions should use the same 3009
3074 numberings for circular structure references. This is only relevant 3010 +++
3075 when `print-circle' is non-nil. 3011 *** New functions `lax-plist-get' and `lax-plist-put'.
3012
3013 They are like `plist-get' and `plist-put', except that they compare
3014 the property name using `equal' rather than `eq'.
3015
3016 +++
3017 *** New variable `print-continuous-numbering'.
3018
3019 When this is non-nil, successive calls to print functions use a single
3020 numbering scheme for circular structure references. This is only
3021 relevant when `print-circle' is non-nil.
3076 3022
3077 When you bind `print-continuous-numbering' to t, you should 3023 When you bind `print-continuous-numbering' to t, you should
3078 also bind `print-number-table' to nil. 3024 also bind `print-number-table' to nil.
3079 3025
3080 +++ 3026 +++
3090 When called with 2 arguments, as in `(atan Y X)', `atan' returns the 3036 When called with 2 arguments, as in `(atan Y X)', `atan' returns the
3091 angle in radians between the vector [X, Y] and the X axis. (This is 3037 angle in radians between the vector [X, Y] and the X axis. (This is
3092 equivalent to the standard C library function `atan2'.) 3038 equivalent to the standard C library function `atan2'.)
3093 3039
3094 +++ 3040 +++
3095 *** A function's doc string can now specify the calling pattern. 3041 *** A function or macro's doc string can now specify the calling pattern.
3096 3042
3097 You put this in the doc string's last line, which should match the 3043 You put this info in the doc string's last line. It should be
3098 regexp "\n\n(fn.*)\\'". 3044 formatted so as to match the regexp "\n\n(fn .*)\\'". If you don't
3099 3045 specify this explicitly, Emacs determines it from the actual argument
3100 +++ 3046 names. Usually that default is right, but not always.
3101 *** New macro `with-local-quit' temporarily sets `inhibit-quit' to nil. 3047
3102 3048 +++
3103 This is for use around potentially blocking or long-running code in 3049 *** New macro `with-local-quit' temporarily allows quitting.
3104 timers and `post-command-hook' functions. 3050
3105 3051 A quit inside the body of `with-local-quit' is caught by the
3106 *** `define-obsolete-function-alias' 3052 `with-local-quit' form itself, but another quit will happen later once
3107 combines `defalias' and `make-obsolete'. 3053 the code that has inhibitted quitting exits.
3108 3054
3109 +++ 3055 This is for use around potentially blocking or long-running code
3110 *** New function `unsafep' returns nil if the given Lisp form can't 3056 inside timer functions and `post-command-hook' functions.
3111 possibly do anything dangerous; otherwise it returns a reason why the 3057
3112 form might be unsafe (calls unknown function, alters global variable, 3058 +++
3113 etc). 3059 *** New macro `define-obsolete-function-alias'.
3060
3061 This combines `defalias' and `make-obsolete'.
3062
3063 +++
3064 *** New function `unsafep' determines whether a Lisp form is safe.
3065
3066 It returns nil if the given Lisp form can't possibly do anything
3067 dangerous; otherwise it returns a reason why the form might be unsafe
3068 (calls unknown function, alters global variable, etc).
3114 3069
3115 ** Lisp code indentation features: 3070 ** Lisp code indentation features:
3116 3071
3117 +++ 3072 +++
3118 *** The `defmacro' form can contain declarations specifying how to 3073 *** The `defmacro' form can contain indentation and edebug declarations.
3119 indent the macro in Lisp mode and how to debug it with Edebug. The 3074
3120 syntax of defmacro has been extended to 3075 These declarations specify how to indent the macro calls in Lisp mode
3076 and how to debug them with Edebug. You write them like this:
3121 3077
3122 (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...) 3078 (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...)
3123 3079
3124 DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'. The 3080 DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'. The
3125 declaration specifiers supported are: 3081 possible declaration specifiers are:
3126 3082
3127 (indent INDENT) 3083 (indent INDENT)
3128 Set NAME's `lisp-indent-function' property to INDENT. 3084 Set NAME's `lisp-indent-function' property to INDENT.
3129 3085
3130 (edebug DEBUG) 3086 (edebug DEBUG)
3131 Set NAME's `edebug-form-spec' property to DEBUG. (This is 3087 Set NAME's `edebug-form-spec' property to DEBUG. (This is
3132 equivalent to writing a `def-edebug-spec' for the macro. 3088 equivalent to writing a `def-edebug-spec' for the macro,
3089 but this is cleaner.)
3133 3090
3134 --- 3091 ---
3135 *** cl-indent now allows customization of Indentation of backquoted forms. 3092 *** cl-indent now allows customization of Indentation of backquoted forms.
3136 3093
3137 See the new user option `lisp-backquote-indentation'. 3094 See the new user option `lisp-backquote-indentation'.
3145 forms. 3102 forms.
3146 3103
3147 +++ 3104 +++
3148 ** Variable aliases: 3105 ** Variable aliases:
3149 3106
3150 *** defvaralias ALIAS-VAR BASE-VAR [DOCSTRING] 3107 *** New function: defvaralias ALIAS-VAR BASE-VAR [DOCSTRING]
3151 3108
3152 This function defines the symbol ALIAS-VAR as a variable alias for 3109 This function defines the symbol ALIAS-VAR as a variable alias for
3153 symbol BASE-VAR. This means that retrieving the value of ALIAS-VAR 3110 symbol BASE-VAR. This means that retrieving the value of ALIAS-VAR
3154 returns the value of BASE-VAR, and changing the value of ALIAS-VAR 3111 returns the value of BASE-VAR, and changing the value of ALIAS-VAR
3155 changes the value of BASE-VAR. 3112 changes the value of BASE-VAR.
3156 3113
3157 DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has 3114 DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has
3158 the same documentation as BASE-VAR. 3115 the same documentation as BASE-VAR.
3159 3116
3160 *** indirect-variable VARIABLE 3117 *** New function: indirect-variable VARIABLE
3161 3118
3162 This function returns the variable at the end of the chain of aliases 3119 This function returns the variable at the end of the chain of aliases
3163 of VARIABLE. If VARIABLE is not a symbol, or if VARIABLE is not 3120 of VARIABLE. If VARIABLE is not a symbol, or if VARIABLE is not
3164 defined as an alias, the function returns VARIABLE. 3121 defined as an alias, the function returns VARIABLE.
3165 3122
3171 `make-obsolete-variable'. 3128 `make-obsolete-variable'.
3172 3129
3173 ** defcustom changes: 3130 ** defcustom changes:
3174 3131
3175 +++ 3132 +++
3176 *** defcustom and other custom declarations now use a default group 3133 *** The new customization type `float' requires a floating point number.
3177 (the last prior group defined in the same file) when no :group was given.
3178
3179 ---
3180 *** The new customization type `float' specifies numbers with floating
3181 point (no integers are allowed).
3182 3134
3183 ** String changes: 3135 ** String changes:
3184 3136
3185 +++ 3137 +++
3186 *** The escape sequence \s is now interpreted as a SPACE character, 3138 *** The escape sequence \s is now interpreted as a SPACE character.
3187 unless it is followed by a `-' in a character constant (e.g. ?\s-A), 3139
3188 in which case it is still interpreted as the super modifier. 3140 Exception: In a character constant, if it is followed by a `-' in a
3189 In strings, \s is always interpreted as a space. 3141 character constant (e.g. ?\s-A), it is still interpreted as the super
3190 3142 modifier. In strings, \s is always interpreted as a space.
3191 +++ 3143
3192 *** A hex escape in a string forces the string to be multibyte. 3144 +++
3193 An octal escape makes it unibyte. 3145 *** A hex escape in a string constant forces the string to be multibyte.
3146
3147 +++
3148 *** An octal escape in a string constant forces the string to be unibyte.
3194 3149
3195 +++ 3150 +++
3196 *** `split-string' now includes null substrings in the returned list if 3151 *** `split-string' now includes null substrings in the returned list if
3197 the optional argument SEPARATORS is non-nil and there are matches for 3152 the optional argument SEPARATORS is non-nil and there are matches for
3198 SEPARATORS at the beginning or end of the string. If SEPARATORS is 3153 SEPARATORS at the beginning or end of the string. If SEPARATORS is
3202 +++ 3157 +++
3203 *** New function `string-to-multibyte' converts a unibyte string to a 3158 *** New function `string-to-multibyte' converts a unibyte string to a
3204 multibyte string with the same individual character codes. 3159 multibyte string with the same individual character codes.
3205 3160
3206 +++ 3161 +++
3207 *** New function `substring-no-properties returns a substring without 3162 *** New function `substring-no-properties' returns a substring without
3208 text properties. 3163 text properties.
3209 3164
3210 +++ 3165 +++
3211 *** The new function `assoc-string' replaces `assoc-ignore-case' and 3166 *** The new function `assoc-string' replaces `assoc-ignore-case' and
3212 `assoc-ignore-representation', which are still available, but have 3167 `assoc-ignore-representation', which are still available, but have
3213 been declared obsolete. 3168 been declared obsolete.
3214 3169
3215 ** Buffer/variable changes: 3170 +++
3171 ** Displaying warnings to the user.
3172
3173 See the functions `warn' and `display-warning', or the Lisp Manual.
3174 If you want to be sure the warning will not be overlooked, this
3175 facility is much better than using `message', since it displays
3176 warnings in a separate window.
3177
3178 +++
3179 ** Progress reporters.
3180
3181 These provide a simple and uniform way for commands to present
3182 progress messages for the user.
3183
3184 See the new functions `make-progress-reporter',
3185 `progress-reporter-update', `progress-reporter-force-update',
3186 `progress-reporter-done', and `dotimes-with-progress-reporter'.
3187
3188 ** Buffer positions:
3189
3190 +++
3191 *** Function `compute-motion' now calculates the usable window
3192 width if the WIDTH argument is nil. If the TOPOS argument is nil,
3193 the usable window height and width is used.
3194
3195 +++
3196 *** The `line-move', `scroll-up', and `scroll-down' functions will now
3197 modify the window vscroll to scroll through display rows that are
3198 taller that the height of the window, for example in the presence of
3199 large images. To disable this feature, bind the new variable
3200 `auto-window-vscroll' to nil.
3201
3202 +++
3203 *** The argument to `forward-word', `backward-word' is optional.
3204
3205 It defaults to 1.
3206
3207 +++
3208 *** Argument to `forward-to-indentation' and `backward-to-indentation' is optional.
3209
3210 It defaults to 1.
3211
3212 +++
3213 *** New function `mouse-on-link-p' test if a position is in a clickable link.
3214
3215 This is the function used by the new `mouse-1-click-follows-link'
3216 functionality.
3217
3218 +++
3219 *** New function `line-number-at-pos' returns the line number of a position.
3220
3221 It an optional buffer position argument that defaults to point.
3222
3223 +++
3224 *** `field-beginning' and `field-end' take new optional argument, LIMIT.
3225
3226 This argument tells them not to search beyond LIMIT. Instead they
3227 give up and return LIMIT.
3228
3229 +++
3230 *** Function `pos-visible-in-window-p' now returns the pixel coordinates
3231 and partial visiblity state of the corresponding row, if the PARTIALLY
3232 arg is non-nil.
3233
3234 +++
3235 *** New functions `posn-at-point' and `posn-at-x-y' return
3236 click-event-style position information for a given visible buffer
3237 position or for a given window pixel coordinate.
3238
3239 ** Text modification:
3240
3241 +++
3242 *** The new function `insert-for-yank' normally works like `insert', but
3243 removes the text properties in the `yank-excluded-properties' list
3244 and handles the `yank-handler' text property.
3245
3246 +++
3247 *** The new function `insert-buffer-substring-as-yank' is like
3248 `insert-for-yank' except that it gets the text from another buffer as
3249 in `insert-buffer-substring'.
3250
3251 +++
3252 *** The new function `insert-buffer-substring-no-properties' is like
3253 `insert-buffer-substring', but removes all text properties from the
3254 inserted substring.
3255
3256 +++
3257 *** The new function `filter-buffer-substring' extracts a buffer
3258 substring, passes it through a set of filter functions, and returns
3259 the filtered substring. Use it instead of `buffer-substring' or
3260 `delete-and-extract-region' when copying text into a user-accessible
3261 data structure, such as the kill-ring, X clipboard, or a register.
3262
3263 The list of filter function is specified by the new variable
3264 `buffer-substring-filters'. For example, Longlines mode adds to
3265 `buffer-substring-filters' to remove soft newlines from the copied
3266 text.
3267
3268 +++
3269 *** Function `translate-region' accepts also a char-table as TABLE
3270 argument.
3271
3272 +++
3273 *** The new translation table `translation-table-for-input'
3274 is used for customizing self-insertion. The character to
3275 be inserted is translated through it.
3276
3277 ---
3278 *** Text clones.
3279
3280 The new function `text-clone-create'. Text clones are chunks of text
3281 that are kept identical by transparently propagating changes from one
3282 clone to the other.
3283
3284 ---
3285 *** The function `insert-string' is now obsolete.
3286
3287 +++
3288 ** Atomic change groups.
3289
3290 To perform some changes in the current buffer "atomically" so that
3291 they either all succeed or are all undone, use `atomic-change-group'
3292 around the code that makes changes. For instance:
3293
3294 (atomic-change-group
3295 (insert foo)
3296 (delete-region x y))
3297
3298 If an error (or other nonlocal exit) occurs inside the body of
3299 `atomic-change-group', it unmakes all the changes in that buffer that
3300 were during the execution of the body. The change group has no effect
3301 on any other buffers--any such changes remain.
3302
3303 If you need something more sophisticated, you can directly call the
3304 lower-level functions that `atomic-change-group' uses. Here is how.
3305
3306 To set up a change group for one buffer, call `prepare-change-group'.
3307 Specify the buffer as argument; it defaults to the current buffer.
3308 This function returns a "handle" for the change group. You must save
3309 the handle to activate the change group and then finish it.
3310
3311 Before you change the buffer again, you must activate the change
3312 group. Pass the handle to `activate-change-group' afterward to
3313 do this.
3314
3315 After you make the changes, you must finish the change group. You can
3316 either accept the changes or cancel them all. Call
3317 `accept-change-group' to accept the changes in the group as final;
3318 call `cancel-change-group' to undo them all.
3319
3320 You should use `unwind-protect' to make sure the group is always
3321 finished. The call to `activate-change-group' should be inside the
3322 `unwind-protect', in case the user types C-g just after it runs.
3323 (This is one reason why `prepare-change-group' and
3324 `activate-change-group' are separate functions.) Once you finish the
3325 group, don't use the handle again--don't try to finish the same group
3326 twice.
3327
3328 To make a multibuffer change group, call `prepare-change-group' once
3329 for each buffer you want to cover, then use `nconc' to combine the
3330 returned values, like this:
3331
3332 (nconc (prepare-change-group buffer-1)
3333 (prepare-change-group buffer-2))
3334
3335 You can then activate the multibuffer change group with a single call
3336 to `activate-change-group', and finish it with a single call to
3337 `accept-change-group' or `cancel-change-group'.
3338
3339 Nested use of several change groups for the same buffer works as you
3340 would expect. Non-nested use of change groups for the same buffer
3341 will lead to undesirable results, so don't let it happen; the first
3342 change group you start for any given buffer should be the last one
3343 finished.
3344
3345 ** Buffer-related changes:
3346
3347 ---
3348 *** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST.
3349
3350 If it is non-nil, it specifies which buffers to list.
3351
3352 +++
3353 *** `kill-buffer-hook' is now a permanent local.
3216 3354
3217 +++ 3355 +++
3218 *** The new function `buffer-local-value' returns the buffer-local 3356 *** The new function `buffer-local-value' returns the buffer-local
3219 binding of VARIABLE (a symbol) in buffer BUFFER. If VARIABLE does not 3357 binding of VARIABLE (a symbol) in buffer BUFFER. If VARIABLE does not
3220 have a buffer-local binding in buffer BUFFER, it returns the default 3358 have a buffer-local binding in buffer BUFFER, it returns the default
3221 value of VARIABLE instead. 3359 value of VARIABLE instead.
3222
3223 +++
3224 ** There is a new facility for displaying warnings to the user.
3225
3226 See the functions `warn' and `display-warning' .
3227
3228 +++
3229 ** Progress reporters.
3230
3231 These provide a simple and uniform way for commands to present
3232 progress messages for the user.
3233
3234 See the new functions `make-progress-reporter',
3235 `progress-reporter-update', `progress-reporter-force-update',
3236 `progress-reporter-done', and `dotimes-with-progress-reporter'.
3237
3238 ** Buffer positions:
3239
3240 +++
3241 *** Function `compute-motion' now calculates the usable window
3242 width if the WIDTH argument is nil. If the TOPOS argument is nil,
3243 the usable window height and width is used.
3244
3245 +++
3246 *** The `line-move', `scroll-up', and `scroll-down' functions will now
3247 modify the window vscroll to scroll through display rows that are
3248 taller that the height of the window, for example in the presense of
3249 large images. To disable this feature, Lisp code can bind the new
3250 variable `auto-window-vscroll' to nil.
3251
3252 +++
3253 *** The argument to `forward-word', `backward-word',
3254 `forward-to-indentation' and `backward-to-indentation' is now
3255 optional, and defaults to 1.
3256
3257 +++
3258 *** Lisp code can now test if a given buffer position is inside a
3259 clickable link with the new function `mouse-on-link-p'. This is the
3260 function used by the new `mouse-1-click-follows-link' functionality.
3261
3262 +++
3263 *** New function `line-number-at-pos' returns the line number of the
3264 current line in the current buffer, or if optional buffer position is
3265 given, line number of corresponding line in current buffer.
3266
3267 +++
3268 *** `field-beginning' and `field-end' now accept an additional optional
3269 argument, LIMIT.
3270
3271 +++
3272 *** Function `pos-visible-in-window-p' now returns the pixel coordinates
3273 and partial visiblity state of the corresponding row, if the PARTIALLY
3274 arg is non-nil.
3275
3276 +++
3277 *** New functions `posn-at-point' and `posn-at-x-y' return
3278 click-event-style position information for a given visible buffer
3279 position or for a given window pixel coordinate.
3280
3281 ** Text modification:
3282
3283 +++
3284 *** The new function `insert-buffer-substring-as-yank' works like
3285 `insert-buffer-substring', but removes the text properties in the
3286 `yank-excluded-properties' list.
3287
3288 +++
3289 *** The new function `insert-buffer-substring-no-properties' is like
3290 insert-buffer-substring, but removes all text properties from the
3291 inserted substring.
3292
3293 +++
3294 *** The new function `filter-buffer-substring' extracts a buffer
3295 substring, passes it through a set of filter functions, and returns
3296 the filtered substring. It is used instead of `buffer-substring' or
3297 `delete-and-extract-region' when copying text into a user-accessible
3298 data structure, like the kill-ring, X clipboard, or a register. The
3299 list of filter function is specified by the new variable
3300 `buffer-substring-filters'. For example, Longlines mode uses
3301 `buffer-substring-filters' to remove soft newlines from the copied
3302 text.
3303
3304 +++
3305 *** Function `translate-region' accepts also a char-table as TABLE
3306 argument.
3307
3308 +++
3309 *** The new translation table `translation-table-for-input'
3310 is used for customizing self-insertion. The character to
3311 be inserted is translated through it.
3312
3313 ---
3314 *** Text clones.
3315
3316 The new function `text-clone-create'. Text clones are chunks of text
3317 that are kept identical by transparently propagating changes from one
3318 clone to the other.
3319
3320 ---
3321 *** The function `insert-string' is now obsolete.
3322
3323 ** Syntax table changes:
3324
3325 +++
3326 *** The macro `with-syntax-table' does not copy the table any more.
3327
3328 +++
3329 *** The new function `syntax-after' returns the syntax code
3330 of the character after a specified buffer position, taking account
3331 of text properties as well as the character code.
3332
3333 +++
3334 *** `syntax-class' extracts the class of a syntax code (as returned
3335 by syntax-after).
3336
3337 *** The new package `syntax.el' provides an efficient way to find the
3338 current syntactic context (as returned by `parse-partial-sexp').
3339
3340 ** GC changes:
3341
3342 +++
3343 *** New variables `gc-elapsed' and `gcs-done' provide extra information
3344 on garbage collection.
3345
3346 +++
3347 *** Functions from `post-gc-hook' are run at the end of garbage
3348 collection. The hook is run with GC inhibited, so use it with care.
3349
3350 ** Buffer-related changes:
3351
3352 ---
3353 *** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST.
3354 If it is non-nil, it specifies which buffers to list.
3355
3356 +++
3357 *** `kill-buffer-hook' is now a permanent local.
3358 3360
3359 ** Local variables lists: 3361 ** Local variables lists:
3360 3362
3361 +++ 3363 +++
3362 *** Text properties in local variables. 3364 *** Text properties in local variables.
3380 with the form as argument, and if any returns t, the form is ok to call. 3382 with the form as argument, and if any returns t, the form is ok to call.
3381 3383
3382 If the form is not "ok to call", that means Emacs asks for 3384 If the form is not "ok to call", that means Emacs asks for
3383 confirmation as before. 3385 confirmation as before.
3384 3386
3385 ** Abbrev changes: 3387 ** Searching and matching changes:
3386 3388
3387 *** The new function copy-abbrev-table returns a new abbrev table that 3389 +++
3388 is a copy of a given abbrev table. 3390 *** New function `looking-back' checks whether a regular expression matches
3389 3391 the text before point. Specifying the LIMIT argument bounds how far
3390 +++ 3392 back the match can start; this is a way to keep it from taking too long.
3391 *** define-abbrev now accepts an optional argument SYSTEM-FLAG. If 3393
3392 non-nil, this marks the abbrev as a "system" abbrev, which means that 3394 +++
3393 it won't be stored in the user's abbrevs file if he saves the abbrevs. 3395 *** The new variable `search-spaces-regexp' controls how to search
3394 Major modes that predefine some abbrevs should always specify this 3396 for spaces in a regular expression. If it is non-nil, it should be a
3395 flag. 3397 regular expression, and any series of spaces stands for that regular
3398 expression. If it is nil, spaces stand for themselves.
3399
3400 Spaces inside of constructs such as `[..]' and inside loops such as
3401 `*', `+', and `?' are never replaced with `search-spaces-regexp'.
3402
3403 +++
3404 *** New regular expression operators, `\_<' and `\_>'.
3405
3406 These match the beginning and end of a symbol. A symbol is a
3407 non-empty sequence of either word or symbol constituent characters, as
3408 specified by the syntax table.
3409
3410 ---
3411 *** rx.el has new corresponding `symbol-end' and `symbol-start' elements.
3412
3413 +++
3414 *** `skip-chars-forward' and `skip-chars-backward' now handle
3415 character classes such as `[:alpha:]', along with individual
3416 characters and ranges.
3417
3418 ---
3419 *** In `replace-match', the replacement text no longer inherits
3420 properties from surrounding text.
3421
3422 +++
3423 *** The list returned by `(match-data t)' now has the buffer as a final
3424 element, if the last match was on a buffer. `set-match-data'
3425 accepts such a list for restoring the match state.
3426
3427 +++
3428 *** The default value of `sentence-end' is now defined using the new
3429 variable `sentence-end-without-space', which contains such characters
3430 that end a sentence without following spaces.
3431
3432 The function `sentence-end' should be used to obtain the value of the
3433 variable `sentence-end'. If the variable `sentence-end' is nil, then
3434 this function returns the regexp constructed from the variables
3435 `sentence-end-without-period', `sentence-end-double-space' and
3436 `sentence-end-without-space'.
3396 3437
3397 ** Undo changes: 3438 ** Undo changes:
3398 3439
3399 +++ 3440 +++
3400 *** An element of buffer-undo-list can now have the form (apply FUNNAME 3441 *** `buffer-undo-list' can allows programmable elements.
3401 . ARGS), where FUNNAME is a symbol other than t or nil. That stands 3442
3402 for a high-level change that should be undone by evaluating (apply 3443 These elements have the form (apply FUNNAME . ARGS), where FUNNAME is
3403 FUNNAME ARGS). 3444 a symbol other than t or nil. That stands for a high-level change
3445 that should be undone by evaluating (apply FUNNAME ARGS).
3404 3446
3405 These entries can also have the form (apply DELTA BEG END FUNNAME . ARGS) 3447 These entries can also have the form (apply DELTA BEG END FUNNAME . ARGS)
3406 which indicates that the change which took place was limited to the 3448 which indicates that the change which took place was limited to the
3407 range BEG...END and increased the buffer size by DELTA. 3449 range BEG...END and increased the buffer size by DELTA.
3408 3450
3409 +++ 3451 +++
3410 *** If the buffer's undo list for the current command gets longer than 3452 *** If the buffer's undo list for the current command gets longer than
3411 undo-outer-limit, garbage collection empties it. This is to prevent 3453 `undo-outer-limit', garbage collection empties it. This is to prevent
3412 it from using up the available memory and choking Emacs. 3454 it from using up the available memory and choking Emacs.
3413 3455
3414 +++ 3456 +++
3415 ** New `yank-handler' text property can be used to control how 3457 ** New `yank-handler' text property can be used to control how
3416 previously killed text on the kill-ring is reinserted. 3458 previously killed text on the kill ring is reinserted.
3417 3459
3418 The value of the yank-handler property must be a list with one to four 3460 The value of the `yank-handler' property must be a list with one to four
3419 elements with the following format: 3461 elements with the following format:
3420 (FUNCTION PARAM NOEXCLUDE UNDO). 3462 (FUNCTION PARAM NOEXCLUDE UNDO).
3421 3463
3422 The `insert-for-yank' function looks for a yank-handler property on 3464 The `insert-for-yank' function looks for a yank-handler property on
3423 the first character on its string argument (typically the first 3465 the first character on its string argument (typically the first
3424 element on the kill-ring). If a yank-handler property is found, 3466 element on the kill-ring). If a `yank-handler' property is found,
3425 the normal behavior of `insert-for-yank' is modified in various ways: 3467 the normal behavior of `insert-for-yank' is modified in various ways:
3426 3468
3427 When FUNCTION is present and non-nil, it is called instead of `insert' 3469 When FUNCTION is present and non-nil, it is called instead of `insert'
3428 to insert the string. FUNCTION takes one argument--the object to insert. 3470 to insert the string. FUNCTION takes one argument--the object to insert.
3429 If PARAM is present and non-nil, it replaces STRING as the object 3471 If PARAM is present and non-nil, it replaces STRING as the object
3430 passed to FUNCTION (or `insert'); for example, if FUNCTION is 3472 passed to FUNCTION (or `insert'); for example, if FUNCTION is
3431 `yank-rectangle', PARAM should be a list of strings to insert as a 3473 `yank-rectangle', PARAM should be a list of strings to insert as a
3432 rectangle. 3474 rectangle.
3433 If NOEXCLUDE is present and non-nil, the normal removal of the 3475 If NOEXCLUDE is present and non-nil, the normal removal of the
3434 yank-excluded-properties is not performed; instead FUNCTION is 3476 `yank-excluded-properties' is not performed; instead FUNCTION is
3435 responsible for removing those properties. This may be necessary 3477 responsible for removing those properties. This may be necessary
3436 if FUNCTION adjusts point before or after inserting the object. 3478 if FUNCTION adjusts point before or after inserting the object.
3437 If UNDO is present and non-nil, it is a function that will be called 3479 If UNDO is present and non-nil, it is a function that will be called
3438 by `yank-pop' to undo the insertion of the current object. It is 3480 by `yank-pop' to undo the insertion of the current object. It is
3439 called with two arguments, the start and end of the current region. 3481 called with two arguments, the start and end of the current region.
3440 FUNCTION can set `yank-undo-function' to override the UNDO value. 3482 FUNCTION can set `yank-undo-function' to override the UNDO value.
3441 3483
3442 *** The functions kill-new, kill-append, and kill-region now have an 3484 *** The functions `kill-new', `kill-append', and `kill-region' now have an
3443 optional argument to specify the yank-handler text property to put on 3485 optional argument to specify the `yank-handler' text property to put on
3444 the killed text. 3486 the killed text.
3445 3487
3446 *** The function yank-pop will now use a non-nil value of the variable 3488 *** The function `yank-pop' will now use a non-nil value of the variable
3447 `yank-undo-function' (instead of delete-region) to undo the previous 3489 `yank-undo-function' (instead of `delete-region') to undo the previous
3448 yank or yank-pop command (or a call to insert-for-yank). The function 3490 `yank' or `yank-pop' command (or a call to `insert-for-yank'). The function
3449 insert-for-yank automatically sets that variable according to the UNDO 3491 `insert-for-yank' automatically sets that variable according to the UNDO
3450 element of the string argument's yank-handler text property if present. 3492 element of the string argument's `yank-handler' text property if present.
3451 3493
3452 *** The function `insert-for-yank' now supports strings where the 3494 *** The function `insert-for-yank' now supports strings where the
3453 `yank-handler' property does not span the first character of the 3495 `yank-handler' property does not span the first character of the
3454 string. The old behavior is available if you call 3496 string. The old behavior is available if you call
3455 `insert-for-yank-1' instead. 3497 `insert-for-yank-1' instead.
3456 3498
3457 *** The new function insert-for-yank normally works like `insert', but 3499 ** Syntax table changes:
3458 removes the text properties in the `yank-excluded-properties' list. 3500
3459 However, the insertion of the text can be modified by a `yank-handler' 3501 +++
3460 text property. 3502 *** The macro `with-syntax-table' no longer copies the syntax table.
3503
3504 +++
3505 *** The new function `syntax-after' returns the syntax code
3506 of the character after a specified buffer position, taking account
3507 of text properties as well as the character code.
3508
3509 +++
3510 *** `syntax-class' extracts the class of a syntax code (as returned
3511 by `syntax-after').
3512
3513 *** The new function `syntax-ppss' rovides an efficient way to find the
3514 current syntactic context at point.
3461 3515
3462 ** File operation changes: 3516 ** File operation changes:
3463 3517
3464 +++ 3518 +++
3465 *** New vars `exec-suffixes' and `load-suffixes' used when 3519 *** New vars `exec-suffixes' and `load-suffixes' used when
3466 searching for an executable resp. an elisp file. 3520 searching for an executable or an Emacs Lisp file.
3467 3521
3468 +++ 3522 +++
3469 *** The new primitive `set-file-times' sets a file's access and 3523 *** The new primitive `set-file-times' sets a file's access and
3470 modification times. Magic file name handlers can handle this 3524 modification times. Magic file name handlers can handle this
3471 operation. 3525 operation.
3475 non-nil if it specifies a remote file (one that Emacs accesses using 3529 non-nil if it specifies a remote file (one that Emacs accesses using
3476 its own special methods and not directly through the file system). 3530 its own special methods and not directly through the file system).
3477 The value in that case is an identifier for the remote file system. 3531 The value in that case is an identifier for the remote file system.
3478 3532
3479 +++ 3533 +++
3480 *** `auto-save-file-format' has been renamed to 3534 *** `buffer-auto-save-file-format' is the new name for what was
3481 `buffer-auto-save-file-format' and made into a permanent local. 3535 formerly called `auto-save-file-format'. It is now a permanent local.
3482 3536
3483 +++ 3537 +++
3484 *** Functions `file-name-sans-extension' and `file-name-extension' now 3538 *** Functions `file-name-sans-extension' and `file-name-extension' now
3485 ignore the leading dots in file names, so that file names such as 3539 ignore the leading dots in file names, so that file names such as
3486 `.emacs' are treated as extensionless. 3540 `.emacs' are treated as extensionless.
3487 3541
3488 +++ 3542 +++
3489 *** copy-file now takes an additional option arg MUSTBENEW. 3543 *** `copy-file' now takes an additional option arg MUSTBENEW.
3490 3544
3491 This argument works like the MUSTBENEW argument of write-file. 3545 This argument works like the MUSTBENEW argument of write-file.
3492
3493 +++
3494 *** If the second argument to `copy-file' is the name of a directory,
3495 the file is copied to that directory instead of signaling an error.
3496 3546
3497 +++ 3547 +++
3498 *** `visited-file-modtime' and `calendar-time-from-absolute' now return 3548 *** `visited-file-modtime' and `calendar-time-from-absolute' now return
3499 a list of two integers, instead of a cons. 3549 a list of two integers, instead of a cons.
3500 3550
3509 before saving buffers. This allows packages to perform various final 3559 before saving buffers. This allows packages to perform various final
3510 tasks, for example; it can be used by the copyright package to make 3560 tasks, for example; it can be used by the copyright package to make
3511 sure saved files have the current year in any copyright headers. 3561 sure saved files have the current year in any copyright headers.
3512 3562
3513 +++ 3563 +++
3514 *** If a buffer sets buffer-save-without-query to non-nil, 3564 *** If `buffer-save-without-query' is non-nil in some buffer,
3515 save-some-buffers will always save that buffer without asking 3565 `save-some-buffers' will always save that buffer without asking (if
3516 (if it's modified). 3566 it's modified).
3517 3567
3518 *** New function `locate-file' searches for a file in a list of directories. 3568 *** New function `locate-file' searches for a file in a list of directories.
3519 `locate-file' accepts a name of a file to search (a string), and two 3569 `locate-file' accepts a name of a file to search (a string), and two
3520 lists: a list of directories to search in and a list of suffixes to 3570 lists: a list of directories to search in and a list of suffixes to
3521 try; typical usage might use `exec-path' and `load-path' for the list 3571 try; typical usage might use `exec-path' and `load-path' for the list
3526 One advantage of using this function is that the list of suffixes in 3576 One advantage of using this function is that the list of suffixes in
3527 `exec-suffixes' is OS-dependant, so this function will find 3577 `exec-suffixes' is OS-dependant, so this function will find
3528 executables without polluting Lisp code with OS dependancies. 3578 executables without polluting Lisp code with OS dependancies.
3529 3579
3530 --- 3580 ---
3531 *** The precedence of file-name-handlers has been changed. 3581 *** The precedence of file name handlers has been changed.
3532 Instead of blindly choosing the first handler that matches, 3582
3533 find-file-name-handler now gives precedence to a file-name handler 3583 Instead of choosing the first handler that matches,
3534 that matches near the end of the file name. More specifically, the 3584 `find-file-name-handler' now gives precedence to a file name handler
3535 handler whose (match-beginning 0) is the largest is chosen. 3585 that matches nearest the end of the file name. More precisely, the
3536 In case of ties, the old "first matched" rule applies. 3586 handler whose (match-beginning 0) is the largest is chosen. In case
3587 of ties, the old "first matched" rule applies.
3537 3588
3538 +++ 3589 +++
3539 *** A file name handler can declare which operations it handles. 3590 *** A file name handler can declare which operations it handles.
3540 3591
3541 You do this by putting an `operation' property on the handler name 3592 You do this by putting an `operation' property on the handler name
3549 ** Input changes: 3600 ** Input changes:
3550 3601
3551 +++ 3602 +++
3552 *** An interactive specification can now use the code letter 'U' to get 3603 *** An interactive specification can now use the code letter 'U' to get
3553 the up-event that was discarded in case the last key sequence read for a 3604 the up-event that was discarded in case the last key sequence read for a
3554 previous 'k' or 'K' argument was a down-event; otherwise nil is used. 3605 previous `k' or `K' argument was a down-event; otherwise nil is used.
3555 3606
3556 +++ 3607 +++
3557 *** The new interactive-specification `G' reads a file name 3608 *** The new interactive-specification `G' reads a file name
3558 much like `F', but if the input is a directory name (even defaulted), 3609 much like `F', but if the input is a directory name (even defaulted),
3559 it returns just the directory name. 3610 it returns just the directory name.
3560 3611
3561 --- 3612 ---
3562 *** Functions y-or-n-p, read-char, read-key-sequence and the like, that 3613 *** Functions `y-or-n-p', `read-char', `read-key-sequence' and the like, that
3563 display a prompt but don't use the minibuffer, now display the prompt 3614 display a prompt but don't use the minibuffer, now display the prompt
3564 using the text properties (esp. the face) of the prompt string. 3615 using the text properties (esp. the face) of the prompt string.
3565 3616
3566 +++ 3617 +++
3567 *** (while-no-input BODY...) runs BODY, but only so long as no input 3618 *** (while-no-input BODY...) runs BODY, but only so long as no input
3568 arrives. If the user types or clicks anything, BODY stops as if a 3619 arrives. If the user types or clicks anything, BODY stops as if a
3569 quit had occurred. while-no-input returns the value of BODY, if BODY 3620 quit had occurred. `while-no-input' returns the value of BODY, if BODY
3570 finishes. It returns nil if BODY was aborted. 3621 finishes. It returns nil if BODY was aborted.
3571 3622
3572 ** Minibuffer changes: 3623 ** Minibuffer changes:
3573 3624
3625 +++
3574 *** The new function `minibufferp' returns non-nil if its optional 3626 *** The new function `minibufferp' returns non-nil if its optional
3575 buffer argument is a minibuffer. If the argument is omitted, it 3627 buffer argument is a minibuffer. If the argument is omitted, it
3576 defaults to the current buffer. 3628 defaults to the current buffer.
3577 3629
3578 +++ 3630 +++
3579 *** New function minibuffer-selected-window returns the window which 3631 *** New function `minibuffer-selected-window' returns the window which
3580 was selected when entering the minibuffer. 3632 was selected when entering the minibuffer.
3581 3633
3582 +++ 3634 +++
3583 *** read-from-minibuffer now accepts an additional argument KEEP-ALL 3635 *** `read-from-minibuffer' now accepts an additional argument KEEP-ALL
3584 saying to put all inputs in the history list, even empty ones. 3636 saying to put all inputs in the history list, even empty ones.
3585 3637
3586 +++ 3638 +++
3587 *** The `read-file-name' function now takes an additional argument which 3639 *** The `read-file-name' function now takes an additional argument which
3588 specifies a predicate which the file name read must satify. The 3640 specifies a predicate which the file name read must satify. The
3589 new variable `read-file-name-predicate' contains the predicate argument 3641 new variable `read-file-name-predicate' contains the predicate argument
3590 while reading the file name from the minibuffer; the predicate in this 3642 while reading the file name from the minibuffer; the predicate in this
3591 variable is used by read-file-name-internal to filter the completion list. 3643 variable is used by read-file-name-internal to filter the completion list.
3592 3644
3593 --- 3645 ---
3594 *** The new variable `read-file-name-function' can be used by lisp code 3646 *** The new variable `read-file-name-function' can be used by Lisp code
3595 to override the internal read-file-name function. 3647 to override the built-in `read-file-name' function.
3596 3648
3597 +++ 3649 +++
3598 *** The new variable `read-file-name-completion-ignore-case' specifies 3650 *** The new variable `read-file-name-completion-ignore-case' specifies
3599 whether completion ignores case when reading a file name with the 3651 whether completion ignores case when reading a file name with the
3600 `read-file-name' function. 3652 `read-file-name' function.
3601 3653
3602 +++ 3654 +++
3603 *** The new function `read-directory-name' can be used instead of 3655 *** The new function `read-directory-name' for reading a directory name.
3604 `read-file-name' to read a directory name; when used, completion 3656
3605 will only show directories. 3657 It is like `read-file-name' except that the defaulting works better
3606 3658 for directories, and completion inside it shows only directories.
3607 ** Searching and matching changes: 3659
3608 3660 ** Completion changes:
3609 +++ 3661
3610 *** New function `looking-back' checks whether a regular expression matches 3662 +++
3611 the text before point. Specifying the LIMIT argument bounds how far 3663 *** The functions `all-completions' and `try-completion' now accept lists
3612 back the match can start; this is a way to keep it from taking too long. 3664 of strings as well as hash-tables additionally to alists, obarrays
3613 3665 and functions. Furthermore, the function `test-completion' is now
3614 +++ 3666 exported to Lisp. The keys in alists and hash tables can be either
3615 *** The new variable search-spaces-regexp controls how to search 3667 strings or symbols, which are automatically converted with to strings.
3616 for spaces in a regular expression. If it is non-nil, it should be a 3668
3617 regular expression, and any series of spaces stands for that regular 3669 +++
3618 expression. If it is nil, spaces stand for themselves. 3670 *** The new macro `dynamic-completion-table' supports using functions
3619 3671 as a dynamic completion table.
3620 Spaces inside of constructs such as [..] and *, +, ? are never 3672
3621 replaced with search-spaces-regexp. 3673 (dynamic-completion-table FUN)
3622 3674
3623 +++ 3675 FUN is called with one argument, the string for which completion is required,
3624 *** There are now two new regular expression operators, \_< and \_>, 3676 and it should return an alist containing all the intended possible
3625 for matching the beginning and end of a symbol. A symbol is a 3677 completions. This alist can be a full list of possible completions so that FUN
3626 non-empty sequence of either word or symbol constituent characters, as 3678 can ignore the value of its argument. If completion is performed in the
3627 specified by the syntax table. 3679 minibuffer, FUN will be called in the buffer from which the minibuffer was
3628 3680 entered. `dynamic-completion-table' then computes the completion.
3629 +++ 3681
3630 *** skip-chars-forward and skip-chars-backward now handle 3682 +++
3631 character classes such as [:alpha:], along with individual characters 3683 *** The new macro `lazy-completion-table' initializes a variable
3632 and ranges. 3684 as a lazy completion table.
3633 3685
3634 --- 3686 (lazy-completion-table VAR FUN &rest ARGS)
3635 *** In `replace-match', the replacement text no longer inherits 3687
3636 properties from surrounding text. 3688 If the completion table VAR is used for the first time (e.g., by passing VAR
3637 3689 as an argument to `try-completion'), the function FUN is called with arguments
3638 +++ 3690 ARGS. FUN must return the completion table that will be stored in VAR. If
3639 *** The list returned by `(match-data t)' now has the buffer as a final 3691 completion is requested in the minibuffer, FUN will be called in the buffer
3640 element, if the last match was on a buffer. `set-match-data' 3692 from which the minibuffer was entered. The return value of
3641 accepts such a list for restoring the match state. 3693 `lazy-completion-table' must be used to initialize the value of VAR.
3642
3643 ---
3644 *** rx.el has new corresponding `symbol-end' and `symbol-start' elements.
3645
3646 +++
3647 *** The default value of `sentence-end' is now defined using the new
3648 variable `sentence-end-without-space', which contains such characters
3649 that end a sentence without following spaces.
3650
3651 The function `sentence-end' should be used to obtain the value of the
3652 variable `sentence-end'. If the variable `sentence-end' is nil, then
3653 this function returns the regexp constructed from the variables
3654 `sentence-end-without-period', `sentence-end-double-space' and
3655 `sentence-end-without-space'.
3656 3694
3657 +++ 3695 +++
3658 ** Enhancements to keymaps. 3696 ** Enhancements to keymaps.
3659 3697
3660 *** Cleaner way to enter key sequences. 3698 *** Cleaner way to enter key sequences.
3665 3703
3666 (kbd "C-x C-f") => "\^x\^f" 3704 (kbd "C-x C-f") => "\^x\^f"
3667 3705
3668 *** Interactive commands can be remapped through keymaps. 3706 *** Interactive commands can be remapped through keymaps.
3669 3707
3670 This is an alternative to using defadvice or substitute-key-definition 3708 This is an alternative to using `defadvice' or `substitute-key-definition'
3671 to modify the behavior of a key binding using the normal keymap 3709 to modify the behavior of a key binding using the normal keymap
3672 binding and lookup functionality. 3710 binding and lookup functionality.
3673 3711
3674 When a key sequence is bound to a command, and that command is 3712 When a key sequence is bound to a command, and that command is
3675 remapped to another command, that command is run instead of the 3713 remapped to another command, that command is run instead of the
3676 original command. 3714 original command.
3677 3715
3678 Example: 3716 Example:
3679 Suppose that minor mode my-mode has defined the commands 3717 Suppose that minor mode `my-mode' has defined the commands
3680 my-kill-line and my-kill-word, and it wants C-k (and any other key 3718 `my-kill-line' and `my-kill-word', and it wants C-k (and any other key
3681 bound to kill-line) to run the command my-kill-line instead of 3719 bound to `kill-line') to run the command `my-kill-line' instead of
3682 kill-line, and likewise it wants to run my-kill-word instead of 3720 `kill-line', and likewise it wants to run `my-kill-word' instead of
3683 kill-word. 3721 `kill-word'.
3684 3722
3685 Instead of rebinding C-k and the other keys in the minor mode map, 3723 Instead of rebinding C-k and the other keys in the minor mode map,
3686 command remapping allows you to directly map kill-line into 3724 command remapping allows you to directly map `kill-line' into
3687 my-kill-line and kill-word into my-kill-word through the minor mode 3725 `my-kill-line' and `kill-word' into `my-kill-word' using `define-key':
3688 map using define-key:
3689 3726
3690 (define-key my-mode-map [remap kill-line] 'my-kill-line) 3727 (define-key my-mode-map [remap kill-line] 'my-kill-line)
3691 (define-key my-mode-map [remap kill-word] 'my-kill-word) 3728 (define-key my-mode-map [remap kill-word] 'my-kill-word)
3692 3729
3693 Now, when my-mode is enabled, and the user enters C-k or M-d, 3730 When `my-mode' is enabled, its minor mode keymap is enabled too. So
3694 the commands my-kill-line and my-kill-word are run. 3731 when the user types C-k, that runs the command `my-kill-line'.
3695 3732
3696 Notice that only one level of remapping is supported. In the above 3733 Only one level of remapping is supported. In the above example, this
3697 example, this means that if my-kill-line is remapped to other-kill, 3734 means that if `my-kill-line' is remapped to `other-kill', then C-k still
3698 then C-k still runs my-kill-line. 3735 runs `my-kill-line'.
3699 3736
3700 The following changes have been made to provide command remapping: 3737 The following changes have been made to provide command remapping:
3701 3738
3702 - Command remappings are defined using `define-key' with a prefix-key 3739 - Command remappings are defined using `define-key' with a prefix-key
3703 `remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD 3740 `remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD
3705 another command; it can be anything accepted for a normal binding. 3742 another command; it can be anything accepted for a normal binding.
3706 3743
3707 - The new function `command-remapping' returns the binding for a 3744 - The new function `command-remapping' returns the binding for a
3708 remapped command in the current keymaps, or nil if not remapped. 3745 remapped command in the current keymaps, or nil if not remapped.
3709 3746
3710 - key-binding now remaps interactive commands unless the optional 3747 - `key-binding' now remaps interactive commands unless the optional
3711 third argument NO-REMAP is non-nil. 3748 third argument NO-REMAP is non-nil.
3712 3749
3713 - where-is-internal now returns nil for a remapped command (e.g. 3750 - `where-is-internal' now returns nil for a remapped command (e.g.
3714 kill-line if my-mode is enabled), and the actual key binding for 3751 `kill-line', when `my-mode' is enabled), and the actual key binding for
3715 the command it is remapped to (e.g. C-k for my-kill-line). 3752 the command it is remapped to (e.g. C-k for my-kill-line).
3716 It also has a new optional fifth argument, NO-REMAP, which inhibits 3753 It also has a new optional fifth argument, NO-REMAP, which inhibits
3717 remapping if non-nil (e.g. it returns C-k for kill-line and 3754 remapping if non-nil (e.g. it returns "C-k" for `kill-line', and
3718 <kill-line> for my-kill-line). 3755 "<kill-line>" for `my-kill-line').
3719 3756
3720 - The new variable `this-original-command' contains the original 3757 - The new variable `this-original-command' contains the original
3721 command before remapping. It is equal to `this-command' when the 3758 command before remapping. It is equal to `this-command' when the
3722 command was not remapped. 3759 command was not remapped.
3723 3760
3724 *** If text has a `keymap' property, that keymap takes precedence 3761 *** If text has a `keymap' property, that keymap takes precedence
3725 over minor mode keymaps. 3762 over minor mode keymaps.
3726 3763
3727 *** The `keymap' property now also works at the ends of overlays and 3764 *** The `keymap' property now also works at the ends of overlays and
3728 text-properties, according to their stickiness. This also means that it 3765 text properties, according to their stickiness. This also means that it
3729 works with empty overlays. The same hold for the `local-map' property. 3766 works with empty overlays. The same hold for the `local-map' property.
3730 3767
3731 *** Dense keymaps now handle inheritance correctly. 3768 *** Dense keymaps now handle inheritance correctly.
3769
3732 Previously a dense keymap would hide all of the simple-char key 3770 Previously a dense keymap would hide all of the simple-char key
3733 bindings of the parent keymap. 3771 bindings of the parent keymap.
3734 3772
3735 *** `define-key-after' now accepts keys longer than 1. 3773 *** `define-key-after' now accepts keys longer than 1.
3736 3774
3738 active keymaps. 3776 active keymaps.
3739 3777
3740 *** New function `describe-buffer-bindings' inserts the list of all 3778 *** New function `describe-buffer-bindings' inserts the list of all
3741 defined keys and their definitions. 3779 defined keys and their definitions.
3742 3780
3743 *** New function `keymap-prompt' returns the prompt-string of a keymap 3781 *** New function `keymap-prompt' returns the prompt string of a keymap.
3744 3782
3745 *** (map-keymap FUNCTION KEYMAP) applies the function to each binding 3783 *** (map-keymap FUNCTION KEYMAP) applies the function to each binding
3746 in the keymap. 3784 in the keymap.
3747 3785
3748 *** New variable emulation-mode-map-alists. 3786 *** New variable `emulation-mode-map-alists'.
3749 3787
3750 Lisp packages using many minor mode keymaps can now maintain their own 3788 Lisp packages using many minor mode keymaps can now maintain their own
3751 keymap alist separate from minor-mode-map-alist by adding their keymap 3789 keymap alist separate from `minor-mode-map-alist' by adding their
3752 alist to this list. 3790 keymap alist to this list.
3753 3791
3754 +++ 3792 ** Abbrev changes:
3755 ** Atomic change groups. 3793
3756 3794 +++
3757 To perform some changes in the current buffer "atomically" so that 3795 *** The new function `copy-abbrev-table' copies an abbrev table.
3758 they either all succeed or are all undone, use `atomic-change-group' 3796
3759 around the code that makes changes. For instance: 3797 It returns a new abbrev table that is a copy of a given abbrev table.
3760 3798
3761 (atomic-change-group 3799 +++
3762 (insert foo) 3800 *** `define-abbrev' now accepts an optional argument SYSTEM-FLAG.
3763 (delete-region x y)) 3801
3764 3802 If non-nil, this marks the abbrev as a "system" abbrev, which means
3765 If an error (or other nonlocal exit) occurs inside the body of 3803 that it won't be stored in the user's abbrevs file if he saves the
3766 `atomic-change-group', it unmakes all the changes in that buffer that 3804 abbrevs. Major modes that predefine some abbrevs should always
3767 were during the execution of the body. The change group has no effect 3805 specify this flag.
3768 on any other buffers--any such changes remain.
3769
3770 If you need something more sophisticated, you can directly call the
3771 lower-level functions that `atomic-change-group' uses. Here is how.
3772
3773 To set up a change group for one buffer, call `prepare-change-group'.
3774 Specify the buffer as argument; it defaults to the current buffer.
3775 This function returns a "handle" for the change group. You must save
3776 the handle to activate the change group and then finish it.
3777
3778 Before you change the buffer again, you must activate the change
3779 group. Pass the handle to `activate-change-group' afterward to
3780 do this.
3781
3782 After you make the changes, you must finish the change group. You can
3783 either accept the changes or cancel them all. Call
3784 `accept-change-group' to accept the changes in the group as final;
3785 call `cancel-change-group' to undo them all.
3786
3787 You should use `unwind-protect' to make sure the group is always
3788 finished. The call to `activate-change-group' should be inside the
3789 `unwind-protect', in case the user types C-g just after it runs.
3790 (This is one reason why `prepare-change-group' and
3791 `activate-change-group' are separate functions.) Once you finish the
3792 group, don't use the handle again--don't try to finish the same group
3793 twice.
3794
3795 To make a multibuffer change group, call `prepare-change-group' once
3796 for each buffer you want to cover, then use `nconc' to combine the
3797 returned values, like this:
3798
3799 (nconc (prepare-change-group buffer-1)
3800 (prepare-change-group buffer-2))
3801
3802 You can then activate the multibuffer change group with a single call
3803 to `activate-change-group', and finish it with a single call to
3804 `accept-change-group' or `cancel-change-group'.
3805
3806 Nested use of several change groups for the same buffer works as you
3807 would expect. Non-nested use of change groups for the same buffer
3808 will lead to undesirable results, so don't let it happen; the first
3809 change group you start for any given buffer should be the last one
3810 finished.
3811 3806
3812 +++ 3807 +++
3813 ** Enhancements to process support 3808 ** Enhancements to process support
3814 3809
3815 *** Function list-processes now has an optional argument; if non-nil, 3810 *** Function `list-processes' now has an optional argument; if non-nil,
3816 only the processes whose query-on-exit flag is set are listed. 3811 it lists only the processes whose query-on-exit flag is set.
3817 3812
3818 *** New set-process-query-on-exit-flag and process-query-on-exit-flag 3813 *** New fns `set-process-query-on-exit-flag' and `process-query-on-exit-flag'.
3819 functions. The existing process-kill-without-query function is still 3814
3820 supported, but new code should use the new functions. 3815 These replace the old function `process-kill-without-query'. That
3821 3816 function is still supported, but new code should use the new
3822 *** Function signal-process now accepts a process object or process 3817 functions.
3818
3819 *** Function `signal-process' now accepts a process object or process
3823 name in addition to a process id to identify the signalled process. 3820 name in addition to a process id to identify the signalled process.
3824 3821
3825 *** Processes now have an associated property list where programs can 3822 *** Processes now have an associated property list where programs can
3826 maintain process state and other per-process related information. 3823 maintain process state and other per-process related information.
3827 3824
3828 The new functions process-get and process-put are used to access, add, 3825 Use the new functions `process-get' and `process-put' to access, add,
3829 and modify elements on this property list. 3826 and modify elements on this property list. Use the new functions
3830 3827 `process-plist' and `set-process-plist' to access and replace the
3831 The new low-level functions process-plist and set-process-plist are 3828 entire property list of a process.
3832 used to access and replace the entire property list of a process. 3829
3833 3830 *** Function `accept-process-output' has a new optional fourth arg
3834 *** Function accept-process-output now has an optional fourth arg 3831 JUST-THIS-ONE. If non-nil, only output from the specified process
3835 `just-this-one'. If non-nil, only output from the specified process
3836 is handled, suspending output from other processes. If value is an 3832 is handled, suspending output from other processes. If value is an
3837 integer, also inhibit running timers. This feature is generally not 3833 integer, also inhibit running timers. This feature is generally not
3838 recommended, but may be necessary for specific applications, such as 3834 recommended, but may be necessary for specific applications, such as
3839 speech synthesis. 3835 speech synthesis.
3840 3836
3841 *** Adaptive read buffering of subprocess output. 3837 *** Adaptive read buffering of subprocess output.
3842 3838
3843 On some systems, when emacs reads the output from a subprocess, the 3839 On some systems, when emacs reads the output from a subprocess, the
3844 output data is read in very small blocks, potentially resulting in 3840 output data is read in very small blocks, potentially resulting in
3845 very poor performance. This behavior can be remedied to some extent 3841 very poor performance. This behavior can be remedied to some extent
3846 by setting the new variable process-adaptive-read-buffering to a 3842 by setting the new variable `process-adaptive-read-buffering' to a
3847 non-nil value (the default), as it will automatically delay reading 3843 non-nil value (the default), as it will automatically delay reading
3848 from such processes, to allowing them to produce more output before 3844 from such processes, to allowing them to produce more output before
3849 emacs tries to read it. 3845 emacs tries to read it.
3850 3846
3851 *** The new function `call-process-shell-command'. 3847 *** The new function `call-process-shell-command'.
3855 3851
3856 *** The new function `process-file' is similar to `call-process', but 3852 *** The new function `process-file' is similar to `call-process', but
3857 obeys file handlers. The file handler is chosen based on 3853 obeys file handlers. The file handler is chosen based on
3858 `default-directory'. 3854 `default-directory'.
3859 3855
3860 *** A filter function of a process is called with a multibyte string 3856 *** A process filter function gets the output as multibyte string
3861 if the filter's multibyteness is t. That multibyteness is decided by 3857 if the process specifies t for its filter's multibyteness.
3862 the value of `default-enable-multibyte-characters' when the process is 3858
3863 created and can be changed later by `set-process-filter-multibyte'. 3859 That multibyteness is decided by the value of
3860 `default-enable-multibyte-characters' when the process is created, and
3861 you can change it later with `set-process-filter-multibyte'.
3864 3862
3865 *** The new function `set-process-filter-multibyte' sets the 3863 *** The new function `set-process-filter-multibyte' sets the
3866 multibyteness of the strings passed to the process's filter. 3864 multibyteness of the strings passed to the process's filter.
3867 3865
3868 *** The new function `process-filter-multibyte-p' returns the 3866 *** The new function `process-filter-multibyte-p' returns the
3875 which was not compatible with the behavior of file reading. 3873 which was not compatible with the behavior of file reading.
3876 3874
3877 +++ 3875 +++
3878 ** Enhanced networking support. 3876 ** Enhanced networking support.
3879 3877
3880 *** There is a new `make-network-process' function which supports 3878 *** The new `make-network-process' function makes network connections.
3881 opening of stream and datagram connections to a server, as well as 3879 It allows opening of stream and datagram connections to a server, as well as
3882 create a stream or datagram server inside emacs. 3880 create a stream or datagram server inside emacs.
3883 3881
3884 - A server is started using :server t arg. 3882 - A server is started using :server t arg.
3885 - Datagram connection is selected using :type 'datagram arg. 3883 - Datagram connection is selected using :type 'datagram arg.
3886 - A server can open on a random port using :service t arg. 3884 - A server can open on a random port using :service t arg.
4558 4556
4559 +++ 4557 +++
4560 *** `emacsserver' now runs `pre-command-hook' and `post-command-hook' 4558 *** `emacsserver' now runs `pre-command-hook' and `post-command-hook'
4561 when it receives a request from emacsclient. 4559 when it receives a request from emacsclient.
4562 4560
4563 ** Minibuffer changes:
4564
4565 +++
4566 *** The functions all-completions and try-completion now accept lists
4567 of strings as well as hash-tables additionally to alists, obarrays
4568 and functions. Furthermore, the function `test-completion' is now
4569 exported to Lisp. The keys in alists and hash tables can be either
4570 strings or symbols, which are automatically converted with to strings.
4571
4572 +++
4573 *** The new macro `dynamic-completion-table' supports using functions
4574 as a dynamic completion table.
4575
4576 (dynamic-completion-table FUN)
4577
4578 FUN is called with one argument, the string for which completion is required,
4579 and it should return an alist containing all the intended possible
4580 completions. This alist can be a full list of possible completions so that FUN
4581 can ignore the value of its argument. If completion is performed in the
4582 minibuffer, FUN will be called in the buffer from which the minibuffer was
4583 entered. `dynamic-completion-table' then computes the completion.
4584
4585 +++
4586 *** The new macro `lazy-completion-table' initializes a variable
4587 as a lazy completion table.
4588
4589 (lazy-completion-table VAR FUN &rest ARGS)
4590
4591 If the completion table VAR is used for the first time (e.g., by passing VAR
4592 as an argument to `try-completion'), the function FUN is called with arguments
4593 ARGS. FUN must return the completion table that will be stored in VAR. If
4594 completion is requested in the minibuffer, FUN will be called in the buffer
4595 from which the minibuffer was entered. The return value of
4596 `lazy-completion-table' must be used to initialize the value of VAR.
4597
4598 ** Lisp file loading changes: 4561 ** Lisp file loading changes:
4599 4562
4600 +++ 4563 +++
4601 *** `load-history' can now have elements of the form (t . FUNNAME), 4564 *** `load-history' can now have elements of the form (t . FUNNAME),
4602 which means FUNNAME was previously defined as an autoload (before the 4565 which means FUNNAME was previously defined as an autoload (before the
4815 Use the LOCAL arg of `add-hook'. 4778 Use the LOCAL arg of `add-hook'.
4816 4779
4817 --- 4780 ---
4818 *** New function `x-send-client-message' sends a client message when 4781 *** New function `x-send-client-message' sends a client message when
4819 running under X. 4782 running under X.
4783
4784 ** GC changes:
4785
4786 +++
4787 *** New variables `gc-elapsed' and `gcs-done' provide extra information
4788 on garbage collection.
4789
4790 +++
4791 *** The normal hook `post-gc-hook' is run at the end of garbage collection.
4792
4793 The hook is run with GC inhibited, so use it with care.
4794
4795 * New Packages for Lisp Programming in Emacs 22.1
4796
4797 +++
4798 ** The new library benchmark.el contains simple support for convenient
4799 timing measurements of code (including the garbage collection component).
4800
4801 ---
4802 ** The new library tree-widget.el provides a widget to display a set
4803 of hierarchical data as an outline. For example, the tree-widget is
4804 well suited to display a hierarchy of directories and files.
4805
4806 ** The new library bindat.el provides functions to unpack and pack
4807 binary data structures, such as network packets, to and from Lisp
4808 data structures.
4809
4810 +++
4811 ** The new library button.el implements simple and fast `clickable
4812 buttons' in emacs buffers. Buttons are much lighter-weight than the
4813 `widgets' implemented by widget.el, and can be used by lisp code that
4814 doesn't require the full power of widgets. Emacs uses buttons for
4815 such things as help and apropos buffers.
4816
4817 ---
4818 ** master-mode.el implements a minor mode for scrolling a slave
4819 buffer without leaving your current buffer, the master buffer.
4820
4821 It can be used by sql.el, for example: the SQL buffer is the master
4822 and its SQLi buffer is the slave. This allows you to scroll the SQLi
4823 buffer containing the output from the SQL buffer containing the
4824 commands.
4825
4826 This is how to use sql.el and master.el together: the variable
4827 sql-buffer contains the slave buffer. It is a local variable in the
4828 SQL buffer.
4829
4830 (add-hook 'sql-mode-hook
4831 (function (lambda ()
4832 (master-mode t)
4833 (master-set-slave sql-buffer))))
4834 (add-hook 'sql-set-sqli-hook
4835 (function (lambda ()
4836 (master-set-slave sql-buffer))))
4837
4838 +++
4839 ** The new library testcover.el does test coverage checking.
4840
4841 This is so you can tell whether you've tested all paths in your Lisp
4842 code. It works with edebug.
4843
4844 The function `testcover-start' instruments all functions in a given
4845 file. Then test your code. The function `testcover-mark-all' adds
4846 overlay "splotches" to the Lisp file's buffer to show where coverage
4847 is lacking. The command `testcover-next-mark' (bind it to a key!)
4848 will move point forward to the next spot that has a splotch.
4849
4850 Normally, a red splotch indicates the form was never completely
4851 evaluated; a brown splotch means it always evaluated to the same
4852 value. The red splotches are skipped for forms that can't possibly
4853 complete their evaluation, such as `error'. The brown splotches are
4854 skipped for forms that are expected to always evaluate to the same
4855 value, such as (setq x 14).
4856
4857 For difficult cases, you can add do-nothing macros to your code to
4858 help out the test coverage tool. The macro `noreturn' suppresses a
4859 red splotch. It is an error if the argument to `noreturn' does
4860 return. The macro `1value' suppresses a brown splotch for its argument.
4861 This macro is a no-op except during test-coverage -- then it signals
4862 an error if the argument actually returns differing values.
4820 4863
4821 * Installation changes in Emacs 21.3 4864 * Installation changes in Emacs 21.3
4822 4865
4823 ** Support for GNU/Linux on little-endian MIPS and on IBM S390 has 4866 ** Support for GNU/Linux on little-endian MIPS and on IBM S390 has
4824 been added. 4867 been added.