From c44da964fc28a3f2a186fd18deacc87857df7340 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 9 May 2005 21:02:37 +0000 Subject: [PATCH] Rearrange; clarify some entries. --- etc/NEWS | 2760 +++++++++++++++++++++++++++++------------------------- 1 file changed, 1460 insertions(+), 1300 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e58347524d5..8edc121a7a0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -104,6 +104,10 @@ the files mac/README and mac/INSTALL for build instructions. --- ** Building with -DENABLE_CHECKING does not automatically build with union types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. + +--- +** When pure storage overflows while dumping, Emacs now prints how +much pure storage it will approximately need. * Startup Changes in Emacs 22.1 @@ -181,7 +185,81 @@ automatically at startup, if it exists. When Emacs offers to save modified buffers, it saves the abbrevs too if they have changed. It can do this either silently or asking for confirmation first, according to the value of `save-abbrevs'. + +* Incompatible Editing Changes in Emacs 22.1 + ++++ +** M-g is now a prefix key. +M-g g and M-g M-g run goto-line. +M-g n and M-g M-n run next-error (like C-x `). +M-g p and M-g M-p run previous-error. + ++++ +** C-u M-g M-g switches to the most recent previous buffer, +and goes to the specified line in that buffer. + +When goto-line starts to execute, if there's a number in the buffer at +point then it acts as the default argument for the minibuffer. + ++++ +** The old bindings C-M-delete and C-M-backspace have been deleted, +since there are situations where one or the other will shut down +the operating system or your X server. + ++++ +** line-move-ignore-invisible now defaults to t. + ++++ +** When the undo information of the current command gets really large +(beyond the value of `undo-outer-limit'), Emacs discards it and warns +you about it. + ++++ +** `apply-macro-to-region-lines' now operates on all lines that begin +in the region, rather than on all complete lines in the region. + ++++ +** A prefix argument is no longer required to repeat a jump to a +previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the +mark ring. Use C-u C-u C-SPC to set the mark immediately after a jump. + ++++ +** The info-search bindings on C-h C-f, C-h C-k and C-h C-i +have been moved to C-h F, C-h K and C-h S. + ++++ +** In incremental search, C-w is changed. M-%, C-M-w and C-M-y are special. + +See below under "incremental search changes". + +--- +** C-x C-f RET, typing nothing in the minibuffer, is no longer a special case. + +Since the default input is the current directory, this has the effect +of specifying the current directory. Normally that means to visit the +directory with Dired. + ++++ +** The completion commands TAB, SPC and ? in the minibuffer apply only +to the text before point. If there is text in the buffer after point, +it remains unchanged. + ++++ +** M-o now is the prefix key for setting text properties; +M-o M-o requests refontification. + ++++ +** You can now follow links by clicking Mouse-1 on the link. +See below for more details. + ++++ +** In Dired's ! command (dired-do-shell-command), `*' and `?' now +control substitution of the file names only when they are surrounded +by whitespace. This means you can now use them as shell wildcards +too. If you want to use just plain `*' as a wildcard, type `*""'; the +doublequotes make no difference in the shell, but they prevent +special treatment in `dired-do-shell-command'. * Editing Changes in Emacs 22.1 @@ -189,11 +267,6 @@ according to the value of `save-abbrevs'. ** The max size of buffers and integers has been doubled. On 32bit machines, it is now 256M (i.e. 268435455). -+++ -** The mode line position information now comes before the major mode. -When the file is maintained under version control, that information -appears between the position information and the major mode. - +++ ** M-g is now a prefix key. M-g g and M-g M-g run goto-line. @@ -201,28 +274,19 @@ M-g n and M-g M-n run next-error (like C-x `). M-g p and M-g M-p run previous-error. +++ -** M-o now is the prefix key for setting text properties; -M-o M-o requests refontification. - -+++ -** C-u M-x goto-line now switches to the most recent previous buffer, +** C-u M-g M-g switches to the most recent previous buffer, and goes to the specified line in that buffer. When goto-line starts to execute, if there's a number in the buffer at point then it acts as the default argument for the minibuffer. -+++ -** You can now switch buffers in a cyclic order with C-x C-left and -(prev-buffer) and C-x C-right (next-buffer). C-x left and C-x right -can be used as well. - +++ ** The old bindings C-M-delete and C-M-backspace have been deleted, since there are situations where one or the other will shut down the operating system or your X server. +++ -** `undo-only' does an undo which does not redo any previous undo. +** line-move-ignore-invisible now defaults to t. +++ ** When the undo information of the current command gets really large @@ -230,11 +294,20 @@ the operating system or your X server. you about it. +++ -** M-SPC (just-one-space) when given a numeric argument N -converts whitespace around point to N spaces. +** `apply-macro-to-region-lines' now operates on all lines that begin +in the region, rather than on all complete lines in the region. +++ -** line-move-ignore-invisible now defaults to t. +** You can now switch buffers in a cyclic order with C-x C-left and +(prev-buffer) and C-x C-right (next-buffer). C-x left and C-x right +can be used as well. + ++++ +** `undo-only' does an undo which does not redo any previous undo. + ++++ +** M-SPC (just-one-space) when given a numeric argument N +converts whitespace around point to N spaces. --- ** New commands to operate on pairs of open and close characters: @@ -256,24 +329,16 @@ been changed to reflect those used in Text mode rather than those used in Indented-Text mode. +++ -** Movement commands `beginning-of-buffer', `end-of-buffer', -`beginning-of-defun', `end-of-defun' do not set the mark if the mark -is already active in Transient Mark mode. - -+++ -** `apply-macro-to-region-lines' now operates on all lines that begin -in the region, rather than on all complete lines in the region. +** M-x setenv now expands environment variable references. -+++ -** M-x setenv now expands environment variables of the form `$foo' and -`${foo}' in the specified new value of the environment variable. To -include a `$' in the value, use `$$'. +Substrings of the form `$foo' and `${foo}' in the specified new value +now refer to the value of environment variable foo. To include a `$' +in the value, use `$$'. +++ -** Unquoted `$' in file names do not signal an error any more when -the corresponding environment variable does not exist. -Instead, the `$ENVVAR' text is left as is, so that `$$' quoting -is only rarely needed. +** `special-display-buffer-names' and `special-display-regexps' now +understand two new boolean pseudo-frame-parameters `same-frame' and +`same-window'. +++ ** The default for the paper size (variable ps-paper-type) is taken @@ -287,18 +352,21 @@ previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the mark ring. Use C-u C-u C-SPC to set the mark immediately after a jump. +++ -*** Marking commands extend the region when invoked multiple times. If -you hit M-C-SPC (mark-sexp), M-@ (mark-word), M-h (mark-paragraph), or -C-M-h (mark-defun) repeatedly, the marked region extends each time, so -you can mark the next two sexps with M-C-SPC M-C-SPC, for example. -This feature also works for mark-end-of-sentence, if you bind that to -a key. It also extends the region when the mark is active in Transient -Mark mode, regardless of the last command. To start a new region with -one of marking commands in Transient Mark mode, you can deactivate the -active region with C-g, or set the new mark with C-SPC. +*** Marking commands extend the region when invoked multiple times. + +If you type C-M-SPC (mark-sexp), M-@ (mark-word), M-h +(mark-paragraph), or C-M-h (mark-defun) repeatedly, the marked region +extends each time, so you can mark the next two sexps with M-C-SPC +M-C-SPC, for example. This feature also works for +mark-end-of-sentence, if you bind that to a key. It also extends the +region when the mark is active in Transient Mark mode, regardless of +the last command. To start a new region with one of marking commands +in Transient Mark mode, you can deactivate the active region with C-g, +or set the new mark with C-SPC. +++ *** M-h (mark-paragraph) now accepts a prefix arg. + With positive arg, M-h marks the current and the following paragraphs; if the arg is negative, it marks the current and the preceding paragraphs. @@ -321,6 +389,11 @@ deactivate the mark. That typically happens when you type a command that alters the buffer, but you can also deactivate the mark by typing C-g. ++++ +*** Movement commands `beginning-of-buffer', `end-of-buffer', +`beginning-of-defun', `end-of-defun' do not set the mark if the mark +is already active in Transient Mark mode. + ** Help command changes: +++ @@ -416,13 +489,6 @@ regular expression that you entered to the apropos command. The best match is listed first, and the calculated score is shown for each matching item. -** Window selection changes: - -+++ -*** `special-display-buffer-names' and `special-display-regexps' now -understand two new boolean pseudo-frame-parameters `same-frame' and -`same-window'. - ** Incremental Search changes: +++ @@ -485,6 +551,12 @@ can be edited for each replacement. ** File operation changes: ++++ +*** Unquoted `$' in file names do not signal an error any more when +the corresponding environment variable does not exist. +Instead, the `$ENVVAR' text is left as is, so that `$$' quoting +is only rarely needed. + +++ *** In processing a local variables list, Emacs strips the prefix and suffix are from every line before processing all the lines. @@ -566,7 +638,7 @@ variable `minibuffer-prompt-properties', which is used to display the prompt string. --- -*** Enhanced visual feedback in *Completions* buffer. +*** Enhanced visual feedback in `*Completions*' buffer. Completions lists use faces to highlight what all completions have in common and where they begin to differ. @@ -600,6 +672,11 @@ elements are deleted. ** Redisplay changes: ++++ +*** The mode line position information now comes before the major mode. +When the file is maintained under version control, that information +appears between the position information and the major mode. + *** Easy to overlook single character negation is now font-locked. You can use the new variable `font-lock-negation-char-face' and the face of the same name to customize this. Currently the cc-modes, sh-script-mode, @@ -631,7 +708,7 @@ The variable `automatic-hscrolling' was renamed to `auto-hscroll-mode'. The old name is still available as an alias. *** Moving or scrolling through images (and other lines) taller that -the window now works sensible, by automatically adjusting the window's +the window now works sensibly, by automatically adjusting the window's vscroll property. +++ @@ -718,6 +795,10 @@ of the recognized cursor types. ** Font-Lock changes: ++++ +*** M-o now is the prefix key for setting text properties; +M-o M-o requests refontification. + +++ *** All modes now support using M-x font-lock-mode to toggle fontification, even those such as Occur, Info, and comint-derived @@ -761,7 +842,7 @@ jit-lock-defer-contextually is renamed jit-lock-contextually and jit-lock-context-time determines the delay after which contextual refontification takes place. -** Menu Bar changes: +** Menu support: --- *** A menu item "Show/Hide" was added to the top-level menu "Options". @@ -775,6 +856,36 @@ mode-line. --- *** Speedbar has moved from the "Tools" top level menu to "Show/Hide". +--- +*** You can exit dialog windows and menus by typing C-g. + +--- +*** The menu item "Open File..." has been split into two items, "New File..." +and "Open File...". "Open File..." now opens only existing files. This is +to support existing GUI file selection dialogs better. + ++++ +*** The file selection dialog for Gtk+, Mac, W32 and Motif/Lesstif can be +disabled by customizing the variable `use-file-dialog'. + +--- +*** The pop up menus for Lucid now stay up if you do a fast click and can +be navigated with the arrow keys (like Gtk+, Mac and W32). + ++++ +*** The Lucid menus can display multilingual text in your locale. You have +to explicitly specify a fontSet resource for this to work, for example +`-xrm "Emacs*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*"'. + +--- +*** Dialogs for Lucid/Athena and Lesstif/Motif now pops down when pressing +ESC, like they do for Gtk+, Mac and W32. + ++++ +*** For Gtk+ version 2.4, you can make Emacs use the old file dialog +by setting the variable `x-use-old-gtk-file-dialog' to t. Default is to use +the new dialog. + ** Mouse changes: +++ @@ -1184,8 +1295,10 @@ search multiple buffers. There is also a new command buffers to search by their filename. Internally, Occur mode has been rewritten, and now uses font-lock, among other changes. +** Grep changes: + +++ -** Grep has been decoupled from compilation mode setup. +*** Grep has been decoupled from compilation mode setup. There's a new separate package grep.el, with its own submenu and customization group. @@ -1230,38 +1343,6 @@ When `-H' is used, the grep command line supplied by the user is passed unchanged to the system to execute, which allows more complicated command lines to be used than was possible before. -** Emacs server changes: - -+++ -*** You can have several Emacs servers on the same machine. - - % emacs --eval '(setq server-name "foo")' -f server-start & - % emacs --eval '(setq server-name "bar")' -f server-start & - % emacsclient -s foo file1 - % emacsclient -s bar file2 - -+++ -*** The `emacsclient' command understands the options `--eval' and -`--display' which tell Emacs respectively to evaluate the given elisp -expression and to use the given display when visiting files. - -+++ -*** User option `server-mode' can be used to start a server process. - -** Menu support: - ---- -*** Dialogs and menus pop down if you type C-g. - ---- -*** The menu item "Open File..." has been split into two items, "New File..." -and "Open File...". "Open File..." now opens only existing files. This is -to support existing GUI file selection dialogs better. - -+++ -*** The file selection dialog for Gtk+, Mac, W32 and Motif/Lesstif can be -disabled by customizing the variable `use-file-dialog'. - ** X Windows Support: +++ @@ -1296,24 +1377,6 @@ and use the more appropriately result. On the other hand, the size of the thumb does not represent the actual amount of text shown any more (only a crude approximation of it). ---- -*** The pop up menus for Lucid now stay up if you do a fast click and can -be navigated with the arrow keys (like Gtk+, Mac and W32). - -+++ -*** The Lucid menus can display multilingual text in your locale. You have -to explicitly specify a fontSet resource for this to work, for example -`-xrm "Emacs*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*"'. - ---- -*** Dialogs for Lucid/Athena and Lesstif/Motif now pops down when pressing -ESC, like they do for Gtk+, Mac and W32. - -+++ -*** For Gtk+ version 2.4, you can make Emacs use the old file dialog -by setting the variable `x-use-old-gtk-file-dialog' to t. Default is to use -the new dialog. - ** Xterm support: --- @@ -1358,7 +1421,7 @@ colors as on X. --- *** There's a new support for colors on `rxvt' terminal emulator. -* New modes and packages in Emacs 22.1 +* New Modes and Packages in Emacs 22.1 +++ ** New package benchmark.el contains simple support for convenient @@ -1631,67 +1694,114 @@ restores the previous value of `buffer-invisibility-spec'. +++ ** The wdired.el package allows you to use normal editing commands on Dired buffers to change filenames, permissions, etc... - -* Changes in specialized modes and packages: - -+++ -** In Outline mode, hide-body no longer hides lines at the top -of the file that precede the first header line. - -+++ -** Telnet now prompts you for a port number with C-u M-x telnet. --- -** The terminal emulation code in term.el has been improved, it can -run most curses applications now. +** The TCL package tcl-mode.el was replaced by tcl.el. +This was actually done in Emacs-21.1, and was not documented. -+++ -** M-x diff uses diff-mode instead of compilation-mode. +** The new package bindat.el provides functions to unpack and pack +binary data structures, such as network packets, to and from Lisp +data structures. +++ -** You can now customize fill-nobreak-predicate to control where -filling can break lines. The value is now normally a list of -functions, but it can also be a single function, for compatibility. - -We provide two sample predicates, fill-single-word-nobreak-p and -fill-french-nobreak-p, for use in the value of fill-nobreak-predicate. - ---- -** M-x view-file and commands that use it now avoid interfering -with special modes such as Tar mode. +** The new package button.el implements simple and fast `clickable buttons' +in emacs buffers. `buttons' are much lighter-weight than the `widgets' +implemented by widget.el, and can be used by lisp code that doesn't +require the full power of widgets. Emacs uses buttons for such things +as help and apropos buffers. --- -** Commands winner-redo and winner-undo, from winner.el, are now bound to -C-c and C-c , respectively. This is an incompatible change. +** master-mode.el implements a minor mode for scrolling a slave +buffer without leaving your current buffer, the master buffer. ---- -** global-whitespace-mode is a new alias for whitespace-global-mode. +It can be used by sql.el, for example: the SQL buffer is the master +and its SQLi buffer is the slave. This allows you to scroll the SQLi +buffer containing the output from the SQL buffer containing the +commands. -+++ -** M-x compare-windows now can automatically skip non-matching text to -resync points in both windows. +This is how to use sql.el and master.el together: the variable +sql-buffer contains the slave buffer. It is a local variable in the +SQL buffer. + +(add-hook 'sql-mode-hook + (function (lambda () + (master-mode t) + (master-set-slave sql-buffer)))) +(add-hook 'sql-set-sqli-hook + (function (lambda () + (master-set-slave sql-buffer)))) +++ -** New user option `add-log-always-start-new-record'. -When this option is enabled, M-x add-change-log-entry always -starts a new record regardless of when the last record is. +** New Lisp library testcover.el works with edebug to help you determine +whether you've tested all your Lisp code. Function testcover-start +instruments all functions in a given file. Then test your code. Function +testcover-mark-all adds overlay "splotches" to the Lisp file's buffer to +show where coverage is lacking. Command testcover-next-mark (bind it to +a key!) will move point forward to the next spot that has a splotch. + +Normally, a red splotch indicates the form was never completely +evaluated; a brown splotch means it always evaluated to the same +value. The red splotches are skipped for forms that can't possibly +complete their evaluation, such as `error'. The brown splotches are +skipped for forms that are expected to always evaluate to the same +value, such as (setq x 14). + +For difficult cases, you can add do-nothing macros to your code to +help out the test coverage tool. The macro `noreturn' suppresses a +red splotch. It is an error if the argument to `noreturn' does +return. The macro 1value suppresses a brown splotch for its argument. +This macro is a no-op except during test-coverage -- then it signals +an error if the argument actually returns differing values. + +* Changes in Specialized Modes and Packages in Emacs 22.1: +++ -** There is a new user option `mail-default-directory' that allows you -to specify the value of `default-directory' for mail buffers. This -directory is used for auto-save files of mail buffers. It defaults to -"~/". +** In Outline mode, hide-body no longer hides lines at the top +of the file that precede the first header line. +++ -** Emacs can now indicate in the mode-line the presence of new e-mail -in a directory or in a file. See the documentation of the user option -`display-time-mail-directory'. +** Telnet now prompts you for a port number with C-u M-x telnet. + +--- +** The terminal emulation code in term.el has been improved, it can +run most curses applications now. + ++++ +** M-x diff uses diff-mode instead of compilation-mode. + ++++ +** You can now customize fill-nobreak-predicate to control where +filling can break lines. The value is now normally a list of +functions, but it can also be a single function, for compatibility. + +We provide two sample predicates, fill-single-word-nobreak-p and +fill-french-nobreak-p, for use in the value of fill-nobreak-predicate. + +--- +** M-x view-file and commands that use it now avoid interfering +with special modes such as Tar mode. + +--- +** Commands winner-redo and winner-undo, from winner.el, are now bound to +C-c and C-c , respectively. This is an incompatible change. + +--- +** global-whitespace-mode is a new alias for whitespace-global-mode. + ++++ +** M-x compare-windows now can automatically skip non-matching text to +resync points in both windows. + ++++ +** New user option `add-log-always-start-new-record'. +When this option is enabled, M-x add-change-log-entry always +starts a new record regardless of when the last record is. --- ** PO translation files are decoded according to their MIME headers when Emacs visits them. -** Info mode: +** Info mode changes: +++ *** A numeric prefix argument of `info' selects an Info buffer @@ -1775,7 +1885,7 @@ function also defines the result format for `eval-expression' (M-:), `eval-print-last-sexp' (C-j) and some edebug evaluation functions. +++ -** CC Mode changes. +** CC mode changes. *** Font lock support. CC Mode now provides font lock support for all its languages. This @@ -2517,6 +2627,17 @@ anyone has committed to the repository since you last executed "checkout", "update" or "commit". That means using cvs diff options -rBASE -rHEAD. ++++ +** There is a new user option `mail-default-directory' that allows you +to specify the value of `default-directory' for mail buffers. This +directory is used for auto-save files of mail buffers. It defaults to +"~/". + ++++ +** Emacs can now indicate in the mode-line the presence of new e-mail +in a directory or in a file. See the documentation of the user option +`display-time-mail-directory'. + ** Rmail changes: --- @@ -2732,6 +2853,24 @@ This is like `strokes-global-set-stroke', but it allows you to bind the stroke directly to a string to insert. This is convenient for using strokes as an input method. +** Emacs server changes: + ++++ +*** You can have several Emacs servers on the same machine. + + % emacs --eval '(setq server-name "foo")' -f server-start & + % emacs --eval '(setq server-name "bar")' -f server-start & + % emacsclient -s foo file1 + % emacsclient -s bar file2 + ++++ +*** The `emacsclient' command understands the options `--eval' and +`--display' which tell Emacs respectively to evaluate the given elisp +expression and to use the given display when visiting files. + ++++ +*** User option `server-mode' can be used to start a server process. + --- ** LDAP support now defaults to ldapsearch from OpenLDAP version 2. @@ -2779,7 +2918,7 @@ boundries etc. For more info, see the documentation of the variable --- ** cplus-md.el has been removed to avoid problems with Custom. -* Changes for non-free operating systems +* Changes in Emacs 22.1 on non-free operating systems +++ ** Passing resources on the command line now works on MS Windows. @@ -2853,11 +2992,6 @@ variable `mac-keyboard-text-encoding' and the constants * Incompatible Lisp Changes in Emacs 22.1 -+++ -** The new interactive-specification `G' reads a file name -much like `F', but if the input is a directory name (even defaulted), -it returns just the directory name. - +++ ** `suppress-keymap' now works by remapping `self-insert-command' to the command `undefined'. (In earlier Emacs versions, it used @@ -2868,161 +3002,145 @@ the command `undefined'. (In earlier Emacs versions, it used ** Mode line display ignores text properties as well as the :propertize and :eval forms in the value of a variable whose `risky-local-variable' property is nil. + +--- +** Support for Mocklisp has been removed. * Lisp Changes in Emacs 22.1 -** New function `locate-file' searches for a file in a list of directories. -`locate-file' accepts a name of a file to search (a string), and two -lists: a list of directories to search in and a list of suffixes to -try; typical usage might use `exec-path' and `load-path' for the list -of directories, and `exec-suffixes' and `load-suffixes' for the list -of suffixes. The function also accepts a predicate argument to -further filter candidate files. - -One advantage of using this function is that the list of suffixes in -`exec-suffixes' is OS-dependant, so this function will find -executables without polluting Lisp code with OS dependancies. +** General Lisp changes: +++ -** The default value of `sentence-end' is now defined using the new -variable `sentence-end-without-space', which contains such characters -that end a sentence without following spaces. - -The function `sentence-end' should be used to obtain the value of the -variable `sentence-end'. If the variable `sentence-end' is nil, then -this function returns the regexp constructed from the variables -`sentence-end-without-period', `sentence-end-double-space' and -`sentence-end-without-space'. +*** The function `eql' is now available without requiring the CL package. +++ -** The argument to forward-word, backward-word, forward-to-indentation -and backward-to-indentation is now optional, and defaults to 1. +*** `makehash' is now obsolete. Use `make-hash-table' instead. +++ -** If a command sets transient-mark-mode to `only', that -enables Transient Mark mode for the following command only. -During that following command, the value of transient-mark-mode -is `identity'. If it is still `identity' at the end of the command, -it changes to nil. +*** If optional third argument APPEND to `add-to-list' is non-nil, a +new element gets added at the end of the list instead of at the +beginning. This change actually occurred in Emacs-21.1, but was not +documented. +++ -** The new hook `before-save-hook' is invoked by `basic-save-buffer' -before saving buffers. This allows packages to perform various final -tasks, for example; it can be used by the copyright package to make -sure saved files have the current year in any copyright headers. +*** New function `copy-tree' makes a copy of a tree, recursively copying +both cars and cdrs. +++ -** If a buffer sets buffer-save-without-query to non-nil, -save-some-buffers will always save that buffer without asking -(if it's modified). - ---- -** list-buffers-noselect now takes an additional argument, BUFFER-LIST. -If it is non-nil, it specifies which buffers to list. +*** New function `delete-dups' destructively removes `equal' +duplicates from a list. Of several `equal' occurrences of an element +in the list, the first one is kept. +++ -** The kill-buffer-hook is now permanent-local. +*** `declare' is now a macro. This change was made mostly for +documentation purposes and should have no real effect on Lisp code. +++ -** `auto-save-file-format' has been renamed to -`buffer-auto-save-file-format' and made into a permanent local. +*** The new function `rassq-delete-all' deletes all elements from an +alist whose cdr is `eq' to a specified value. +++ -** Functions `file-name-sans-extension' and `file-name-extension' now -ignore the leading dots in file names, so that file names such as -`.emacs' are treated as extensionless. +*** The function `number-sequence' returns a list of equally-separated +numbers. For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). +By default, the separation is 1, but you can specify a different separation +as the third argument. (number-sequence 1.5 6 2) returns (1.5 3.5 5.5). +++ -** copy-file now takes an additional option arg MUSTBENEW. - -This argument works like the MUSTBENEW argument of write-file. +*** The variables `most-positive-fixnum' and `most-negative-fixnum' +hold the largest and smallest possible integer values. +++ -** If the second argument to `copy-file' is the name of a directory, -the file is copied to that directory instead of signaling an error. +*** The flags, width, and precision options for %-specifications in function +`format' are now documented. Some flags that were accepted but not +implemented (such as "*") are no longer accepted. +++ -** `visited-file-modtime' and `calendar-time-from-absolute' now return -a list of two integers, instead of a cons. +*** Functions `get' and `plist-get' no longer signals an error for +a malformed property list. They also detect cyclic lists. +++ -** `file-chase-links' now takes an optional second argument LIMIT which -specifies the maximum number of links to chase through. If after that -many iterations the file name obtained is still a symbolic link, -`file-chase-links' returns it anyway. +*** The new functions `lax-plist-get' and `lax-plist-put' are like +`plist-get' and `plist-put', except that they compare the property +name using `equal' rather than `eq'. +++ -** The function `commandp' takes an additional optional -argument. If it is non-nil, then `commandp' checks -for a function that could be called with `call-interactively', -and does not return t for keyboard macros. +*** The new variable `print-continuous-numbering', when non-nil, says +that successive calls to print functions should use the same +numberings for circular structure references. This is only relevant +when `print-circle' is non-nil. + +When you bind `print-continuous-numbering' to t, you should +also bind `print-number-table' to nil. +++ -** An interactive specification can now use the code letter 'U' to get -the up-event that was discarded in case the last key sequence read for a -previous 'k' or 'K' argument was a down-event; otherwise nil is used. +*** New function `macroexpand-all' expands all macros in a form. ---- -** Functions y-or-n-p, read-char, read-key-sequence and the like, that -display a prompt but don't use the minibuffer, now display the prompt -using the text properties (esp. the face) of the prompt string. +It is similar to the Common-Lisp function of the same name. +One difference is that it guarantees to return the original argument +if no expansion is done, which can be tested using `eq'. +++ -** read-from-minibuffer now accepts an additional argument KEEP-ALL -saying to put all inputs in the history list, even empty ones. +*** The function `atan' now accepts an optional second argument. + +When called with 2 arguments, as in `(atan Y X)', `atan' returns the +angle in radians between the vector [X, Y] and the X axis. (This is +equivalent to the standard C library function `atan2'.) +++ -** The `read-file-name' function now takes an additional argument which -specifies a predicate which the file name read must satify. The -new variable `read-file-name-predicate' contains the predicate argument -while reading the file name from the minibuffer; the predicate in this -variable is used by read-file-name-internal to filter the completion list. +*** A function's doc string can now specify the calling pattern. ---- -** The new variable `read-file-name-function' can be used by lisp code -to override the internal read-file-name function. +You put this in the doc string's last line, which should match the +regexp "\n\n(fn.*)\\'". +++ -** The new variable `read-file-name-completion-ignore-case' specifies -whether completion ignores case when reading a file name with the -`read-file-name' function. +*** New macro `with-local-quit' temporarily sets `inhibit-quit' to nil. -+++ -** The new function `read-directory-name' can be used instead of -`read-file-name' to read a directory name; when used, completion -will only show directories. +This is for use around potentially blocking or long-running code in +timers and `post-command-hook' functions. + +*** `define-obsolete-function-alias' +combines `defalias' and `make-obsolete'. +++ -** The new variable search-spaces-regexp controls how to search -for spaces in a regular expression. If it is non-nil, it should be a -regular expression, and any series of spaces stands for that regular -expression. If it is nil, spaces stand for themselves. +*** New function `unsafep' returns nil if the given Lisp form can't +possibly do anything dangerous; otherwise it returns a reason why the +form might be unsafe (calls unknown function, alters global variable, +etc). -Spaces inside of constructs such as [..] and *, +, ? are never -replaced with search-spaces-regexp. +** Lisp code indentation features: +++ -** There are now two new regular expression operators, \_< and \_>, -for matching the beginning and end of a symbol. A symbol is a -non-empty sequence of either word or symbol constituent characters, as -specified by the syntax table. +*** The `defmacro' form can contain declarations specifying how to +indent the macro in Lisp mode and how to debug it with Edebug. The +syntax of defmacro has been extended to -+++ -** skip-chars-forward and skip-chars-backward now handle -character classes such as [:alpha:], along with individual characters -and ranges. + (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...) + +DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'. The +declaration specifiers supported are: + +(indent INDENT) + Set NAME's `lisp-indent-function' property to INDENT. + +(edebug DEBUG) + Set NAME's `edebug-form-spec' property to DEBUG. (This is + equivalent to writing a `def-edebug-spec' for the macro. --- -** In `replace-match', the replacement text no longer inherits -properties from surrounding text. +*** cl-indent now allows customization of Indentation of backquoted forms. -+++ -** The list returned by `(match-data t)' now has the buffer as a final -element, if the last match was on a buffer. `set-match-data' -accepts such a list for restoring the match state. +See the new user option `lisp-backquote-indentation'. + +--- +*** cl-indent now handles indentation of simple and extended `loop' forms. + +The new user options `lisp-loop-keyword-indentation', +`lisp-loop-forms-indentation', and `lisp-simple-loop-indentation' can +be used to customize the indentation of keywords and forms in loop +forms. +++ -** Variable aliases have been implemented: +** Variable aliases: *** defvaralias ALIAS-VAR BASE-VAR [DOCSTRING] @@ -3044,171 +3162,249 @@ It might be noteworthy that variables aliases work for all kinds of variables, including buffer-local and frame-local variables. +++ -*** The macro define-obsolete-variable-alias combines defvaralias and -make-obsolete-variable. The macro define-obsolete-function-alias -combines defalias and make-obsolete. +*** The macro `define-obsolete-variable-alias' combines `defvaralias' and +`make-obsolete-variable'. -+++ -** Enhancements to keymaps. +** defcustom changes: -*** Cleaner way to enter key sequences. ++++ +*** defcustom and other custom declarations now use a default group +(the last prior group defined in the same file) when no :group was given. -You can enter a constant key sequence in a more natural format, the -same one used for saving keyboard macros, using the macro `kbd'. For -example, +--- +*** The new customization type `float' specifies numbers with floating +point (no integers are allowed). -(kbd "C-x C-f") => "\^x\^f" +** String changes: -*** Interactive commands can be remapped through keymaps. ++++ +*** The escape sequence \s is now interpreted as a SPACE character, +unless it is followed by a `-' in a character constant (e.g. ?\s-A), +in which case it is still interpreted as the super modifier. +In strings, \s is always interpreted as a space. -This is an alternative to using defadvice or substitute-key-definition -to modify the behavior of a key binding using the normal keymap -binding and lookup functionality. ++++ +*** A hex escape in a string forces the string to be multibyte. +An octal escape makes it unibyte. -When a key sequence is bound to a command, and that command is -remapped to another command, that command is run instead of the -original command. ++++ +*** `split-string' now includes null substrings in the returned list if +the optional argument SEPARATORS is non-nil and there are matches for +SEPARATORS at the beginning or end of the string. If SEPARATORS is +nil, or if the new optional third argument OMIT-NULLS is non-nil, all +empty matches are omitted from the returned list. -Example: -Suppose that minor mode my-mode has defined the commands -my-kill-line and my-kill-word, and it wants C-k (and any other key -bound to kill-line) to run the command my-kill-line instead of -kill-line, and likewise it wants to run my-kill-word instead of -kill-word. ++++ +*** New function `string-to-multibyte' converts a unibyte string to a +multibyte string with the same individual character codes. -Instead of rebinding C-k and the other keys in the minor mode map, -command remapping allows you to directly map kill-line into -my-kill-line and kill-word into my-kill-word through the minor mode -map using define-key: ++++ +*** New function `substring-no-properties returns a substring without +text properties. - (define-key my-mode-map [remap kill-line] 'my-kill-line) - (define-key my-mode-map [remap kill-word] 'my-kill-word) ++++ +*** The new function `assoc-string' replaces `assoc-ignore-case' and +`assoc-ignore-representation', which are still available, but have +been declared obsolete. -Now, when my-mode is enabled, and the user enters C-k or M-d, -the commands my-kill-line and my-kill-word are run. +** Buffer/variable changes: -Notice that only one level of remapping is supported. In the above -example, this means that if my-kill-line is remapped to other-kill, -then C-k still runs my-kill-line. ++++ +*** The new function `buffer-local-value' returns the buffer-local +binding of VARIABLE (a symbol) in buffer BUFFER. If VARIABLE does not +have a buffer-local binding in buffer BUFFER, it returns the default +value of VARIABLE instead. -The following changes have been made to provide command remapping: ++++ +** There is a new facility for displaying warnings to the user. -- Command remappings are defined using `define-key' with a prefix-key - `remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD - to definition DEF in keymap MAP. The definition is not limited to - another command; it can be anything accepted for a normal binding. +See the functions `warn' and `display-warning' . -- The new function `command-remapping' returns the binding for a - remapped command in the current keymaps, or nil if not remapped. ++++ +** Progress reporters. -- key-binding now remaps interactive commands unless the optional - third argument NO-REMAP is non-nil. +These provide a simple and uniform way for commands to present +progress messages for the user. -- where-is-internal now returns nil for a remapped command (e.g. - kill-line if my-mode is enabled), and the actual key binding for - the command it is remapped to (e.g. C-k for my-kill-line). - It also has a new optional fifth argument, NO-REMAP, which inhibits - remapping if non-nil (e.g. it returns C-k for kill-line and - for my-kill-line). +See the new functions `make-progress-reporter', +`progress-reporter-update', `progress-reporter-force-update', +`progress-reporter-done', and `dotimes-with-progress-reporter'. -- The new variable `this-original-command' contains the original - command before remapping. It is equal to `this-command' when the - command was not remapped. +** Buffer positions: -*** If text has a `keymap' property, that keymap takes precedence -over minor mode keymaps. ++++ +*** Function `compute-motion' now calculates the usable window +width if the WIDTH argument is nil. If the TOPOS argument is nil, +the usable window height and width is used. -*** The `keymap' property now also works at the ends of overlays and -text-properties, according to their stickiness. This also means that it -works with empty overlays. The same hold for the `local-map' property. ++++ +*** The `line-move', `scroll-up', and `scroll-down' functions will now +modify the window vscroll to scroll through display rows that are +taller that the height of the window, for example in the presense of +large images. To disable this feature, Lisp code can bind the new +variable `auto-window-vscroll' to nil. -*** Dense keymaps now handle inheritance correctly. -Previously a dense keymap would hide all of the simple-char key -bindings of the parent keymap. ++++ +*** The argument to `forward-word', `backward-word', +`forward-to-indentation' and `backward-to-indentation' is now +optional, and defaults to 1. -*** `define-key-after' now accepts keys longer than 1. ++++ +*** Lisp code can now test if a given buffer position is inside a +clickable link with the new function `mouse-on-link-p'. This is the +function used by the new `mouse-1-click-follows-link' functionality. -*** New function `current-active-maps' returns a list of currently -active keymaps. ++++ +*** New function `line-number-at-pos' returns the line number of the +current line in the current buffer, or if optional buffer position is +given, line number of corresponding line in current buffer. -*** New function `describe-buffer-bindings' inserts the list of all -defined keys and their definitions. ++++ +*** `field-beginning' and `field-end' now accept an additional optional +argument, LIMIT. -*** New function `keymap-prompt' returns the prompt-string of a keymap ++++ +*** Function `pos-visible-in-window-p' now returns the pixel coordinates +and partial visiblity state of the corresponding row, if the PARTIALLY +arg is non-nil. -*** (map-keymap FUNCTION KEYMAP) applies the function to each binding -in the keymap. ++++ +*** New functions `posn-at-point' and `posn-at-x-y' return +click-event-style position information for a given visible buffer +position or for a given window pixel coordinate. -*** New variable emulation-mode-map-alists. +** Text modification: -Lisp packages using many minor mode keymaps can now maintain their own -keymap alist separate from minor-mode-map-alist by adding their keymap -alist to this list. ++++ +*** The new function `insert-buffer-substring-as-yank' works like +`insert-buffer-substring', but removes the text properties in the +`yank-excluded-properties' list. +++ -** Atomic change groups. +*** The new function `insert-buffer-substring-no-properties' is like +insert-buffer-substring, but removes all text properties from the +inserted substring. -To perform some changes in the current buffer "atomically" so that -they either all succeed or are all undone, use `atomic-change-group' -around the code that makes changes. For instance: ++++ +*** The new function `filter-buffer-substring' extracts a buffer +substring, passes it through a set of filter functions, and returns +the filtered substring. It is used instead of `buffer-substring' or +`delete-and-extract-region' when copying text into a user-accessible +data structure, like the kill-ring, X clipboard, or a register. The +list of filter function is specified by the new variable +`buffer-substring-filters'. For example, Longlines mode uses +`buffer-substring-filters' to remove soft newlines from the copied +text. - (atomic-change-group - (insert foo) - (delete-region x y)) ++++ +*** Function `translate-region' accepts also a char-table as TABLE +argument. -If an error (or other nonlocal exit) occurs inside the body of -`atomic-change-group', it unmakes all the changes in that buffer that -were during the execution of the body. The change group has no effect -on any other buffers--any such changes remain. ++++ +*** The new translation table `translation-table-for-input' +is used for customizing self-insertion. The character to +be inserted is translated through it. -If you need something more sophisticated, you can directly call the -lower-level functions that `atomic-change-group' uses. Here is how. +--- +*** Text clones. -To set up a change group for one buffer, call `prepare-change-group'. -Specify the buffer as argument; it defaults to the current buffer. -This function returns a "handle" for the change group. You must save -the handle to activate the change group and then finish it. +The new function `text-clone-create'. Text clones are chunks of text +that are kept identical by transparently propagating changes from one +clone to the other. -Before you change the buffer again, you must activate the change -group. Pass the handle to `activate-change-group' afterward to -do this. +--- +*** The function `insert-string' is now obsolete. -After you make the changes, you must finish the change group. You can -either accept the changes or cancel them all. Call -`accept-change-group' to accept the changes in the group as final; -call `cancel-change-group' to undo them all. +** Syntax table changes: -You should use `unwind-protect' to make sure the group is always -finished. The call to `activate-change-group' should be inside the -`unwind-protect', in case the user types C-g just after it runs. -(This is one reason why `prepare-change-group' and -`activate-change-group' are separate functions.) Once you finish the -group, don't use the handle again--don't try to finish the same group -twice. ++++ +*** The macro `with-syntax-table' does not copy the table any more. -To make a multibuffer change group, call `prepare-change-group' once -for each buffer you want to cover, then use `nconc' to combine the -returned values, like this: ++++ +*** The new function `syntax-after' returns the syntax code +of the character after a specified buffer position, taking account +of text properties as well as the character code. - (nconc (prepare-change-group buffer-1) - (prepare-change-group buffer-2)) ++++ +*** `syntax-class' extracts the class of a syntax code (as returned +by syntax-after). -You can then activate the multibuffer change group with a single call -to `activate-change-group', and finish it with a single call to -`accept-change-group' or `cancel-change-group'. +*** The new package `syntax.el' provides an efficient way to find the +current syntactic context (as returned by `parse-partial-sexp'). -Nested use of several change groups for the same buffer works as you -would expect. Non-nested use of change groups for the same buffer -will lead to undesirable results, so don't let it happen; the first -change group you start for any given buffer should be the last one -finished. +** GC changes: +++ -** Progress reporters. -The new functions `make-progress-reporter', `progress-reporter-update', -`progress-reporter-force-update', `progress-reporter-done', and -`dotimes-with-progress-reporter' provide a simple and efficient way for -a command to present progress messages for the user. +*** New variables `gc-elapsed' and `gcs-done' provide extra information +on garbage collection. + ++++ +*** Functions from `post-gc-hook' are run at the end of garbage +collection. The hook is run with GC inhibited, so use it with care. + +** Buffer-related changes: + +--- +*** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST. +If it is non-nil, it specifies which buffers to list. + ++++ +*** `kill-buffer-hook' is now a permanent local. + +** Local variables lists: + ++++ +*** Text properties in local variables. + +A file local variables list cannot specify a string with text +properties--any specified text properties are discarded. + ++++ +*** The variable `safe-local-eval-forms' specifies a list of forms that +are ok to evaluate when they appear in an `eval' local variables +specification. Normally Emacs asks for confirmation before evaluating +such a form, but if the form appears in this list, no confirmation is +needed. + +--- +*** If a function has a non-nil `safe-local-eval-function' property, +that means it is ok to evaluate some calls to that function when it +appears in an `eval' local variables specification. If the property +is t, then any form calling that function with constant arguments is +ok. If the property is a function or list of functions, they are called +with the form as argument, and if any returns t, the form is ok to call. + +If the form is not "ok to call", that means Emacs asks for +confirmation as before. + +** Abbrev changes: + +*** The new function copy-abbrev-table returns a new abbrev table that +is a copy of a given abbrev table. + ++++ +*** define-abbrev now accepts an optional argument SYSTEM-FLAG. If +non-nil, this marks the abbrev as a "system" abbrev, which means that +it won't be stored in the user's abbrevs file if he saves the abbrevs. +Major modes that predefine some abbrevs should always specify this +flag. + +** Undo changes: + ++++ +*** An element of buffer-undo-list can now have the form (apply FUNNAME +. ARGS), where FUNNAME is a symbol other than t or nil. That stands +for a high-level change that should be undone by evaluating (apply +FUNNAME ARGS). + +These entries can also have the form (apply DELTA BEG END FUNNAME . ARGS) +which indicates that the change which took place was limited to the +range BEG...END and increased the buffer size by DELTA. + ++++ +*** If the buffer's undo list for the current command gets longer than +undo-outer-limit, garbage collection empties it. This is to prevent +it from using up the available memory and choking Emacs. +++ ** New `yank-handler' text property can be used to control how @@ -3258,26 +3454,361 @@ removes the text properties in the `yank-excluded-properties' list. However, the insertion of the text can be modified by a `yank-handler' text property. +** File operation changes: + +++ -** An element of buffer-undo-list can now have the form (apply FUNNAME -. ARGS), where FUNNAME is a symbol other than t or nil. That stands -for a high-level change that should be undone by evaluating (apply -FUNNAME ARGS). +*** New vars `exec-suffixes' and `load-suffixes' used when +searching for an executable resp. an elisp file. -These entries can also have the form (apply DELTA BEG END FUNNAME . ARGS) -which indicates that the change which took place was limited to the -range BEG...END and increased the buffer size by DELTA. ++++ +*** The new primitive `set-file-times' sets a file's access and +modification times. Magic file name handlers can handle this +operation. +++ -** If the buffer's undo list for the current command gets longer than -undo-outer-limit, garbage collection empties it. This is to prevent -it from using up the available memory and choking Emacs. +*** The new function `file-remote-p' tests a file name and returns +non-nil if it specifies a remote file (one that Emacs accesses using +its own special methods and not directly through the file system). +The value in that case is an identifier for the remote file system. +++ -** Enhancements to process support +*** `auto-save-file-format' has been renamed to +`buffer-auto-save-file-format' and made into a permanent local. -*** Function list-processes now has an optional argument; if non-nil, -only the processes whose query-on-exit flag is set are listed. ++++ +*** Functions `file-name-sans-extension' and `file-name-extension' now +ignore the leading dots in file names, so that file names such as +`.emacs' are treated as extensionless. + ++++ +*** copy-file now takes an additional option arg MUSTBENEW. + +This argument works like the MUSTBENEW argument of write-file. + ++++ +*** If the second argument to `copy-file' is the name of a directory, +the file is copied to that directory instead of signaling an error. + ++++ +*** `visited-file-modtime' and `calendar-time-from-absolute' now return +a list of two integers, instead of a cons. + ++++ +*** `file-chase-links' now takes an optional second argument LIMIT which +specifies the maximum number of links to chase through. If after that +many iterations the file name obtained is still a symbolic link, +`file-chase-links' returns it anyway. + ++++ +*** The new hook `before-save-hook' is invoked by `basic-save-buffer' +before saving buffers. This allows packages to perform various final +tasks, for example; it can be used by the copyright package to make +sure saved files have the current year in any copyright headers. + ++++ +*** If a buffer sets buffer-save-without-query to non-nil, +save-some-buffers will always save that buffer without asking +(if it's modified). + +*** New function `locate-file' searches for a file in a list of directories. +`locate-file' accepts a name of a file to search (a string), and two +lists: a list of directories to search in and a list of suffixes to +try; typical usage might use `exec-path' and `load-path' for the list +of directories, and `exec-suffixes' and `load-suffixes' for the list +of suffixes. The function also accepts a predicate argument to +further filter candidate files. + +One advantage of using this function is that the list of suffixes in +`exec-suffixes' is OS-dependant, so this function will find +executables without polluting Lisp code with OS dependancies. + +--- +*** The precedence of file-name-handlers has been changed. +Instead of blindly choosing the first handler that matches, +find-file-name-handler now gives precedence to a file-name handler +that matches near the end of the file name. More specifically, the +handler whose (match-beginning 0) is the largest is chosen. +In case of ties, the old "first matched" rule applies. + ++++ +*** A file name handler can declare which operations it handles. + +You do this by putting an `operation' property on the handler name +symbol. The property value should be a list of the operations that +the handler really handles. It won't be called for any other +operations. + +This is useful for autoloaded handlers, to prevent them from being +autoloaded when not really necessary. + +** Input changes: + ++++ +*** An interactive specification can now use the code letter 'U' to get +the up-event that was discarded in case the last key sequence read for a +previous 'k' or 'K' argument was a down-event; otherwise nil is used. + ++++ +*** The new interactive-specification `G' reads a file name +much like `F', but if the input is a directory name (even defaulted), +it returns just the directory name. + +--- +*** Functions y-or-n-p, read-char, read-key-sequence and the like, that +display a prompt but don't use the minibuffer, now display the prompt +using the text properties (esp. the face) of the prompt string. + ++++ +*** (while-no-input BODY...) runs BODY, but only so long as no input +arrives. If the user types or clicks anything, BODY stops as if a +quit had occurred. while-no-input returns the value of BODY, if BODY +finishes. It returns nil if BODY was aborted. + +** Minibuffer changes: + +*** The new function `minibufferp' returns non-nil if its optional +buffer argument is a minibuffer. If the argument is omitted, it +defaults to the current buffer. + ++++ +*** New function minibuffer-selected-window returns the window which +was selected when entering the minibuffer. + ++++ +*** read-from-minibuffer now accepts an additional argument KEEP-ALL +saying to put all inputs in the history list, even empty ones. + ++++ +*** The `read-file-name' function now takes an additional argument which +specifies a predicate which the file name read must satify. The +new variable `read-file-name-predicate' contains the predicate argument +while reading the file name from the minibuffer; the predicate in this +variable is used by read-file-name-internal to filter the completion list. + +--- +*** The new variable `read-file-name-function' can be used by lisp code +to override the internal read-file-name function. + ++++ +*** The new variable `read-file-name-completion-ignore-case' specifies +whether completion ignores case when reading a file name with the +`read-file-name' function. + ++++ +*** The new function `read-directory-name' can be used instead of +`read-file-name' to read a directory name; when used, completion +will only show directories. + +** Searching and matching changes: + ++++ +*** New function `looking-back' checks whether a regular expression matches +the text before point. Specifying the LIMIT argument bounds how far +back the match can start; this is a way to keep it from taking too long. + ++++ +*** The new variable search-spaces-regexp controls how to search +for spaces in a regular expression. If it is non-nil, it should be a +regular expression, and any series of spaces stands for that regular +expression. If it is nil, spaces stand for themselves. + +Spaces inside of constructs such as [..] and *, +, ? are never +replaced with search-spaces-regexp. + ++++ +*** There are now two new regular expression operators, \_< and \_>, +for matching the beginning and end of a symbol. A symbol is a +non-empty sequence of either word or symbol constituent characters, as +specified by the syntax table. + ++++ +*** skip-chars-forward and skip-chars-backward now handle +character classes such as [:alpha:], along with individual characters +and ranges. + +--- +*** In `replace-match', the replacement text no longer inherits +properties from surrounding text. + ++++ +*** The list returned by `(match-data t)' now has the buffer as a final +element, if the last match was on a buffer. `set-match-data' +accepts such a list for restoring the match state. + +--- +*** rx.el has new corresponding `symbol-end' and `symbol-start' elements. + ++++ +*** The default value of `sentence-end' is now defined using the new +variable `sentence-end-without-space', which contains such characters +that end a sentence without following spaces. + +The function `sentence-end' should be used to obtain the value of the +variable `sentence-end'. If the variable `sentence-end' is nil, then +this function returns the regexp constructed from the variables +`sentence-end-without-period', `sentence-end-double-space' and +`sentence-end-without-space'. + ++++ +** Enhancements to keymaps. + +*** Cleaner way to enter key sequences. + +You can enter a constant key sequence in a more natural format, the +same one used for saving keyboard macros, using the macro `kbd'. For +example, + +(kbd "C-x C-f") => "\^x\^f" + +*** Interactive commands can be remapped through keymaps. + +This is an alternative to using defadvice or substitute-key-definition +to modify the behavior of a key binding using the normal keymap +binding and lookup functionality. + +When a key sequence is bound to a command, and that command is +remapped to another command, that command is run instead of the +original command. + +Example: +Suppose that minor mode my-mode has defined the commands +my-kill-line and my-kill-word, and it wants C-k (and any other key +bound to kill-line) to run the command my-kill-line instead of +kill-line, and likewise it wants to run my-kill-word instead of +kill-word. + +Instead of rebinding C-k and the other keys in the minor mode map, +command remapping allows you to directly map kill-line into +my-kill-line and kill-word into my-kill-word through the minor mode +map using define-key: + + (define-key my-mode-map [remap kill-line] 'my-kill-line) + (define-key my-mode-map [remap kill-word] 'my-kill-word) + +Now, when my-mode is enabled, and the user enters C-k or M-d, +the commands my-kill-line and my-kill-word are run. + +Notice that only one level of remapping is supported. In the above +example, this means that if my-kill-line is remapped to other-kill, +then C-k still runs my-kill-line. + +The following changes have been made to provide command remapping: + +- Command remappings are defined using `define-key' with a prefix-key + `remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD + to definition DEF in keymap MAP. The definition is not limited to + another command; it can be anything accepted for a normal binding. + +- The new function `command-remapping' returns the binding for a + remapped command in the current keymaps, or nil if not remapped. + +- key-binding now remaps interactive commands unless the optional + third argument NO-REMAP is non-nil. + +- where-is-internal now returns nil for a remapped command (e.g. + kill-line if my-mode is enabled), and the actual key binding for + the command it is remapped to (e.g. C-k for my-kill-line). + It also has a new optional fifth argument, NO-REMAP, which inhibits + remapping if non-nil (e.g. it returns C-k for kill-line and + for my-kill-line). + +- The new variable `this-original-command' contains the original + command before remapping. It is equal to `this-command' when the + command was not remapped. + +*** If text has a `keymap' property, that keymap takes precedence +over minor mode keymaps. + +*** The `keymap' property now also works at the ends of overlays and +text-properties, according to their stickiness. This also means that it +works with empty overlays. The same hold for the `local-map' property. + +*** Dense keymaps now handle inheritance correctly. +Previously a dense keymap would hide all of the simple-char key +bindings of the parent keymap. + +*** `define-key-after' now accepts keys longer than 1. + +*** New function `current-active-maps' returns a list of currently +active keymaps. + +*** New function `describe-buffer-bindings' inserts the list of all +defined keys and their definitions. + +*** New function `keymap-prompt' returns the prompt-string of a keymap + +*** (map-keymap FUNCTION KEYMAP) applies the function to each binding +in the keymap. + +*** New variable emulation-mode-map-alists. + +Lisp packages using many minor mode keymaps can now maintain their own +keymap alist separate from minor-mode-map-alist by adding their keymap +alist to this list. + ++++ +** Atomic change groups. + +To perform some changes in the current buffer "atomically" so that +they either all succeed or are all undone, use `atomic-change-group' +around the code that makes changes. For instance: + + (atomic-change-group + (insert foo) + (delete-region x y)) + +If an error (or other nonlocal exit) occurs inside the body of +`atomic-change-group', it unmakes all the changes in that buffer that +were during the execution of the body. The change group has no effect +on any other buffers--any such changes remain. + +If you need something more sophisticated, you can directly call the +lower-level functions that `atomic-change-group' uses. Here is how. + +To set up a change group for one buffer, call `prepare-change-group'. +Specify the buffer as argument; it defaults to the current buffer. +This function returns a "handle" for the change group. You must save +the handle to activate the change group and then finish it. + +Before you change the buffer again, you must activate the change +group. Pass the handle to `activate-change-group' afterward to +do this. + +After you make the changes, you must finish the change group. You can +either accept the changes or cancel them all. Call +`accept-change-group' to accept the changes in the group as final; +call `cancel-change-group' to undo them all. + +You should use `unwind-protect' to make sure the group is always +finished. The call to `activate-change-group' should be inside the +`unwind-protect', in case the user types C-g just after it runs. +(This is one reason why `prepare-change-group' and +`activate-change-group' are separate functions.) Once you finish the +group, don't use the handle again--don't try to finish the same group +twice. + +To make a multibuffer change group, call `prepare-change-group' once +for each buffer you want to cover, then use `nconc' to combine the +returned values, like this: + + (nconc (prepare-change-group buffer-1) + (prepare-change-group buffer-2)) + +You can then activate the multibuffer change group with a single call +to `activate-change-group', and finish it with a single call to +`accept-change-group' or `cancel-change-group'. + +Nested use of several change groups for the same buffer works as you +would expect. Non-nested use of change groups for the same buffer +will lead to undesirable results, so don't let it happen; the first +change group you start for any given buffer should be the last one +finished. + ++++ +** Enhancements to process support + +*** Function list-processes now has an optional argument; if non-nil, +only the processes whose query-on-exit flag is set are listed. *** New set-process-query-on-exit-flag and process-query-on-exit-flag functions. The existing process-kill-without-query function is still @@ -3312,25 +3843,27 @@ non-nil value (the default), as it will automatically delay reading from such processes, to allowing them to produce more output before emacs tries to read it. -*** The new function `call-process-shell-command' executes a shell -command command synchronously in a separate process. +*** The new function `call-process-shell-command'. + +This executes a shell command command synchronously in a separate +process. *** The new function `process-file' is similar to `call-process', but obeys file handlers. The file handler is chosen based on -default-directory. - -*** The new function `set-process-filter-multibyte' sets the -multibyteness of a string given to a process's filter. - -*** The new function `process-filter-multibyte-p' returns t if a -string given to a process's filter is multibyte. +`default-directory'. *** A filter function of a process is called with a multibyte string if the filter's multibyteness is t. That multibyteness is decided by the value of `default-enable-multibyte-characters' when the process is created and can be changed later by `set-process-filter-multibyte'. -*** If a process's coding system is raw-text or no-conversion and its +*** The new function `set-process-filter-multibyte' sets the +multibyteness of the strings passed to the process's filter. + +*** The new function `process-filter-multibyte-p' returns the +multibyteness of the strings passed to the process's filter. + +*** If a process's coding system is `raw-text' or `no-conversion' and its buffer is multibyte, the output of the process is at first converted to multibyte by `string-to-multibyte' then inserted in the buffer. Previously, it was converted to multibyte by `string-as-multibyte', @@ -3415,31 +3948,19 @@ deleted network process is "deleted". The message passed to the sentinel when the connection is closed by the remote peer has been changed to "connection broken by remote peer". -+++ -** New function `force-window-update' can initiate a full redisplay of -one or all windows. Normally, this is not needed as changes in window -contents are detected automatically. However, certain implicit -changes to mode lines, header lines, or display properties may require -forcing an explicit window update. +** Using window objects: +++ -** The line-move, scroll-up, and scroll-down functions will now -modify the window vscroll to scroll through display rows that are -taller that the height of the window, for example in the presense of -large images. To disable this feature, Lisp code can bind the new -variable `auto-window-vscroll' to nil. +*** New function `window-body-height'. -+++ -** Function `compute-motion' now calculates the usable window -width if the WIDTH argument is nil. If the TOPOS argument is nil, -the usable window height and width is used. +This is like `window-height' but does not count the mode line or the +header line. +++ -** Function pos-visible-in-window-p now returns the pixel coordinates -and partial visiblity state of the corresponding row, if the PARTIALLY -arg is non-nil. +*** New function `window-body-height'. -** Changes in using window objects: +This is like window-height but does not count the mode line +or the header line. +++ *** You can now make a window as short as one line. @@ -3462,11 +3983,12 @@ return window edges in units of pixels, rather than columns and lines. +++ *** The new macro `with-selected-window' temporarily switches the -selected window without impacting the order of buffer-list. +selected window without impacting the order of `buffer-list'. +++ -*** `select-window' takes an optional second argument `norecord', like -`switch-to-buffer'. +*** `select-window' takes an optional second argument `norecord'. + +This is like `switch-to-buffer'. +++ *** `save-selected-window' now saves and restores the selected window @@ -3474,32 +3996,33 @@ of every frame. This way, it restores everything that can be changed by calling `select-window'. +++ -*** The function `set-window-buffer' now has an optional third argument -KEEP-MARGINS which will preserve the window's current margin, fringe, -and scroll-bar settings if non-nil. +*** `set-window-buffer' has an optional argument KEEP-MARGINS. + +If non-nil, that says to preserve the window's current margin, fringe, +and scroll-bar settings. +++ ** Customizable fringe bitmaps -*** New function 'define-fringe-bitmap' can now be used to create new +*** New function `define-fringe-bitmap' can now be used to create new fringe bitmaps, as well as change the built-in fringe bitmaps. To change a built-in bitmap, do (require 'fringe) and use the symbol identifing the bitmap such as `left-truncation or `continued-line'. -*** New function 'destroy-fringe-bitmap' can be used to destroy a -previously created bitmap, or restore a built-in bitmap. +*** New function `destroy-fringe-bitmap' deletes a fringe bitmap +or restores a built-in one to its default value. -*** New function 'set-fringe-bitmap-face' can now be used to set a +*** New function `set-fringe-bitmap-face' can now be used to set a specific face to be used for a specific fringe bitmap. The face is automatically merged with the `fringe' face, so normally, the face should only specify the foreground color of the bitmap. -*** There are new display properties, left-fringe and right-fringe, +*** There are new display properties, `left-fringe; and `right-fringe', that can be used to show a specific bitmap in the left or right fringe bitmap of the display line. -Format is 'display '(left-fringe BITMAP [FACE]), where BITMAP is a +Format is `display (left-fringe BITMAP [FACE])', where BITMAP is a symbol identifying a fringe bitmap, either built-in or defined with `define-fringe-bitmap', and FACE is an optional face name to be used for displaying the bitmap instead of the default `fringe' face. @@ -3508,8 +4031,10 @@ When specified, FACE is automatically merged with the `fringe' face. *** New function `fringe-bitmaps-at-pos' returns the current fringe bitmaps in the display line at a given buffer position. +** Other window fringe features: + +++ -** Controlling the default left and right fringe widths. +*** Controlling the default left and right fringe widths. The default left and right fringe widths for all windows of a frame can now be controlled by setting the `left-fringe' and `right-fringe' @@ -3529,9 +4054,9 @@ of the currently defined fringe bitmaps. The width of the built-in fringe bitmaps is 8 pixels. +++ -** Per-window fringe and scrollbar settings +*** Per-window fringe and scrollbar settings -*** Windows can now have their own individual fringe widths and +**** Windows can now have their own individual fringe widths and position settings. To control the fringe widths of a window, either set the buffer-local @@ -3549,295 +4074,31 @@ settings. To make `left-fringe-width', `right-fringe-width', and displaying the buffer in a window, or use `set-window-buffer' to force an update of the display margins. -*** Windows can now have their own individual scroll-bar settings +**** Windows can now have their own individual scroll-bar settings controlling the width and position of scroll-bars. -To control the scroll-bar of a window, either set the buffer-local -variables `scroll-bar-mode' and `scroll-bar-width', or call -`set-window-scroll-bars'. The function `window-scroll-bars' can be -used to obtain the current settings. To make `scroll-bar-mode' and -`scroll-bar-width' take effect, you must set them before displaying -the buffer in a window, or use `set-window-buffer' to force an update -of the display margins. - -+++ -** When using non-toolkit scroll bars with the default width, -the scroll-bar-width frame parameter value is nil. - -+++ -** Multiple overlay arrows can now be defined and managed via the new -variable `overlay-arrow-variable-list'. It contains a list of -varibles which contain overlay arrow position markers, including -the original `overlay-arrow-position' variable. - -Each variable on this list can have individual `overlay-arrow-string' -and `overlay-arrow-bitmap' properties that specify an overlay arrow -string (for non-window terminals) or fringe bitmap (for window -systems) to display at the corresponding overlay arrow position. -If either property is not set, the default `overlay-arrow-string' or -'overlay-arrow-fringe-bitmap' will be used. - -+++ -** New line-height and line-spacing properties for newline characters - -A newline can now have line-height and line-spacing text or overlay -properties that control the height of the corresponding display row. - -If the line-height property value is t, the newline does not -contribute to the height of the display row; instead the height of the -newline glyph is reduced. Also, a line-spacing property on this -newline is ignored. This can be used to tile small images or image -slices without adding blank areas between the images. - -If the line-height property value is a positive integer, the value -specifies the minimum line height in pixels. If necessary, the line -height it increased by increasing the line's ascent. - -If the line-height property value is a float, the minimum line height -is calculated by multiplying the default frame line height by the -given value. - -If the line-height property value is a cons (FACE . RATIO), the -minimum line height is calculated as RATIO * height of named FACE. -RATIO is int or float. If FACE is t, it specifies the current face. - -If the line-height property value is a cons (nil . RATIO), the line -height is calculated as RATIO * actual height of the line's contents. - -If the line-height value is a cons (HEIGHT . TOTAL), HEIGHT specifies -the line height as described above, while TOTAL is any of the forms -described above and specifies the total height of the line, causing a -varying number of pixels to be inserted after the line to make it line -exactly that many pixels high. - -If the line-spacing property value is an positive integer, the value -is used as additional pixels to insert after the display line; this -overrides the default frame line-spacing and any buffer local value of -the line-spacing variable. - -If the line-spacing property is a float or cons, the line spacing -is calculated as specified above for the line-height property. - -+++ -** The buffer local line-spacing variable can now have a float value, -which is used as a height relative to the default frame line height. - -+++ -** Enhancements to stretch display properties - -The display property stretch specification form `(space PROPS)', where -PROPS is a property list now allows pixel based width and height -specifications, as well as enhanced horizontal text alignment. - -The value of these properties can now be a (primitive) expression -which is evaluated during redisplay. The following expressions -are supported: - -EXPR ::= NUM | (NUM) | UNIT | ELEM | POS | IMAGE | FORM -NUM ::= INTEGER | FLOAT | SYMBOL -UNIT ::= in | mm | cm | width | height -ELEM ::= left-fringe | right-fringe | left-margin | right-margin - | scroll-bar | text -POS ::= left | center | right -FORM ::= (NUM . EXPR) | (OP EXPR ...) -OP ::= + | - - -The form `NUM' specifies a fractional width or height of the default -frame font size. The form `(NUM)' specifies an absolute number of -pixels. If a symbol is specified, its buffer-local variable binding -is used. The `in', `mm', and `cm' units specifies the number of -pixels per inch, milli-meter, and centi-meter, resp. The `width' and -`height' units correspond to the width and height of the current face -font. An image specification corresponds to the width or height of -the image. - -The `left-fringe', `right-fringe', `left-margin', `right-margin', -`scroll-bar', and `text' elements specify to the width of the -corresponding area of the window. - -The `left', `center', and `right' positions can be used with :align-to -to specify a position relative to the left edge, center, or right edge -of the text area. One of the above window elements (except `text') -can also be used with :align-to to specify that the position is -relative to the left edge of the given area. Once the base offset for -a relative position has been set (by the first occurrence of one of -these symbols), further occurences of these symbols are interpreted as -the width of the area. - -For example, to align to the center of the left-margin, use - :align-to (+ left-margin (0.5 . left-margin)) - -If no specific base offset is set for alignment, it is always relative -to the left edge of the text area. For example, :align-to 0 in a -header-line aligns with the first text column in the text area. - -The value of the form `(NUM . EXPR)' is the value of NUM multiplied by -the value of the expression EXPR. For example, (2 . in) specifies a -width of 2 inches, while (0.5 . IMAGE) specifies half the width (or -height) of the specified image. - -The form `(+ EXPR ...)' adds up the value of the expressions. -The form `(- EXPR ...)' negates or subtracts the value of the expressions. - -+++ -** Support for displaying image slices - -*** New display property (slice X Y WIDTH HEIGHT) can be used with -an image property to display only a specific slice of the image. - -*** Function insert-image has new optional fourth arg to -specify image slice (X Y WIDTH HEIGHT). - -*** New function insert-sliced-image inserts a given image as a -specified number of evenly sized slices (rows x columns). - -+++ -** Images can now have an associated image map via the :map property. - -An image map is an alist where each element has the format (AREA ID PLIST). -An AREA is specified as either a rectangle, a circle, or a polygon: -A rectangle is a cons (rect . ((X0 . Y0) . (X1 . Y1))) specifying the -pixel coordinates of the upper left and bottom right corners. -A circle is a cons (circle . ((X0 . Y0) . R)) specifying the center -and the radius of the circle; R can be a float or integer. -A polygon is a cons (poly . [X0 Y0 X1 Y1 ...]) where each pair in the -vector describes one corner in the polygon. - -When the mouse pointer is above a hot-spot area of an image, the -PLIST of that hot-spot is consulted; if it contains a `help-echo' -property it defines a tool-tip for the hot-spot, and if it contains -a `pointer' property, it defines the shape of the mouse cursor when -it is over the hot-spot. See the variable 'void-area-text-pointer' -for possible pointer shapes. - -When you click the mouse when the mouse pointer is over a hot-spot, -an event is composed by combining the ID of the hot-spot with the -mouse event, e.g. [area4 mouse-1] if the hot-spot's ID is `area4'. - -+++ (lispref) -??? (man) -** The mouse pointer shape in void text areas (i.e. after the end of a -line or below the last line in the buffer) of the text window is now -controlled by the new variable `void-text-area-pointer'. The default -is to use the `arrow' (non-text) pointer. Other choices are `text' -(or nil), `hand', `vdrag', `hdrag', `modeline', and `hourglass'. - -+++ -** The mouse pointer shape over an image can now be controlled by the -:pointer image property. - -+++ -** Lisp code can now test if a given buffer position is inside a -clickable link with the new function `mouse-on-link-p'. This is the -function used by the new `mouse-1-click-follows-link' functionality. - -+++ -** The mouse pointer shape over ordinary text or images can now be -controlled/overriden via the `pointer' text property. - -** Mouse event enhancements: - -+++ -*** Mouse clicks on fringes now generates left-fringe or right-fringes -events, rather than a text area click event. - -+++ -*** Mouse clicks in the left and right marginal areas now includes a -sensible buffer position corresponding to the first character in the -corresponding text row. - -+++ -*** Function `mouse-set-point' now works for events outside text area. - -+++ -*** Mouse events now includes buffer position for all event types. - -+++ -*** `posn-point' now returns buffer position for non-text area events. - -+++ -*** New function `posn-area' returns window area clicked on (nil means -text area). - -+++ -*** Mouse events include actual glyph column and row for all event types. - -+++ -*** New function `posn-actual-col-row' returns actual glyph coordinates. - -+++ -*** Mouse events can now include image object in addition to string object. - -+++ -*** Mouse events include relative x and y pixel coordinates relative to -the top left corner of the object (image or character) clicked on. - -+++ -*** Mouse events include the pixel width and height of the object -(image or character) clicked on. - -+++ -*** New functions 'posn-object', 'posn-object-x-y', and -'posn-object-width-height' return the image or string object of a mouse -click, the x and y pixel coordinates relative to the top left corner -of that object, and the total width and height of that object. - -+++ -** At the end of a command, point moves out from within invisible -text, in the same way it moves out from within text covered by an -image or composition property. - -This makes it generally unnecessary to mark invisible text as intangible. -This is particularly good because the intangible property often has -unexpected side-effects since the property applies to everything -(including `goto-char', ...) whereas this new code is only run after -post-command-hook and thus does not care about intermediate states. - -+++ -** Normally, the cursor is displayed at the end of any overlay and -text property string that may be present at the current window -position. The cursor can now be placed on any character of such -strings by giving that character a non-nil `cursor' text property. - -+++ -** The display space :width and :align-to text properties are now -supported on text terminals. - -+++ -** Arguments for remove-overlays are now optional, so that you can -remove all overlays in the buffer by just calling (remove-overlay). - -+++ -** New variable char-property-alias-alist. - -This variable allows you to create alternative names for text -properties. It works at the same level as `default-text-properties', -although it applies to overlays as well. This variable was introduced -to implement the `font-lock-face' property. +To control the scroll-bar of a window, either set the buffer-local +variables `scroll-bar-mode' and `scroll-bar-width', or call +`set-window-scroll-bars'. The function `window-scroll-bars' can be +used to obtain the current settings. To make `scroll-bar-mode' and +`scroll-bar-width' take effect, you must set them before displaying +the buffer in a window, or use `set-window-buffer' to force an update +of the display margins. -+++ -** New function `get-char-property-and-overlay' accepts the same -arguments as `get-char-property' and returns a cons whose car is the -return value of `get-char-property' called with those arguments and -whose cdr is the overlay in which the property was found, or nil if -it was found as a text property or not found at all. +** Redisplay features: +++ -** The new frame parameter `tty-color-mode' specifies the mode to use -for color support on character terminal frames. Its value can be a -number of colors to support, or a symbol. See the Emacs Lisp -Reference manual for more detailed documentation. +*** `sit-for' can now be called with args (SECONDS &optional NODISP). +++ -** The new face attribute `min-colors' can be used to tailor the face -color to the number of colors supported by a display, and define the -foreground and background colors accordingly so that they look best on -a terminal that supports at least this many colors. This is now the -preferred method for defining default faces in a way that makes a good -use of the capabilities of the display. +*** New function `force-window-update' can initiate a full redisplay of +one or all windows. Normally, this is not needed as changes in window +contents are detected automatically. However, certain implicit +changes to mode lines, header lines, or display properties may require +forcing an explicit window update. +++ -** (char-displayable-p CHAR) returns non-nil if Emacs ought to be able +*** (char-displayable-p CHAR) returns non-nil if Emacs ought to be able to display CHAR. More precisely, if the selected frame's fontset has a font to display the character set that CHAR belongs to. @@ -3845,813 +4106,712 @@ Fontsets can specify a font on a per-character basis; when the fontset does that, this value cannot be accurate. +++ -** New function display-supports-face-attributes-p can be used to test -whether a given set of face attributes is actually displayable. - -A new predicate `supports' has also been added to the `defface' face -specification language, which can be used to do this test for faces -defined with defface. - ---- -** The special treatment of faces whose names are of the form `fg:COLOR' -or `bg:COLOR' has been removed. Lisp programs should use the -`defface' facility for defining faces with specific colors, or use -the feature of specifying the face attributes :foreground and :background -directly in the `face' property instead of using a named face. - -+++ -** The first face specification element in a defface can specify -`default' instead of frame classification. Then its attributes act as -defaults that apply to all the subsequent cases (and can be overridden -by them). - -+++ -** The variable `face-font-rescale-alist' specifies how much larger -(or smaller) font we should use. For instance, if the value is -'((SOME-FONTNAME-PATTERN . 1.3)) and a face requests a font of 10 -point, we actually use a font of 13 point if the font matches -SOME-FONTNAME-PATTERN. - ---- -** `set-fontset-font', `fontset-info', `fontset-font' now operate on -the default fontset if the argument NAME is nil.. +*** You can define multiple overlay arrows via the new +variable `overlay-arrow-variable-list'. ---- -** The function face-differs-from-default-p now truly checks whether the -given face displays differently from the default face or not (previously -it did only a very cursory check). +It contains a list of varibles which contain overlay arrow position +markers, including the original `overlay-arrow-position' variable. -+++ -** face-attribute, face-foreground, face-background, and face-stipple now -accept a new optional argument, INHERIT, which controls how face -inheritance is used when determining the value of a face attribute. +Each variable on this list can have individual `overlay-arrow-string' +and `overlay-arrow-bitmap' properties that specify an overlay arrow +string (for non-window terminals) or fringe bitmap (for window +systems) to display at the corresponding overlay arrow position. +If either property is not set, the default `overlay-arrow-string' or +'overlay-arrow-fringe-bitmap' will be used. +++ -** New functions face-attribute-relative-p and merge-face-attribute -help with handling relative face attributes. +*** New `line-height' and `line-spacing' properties for newline characters -+++ -** The priority of faces in an :inherit attribute face-list is reversed. -If a face contains an :inherit attribute with a list of faces, earlier -faces in the list override later faces in the list; in previous releases -of Emacs, the order was the opposite. This change was made so that -:inherit face-lists operate identically to face-lists in text `face' -properties. +A newline can now have `line-height' and `line-spacing' text or overlay +properties that control the height of the corresponding display row. -+++ -** New standard font-lock face `font-lock-preprocessor-face'. +If the `line-height' property value is t, the newline does not +contribute to the height of the display row; instead the height of the +newline glyph is reduced. Also, a `line-spacing' property on this +newline is ignored. This can be used to tile small images or image +slices without adding blank areas between the images. -+++ -** New special text property `font-lock-face'. +If the `line-height' property value is a positive integer, the value +specifies the minimum line height in pixels. If necessary, the line +height it increased by increasing the line's ascent. -This property acts like the `face' property, but it is controlled by -M-x font-lock-mode. It is not, strictly speaking, a builtin text -property. Instead, it is implemented inside font-core.el, using the -new variable `char-property-alias-alist'. +If the `line-height' property value is a float, the minimum line +height is calculated by multiplying the default frame line height by +the given value. ---- -** jit-lock obeys a new text-property `jit-lock-defer-multiline'. -If a piece of text with that property gets contextually refontified -(see jit-lock-defer-contextually), then all of that text will -be refontified. This is useful when the syntax of a textual element -depends on text several lines further down (and when font-lock-multiline -is not appropriate to solve that problem). For example in Perl: +If the `line-height' property value is a cons (FACE . RATIO), the +minimum line height is calculated as RATIO * height of named FACE. +RATIO is int or float. If FACE is t, it specifies the current face. - s{ - foo - }{ - bar - }e +If the `line-height' property value is a cons (nil . RATIO), the line +height is calculated as RATIO * actual height of the line's contents. -Adding/removing the last `e' changes the `bar' from being a piece of -text to being a piece of code, so you'd put a jit-lock-defer-multiline -property over the second half of the command to force (deferred) -refontification of `bar' whenever the `e' is added/removed. +If the `line-height' value is a cons (HEIGHT . TOTAL), HEIGHT specifies +the line height as described above, while TOTAL is any of the forms +described above and specifies the total height of the line, causing a +varying number of pixels to be inserted after the line to make it line +exactly that many pixels high. -+++ -** font-lock can manage arbitrary text-properties beside `face'. -*** the FACENAME returned in font-lock-keywords can be a list -of the form (face FACE PROP1 VAL1 PROP2 VAL2 ...) so you can set -other properties than `face'. -*** font-lock-extra-managed-props can be set to make sure those extra -properties are automatically cleaned up by font-lock. +If the `line-spacing' property value is an positive integer, the value +is used as additional pixels to insert after the display line; this +overrides the default frame `line-spacing' and any buffer local value of +the `line-spacing' variable. ---- -** The precedence of file-name-handlers has been changed. -Instead of blindly choosing the first handler that matches, -find-file-name-handler now gives precedence to a file-name handler -that matches near the end of the file name. More specifically, the -handler whose (match-beginning 0) is the largest is chosen. -In case of ties, the old "first matched" rule applies. +If the `line-spacing' property is a float or cons, the line spacing +is calculated as specified above for the `line-height' property. +++ -** A file name handler can declare which operations it handles. - -You do this by putting an `operation' property on the handler name -symbol. The property value should be a list of the operations that -the handler really handles. It won't be called for any other -operations. - -This is useful for autoloaded handlers, to prevent them from being -autoloaded when not really necessary. +*** The buffer local line-spacing variable can now have a float value, +which is used as a height relative to the default frame line height. +++ -** `set-auto-mode' now gives the interpreter magic line (if present) -precedence over the file name. Likewise an ) - (if (boundp 'foo) form -won't produce a warning if it's not defined as a function, and in the -second case, using `foo' as a variable won't produce a warning if it's -unbound. The test must be in exactly one of the above forms (after -macro expansion), but such tests can be nested. Note that `when' and -`unless' expand to `if', but `cond' doesn't. +** Text property and overlay changes: -*** `(featurep 'xemacs)' is treated by the compiler as nil. This -helps to avoid noisy compiler warnings in code meant to run under both -Emacs and XEmacs and can sometimes make the result significantly more -efficient. Since byte code from recent versions of XEmacs won't -generally run in Emacs and vice versa, this optimization doesn't lose -you anything. ++++ +*** Arguments for remove-overlays are now optional, so that you can +remove all overlays in the buffer by just calling (remove-overlays). -*** The local variable `no-byte-compile' in elisp files is now obeyed. ++++ +*** New variable char-property-alias-alist. ---- -** When a Lisp file uses CL functions at run-time, compiling the file -now issues warnings about these calls, unless the file performs -(require 'cl) when loaded. +This variable allows you to create alternative names for text +properties. It works at the same level as `default-text-properties', +although it applies to overlays as well. This variable was introduced +to implement the `font-lock-face' property. +++ -** New function unsafep returns nil if the given Lisp form can't possibly -do anything dangerous; otherwise it returns a reason why the form might be -unsafe (calls dangerous function, alters global variable, etc). +*** New function `get-char-property-and-overlay' accepts the same +arguments as `get-char-property' and returns a cons whose car is the +return value of `get-char-property' called with those arguments and +whose cdr is the overlay in which the property was found, or nil if +it was found as a text property or not found at all. +++ -** There is a new Warnings facility; see the functions `warn' -and `display-warning'. +*** The new function remove-list-of-text-properties is almost the same +as `remove-text-properties'. The only difference is that it takes a +list of property names as argument rather than a property list. ---- -** VC changes for backends: -*** (vc-switches BACKEND OPERATION) is a new function for use by backends. -*** The new `find-version' backend function replaces the `destfile' -parameter of the `checkout' backend function. -Old code still works thanks to a default `find-version' behavior that -uses the old `destfile' parameter. +** Face changes +++ -** Already true in Emacs 21.1, but not emphasized clearly enough: - -Multibyte buffers can now faithfully record all 256 character codes -from 0 to 255. As a result, most of the past reasons to use unibyte -buffers no longer exist. We only know of three reasons to use them -now: - -1. If you prefer to use unibyte text all of the time. +*** The new face attribute condition `min-colors' can be used to tailor +the face color to the number of colors supported by a display, and +define the foreground and background colors accordingly so that they +look best on a terminal that supports at least this many colors. This +is now the preferred method for defining default faces in a way that +makes a good use of the capabilities of the display. -2. For reading files into temporary buffers, when you want to avoid -the time it takes to convert the format. ++++ +*** New function display-supports-face-attributes-p can be used to test +whether a given set of face attributes is actually displayable. -3. For binary files where format conversion would be pointless and -wasteful. +A new predicate `supports' has also been added to the `defface' face +specification language, which can be used to do this test for faces +defined with defface. --- -** set-buffer-file-coding-system now takes an additional argument, -NOMODIFY. If it is non-nil, it means don't mark the buffer modified. +*** The special treatment of faces whose names are of the form `fg:COLOR' +or `bg:COLOR' has been removed. Lisp programs should use the +`defface' facility for defining faces with specific colors, or use +the feature of specifying the face attributes :foreground and :background +directly in the `face' property instead of using a named face. +++ -** The new variable `auto-coding-functions' lets you specify functions -to examine a file being visited and deduce the proper coding system -for it. (If the coding system is detected incorrectly for a specific -file, you can put a `coding:' tags to override it.) +*** The first face specification element in a defface can specify +`default' instead of frame classification. Then its attributes act as +defaults that apply to all the subsequent cases (and can be overridden +by them). ---- -** The new function `merge-coding-systems' fills in unspecified aspects -of one coding system from another coding system. ++++ +*** The variable `face-font-rescale-alist' specifies how much larger +(or smaller) font we should use. For instance, if the value is +'((SOME-FONTNAME-PATTERN . 1.3)) and a face requests a font of 10 +point, we actually use a font of 13 point if the font matches +SOME-FONTNAME-PATTERN. --- -** New coding system property `mime-text-unsuitable' indicates that -the coding system's `mime-charset' is not suitable for MIME text -parts, e.g. utf-16. +*** The function `face-differs-from-default-p' now truly checks +whether the given face displays differently from the default face or +not (previously it did only a very cursory check). +++ -** New function `decode-coding-inserted-region' decodes a region as if -it is read from a file without decoding. +*** `face-attribute', `face-foreground', `face-background', and +`face-stipple' now accept a new optional argument, INHERIT, which +controls how face inheritance is used when determining the value of a +face attribute. +++ -** Function `translate-region' accepts also a char-table as TABLE -argument. +*** New functions `face-attribute-relative-p' and `merge-face-attribute' +help with handling relative face attributes. +++ -** The new translation table `translation-table-for-input' -is used for customizing self-insertion. The character to -be inserted is translated through it. +*** The priority of faces in an :inherit attribute face list is reversed. ---- -** New CCL functions `lookup-character' and `lookup-integer' access -hash tables defined by the Lisp function `define-translation-hash-table'. +If a face contains an :inherit attribute with a list of faces, earlier +faces in the list override later faces in the list; in previous +releases of Emacs, the order was the opposite. This change was made +so that :inherit face lists operate identically to face lists in text +`face' properties. +++ -** The flags, width, and precision options for %-specifications in function -`format' are now documented. Some flags that were accepted but not -implemented (such as "*") are no longer accepted. +*** New standard font-lock face `font-lock-preprocessor-face'. --- -** New function `redirect-debugging-output' can be used to redirect -debugging output on the stderr file handle to a file. +*** `set-fontset-font', `fontset-info', `fontset-font' now operate on +the default fontset if the argument NAME is nil.. -+++ -** `makehash' is now obsolete. Use `make-hash-table' instead. +** Font-Lock changes: +++ -** The macro `with-syntax-table' does not copy the table any more. +*** New special text property `font-lock-face'. -+++ -** New variables `gc-elapsed' and `gcs-done' provide extra information -on garbage collection. +This property acts like the `face' property, but it is controlled by +M-x font-lock-mode. It is not, strictly speaking, a builtin text +property. Instead, it is implemented inside font-core.el, using the +new variable `char-property-alias-alist'. +++ -** New function `locale-info' accesses locale information. +*** font-lock can manage arbitrary text-properties beside `face'. -+++ -** The new variable `print-continuous-numbering', when non-nil, says -that successive calls to print functions should use the same -numberings for circular structure references. This is only relevant -when `print-circle' is non-nil. +*** the FACENAME returned in `font-lock-keywords' can be a list of the +form (face FACE PROP1 VAL1 PROP2 VAL2 ...) so you can set other +properties than `face'. -When you bind `print-continuous-numbering' to t, you should -also bind `print-number-table' to nil. +*** `font-lock-extra-managed-props' can be set to make sure those +extra properties are automatically cleaned up by font-lock. --- -** When pure storage overflows while dumping, Emacs now prints how -much pure storage it will approximately need. - -+++ -** File local variables. +*** jit-lock obeys a new text-property `jit-lock-defer-multiline'. -A file local variables list cannot specify a string with text -properties--any specified text properties are discarded. +If a piece of text with that property gets contextually refontified +(see `jit-lock-defer-contextually'), then all of that text will +be refontified. This is useful when the syntax of a textual element +depends on text several lines further down (and when `font-lock-multiline' +is not appropriate to solve that problem). For example in Perl: -+++ -** The variable `safe-local-eval-forms' specifies a list of forms that -are ok to evaluate when they appear in an `eval' local variables -specification. Normally Emacs asks for confirmation before evaluating -such a form, but if the form appears in this list, no confirmation is -needed. + s{ + foo + }{ + bar + }e ---- -** If a function has a non-nil `safe-local-eval-function' property, -that means it is ok to evaluate some calls to that function when it -appears in an `eval' local variables specification. If the property -is t, then any form calling that function with constant arguments is -ok. If the property is a function or list of functions, they are called -with the form as argument, and if any returns t, the form is ok to call. +Adding/removing the last `e' changes the `bar' from being a piece of +text to being a piece of code, so you'd put a `jit-lock-defer-multiline' +property over the second half of the command to force (deferred) +refontification of `bar' whenever the `e' is added/removed. -If the form is not "ok to call", that means Emacs asks for -confirmation as before. +** Major mode mechanism changes: +++ -** Renamed hooks to better follow the naming convention: -find-file-hooks to find-file-hook, -find-file-not-found-hooks to find-file-not-found-functions, -write-file-hooks to write-file-functions, -write-contents-hooks to write-contents-functions, -x-lost-selection-hooks to x-lost-selection-functions, -x-sent-selection-hooks to x-sent-selection-functions. -Marked local-write-file-hooks as obsolete (use the LOCAL arg of `add-hook'). +*** `set-auto-mode' now gives the interpreter magic line (if present) +precedence over the file name. Likewise an ` ) + (if (boundp 'foo) form +won't produce a warning if it's not defined as a function, and in the +second case, using `foo' as a variable won't produce a warning if it's +unbound. The test must be in exactly one of the above forms (after +macro expansion), but such tests can be nested. Note that `when' and +`unless' expand to `if', but `cond' doesn't. + +*** `(featurep 'xemacs)' is treated by the compiler as nil. This +helps to avoid noisy compiler warnings in code meant to run under both +Emacs and XEmacs and can sometimes make the result significantly more +efficient. Since byte code from recent versions of XEmacs won't +generally run in Emacs and vice versa, this optimization doesn't lose +you anything. + +*** The local variable `no-byte-compile' in elisp files is now obeyed. + +--- +*** When a Lisp file uses CL functions at run-time, compiling the file +now issues warnings about these calls, unless the file performs +(require 'cl) when loaded. + +** Frame operations: +++ -*** New functions frame-current-scroll-bars and window-current-scroll-bars. +*** New functions `frame-current-scroll-bars' and `window-current-scroll-bars'. These functions return the current locations of the vertical and horizontal scroll bars in a frame or window. +++ -*** The new primitive `get-internal-run-time' returns the processor -run time used by Emacs since start-up. +*** The new function `modify-all-frames-parameters' modifies parameters +for all (existing and future) frames. +++ -*** The new function insert-buffer-substring-as-yank works like -`insert-buffer-substring', but removes the text properties in the -`yank-excluded-properties' list. +*** The new frame parameter `tty-color-mode' specifies the mode to use +for color support on character terminal frames. Its value can be a +number of colors to support, or a symbol. See the Emacs Lisp +Reference manual for more detailed documentation. +++ -*** The new function insert-buffer-substring-no-properties is like -insert-buffer-substring, but removes all text properties from the -inserted substring. +*** When using non-toolkit scroll bars with the default width, +the `scroll-bar-width' frame parameter value is nil. -+++ -*** The new functions `lax-plist-get' and `lax-plist-put' are like -`plist-get' and `plist-put', except that they compare the property -name using `equal' rather than `eq'. +** Mule changes: +++ -*** New function `line-number-at-pos' returns the line number of the -current line in the current buffer, or if optional buffer position is -given, line number of corresponding line in current buffer. +*** Already true in Emacs 21.1, but not emphasized clearly enough: -+++ -*** New function `looking-back' checks whether a regular expression matches -the text before point. Specifying the LIMIT argument bounds how far -back the match can start; this is a way to keep it from taking too long. +Multibyte buffers can now faithfully record all 256 character codes +from 0 to 255. As a result, most of the past reasons to use unibyte +buffers no longer exist. We only know of three reasons to use them +now: -+++ -*** New function `macroexpand-all' expands all macros in a form. -It is similar to the Common-Lisp function of the same name. -One difference is that it guarantees to return the original argument -if no expansion is done, which can be tested using `eq'. +1. If you prefer to use unibyte text all of the time. -*** The new function `minibufferp' returns non-nil if its optional -buffer argument is a minibuffer. If the argument is omitted, it -defaults to the current buffer. +2. For reading files into temporary buffers, when you want to avoid +the time it takes to convert the format. -+++ -*** New function minibuffer-selected-window returns the window which -was selected when entering the minibuffer. +3. For binary files where format conversion would be pointless and +wasteful. -+++ -*** The new function `modify-all-frames-parameters' modifies parameters -for all (existing and future) frames. +--- +*** set-buffer-file-coding-system now takes an additional argument, +NOMODIFY. If it is non-nil, it means don't mark the buffer modified. +++ -*** New functions posn-at-point and posn-at-x-y return -click-event-style position information for a given visible buffer -position or for a given window pixel coordinate. +*** The new variable `auto-coding-functions' lets you specify functions +to examine a file being visited and deduce the proper coding system +for it. (If the coding system is detected incorrectly for a specific +file, you can put a `coding:' tags to override it.) --- -*** New function quail-find-key returns a list of keys to type in the -current input method to input a character. - -+++ -*** The new function `rassq-delete-all' deletes all elements from an -alist whose cdr is `eq' to a specified value. +*** The new function `merge-coding-systems' fills in unspecified aspects +of one coding system from another coding system. -+++ -*** The new function remove-list-of-text-properties is almost the same -as `remove-text-properties'. The only difference is that it takes a -list of property names as argument rather than a property list. +--- +*** New coding system property `mime-text-unsuitable' indicates that +the coding system's `mime-charset' is not suitable for MIME text +parts, e.g. utf-16. +++ -*** The new primitive `set-file-times' sets a file's access and -modification times. Magic file name handlers can handle this -operation. +*** New function `decode-coding-inserted-region' decodes a region as if +it is read from a file without decoding. -+++ -*** New function substring-no-properties returns a substring without -text properties. +--- +*** New CCL functions `lookup-character' and `lookup-integer' access +hash tables defined by the Lisp function `define-translation-hash-table'. -+++ -*** The new function syntax-after returns the syntax code -of the character after a specified buffer position, taking account -of text properties as well as the character code. +--- +*** New function quail-find-key returns a list of keys to type in the +current input method to input a character. -+++ -*** `syntax-class' extracts the class of a syntax code (as returned -by syntax-after). +** Mode line changes: +++ -*** New function `tool-bar-local-item-from-menu' +*** New function `format-mode-line'. -The `tool-bar-add-item-from-menu' must not be used (as previously -recommended) for making entries in the tool bar for local keymaps. -Instead, use the function `tool-bar-local-item-from-menu', which lets -you specify the map to use as an argument. +This returns the mode-line or header-line of the selected (or a +specified) window as a string with or without text properties. +++ -*** New function window-body-height. -This is like window-height but does not count the mode line -or the header line. +*** The new mode-line construct `(:propertize ELT PROPS...)' can be +used to add text properties to mode-line elements. +++ -*** (while-no-input BODY...) runs BODY, but only so long as no input -arrives. If the user types or clicks anything, BODY stops as if a -quit had occurred. while-no-input returns the value of BODY, if BODY -finishes. It returns nil if BODY was aborted. +*** The new `%i' and `%I' constructs for `mode-line-format' can be used +to display the size of the accessible part of the buffer on the mode +line. -+++ -*** New macro with-local-quit temporarily sets inhibit-quit to nil for use -around potentially blocking or long-running code in timers -and post-command-hooks. +** Menu manipulation changes: -** New packages: +--- +*** To manipulate the File menu using easy-menu, you must specify the +proper name "file". In previous Emacs versions, you had to specify +"files", even though the menu item itself was changed to say "File" +several versions ago. -*** The new package syntax.el provides an efficient way to find the -current syntactic context (as returned by parse-partial-sexp). +--- +*** The dummy function keys made by easy-menu are now always lower case. +If you specify the menu item name "Ada", for instance, it uses `ada' +as the "key" bound by that key binding. -*** The new package bindat.el provides functions to unpack and pack -binary data structures, such as network packets, to and from Lisp -data structures. +This is relevant only if Lisp code looks for the bindings that were +made with easy-menu. --- -*** The TCL package tcl-mode.el was replaced by tcl.el. -This was actually done in Emacs-21.1, and was not documented. +*** `easy-menu-define' now allows you to use nil for the symbol name +if you don't need to give the menu a name. If you install the menu +into other keymaps right away (MAPS is non-nil), it usually doesn't +need to have a name. + +** Operating system access: +++ -*** The new package button.el implements simple and fast `clickable buttons' -in emacs buffers. `buttons' are much lighter-weight than the `widgets' -implemented by widget.el, and can be used by lisp code that doesn't -require the full power of widgets. Emacs uses buttons for such things -as help and apropos buffers. +*** The new primitive `get-internal-run-time' returns the processor +run time used by Emacs since start-up. ---- -*** master-mode.el implements a minor mode for scrolling a slave -buffer without leaving your current buffer, the master buffer. ++++ +*** Functions `user-uid' and `user-real-uid' now return floats if the +user UID doesn't fit in a Lisp integer. Function `user-full-name' +accepts a float as UID parameter. -It can be used by sql.el, for example: the SQL buffer is the master -and its SQLi buffer is the slave. This allows you to scroll the SQLi -buffer containing the output from the SQL buffer containing the -commands. ++++ +*** New function `locale-info' accesses locale information. -This is how to use sql.el and master.el together: the variable -sql-buffer contains the slave buffer. It is a local variable in the -SQL buffer. +--- +*** On MS Windows, locale-coding-system is used to interact with the OS. +The Windows specific variable w32-system-coding-system, which was +formerly used for that purpose is now an alias for locale-coding-system. -(add-hook 'sql-mode-hook - (function (lambda () - (master-mode t) - (master-set-slave sql-buffer)))) -(add-hook 'sql-set-sqli-hook - (function (lambda () - (master-set-slave sql-buffer)))) +--- +*** New function `redirect-debugging-output' can be used to redirect +debugging output on the stderr file handle to a file. + +** Miscellaneous: +++ -*** New Lisp library testcover.el works with edebug to help you determine -whether you've tested all your Lisp code. Function testcover-start -instruments all functions in a given file. Then test your code. Function -testcover-mark-all adds overlay "splotches" to the Lisp file's buffer to -show where coverage is lacking. Command testcover-next-mark (bind it to -a key!) will move point forward to the next spot that has a splotch. +*** A number of hooks have been renamed to better follow the conventions: -Normally, a red splotch indicates the form was never completely -evaluated; a brown splotch means it always evaluated to the same -value. The red splotches are skipped for forms that can't possibly -complete their evaluation, such as `error'. The brown splotches are -skipped for forms that are expected to always evaluate to the same -value, such as (setq x 14). +find-file-hooks to find-file-hook, +find-file-not-found-hooks to find-file-not-found-functions, +write-file-hooks to write-file-functions, +write-contents-hooks to write-contents-functions, +x-lost-selection-hooks to x-lost-selection-functions, +x-sent-selection-hooks to x-sent-selection-functions, +delete-frame-hook to delete-frame-functions. -For difficult cases, you can add do-nothing macros to your code to -help out the test coverage tool. The macro `noreturn' suppresses a -red splotch. It is an error if the argument to `noreturn' does -return. The macro 1value suppresses a brown splotch for its argument. -This macro is a no-op except during test-coverage -- then it signals -an error if the argument actually returns differing values. +In each case the old name remains as an alias for the moment. ---- -** Support for Mocklisp has been removed. ++++ +*** local-write-file-hooks is marked obsolete + +Use the LOCAL arg of `add-hook'. --- -** The function insert-string is now obsolete. +*** New function `x-send-client-message' sends a client message when +running under X. * Installation changes in Emacs 21.3 -- 2.39.2