/[emacs]/emacs/etc/NEWS
ViewVC logotype

Diff of /emacs/etc/NEWS

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.1185  
changed lines
  Added in v.1.1186

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26