diff options
| author | Richard M. Stallman | 2005-05-14 13:15:35 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-05-14 13:15:35 +0000 |
| commit | 9bae34bfb0c48dff225673f46ef35b91953ef6d5 (patch) | |
| tree | 566df908ed19f42d72633bf3a6b6d47c5d05a9dd | |
| parent | 39c7eb8a6c37fa587b1ad72b79298109647246ef (diff) | |
| download | emacs-9bae34bfb0c48dff225673f46ef35b91953ef6d5.tar.gz emacs-9bae34bfb0c48dff225673f46ef35b91953ef6d5.zip | |
Rearrangements and cleanups. Don't mention defaulting of :group.
| -rw-r--r-- | etc/NEWS | 927 |
1 files changed, 485 insertions, 442 deletions
| @@ -952,9 +952,11 @@ variable mouse-drag-copy-region to nil. | |||
| 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 | +++ |
| @@ -1424,10 +1426,6 @@ colors as on X. | |||
| 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. |
| @@ -1445,16 +1443,20 @@ 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. |
| 1448 | |||
| 1449 | --- | ||
| 1450 | ** Ido mode is now part of the Emacs distribution. | ||
| 1451 | |||
| 1452 | The ido (interactively do) package is an extension of the iswitchb | ||
| 1453 | package to do interactive opening of files and directories in addition | ||
| 1454 | to interactive buffer switching. Ido is a superset of iswitchb (with | ||
| 1455 | a few exceptions), so don't enable both packages. | ||
| 1450 | 1456 | ||
| 1451 | +++ | 1457 | +++ |
| 1452 | ** The new package conf-mode.el handles thousands of configuration files, with | 1458 | ** Image files are normally visited in Image mode, which lets you toggle |
| 1453 | varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value, | 1459 | between viewing the image and viewing the text using C-c C-c. |
| 1454 | var : value, var value or keyword var value) and sections ([section] or | ||
| 1455 | section { }). Many files under /etc/, or with suffixes like .cf through | ||
| 1456 | .config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are | ||
| 1457 | recognized. | ||
| 1458 | 1460 | ||
| 1459 | --- | 1461 | --- |
| 1460 | ** CUA mode is now part of the Emacs distribution. | 1462 | ** CUA mode is now part of the Emacs distribution. |
| @@ -1518,28 +1520,6 @@ be displayed by customizing the variable `file-name-shadow-properties'. | |||
| 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 | 1522 | ||
| 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 | |||
| 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 |
| @@ -1599,6 +1579,15 @@ 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' |
| @@ -1619,9 +1608,6 @@ 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. |
| @@ -1679,79 +1665,29 @@ If you want to disable Tramp you should set | |||
| 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'. | ||
| 1693 | 1673 | ||
| 1694 | +++ | 1674 | +++ |
| 1695 | ** The wdired.el package allows you to use normal editing commands on Dired | 1675 | ** The new package conf-mode.el handles thousands of configuration files, with |
| 1696 | buffers to change filenames, permissions, etc... | 1676 | varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value, |
| 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. | ||
| 1697 | 1681 | ||
| 1698 | --- | 1682 | --- |
| 1699 | ** The TCL package tcl-mode.el was replaced by tcl.el. | 1683 | ** GDB-Script-mode is used for files like .gdbinit. |
| 1700 | 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 | 1684 | ||
| 1706 | +++ | 1685 | +++ |
| 1707 | ** The new package button.el implements simple and fast `clickable buttons' | 1686 | ** The new python.el package is used to edit Python and Jython programs. |
| 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 | 1687 | ||
| 1713 | --- | 1688 | --- |
| 1714 | ** master-mode.el implements a minor mode for scrolling a slave | 1689 | ** The TCL package tcl-mode.el was replaced by tcl.el. |
| 1715 | buffer without leaving your current buffer, the master buffer. | 1690 | This was actually done in Emacs-21.1, and was not documented. |
| 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 | ||
| @@ -3022,57 +2958,67 @@ the command `undefined'. (In earlier Emacs versions, it used | |||
| 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 | ||
| 3027 | beginning. This change actually occurred in Emacs-21.1, but was not | ||
| 3028 | documented. | ||
| 3029 | 2962 | ||
| 3030 | +++ | 2963 | If APPEND is non-nil, the new element gets added at the end of the |
| 3031 | *** New function `copy-tree' makes a copy of a tree, recursively copying | 2964 | list instead of at the beginning. This change actually occurred in |
| 3032 | both cars and cdrs. | 2965 | Emacs 21.1, but was not documented then. |
| 3033 | 2966 | ||
| 3034 | +++ | 2967 | +++ |
| 3035 | *** New function `delete-dups' destructively removes `equal' | 2968 | *** New function `copy-tree' makes a copy of a tree. |
| 3036 | duplicates from a list. Of several `equal' occurrences of an element | 2969 | |
| 3037 | in the list, the first one is kept. | 2970 | It recursively copyies through both CARs and CDRs. |
| 3038 | 2971 | ||
| 3039 | +++ | 2972 | +++ |
| 3040 | *** `declare' is now a macro. This change was made mostly for | 2973 | *** New function `delete-dups' deletes `equal' duplicate elements from a list. |
| 3041 | documentation purposes and should have no real effect on Lisp code. | 2974 | |
| 2975 | It modifies the list destructively, like `delete'. Of several `equal' | ||
| 2976 | occurrences of an element in the list, the one that's kept is the | ||
| 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 | |
| 2982 | (rassq-delete-all VALUE ALIST) deletes, from ALIST, each element whose | ||
| 2983 | CDR is `eq' to the specified value. | ||
| 3046 | 2984 | ||
| 3047 | +++ | 2985 | +++ |
| 3048 | *** The function `number-sequence' returns a list of equally-separated | 2986 | *** The function `number-sequence' makes a list of equally-separated numbers. |
| 3049 | numbers. For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). | 2987 | |
| 3050 | By default, the separation is 1, but you can specify a different separation | 2988 | For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). By |
| 3051 | as the third argument. (number-sequence 1.5 6 2) returns (1.5 3.5 5.5). | 2989 | default, the separation is 1, but you can specify a different |
| 2990 | separation as the third argument. (number-sequence 1.5 6 2) returns | ||
| 2991 | (1.5 3.5 5.5). | ||
| 3052 | 2992 | ||
| 3053 | +++ | 2993 | +++ |
| 3054 | *** The variables `most-positive-fixnum' and `most-negative-fixnum' | 2994 | *** New variables `most-positive-fixnum' and `most-negative-fixnum'. |
| 3055 | hold the largest and smallest possible integer values. | 2995 | |
| 2996 | They hold the largest and smallest possible integer values. | ||
| 3056 | 2997 | ||
| 3057 | +++ | 2998 | +++ |
| 3058 | *** The flags, width, and precision options for %-specifications in function | 2999 | *** Minor change in the function `format'. |
| 3059 | `format' are now documented. Some flags that were accepted but not | 3000 | |
| 3060 | implemented (such as "*") are no longer accepted. | 3001 | Some flags that were accepted but not implemented (such as "*") are no |
| 3002 | longer accepted. | ||
| 3061 | 3003 | ||
| 3062 | +++ | 3004 | +++ |
| 3063 | *** Functions `get' and `plist-get' no longer signals an error for | 3005 | *** Functions `get' and `plist-get' no longer give errors for bad plists. |
| 3064 | a malformed property list. They also detect cyclic lists. | 3006 | |
| 3007 | They return nil for a malformed property list or if the list is | ||
| 3008 | cyclic. | ||
| 3065 | 3009 | ||
| 3066 | +++ | 3010 | +++ |
| 3067 | *** The new functions `lax-plist-get' and `lax-plist-put' are like | 3011 | *** New functions `lax-plist-get' and `lax-plist-put'. |
| 3068 | `plist-get' and `plist-put', except that they compare the property | 3012 | |
| 3069 | name using `equal' rather than `eq'. | 3013 | They are like `plist-get' and `plist-put', except that they compare |
| 3014 | the property name using `equal' rather than `eq'. | ||
| 3070 | 3015 | ||
| 3071 | +++ | 3016 | +++ |
| 3072 | *** The new variable `print-continuous-numbering', when non-nil, says | 3017 | *** New variable `print-continuous-numbering'. |
| 3073 | that successive calls to print functions should use the same | 3018 | |
| 3074 | numberings for circular structure references. This is only relevant | 3019 | When this is non-nil, successive calls to print functions use a single |
| 3075 | when `print-circle' is non-nil. | 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. |
| @@ -3092,44 +3038,55 @@ 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 |
| 3045 | specify this explicitly, Emacs determines it from the actual argument | ||
| 3046 | names. Usually that default is right, but not always. | ||
| 3099 | 3047 | ||
| 3100 | +++ | 3048 | +++ |
| 3101 | *** New macro `with-local-quit' temporarily sets `inhibit-quit' to nil. | 3049 | *** New macro `with-local-quit' temporarily allows quitting. |
| 3102 | 3050 | ||
| 3103 | This is for use around potentially blocking or long-running code in | 3051 | A quit inside the body of `with-local-quit' is caught by the |
| 3104 | timers and `post-command-hook' functions. | 3052 | `with-local-quit' form itself, but another quit will happen later once |
| 3053 | the code that has inhibitted quitting exits. | ||
| 3105 | 3054 | ||
| 3106 | *** `define-obsolete-function-alias' | 3055 | This is for use around potentially blocking or long-running code |
| 3107 | combines `defalias' and `make-obsolete'. | 3056 | inside timer functions and `post-command-hook' functions. |
| 3108 | 3057 | ||
| 3109 | +++ | 3058 | +++ |
| 3110 | *** New function `unsafep' returns nil if the given Lisp form can't | 3059 | *** New macro `define-obsolete-function-alias'. |
| 3111 | possibly do anything dangerous; otherwise it returns a reason why the | 3060 | |
| 3112 | form might be unsafe (calls unknown function, alters global variable, | 3061 | This combines `defalias' and `make-obsolete'. |
| 3113 | etc). | 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. |
| @@ -3147,7 +3104,7 @@ forms. | |||
| 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 |
| @@ -3157,7 +3114,7 @@ changes the value of BASE-VAR. | |||
| 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 |
| @@ -3173,24 +3130,22 @@ variables, including buffer-local and frame-local variables. | |||
| 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 |
| 3142 | modifier. In strings, \s is always interpreted as a space. | ||
| 3143 | |||
| 3144 | +++ | ||
| 3145 | *** A hex escape in a string constant forces the string to be multibyte. | ||
| 3190 | 3146 | ||
| 3191 | +++ | 3147 | +++ |
| 3192 | *** A hex escape in a string forces the string to be multibyte. | 3148 | *** An octal escape in a string constant forces the string to be unibyte. |
| 3193 | An octal escape makes it 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 |
| @@ -3204,7 +3159,7 @@ empty matches are omitted from the returned list. | |||
| 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 | +++ |
| @@ -3212,18 +3167,13 @@ text properties. | |||
| 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: | ||
| 3216 | |||
| 3217 | +++ | 3170 | +++ |
| 3218 | *** The new function `buffer-local-value' returns the buffer-local | 3171 | ** Displaying warnings to the user. |
| 3219 | 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 | ||
| 3221 | value of VARIABLE instead. | ||
| 3222 | |||
| 3223 | +++ | ||
| 3224 | ** There is a new facility for displaying warnings to the user. | ||
| 3225 | 3172 | ||
| 3226 | See the functions `warn' and `display-warning' . | 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. | ||
| 3227 | 3177 | ||
| 3228 | +++ | 3178 | +++ |
| 3229 | ** Progress reporters. | 3179 | ** Progress reporters. |
| @@ -3245,28 +3195,36 @@ the usable window height and width is used. | |||
| 3245 | +++ | 3195 | +++ |
| 3246 | *** The `line-move', `scroll-up', and `scroll-down' functions will now | 3196 | *** The `line-move', `scroll-up', and `scroll-down' functions will now |
| 3247 | modify the window vscroll to scroll through display rows that are | 3197 | 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 | 3198 | taller that the height of the window, for example in the presence of |
| 3249 | large images. To disable this feature, Lisp code can bind the new | 3199 | large images. To disable this feature, bind the new variable |
| 3250 | variable `auto-window-vscroll' to nil. | 3200 | `auto-window-vscroll' to nil. |
| 3251 | 3201 | ||
| 3252 | +++ | 3202 | +++ |
| 3253 | *** The argument to `forward-word', `backward-word', | 3203 | *** The argument to `forward-word', `backward-word' is optional. |
| 3254 | `forward-to-indentation' and `backward-to-indentation' is now | 3204 | |
| 3255 | optional, and defaults to 1. | 3205 | It defaults to 1. |
| 3256 | 3206 | ||
| 3257 | +++ | 3207 | +++ |
| 3258 | *** Lisp code can now test if a given buffer position is inside a | 3208 | *** Argument to `forward-to-indentation' and `backward-to-indentation' is optional. |
| 3259 | clickable link with the new function `mouse-on-link-p'. This is the | 3209 | |
| 3260 | function used by the new `mouse-1-click-follows-link' functionality. | 3210 | It defaults to 1. |
| 3261 | 3211 | ||
| 3262 | +++ | 3212 | +++ |
| 3263 | *** New function `line-number-at-pos' returns the line number of the | 3213 | *** New function `mouse-on-link-p' test if a position is in a clickable link. |
| 3264 | current line in the current buffer, or if optional buffer position is | 3214 | |
| 3265 | given, line number of corresponding line in current buffer. | 3215 | This is the function used by the new `mouse-1-click-follows-link' |
| 3216 | functionality. | ||
| 3266 | 3217 | ||
| 3267 | +++ | 3218 | +++ |
| 3268 | *** `field-beginning' and `field-end' now accept an additional optional | 3219 | *** New function `line-number-at-pos' returns the line number of a position. |
| 3269 | argument, LIMIT. | 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. | ||
| 3270 | 3228 | ||
| 3271 | +++ | 3229 | +++ |
| 3272 | *** Function `pos-visible-in-window-p' now returns the pixel coordinates | 3230 | *** Function `pos-visible-in-window-p' now returns the pixel coordinates |
| @@ -3281,23 +3239,29 @@ position or for a given window pixel coordinate. | |||
| 3281 | ** Text modification: | 3239 | ** Text modification: |
| 3282 | 3240 | ||
| 3283 | +++ | 3241 | +++ |
| 3284 | *** The new function `insert-buffer-substring-as-yank' works like | 3242 | *** The new function `insert-for-yank' normally works like `insert', but |
| 3285 | `insert-buffer-substring', but removes the text properties in the | 3243 | removes the text properties in the `yank-excluded-properties' list |
| 3286 | `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'. | ||
| 3287 | 3250 | ||
| 3288 | +++ | 3251 | +++ |
| 3289 | *** The new function `insert-buffer-substring-no-properties' is like | 3252 | *** The new function `insert-buffer-substring-no-properties' is like |
| 3290 | insert-buffer-substring, but removes all text properties from the | 3253 | `insert-buffer-substring', but removes all text properties from the |
| 3291 | inserted substring. | 3254 | inserted substring. |
| 3292 | 3255 | ||
| 3293 | +++ | 3256 | +++ |
| 3294 | *** The new function `filter-buffer-substring' extracts a buffer | 3257 | *** The new function `filter-buffer-substring' extracts a buffer |
| 3295 | substring, passes it through a set of filter functions, and returns | 3258 | substring, passes it through a set of filter functions, and returns |
| 3296 | the filtered substring. It is used instead of `buffer-substring' or | 3259 | the filtered substring. Use it instead of `buffer-substring' or |
| 3297 | `delete-and-extract-region' when copying text into a user-accessible | 3260 | `delete-and-extract-region' when copying text into a user-accessible |
| 3298 | data structure, like the kill-ring, X clipboard, or a register. The | 3261 | data structure, such as the kill-ring, X clipboard, or a register. |
| 3299 | list of filter function is specified by the new variable | 3262 | |
| 3300 | `buffer-substring-filters'. For example, Longlines mode uses | 3263 | The list of filter function is specified by the new variable |
| 3264 | `buffer-substring-filters'. For example, Longlines mode adds to | ||
| 3301 | `buffer-substring-filters' to remove soft newlines from the copied | 3265 | `buffer-substring-filters' to remove soft newlines from the copied |
| 3302 | text. | 3266 | text. |
| 3303 | 3267 | ||
| @@ -3320,42 +3284,80 @@ clone to the other. | |||
| 3320 | --- | 3284 | --- |
| 3321 | *** The function `insert-string' is now obsolete. | 3285 | *** The function `insert-string' is now obsolete. |
| 3322 | 3286 | ||
| 3323 | ** Syntax table changes: | ||
| 3324 | |||
| 3325 | +++ | 3287 | +++ |
| 3326 | *** The macro `with-syntax-table' does not copy the table any more. | 3288 | ** Atomic change groups. |
| 3327 | 3289 | ||
| 3328 | +++ | 3290 | To perform some changes in the current buffer "atomically" so that |
| 3329 | *** The new function `syntax-after' returns the syntax code | 3291 | they either all succeed or are all undone, use `atomic-change-group' |
| 3330 | of the character after a specified buffer position, taking account | 3292 | around the code that makes changes. For instance: |
| 3331 | of text properties as well as the character code. | ||
| 3332 | 3293 | ||
| 3333 | +++ | 3294 | (atomic-change-group |
| 3334 | *** `syntax-class' extracts the class of a syntax code (as returned | 3295 | (insert foo) |
| 3335 | by syntax-after). | 3296 | (delete-region x y)) |
| 3336 | 3297 | ||
| 3337 | *** The new package `syntax.el' provides an efficient way to find the | 3298 | If an error (or other nonlocal exit) occurs inside the body of |
| 3338 | current syntactic context (as returned by `parse-partial-sexp'). | 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. | ||
| 3339 | 3302 | ||
| 3340 | ** GC changes: | 3303 | If you need something more sophisticated, you can directly call the |
| 3304 | lower-level functions that `atomic-change-group' uses. Here is how. | ||
| 3341 | 3305 | ||
| 3342 | +++ | 3306 | To set up a change group for one buffer, call `prepare-change-group'. |
| 3343 | *** New variables `gc-elapsed' and `gcs-done' provide extra information | 3307 | Specify the buffer as argument; it defaults to the current buffer. |
| 3344 | on garbage collection. | 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. | ||
| 3345 | 3310 | ||
| 3346 | +++ | 3311 | Before you change the buffer again, you must activate the change |
| 3347 | *** Functions from `post-gc-hook' are run at the end of garbage | 3312 | group. Pass the handle to `activate-change-group' afterward to |
| 3348 | collection. The hook is run with GC inhibited, so use it with care. | 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. | ||
| 3349 | 3344 | ||
| 3350 | ** Buffer-related changes: | 3345 | ** Buffer-related changes: |
| 3351 | 3346 | ||
| 3352 | --- | 3347 | --- |
| 3353 | *** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST. | 3348 | *** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST. |
| 3349 | |||
| 3354 | If it is non-nil, it specifies which buffers to list. | 3350 | If it is non-nil, it specifies which buffers to list. |
| 3355 | 3351 | ||
| 3356 | +++ | 3352 | +++ |
| 3357 | *** `kill-buffer-hook' is now a permanent local. | 3353 | *** `kill-buffer-hook' is now a permanent local. |
| 3358 | 3354 | ||
| 3355 | +++ | ||
| 3356 | *** The new function `buffer-local-value' returns the buffer-local | ||
| 3357 | binding of VARIABLE (a symbol) in buffer BUFFER. If VARIABLE does not | ||
| 3358 | have a buffer-local binding in buffer BUFFER, it returns the default | ||
| 3359 | value of VARIABLE instead. | ||
| 3360 | |||
| 3359 | ** Local variables lists: | 3361 | ** Local variables lists: |
| 3360 | 3362 | ||
| 3361 | +++ | 3363 | +++ |
| @@ -3382,25 +3384,65 @@ with the form as argument, and if any returns t, the form is ok to call. | |||
| 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: |
| 3388 | |||
| 3389 | +++ | ||
| 3390 | *** New function `looking-back' checks whether a regular expression matches | ||
| 3391 | the text before point. Specifying the LIMIT argument bounds how far | ||
| 3392 | back the match can start; this is a way to keep it from taking too long. | ||
| 3393 | |||
| 3394 | +++ | ||
| 3395 | *** The new variable `search-spaces-regexp' controls how to search | ||
| 3396 | for spaces in a regular expression. If it is non-nil, it should be a | ||
| 3397 | regular expression, and any series of spaces stands for that regular | ||
| 3398 | expression. If it is nil, spaces stand for themselves. | ||
| 3386 | 3399 | ||
| 3387 | *** The new function copy-abbrev-table returns a new abbrev table that | 3400 | Spaces inside of constructs such as `[..]' and inside loops such as |
| 3388 | is a copy of a given abbrev table. | 3401 | `*', `+', and `?' are never replaced with `search-spaces-regexp'. |
| 3389 | 3402 | ||
| 3390 | +++ | 3403 | +++ |
| 3391 | *** define-abbrev now accepts an optional argument SYSTEM-FLAG. If | 3404 | *** New regular expression operators, `\_<' and `\_>'. |
| 3392 | non-nil, this marks the abbrev as a "system" abbrev, which means that | 3405 | |
| 3393 | it won't be stored in the user's abbrevs file if he saves the abbrevs. | 3406 | These match the beginning and end of a symbol. A symbol is a |
| 3394 | Major modes that predefine some abbrevs should always specify this | 3407 | non-empty sequence of either word or symbol constituent characters, as |
| 3395 | flag. | 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 |
| @@ -3408,20 +3450,20 @@ 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' |
| @@ -3431,7 +3473,7 @@ 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 |
| @@ -3439,31 +3481,43 @@ 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 |
| @@ -3477,8 +3531,8 @@ 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 |
| @@ -3486,15 +3540,11 @@ 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 | 3546 | ||
| 3493 | +++ | 3547 | +++ |
| 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 | |||
| 3497 | +++ | ||
| 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 | ||
| @@ -3511,9 +3561,9 @@ 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 |
| @@ -3528,12 +3578,13 @@ One advantage of using this function is that the list of suffixes in | |||
| 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. |
| @@ -3551,7 +3602,7 @@ autoloaded when not really necessary. | |||
| 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 |
| @@ -3559,28 +3610,29 @@ 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 | +++ |
| @@ -3591,8 +3643,8 @@ 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 |
| @@ -3600,59 +3652,45 @@ 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 | ||
| 3605 | will only show directories. | ||
| 3606 | 3656 | ||
| 3607 | ** Searching and matching changes: | 3657 | It is like `read-file-name' except that the defaulting works better |
| 3658 | for directories, and completion inside it shows only directories. | ||
| 3608 | 3659 | ||
| 3609 | +++ | 3660 | ** Completion changes: |
| 3610 | *** New function `looking-back' checks whether a regular expression matches | ||
| 3611 | the text before point. Specifying the LIMIT argument bounds how far | ||
| 3612 | back the match can start; this is a way to keep it from taking too long. | ||
| 3613 | 3661 | ||
| 3614 | +++ | 3662 | +++ |
| 3615 | *** The new variable search-spaces-regexp controls how to search | 3663 | *** The functions `all-completions' and `try-completion' now accept lists |
| 3616 | for spaces in a regular expression. If it is non-nil, it should be a | 3664 | of strings as well as hash-tables additionally to alists, obarrays |
| 3617 | regular expression, and any series of spaces stands for that regular | 3665 | and functions. Furthermore, the function `test-completion' is now |
| 3618 | expression. If it is nil, spaces stand for themselves. | 3666 | exported to Lisp. The keys in alists and hash tables can be either |
| 3619 | 3667 | strings or symbols, which are automatically converted with to strings. | |
| 3620 | Spaces inside of constructs such as [..] and *, +, ? are never | ||
| 3621 | replaced with search-spaces-regexp. | ||
| 3622 | 3668 | ||
| 3623 | +++ | 3669 | +++ |
| 3624 | *** There are now two new regular expression operators, \_< and \_>, | 3670 | *** The new macro `dynamic-completion-table' supports using functions |
| 3625 | for matching the beginning and end of a symbol. A symbol is a | 3671 | as a dynamic completion table. |
| 3626 | non-empty sequence of either word or symbol constituent characters, as | ||
| 3627 | specified by the syntax table. | ||
| 3628 | 3672 | ||
| 3629 | +++ | 3673 | (dynamic-completion-table FUN) |
| 3630 | *** skip-chars-forward and skip-chars-backward now handle | ||
| 3631 | character classes such as [:alpha:], along with individual characters | ||
| 3632 | and ranges. | ||
| 3633 | 3674 | ||
| 3634 | --- | 3675 | FUN is called with one argument, the string for which completion is required, |
| 3635 | *** In `replace-match', the replacement text no longer inherits | 3676 | and it should return an alist containing all the intended possible |
| 3636 | properties from surrounding text. | 3677 | completions. This alist can be a full list of possible completions so that FUN |
| 3678 | can ignore the value of its argument. If completion is performed in the | ||
| 3679 | minibuffer, FUN will be called in the buffer from which the minibuffer was | ||
| 3680 | entered. `dynamic-completion-table' then computes the completion. | ||
| 3637 | 3681 | ||
| 3638 | +++ | 3682 | +++ |
| 3639 | *** The list returned by `(match-data t)' now has the buffer as a final | 3683 | *** The new macro `lazy-completion-table' initializes a variable |
| 3640 | element, if the last match was on a buffer. `set-match-data' | 3684 | as a lazy completion table. |
| 3641 | accepts such a list for restoring the match state. | ||
| 3642 | |||
| 3643 | --- | ||
| 3644 | *** rx.el has new corresponding `symbol-end' and `symbol-start' elements. | ||
| 3645 | 3685 | ||
| 3646 | +++ | 3686 | (lazy-completion-table VAR FUN &rest ARGS) |
| 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 | 3687 | ||
| 3651 | The function `sentence-end' should be used to obtain the value of the | 3688 | If the completion table VAR is used for the first time (e.g., by passing VAR |
| 3652 | variable `sentence-end'. If the variable `sentence-end' is nil, then | 3689 | as an argument to `try-completion'), the function FUN is called with arguments |
| 3653 | this function returns the regexp constructed from the variables | 3690 | ARGS. FUN must return the completion table that will be stored in VAR. If |
| 3654 | `sentence-end-without-period', `sentence-end-double-space' and | 3691 | completion is requested in the minibuffer, FUN will be called in the buffer |
| 3655 | `sentence-end-without-space'. | 3692 | from which the minibuffer was entered. The return value of |
| 3693 | `lazy-completion-table' must be used to initialize the value of VAR. | ||
| 3656 | 3694 | ||
| 3657 | +++ | 3695 | +++ |
| 3658 | ** Enhancements to keymaps. | 3696 | ** Enhancements to keymaps. |
| @@ -3667,7 +3705,7 @@ example, | |||
| 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 | ||
| @@ -3676,26 +3714,25 @@ 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 | ||
| @@ -3707,15 +3744,15 @@ The following changes have been made to provide command remapping: | |||
| 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 |
| @@ -3725,10 +3762,11 @@ The following changes have been made to provide command remapping: | |||
| 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 | ||
| @@ -3740,99 +3778,57 @@ active keymaps. | |||
| 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 | |||
| 3754 | +++ | ||
| 3755 | ** Atomic change groups. | ||
| 3756 | |||
| 3757 | To perform some changes in the current buffer "atomically" so that | ||
| 3758 | they either all succeed or are all undone, use `atomic-change-group' | ||
| 3759 | around the code that makes changes. For instance: | ||
| 3760 | |||
| 3761 | (atomic-change-group | ||
| 3762 | (insert foo) | ||
| 3763 | (delete-region x y)) | ||
| 3764 | |||
| 3765 | If an error (or other nonlocal exit) occurs inside the body of | ||
| 3766 | `atomic-change-group', it unmakes all the changes in that buffer that | ||
| 3767 | were during the execution of the body. The change group has no effect | ||
| 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 | 3791 | ||
| 3787 | You should use `unwind-protect' to make sure the group is always | 3792 | ** Abbrev changes: |
| 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 | 3793 | ||
| 3795 | To make a multibuffer change group, call `prepare-change-group' once | 3794 | +++ |
| 3796 | for each buffer you want to cover, then use `nconc' to combine the | 3795 | *** The new function `copy-abbrev-table' copies an abbrev table. |
| 3797 | returned values, like this: | ||
| 3798 | 3796 | ||
| 3799 | (nconc (prepare-change-group buffer-1) | 3797 | It returns a new abbrev table that is a copy of a given abbrev table. |
| 3800 | (prepare-change-group buffer-2)) | ||
| 3801 | 3798 | ||
| 3802 | You can then activate the multibuffer change group with a single call | 3799 | +++ |
| 3803 | to `activate-change-group', and finish it with a single call to | 3800 | *** `define-abbrev' now accepts an optional argument SYSTEM-FLAG. |
| 3804 | `accept-change-group' or `cancel-change-group'. | ||
| 3805 | 3801 | ||
| 3806 | Nested use of several change groups for the same buffer works as you | 3802 | If non-nil, this marks the abbrev as a "system" abbrev, which means |
| 3807 | would expect. Non-nested use of change groups for the same buffer | 3803 | that it won't be stored in the user's abbrevs file if he saves the |
| 3808 | will lead to undesirable results, so don't let it happen; the first | 3804 | abbrevs. Major modes that predefine some abbrevs should always |
| 3809 | change group you start for any given buffer should be the last one | 3805 | specify this flag. |
| 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 | ||
| 3820 | supported, but new code should use the new functions. | ||
| 3821 | 3814 | ||
| 3822 | *** Function signal-process now accepts a process object or process | 3815 | These replace the old function `process-kill-without-query'. That |
| 3816 | function is still supported, but new code should use the new | ||
| 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 |
| 3827 | `process-plist' and `set-process-plist' to access and replace the | ||
| 3828 | entire property list of a process. | ||
| 3830 | 3829 | ||
| 3831 | The new low-level functions process-plist and set-process-plist are | 3830 | *** Function `accept-process-output' has a new optional fourth arg |
| 3832 | used to access and replace the entire property list of a process. | 3831 | JUST-THIS-ONE. If non-nil, only output from the specified process |
| 3833 | |||
| 3834 | *** Function accept-process-output now has an optional fourth arg | ||
| 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 |
| @@ -3843,7 +3839,7 @@ speech synthesis. | |||
| 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. |
| @@ -3857,10 +3853,12 @@ process. | |||
| 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. |
| @@ -3877,8 +3875,8 @@ which was not compatible with the behavior of file reading. | |||
| 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. |
| @@ -4560,41 +4558,6 @@ been renamed to `disabled-command-function'. The variable | |||
| 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 | +++ |
| @@ -4817,6 +4780,86 @@ Use the LOCAL arg of `add-hook'. | |||
| 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 | ||