diff options
| author | Stefan Monnier | 2005-04-20 16:06:39 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-04-20 16:06:39 +0000 |
| commit | fc9d21fc78b5fd6f8331a300ab30154c325d28df (patch) | |
| tree | b7b824d18eceaa82a377192213170b663e820e2c | |
| parent | c164a7e6ec603a9d204ae191c5493b7f6c17351d (diff) | |
| download | emacs-fc9d21fc78b5fd6f8331a300ab30154c325d28df.tar.gz emacs-fc9d21fc78b5fd6f8331a300ab30154c325d28df.zip | |
Try to add some structure by adding a "new functions" topic.
Mention the new `syntax-class' function.
| -rw-r--r-- | etc/NEWS | 149 |
1 files changed, 77 insertions, 72 deletions
| @@ -2754,12 +2754,10 @@ the command `undefined'. (In earlier Emacs versions, it used | |||
| 2754 | 2754 | ||
| 2755 | * Lisp Changes in Emacs 22.1 | 2755 | * Lisp Changes in Emacs 22.1 |
| 2756 | 2756 | ||
| 2757 | --- | 2757 | ** New functions, macros, and commands |
| 2758 | ** easy-mmode-define-global-mode has been renamed to | ||
| 2759 | define-global-minor-mode. The old name remains as an alias. | ||
| 2760 | 2758 | ||
| 2761 | +++ | 2759 | +++ |
| 2762 | ** The new function `filter-buffer-substring' extracts a buffer | 2760 | *** The new function `filter-buffer-substring' extracts a buffer |
| 2763 | substring, passes it through a set of filter functions, and returns | 2761 | substring, passes it through a set of filter functions, and returns |
| 2764 | the filtered substring. It is used instead of `buffer-substring' or | 2762 | the filtered substring. It is used instead of `buffer-substring' or |
| 2765 | `delete-and-extract-region' when copying text into a user-accessible | 2763 | `delete-and-extract-region' when copying text into a user-accessible |
| @@ -2770,6 +2768,81 @@ list of filter function is specified by the new variable | |||
| 2770 | text. | 2768 | text. |
| 2771 | 2769 | ||
| 2772 | +++ | 2770 | +++ |
| 2771 | *** (while-no-input BODY...) runs BODY, but only so long as no input | ||
| 2772 | arrives. If the user types or clicks anything, BODY stops as if a | ||
| 2773 | quit had occurred. while-no-input returns the value of BODY, if BODY | ||
| 2774 | finishes. It returns nil if BODY was aborted. | ||
| 2775 | |||
| 2776 | +++ | ||
| 2777 | *** New function `looking-back' checks whether a regular expression matches | ||
| 2778 | the text before point. Specifying the LIMIT argument bounds how far | ||
| 2779 | back the match can start; this is a way to keep it from taking too long. | ||
| 2780 | |||
| 2781 | +++ | ||
| 2782 | *** New functions `make-progress-reporter', `progress-reporter-update', | ||
| 2783 | `progress-reporter-force-update', `progress-reporter-done', and | ||
| 2784 | `dotimes-with-progress-reporter' provide a simple and efficient way for | ||
| 2785 | a command to present progress messages for the user. | ||
| 2786 | |||
| 2787 | +++ | ||
| 2788 | *** The new primitive `get-internal-run-time' returns the processor | ||
| 2789 | run time used by Emacs since start-up. | ||
| 2790 | |||
| 2791 | +++ | ||
| 2792 | *** The new function `called-interactively-p' does what many people | ||
| 2793 | have mistakenly believed `interactive-p' did: it returns t if the | ||
| 2794 | calling function was called through `call-interactively'. This should | ||
| 2795 | only be used when you cannot add a new "interactive" argument to the | ||
| 2796 | command. | ||
| 2797 | |||
| 2798 | +++ | ||
| 2799 | *** The new function `assoc-string' replaces `assoc-ignore-case' and | ||
| 2800 | `assoc-ignore-representation', which are still available, but have | ||
| 2801 | been declared obsolete. | ||
| 2802 | |||
| 2803 | --- | ||
| 2804 | *** New function quail-find-key returns a list of keys to type in the | ||
| 2805 | current input method to input a character. | ||
| 2806 | |||
| 2807 | +++ | ||
| 2808 | *** New functions posn-at-point and posn-at-x-y return | ||
| 2809 | click-event-style position information for a given visible buffer | ||
| 2810 | position or for a given window pixel coordinate. | ||
| 2811 | |||
| 2812 | +++ | ||
| 2813 | *** The new primitive `set-file-times' sets a file's access and | ||
| 2814 | modification times. Magic file name handlers can handle this | ||
| 2815 | operation. | ||
| 2816 | |||
| 2817 | +++ | ||
| 2818 | *** The new function syntax-after returns the syntax code | ||
| 2819 | of the character after a specified buffer position, taking account | ||
| 2820 | of text properties as well as the character code. | ||
| 2821 | |||
| 2822 | *** `syntax-class' extracts the class of a syntax code (as returned | ||
| 2823 | by syntax-after). | ||
| 2824 | |||
| 2825 | +++ | ||
| 2826 | *** New function `line-number-at-pos' returns line number of current | ||
| 2827 | line in current buffer, or if optional buffer position is given, line | ||
| 2828 | number of corresponding line in current buffer. | ||
| 2829 | |||
| 2830 | +++ | ||
| 2831 | *** New function `macroexpand-all' expands all macros in a form. | ||
| 2832 | It is similar to the Common-Lisp function of the same name. | ||
| 2833 | One difference is that it guarantees to return the original argument | ||
| 2834 | if no expansion is done, which may be tested using `eq'. | ||
| 2835 | |||
| 2836 | +++ | ||
| 2837 | *** New macro with-local-quit temporarily sets inhibit-quit to nil for use | ||
| 2838 | around potentially blocking or long-running code in timers | ||
| 2839 | and post-command-hooks. | ||
| 2840 | |||
| 2841 | --- | ||
| 2842 | ** easy-mmode-define-global-mode has been renamed to | ||
| 2843 | define-global-minor-mode. The old name remains as an alias. | ||
| 2844 | |||
| 2845 | +++ | ||
| 2773 | ** An element of buffer-undo-list can now have the form (apply FUNNAME | 2846 | ** An element of buffer-undo-list can now have the form (apply FUNNAME |
| 2774 | . ARGS), where FUNNAME is a symbol other than t or nil. That stands | 2847 | . ARGS), where FUNNAME is a symbol other than t or nil. That stands |
| 2775 | for a high-level change that should be undone by evaluating (apply | 2848 | for a high-level change that should be undone by evaluating (apply |
| @@ -2801,28 +2874,11 @@ clickable link with the new function `mouse-on-link-p'. This is the | |||
| 2801 | function used by the new `mouse-1-click-follows-link' functionality. | 2874 | function used by the new `mouse-1-click-follows-link' functionality. |
| 2802 | 2875 | ||
| 2803 | +++ | 2876 | +++ |
| 2804 | ** (while-no-input BODY...) runs BODY, but only so long as no input | ||
| 2805 | arrives. If the user types or clicks anything, BODY stops as if a | ||
| 2806 | quit had occurred. while-no-input returns the value of BODY, if BODY | ||
| 2807 | finishes. It returns nil if BODY was aborted. | ||
| 2808 | |||
| 2809 | +++ | ||
| 2810 | ** `set-auto-mode' now gives the interpreter magic line (if present) | 2877 | ** `set-auto-mode' now gives the interpreter magic line (if present) |
| 2811 | precedence over the file name. Likewise an <?xml or <!DOCTYPE declaration | 2878 | precedence over the file name. Likewise an <?xml or <!DOCTYPE declaration |
| 2812 | will give the buffer XML or SGML mode, based on the new var | 2879 | will give the buffer XML or SGML mode, based on the new var |
| 2813 | `magic-mode-alist'. | 2880 | `magic-mode-alist'. |
| 2814 | 2881 | ||
| 2815 | +++ | ||
| 2816 | ** New function `looking-back' checks whether a regular expression matches | ||
| 2817 | the text before point. Specifying the LIMIT argument bounds how far | ||
| 2818 | back the match can start; this is a way to keep it from taking too long. | ||
| 2819 | |||
| 2820 | +++ | ||
| 2821 | ** New functions `make-progress-reporter', `progress-reporter-update', | ||
| 2822 | `progress-reporter-force-update', `progress-reporter-done', and | ||
| 2823 | `dotimes-with-progress-reporter' provide a simple and efficient way for | ||
| 2824 | a command to present progress messages for the user. | ||
| 2825 | |||
| 2826 | --- | 2882 | --- |
| 2827 | ** To manipulate the File menu using easy-menu, you must specify the | 2883 | ** To manipulate the File menu using easy-menu, you must specify the |
| 2828 | proper name "file". In previous Emacs versions, you had to specify | 2884 | proper name "file". In previous Emacs versions, you had to specify |
| @@ -2851,27 +2907,6 @@ If it is non-nil, it specifies which buffers to list. | |||
| 2851 | NOMODIFY. If it is non-nil, it means don't mark the buffer modified. | 2907 | NOMODIFY. If it is non-nil, it means don't mark the buffer modified. |
| 2852 | 2908 | ||
| 2853 | +++ | 2909 | +++ |
| 2854 | ** The new function syntax-after returns the syntax code | ||
| 2855 | of the character after a specified buffer position, taking account | ||
| 2856 | of text properties as well as the character code. | ||
| 2857 | |||
| 2858 | +++ | ||
| 2859 | ** The new primitive `get-internal-run-time' returns the processor | ||
| 2860 | run time used by Emacs since start-up. | ||
| 2861 | |||
| 2862 | +++ | ||
| 2863 | ** The new function `called-interactively-p' does what many people | ||
| 2864 | have mistakenly believed `interactive-p' did: it returns t if the | ||
| 2865 | calling function was called through `call-interactively'. This should | ||
| 2866 | only be used when you cannot add a new "interactive" argument to the | ||
| 2867 | command. | ||
| 2868 | |||
| 2869 | +++ | ||
| 2870 | ** The new function `assoc-string' replaces `assoc-ignore-case' and | ||
| 2871 | `assoc-ignore-representation', which are still available, but have | ||
| 2872 | been declared obsolete. | ||
| 2873 | |||
| 2874 | +++ | ||
| 2875 | ** An interactive specification may now use the code letter 'U' to get | 2910 | ** An interactive specification may now use the code letter 'U' to get |
| 2876 | the up-event that was discarded in case the last key sequence read for a | 2911 | the up-event that was discarded in case the last key sequence read for a |
| 2877 | previous 'k' or 'K' argument was a down-event; otherwise nil is used. | 2912 | previous 'k' or 'K' argument was a down-event; otherwise nil is used. |
| @@ -2930,15 +2965,6 @@ changed to "connection broken by remote peer". | |||
| 2930 | undo-outer-limit, garbage collection empties it. This is to prevent | 2965 | undo-outer-limit, garbage collection empties it. This is to prevent |
| 2931 | it from using up the available memory and choking Emacs. | 2966 | it from using up the available memory and choking Emacs. |
| 2932 | 2967 | ||
| 2933 | --- | ||
| 2934 | ** New function quail-find-key returns a list of keys to type in the | ||
| 2935 | current input method to input a character. | ||
| 2936 | |||
| 2937 | +++ | ||
| 2938 | ** New functions posn-at-point and posn-at-x-y return | ||
| 2939 | click-event-style position information for a given visible buffer | ||
| 2940 | position or for a given window pixel coordinate. | ||
| 2941 | |||
| 2942 | +++ | 2968 | +++ |
| 2943 | ** skip-chars-forward and skip-chars-backward now handle | 2969 | ** skip-chars-forward and skip-chars-backward now handle |
| 2944 | character classes such as [:alpha:], along with individual characters | 2970 | character classes such as [:alpha:], along with individual characters |
| @@ -2953,11 +2979,6 @@ arg is non-nil. | |||
| 2953 | ** The function `eql' is now available without requiring the CL package. | 2979 | ** The function `eql' is now available without requiring the CL package. |
| 2954 | 2980 | ||
| 2955 | +++ | 2981 | +++ |
| 2956 | ** The new primitive `set-file-times' sets a file's access and | ||
| 2957 | modification times. Magic file name handlers can handle this | ||
| 2958 | operation. | ||
| 2959 | |||
| 2960 | +++ | ||
| 2961 | ** The display space :width and :align-to text properties are now | 2982 | ** The display space :width and :align-to text properties are now |
| 2962 | supported on text terminals. | 2983 | supported on text terminals. |
| 2963 | 2984 | ||
| @@ -3081,11 +3102,6 @@ text property string that may be present at the current window | |||
| 3081 | position. The cursor may now be placed on any character of such | 3102 | position. The cursor may now be placed on any character of such |
| 3082 | strings by giving that character a non-nil `cursor' text property. | 3103 | strings by giving that character a non-nil `cursor' text property. |
| 3083 | 3104 | ||
| 3084 | +++ | ||
| 3085 | ** New macro with-local-quit temporarily sets inhibit-quit to nil for use | ||
| 3086 | around potentially blocking or long-running code in timers | ||
| 3087 | and post-command-hooks. | ||
| 3088 | |||
| 3089 | ** The first face specification element in a defface can specify | 3105 | ** The first face specification element in a defface can specify |
| 3090 | `default' instead of frame classification. Then its attributes act as | 3106 | `default' instead of frame classification. Then its attributes act as |
| 3091 | defaults that apply to all the subsequent cases (and may be overridden | 3107 | defaults that apply to all the subsequent cases (and may be overridden |
| @@ -3143,11 +3159,6 @@ If either property is not set, the default `overlay-arrow-string' or | |||
| 3143 | 'overlay-arrow-fringe-bitmap' will be used. | 3159 | 'overlay-arrow-fringe-bitmap' will be used. |
| 3144 | 3160 | ||
| 3145 | +++ | 3161 | +++ |
| 3146 | ** New function `line-number-at-pos' returns line number of current | ||
| 3147 | line in current buffer, or if optional buffer position is given, line | ||
| 3148 | number of corresponding line in current buffer. | ||
| 3149 | |||
| 3150 | +++ | ||
| 3151 | ** The default value of `sentence-end' is now defined using the new | 3162 | ** The default value of `sentence-end' is now defined using the new |
| 3152 | variable `sentence-end-without-space' which contains such characters | 3163 | variable `sentence-end-without-space' which contains such characters |
| 3153 | that end a sentence without following spaces. | 3164 | that end a sentence without following spaces. |
| @@ -3165,12 +3176,6 @@ then this function returns the regexp constructed from the variables | |||
| 3165 | implemented (such as "*") are no longer accepted. | 3176 | implemented (such as "*") are no longer accepted. |
| 3166 | 3177 | ||
| 3167 | +++ | 3178 | +++ |
| 3168 | ** New function `macroexpand-all' expands all macros in a form. | ||
| 3169 | It is similar to the Common-Lisp function of the same name. | ||
| 3170 | One difference is that it guarantees to return the original argument | ||
| 3171 | if no expansion is done, which may be tested using `eq'. | ||
| 3172 | |||
| 3173 | +++ | ||
| 3174 | ** New function `delete-dups' destructively removes `equal' duplicates | 3179 | ** New function `delete-dups' destructively removes `equal' duplicates |
| 3175 | from a list. Of several `equal' occurrences of an element in the list, | 3180 | from a list. Of several `equal' occurrences of an element in the list, |
| 3176 | the first one is kept. | 3181 | the first one is kept. |