comparison etc/NEWS @ 77596:a7e7fba52d2d

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Sat, 28 Apr 2007 17:21:40 +0000
parents b5b132a74c17
children 317edcdecb49
comparison
equal deleted inserted replaced
77595:b5b132a74c17 77596:a7e7fba52d2d
3463 3463
3464 * Lisp Changes in Emacs 22.1 3464 * Lisp Changes in Emacs 22.1
3465 3465
3466 ** General Lisp changes: 3466 ** General Lisp changes:
3467 3467
3468 *** The function `expt' handles negative exponents differently.
3469 The value for `(expt A B)', if both A and B are integers and B is
3470 negative, is now a float. For example: (expt 2 -2) => 0.25.
3471
3472 *** The function `eql' is now available without requiring the CL package.
3473
3474 *** The new function `memql' is like `memq', but uses `eql' for comparison,
3475 that is, floats are compared by value and other elements with `eq'.
3476
3477 *** `makehash' is now obsolete. Use `make-hash-table' instead.
3478
3479 *** `add-to-list' takes an optional third argument, APPEND.
3480
3481 If APPEND is non-nil, the new element gets added at the end of the
3482 list instead of at the beginning. This change actually occurred in
3483 Emacs 21.1, but was not documented then.
3484
3485 *** New function `add-to-ordered-list' is like `add-to-list' but
3486 associates a numeric ordering of each element added to the list.
3487
3488 *** New function `copy-tree' makes a copy of a tree.
3489
3490 It recursively copies through both CARs and CDRs.
3491
3492 *** New function `delete-dups' deletes `equal' duplicate elements from a list.
3493
3494 It modifies the list destructively, like `delete'. Of several `equal'
3495 occurrences of an element in the list, the one that's kept is the
3496 first one.
3497
3498 *** New function `add-to-history' adds an element to a history list.
3499
3500 Lisp packages should use this function to add elements to their
3501 history lists.
3502
3503 If `history-delete-duplicates' is non-nil, it removes duplicates of
3504 the new element from the history list it updates.
3505
3506 *** New function `rassq-delete-all'.
3507
3508 (rassq-delete-all VALUE ALIST) deletes, from ALIST, each element whose
3509 CDR is `eq' to the specified value.
3510
3511 *** The function `number-sequence' makes a list of equally-separated numbers.
3512
3513 For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). By
3514 default, the separation is 1, but you can specify a different
3515 separation as the third argument. (number-sequence 1.5 6 2) returns
3516 (1.5 3.5 5.5).
3517
3518 *** New variables `most-positive-fixnum' and `most-negative-fixnum'.
3519
3520 They hold the largest and smallest possible integer values.
3521
3522 *** Minor change in the function `format'.
3523
3524 Some flags that were accepted but not implemented (such as "*") are no
3525 longer accepted.
3526
3527 *** Functions `get' and `plist-get' no longer give errors for bad plists.
3528
3529 They return nil for a malformed property list or if the list is
3530 cyclic.
3531
3532 *** New functions `lax-plist-get' and `lax-plist-put'.
3533
3534 They are like `plist-get' and `plist-put', except that they compare
3535 the property name using `equal' rather than `eq'.
3536
3537 *** New variable `print-continuous-numbering'.
3538
3539 When this is non-nil, successive calls to print functions use a single
3540 numbering scheme for circular structure references. This is only
3541 relevant when `print-circle' is non-nil.
3542
3543 When you bind `print-continuous-numbering' to t, you should
3544 also bind `print-number-table' to nil.
3545
3546 *** New function `macroexpand-all' expands all macros in a form.
3547
3548 It is similar to the Common-Lisp function of the same name.
3549 One difference is that it guarantees to return the original argument
3550 if no expansion is done, which can be tested using `eq'.
3551
3552 *** The function `atan' now accepts an optional second argument.
3553
3554 When called with 2 arguments, as in `(atan Y X)', `atan' returns the
3555 angle in radians between the vector [X, Y] and the X axis. (This is
3556 equivalent to the standard C library function `atan2'.)
3557
3558 *** A function or macro's doc string can now specify the calling pattern.
3559
3560 You put this info in the doc string's last line. It should be
3561 formatted so as to match the regexp "\n\n(fn .*)\\'". If you don't
3562 specify this explicitly, Emacs determines it from the actual argument
3563 names. Usually that default is right, but not always.
3564
3565 *** New macro `with-local-quit' temporarily allows quitting.
3566
3567 A quit inside the body of `with-local-quit' is caught by the
3568 `with-local-quit' form itself, but another quit will happen later once
3569 the code that has inhibited quitting exits.
3570
3571 This is for use around potentially blocking or long-running code
3572 inside timer functions and `post-command-hook' functions.
3573
3574 *** New macro `define-obsolete-function-alias'.
3575
3576 This combines `defalias' and `make-obsolete'.
3577
3578 *** New macro `with-case-table'
3579
3580 This executes the body with the case table temporarily set to a given
3581 case table.
3582
3583 *** New function `unsafep' determines whether a Lisp form is safe.
3584
3585 It returns nil if the given Lisp form can't possibly do anything
3586 dangerous; otherwise it returns a reason why the form might be unsafe
3587 (calls unknown function, alters global variable, etc.).
3588
3589 *** New macro `eval-at-startup' specifies expressions to
3590 evaluate when Emacs starts up. If this is done after startup,
3591 it evaluates those expressions immediately.
3592
3593 This is useful in packages that can be preloaded.
3594
3595 *** `list-faces-display' takes an optional argument, REGEXP.
3596
3597 If it is non-nil, the function lists only faces matching this regexp.
3598
3599 *** New functions `string-or-null-p' and `booleanp'.
3600
3601 `string-or-null-p' returns non-nil iff OBJECT is a string or nil.
3602 `booleanp' returns non-nil iff OBJECT is t or nil.
3603
3604 *** New hook `command-error-function'.
3605
3606 By setting this variable to a function, you can control
3607 how the editor command loop shows the user an error message.
3608
3609 *** `debug-on-entry' accepts primitive functions that are not special forms.
3610
3611 ** Lisp code indentation features:
3612
3613 *** The `defmacro' form can contain indentation and edebug declarations.
3614
3615 These declarations specify how to indent the macro calls in Lisp mode
3616 and how to debug them with Edebug. You write them like this:
3617
3618 (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...)
3619
3620 DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'. The
3621 possible declaration specifiers are:
3622
3623 (indent INDENT)
3624 Set NAME's `lisp-indent-function' property to INDENT.
3625
3626 (edebug DEBUG)
3627 Set NAME's `edebug-form-spec' property to DEBUG. (This is
3628 equivalent to writing a `def-edebug-spec' for the macro,
3629 but this is cleaner.)
3630
3631 *** cl-indent now allows customization of Indentation of backquoted forms.
3632
3633 See the new user option `lisp-backquote-indentation'.
3634
3635 *** cl-indent now handles indentation of simple and extended `loop' forms.
3636
3637 The new user options `lisp-loop-keyword-indentation',
3638 `lisp-loop-forms-indentation', and `lisp-simple-loop-indentation' can
3639 be used to customize the indentation of keywords and forms in loop
3640 forms.
3641
3642 ** Variable aliases:
3643
3644 *** New function: defvaralias ALIAS-VAR BASE-VAR [DOCSTRING]
3645
3646 This function defines the symbol ALIAS-VAR as a variable alias for
3647 symbol BASE-VAR. This means that retrieving the value of ALIAS-VAR
3648 returns the value of BASE-VAR, and changing the value of ALIAS-VAR
3649 changes the value of BASE-VAR.
3650
3651 DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has
3652 the same documentation as BASE-VAR.
3653
3654 *** New function: indirect-variable VARIABLE
3655
3656 This function returns the variable at the end of the chain of aliases
3657 of VARIABLE. If VARIABLE is not a symbol, or if VARIABLE is not
3658 defined as an alias, the function returns VARIABLE.
3659
3660 It might be noteworthy that variables aliases work for all kinds of
3661 variables, including buffer-local and frame-local variables.
3662
3663 *** The macro `define-obsolete-variable-alias' combines `defvaralias' and
3664 `make-obsolete-variable'.
3665
3666 ** defcustom changes:
3667
3668 *** The package-version keyword has been added to provide
3669 `customize-changed-options' functionality to packages in the future.
3670 Developers who make use of this keyword must also update the new
3671 variable `customize-package-emacs-version-alist'.
3672
3673 *** The new customization type `float' requires a floating point number.
3674
3675 ** String changes:
3676
3677 *** The escape sequence \s now stands for the SPACE character. 3468 *** The escape sequence \s now stands for the SPACE character.
3678 3469
3679 `?\s' is a new way to write the space character. You must make sure 3470 `?\s' is a new way to write the space character. You must make sure
3680 it is not followed by a dash, since `?\s-...' indicates the "super" 3471 it is not followed by a dash, since `?\s-...' indicates the "super"
3681 modifier. However, it would be strange to write a character constant 3472 modifier. However, it would be strange to write a character constant
3682 and a following symbol (beginning with `-') with no space between 3473 and a following symbol (beginning with `-') with no space between
3683 them. 3474 them.
3684 3475
3685 `\s' stands for space in strings, too, but it is not really meant for 3476 `\s' stands for space in strings, too, but it is not really meant for
3686 strings; it is easier and nicer just to write a space. 3477 strings; it is easier and nicer just to write a space.
3478
3479 *** The function `expt' handles negative exponents differently.
3480 The value for `(expt A B)', if both A and B are integers and B is
3481 negative, is now a float. For example: (expt 2 -2) => 0.25.
3482
3483 *** The function `eql' is now available without requiring the CL package.
3484
3485 *** The new function `memql' is like `memq', but uses `eql' for comparison,
3486 that is, floats are compared by value and other elements with `eq'.
3487
3488 *** `makehash' is now obsolete. Use `make-hash-table' instead.
3489
3490 *** `add-to-list' takes an optional third argument, APPEND.
3491
3492 If APPEND is non-nil, the new element gets added at the end of the
3493 list instead of at the beginning. This change actually occurred in
3494 Emacs 21.1, but was not documented then.
3495
3496 *** New function `add-to-ordered-list' is like `add-to-list' but
3497 associates a numeric ordering of each element added to the list.
3498
3499 *** New function `copy-tree' makes a copy of a tree.
3500
3501 It recursively copies through both CARs and CDRs.
3502
3503 *** New function `delete-dups' deletes `equal' duplicate elements from a list.
3504
3505 It modifies the list destructively, like `delete'. Of several `equal'
3506 occurrences of an element in the list, the one that's kept is the
3507 first one.
3508
3509 *** New function `add-to-history' adds an element to a history list.
3510
3511 Lisp packages should use this function to add elements to their
3512 history lists.
3513
3514 If `history-delete-duplicates' is non-nil, it removes duplicates of
3515 the new element from the history list it updates.
3516
3517 *** New function `rassq-delete-all'.
3518
3519 (rassq-delete-all VALUE ALIST) deletes, from ALIST, each element whose
3520 CDR is `eq' to the specified value.
3521
3522 *** The function `number-sequence' makes a list of equally-separated numbers.
3523
3524 For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). By
3525 default, the separation is 1, but you can specify a different
3526 separation as the third argument. (number-sequence 1.5 6 2) returns
3527 (1.5 3.5 5.5).
3528
3529 *** New variables `most-positive-fixnum' and `most-negative-fixnum'.
3530
3531 They hold the largest and smallest possible integer values.
3532
3533 *** Minor change in the function `format'.
3534
3535 Some flags that were accepted but not implemented (such as "*") are no
3536 longer accepted.
3537
3538 *** Functions `get' and `plist-get' no longer give errors for bad plists.
3539
3540 They return nil for a malformed property list or if the list is
3541 cyclic.
3542
3543 *** New functions `lax-plist-get' and `lax-plist-put'.
3544
3545 They are like `plist-get' and `plist-put', except that they compare
3546 the property name using `equal' rather than `eq'.
3547
3548 *** New variable `print-continuous-numbering'.
3549
3550 When this is non-nil, successive calls to print functions use a single
3551 numbering scheme for circular structure references. This is only
3552 relevant when `print-circle' is non-nil.
3553
3554 When you bind `print-continuous-numbering' to t, you should
3555 also bind `print-number-table' to nil.
3556
3557 *** New function `macroexpand-all' expands all macros in a form.
3558
3559 It is similar to the Common-Lisp function of the same name.
3560 One difference is that it guarantees to return the original argument
3561 if no expansion is done, which can be tested using `eq'.
3562
3563 *** The function `atan' now accepts an optional second argument.
3564
3565 When called with 2 arguments, as in `(atan Y X)', `atan' returns the
3566 angle in radians between the vector [X, Y] and the X axis. (This is
3567 equivalent to the standard C library function `atan2'.)
3568
3569 *** A function or macro's doc string can now specify the calling pattern.
3570
3571 You put this info in the doc string's last line. It should be
3572 formatted so as to match the regexp "\n\n(fn .*)\\'". If you don't
3573 specify this explicitly, Emacs determines it from the actual argument
3574 names. Usually that default is right, but not always.
3575
3576 *** New macro `with-local-quit' temporarily allows quitting.
3577
3578 A quit inside the body of `with-local-quit' is caught by the
3579 `with-local-quit' form itself, but another quit will happen later once
3580 the code that has inhibited quitting exits.
3581
3582 This is for use around potentially blocking or long-running code
3583 inside timer functions and `post-command-hook' functions.
3584
3585 *** New macro `define-obsolete-function-alias'.
3586
3587 This combines `defalias' and `make-obsolete'.
3588
3589 *** New macro `with-case-table'
3590
3591 This executes the body with the case table temporarily set to a given
3592 case table.
3593
3594 *** New function `unsafep' determines whether a Lisp form is safe.
3595
3596 It returns nil if the given Lisp form can't possibly do anything
3597 dangerous; otherwise it returns a reason why the form might be unsafe
3598 (calls unknown function, alters global variable, etc.).
3599
3600 *** New macro `eval-at-startup' specifies expressions to
3601 evaluate when Emacs starts up. If this is done after startup,
3602 it evaluates those expressions immediately.
3603
3604 This is useful in packages that can be preloaded.
3605
3606 *** `list-faces-display' takes an optional argument, REGEXP.
3607
3608 If it is non-nil, the function lists only faces matching this regexp.
3609
3610 *** New functions `string-or-null-p' and `booleanp'.
3611
3612 `string-or-null-p' returns non-nil iff OBJECT is a string or nil.
3613 `booleanp' returns non-nil iff OBJECT is t or nil.
3614
3615 *** New hook `command-error-function'.
3616
3617 By setting this variable to a function, you can control
3618 how the editor command loop shows the user an error message.
3619
3620 *** `debug-on-entry' accepts primitive functions that are not special forms.
3621
3622 ** Lisp code indentation features:
3623
3624 *** The `defmacro' form can contain indentation and edebug declarations.
3625
3626 These declarations specify how to indent the macro calls in Lisp mode
3627 and how to debug them with Edebug. You write them like this:
3628
3629 (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...)
3630
3631 DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'. The
3632 possible declaration specifiers are:
3633
3634 (indent INDENT)
3635 Set NAME's `lisp-indent-function' property to INDENT.
3636
3637 (edebug DEBUG)
3638 Set NAME's `edebug-form-spec' property to DEBUG. (This is
3639 equivalent to writing a `def-edebug-spec' for the macro,
3640 but this is cleaner.)
3641
3642 *** cl-indent now allows customization of Indentation of backquoted forms.
3643
3644 See the new user option `lisp-backquote-indentation'.
3645
3646 *** cl-indent now handles indentation of simple and extended `loop' forms.
3647
3648 The new user options `lisp-loop-keyword-indentation',
3649 `lisp-loop-forms-indentation', and `lisp-simple-loop-indentation' can
3650 be used to customize the indentation of keywords and forms in loop
3651 forms.
3652
3653 ** Variable aliases:
3654
3655 *** New function: defvaralias ALIAS-VAR BASE-VAR [DOCSTRING]
3656
3657 This function defines the symbol ALIAS-VAR as a variable alias for
3658 symbol BASE-VAR. This means that retrieving the value of ALIAS-VAR
3659 returns the value of BASE-VAR, and changing the value of ALIAS-VAR
3660 changes the value of BASE-VAR.
3661
3662 DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has
3663 the same documentation as BASE-VAR.
3664
3665 *** New function: indirect-variable VARIABLE
3666
3667 This function returns the variable at the end of the chain of aliases
3668 of VARIABLE. If VARIABLE is not a symbol, or if VARIABLE is not
3669 defined as an alias, the function returns VARIABLE.
3670
3671 It might be noteworthy that variables aliases work for all kinds of
3672 variables, including buffer-local and frame-local variables.
3673
3674 *** The macro `define-obsolete-variable-alias' combines `defvaralias' and
3675 `make-obsolete-variable'.
3676
3677 ** defcustom changes:
3678
3679 *** The package-version keyword has been added to provide
3680 `customize-changed-options' functionality to packages in the future.
3681 Developers who make use of this keyword must also update the new
3682 variable `customize-package-emacs-version-alist'.
3683
3684 *** The new customization type `float' requires a floating point number.
3685
3686 ** String changes:
3687 3687
3688 *** A hex escape in a string constant forces the string to be multibyte. 3688 *** A hex escape in a string constant forces the string to be multibyte.
3689 3689
3690 *** An octal escape in a string constant forces the string to be unibyte. 3690 *** An octal escape in a string constant forces the string to be unibyte.
3691 3691