aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias EngdegÄrd2024-06-30 17:06:30 +0200
committerMattias EngdegÄrd2024-06-30 17:27:08 +0200
commitdfbdd38f701cbf70769b024ee3fc59f677b328da (patch)
tree5ce69d8695ac82b54e50778abc22046a0c815d44
parent64851d101a854e00c68f3e9259d70777e7b26cb2 (diff)
downloademacs-dfbdd38f701cbf70769b024ee3fc59f677b328da.tar.gz
emacs-dfbdd38f701cbf70769b024ee3fc59f677b328da.zip
Revert "; * etc/NEWS: Move items to "Incompatible Lisp Changes"."
This reverts commit 000ef8876ae9e2098cf98e1b1c468c09be3acd43. Most of the moved items weren't actually incompatible changes.
-rw-r--r--etc/NEWS438
1 files changed, 219 insertions, 219 deletions
diff --git a/etc/NEWS b/etc/NEWS
index a6eda6afddd..7cc1949af2d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2135,13 +2135,6 @@ preventing the installation of Compat if unnecessary.
2135 2135
2136* Incompatible Lisp Changes in Emacs 30.1 2136* Incompatible Lisp Changes in Emacs 30.1
2137 2137
2138** Bytecode is now always loaded eagerly.
2139Bytecode compiled with older Emacs versions for lazy loading using
2140'byte-compile-dynamic' is now loaded all at once.
2141As a consequence, 'fetch-bytecode' has no use, does nothing, and is
2142now obsolete. The variable 'byte-compile-dynamic' has no effect any
2143more; compilation will always yield bytecode for eager loading.
2144
2145+++ 2138+++
2146** Evaluating a 'lambda' returns an object of type 'interpreted-function'. 2139** Evaluating a 'lambda' returns an object of type 'interpreted-function'.
2147Instead of representing interpreted functions as lists that start with 2140Instead of representing interpreted functions as lists that start with
@@ -2159,209 +2152,6 @@ no longer work and will need to use 'aref' instead to extract its
2159various subparts (when 'interactive-form', 'documentation', and 2152various subparts (when 'interactive-form', 'documentation', and
2160'help-function-arglist' aren't adequate). 2153'help-function-arglist' aren't adequate).
2161 2154
2162+++
2163** Returned strings from functions and macros are never docstrings.
2164Functions and macros whose bodies consist of a single string literal now
2165only return that string; it is not used as a docstring. Example:
2166
2167 (defun sing-a-song ()
2168 "Sing a song.")
2169
2170The above function returns the string '"Sing a song."' but has no
2171docstring. Previously, that string was used as both a docstring and
2172return value, which was never what the programmer wanted. If you want
2173the string to be a docstring, add an explicit return value.
2174
2175This change applies to 'defun', 'defsubst', 'defmacro' and 'lambda'
2176forms; other defining forms such as 'cl-defun' already worked this way.
2177
2178** New or changed byte-compilation warnings
2179
2180---
2181*** Warn about missing 'lexical-binding' directive.
2182The compiler now warns if an Elisp file lacks the standard
2183'-*- lexical-binding: ... -*-' cookie on the first line.
2184This line typically looks something like
2185
2186 ;;; My little pony mode -*- lexical-binding: t -*-
2187
2188It is needed to inform the compiler about which dialect of ELisp
2189your code is using: the modern dialect with lexical binding or
2190the old dialect with only dynamic binding.
2191
2192Lexical binding avoids some name conflicts and allows the compiler to
2193detect more mistakes and generate more efficient code, so it is
2194recommended. For how to adapt your code to lexical binding, see the
2195manual section "(elisp) Converting to Lexical Binding".
2196
2197If your code cannot be converted to lexical binding, you can insert
2198the line
2199
2200 ;;; -*- lexical-binding: nil -*-
2201
2202first in the file to declare that it uses the old dialect.
2203
2204---
2205*** Warn about empty bodies for more special forms and macros.
2206The compiler now warns about an empty body argument to 'when',
2207'unless', 'ignore-error' and 'with-suppressed-warnings' in addition to
2208the existing warnings for 'let' and 'let*'. Example:
2209
2210 (when (> x 2))
2211
2212This warning can be suppressed using 'with-suppressed-warnings' with
2213the warning name 'empty-body'.
2214
2215---
2216*** Warn about quoted error names in 'condition-case' and 'ignore-error'.
2217The compiler now warns about quoted condition (error) names
2218in 'condition-case' and 'ignore-error'. Example:
2219
2220 (condition-case nil
2221 (/ x y)
2222 ('arith-error "division by zero"))
2223
2224Quoting them adds the error name 'quote' to those handled or ignored
2225respectively, which was probably not intended.
2226
2227---
2228*** Warn about comparison with literal constants without defined identity.
2229The compiler now warns about comparisons by identity with a literal
2230string, cons, vector, record, function, large integer or float as this
2231may not match any value at all. Example:
2232
2233 (eq x "hello")
2234
2235Only literals for symbols and small integers (fixnums), including
2236characters, are guaranteed to have a consistent (unique) identity.
2237This warning applies to 'eq', 'eql', 'memq', 'memql', 'assq', 'rassq',
2238'remq' and 'delq'.
2239
2240To compare by (structural) value, use 'equal', 'member', 'assoc',
2241'rassoc', 'remove' or 'delete' instead. Floats and bignums can also
2242be compared using 'eql', '=' and 'memql'. Function literals cannot be
2243compared reliably at all.
2244
2245This warning can be suppressed using 'with-suppressed-warnings' with
2246the warning name 'suspicious'.
2247
2248---
2249*** Warn about 'condition-case' without handlers.
2250The compiler now warns when the 'condition-case' form is used without
2251any actual handlers, as in
2252
2253 (condition-case nil (read buffer))
2254
2255because it has no effect other than the execution of the body form.
2256In particular, no errors are caught or suppressed. If the intention
2257was to catch all errors, add an explicit handler for 'error', or use
2258'ignore-error' or 'ignore-errors'.
2259
2260This warning can be suppressed using 'with-suppressed-warnings' with
2261the warning name 'suspicious'.
2262
2263---
2264*** Warn about 'unwind-protect' without unwind forms.
2265The compiler now warns when the 'unwind-protect' form is used without
2266any unwind forms, as in
2267
2268 (unwind-protect (read buffer))
2269
2270because the behavior is identical to that of the argument; there is
2271no protection of any kind. Perhaps the intended unwind forms have
2272been misplaced or forgotten, or the use of 'unwind-protect' could be
2273simplified away.
2274
2275This warning can be suppressed using 'with-suppressed-warnings' with
2276the warning name 'suspicious'.
2277
2278---
2279*** Warn about useless trailing 'cond' clauses.
2280The compiler now warns when a 'cond' form contains clauses following a
2281default (unconditional) clause. Example:
2282
2283 (cond ((= x 0) (say "none"))
2284 (t (say "some"))
2285 (say "goodbye"))
2286
2287Such a clause will never be executed but is likely to be a mistake,
2288perhaps due to misplaced brackets.
2289
2290This warning can be suppressed using 'with-suppressed-warnings' with
2291the warning name 'suspicious'.
2292
2293---
2294*** Warn about mutation of constant values.
2295The compiler now warns about code that modifies program constants in
2296some obvious cases. Examples:
2297
2298 (setcar '(1 2) 7)
2299 (aset [3 4] 0 8)
2300 (aset "abc" 1 ?d)
2301
2302Such code may have unpredictable behavior because the constants are
2303part of the program, not data structures generated afresh during
2304execution, and the compiler does not expect them to change.
2305
2306To avoid the warning, operate on an object created by the program
2307(maybe a copy of the constant), or use a non-destructive operation
2308instead.
2309
2310This warning can be suppressed using 'with-suppressed-warnings' with
2311the warning name 'mutate-constant'.
2312
2313---
2314*** Warn about more ignored function return values.
2315The compiler now warns when the return value from certain functions is
2316implicitly ignored. Example:
2317
2318 (progn (nreverse my-list) my-list)
2319
2320will elicit a warning because it is usually pointless to call
2321'nreverse' on a list without using the returned value.
2322
2323To silence the warning, make use of the value in some way, such as
2324assigning it to a variable. You can also wrap the function call in
2325'(ignore ...)', or use 'with-suppressed-warnings' with the warning
2326name 'ignored-return-value'.
2327
2328The warning will only be issued for calls to functions declared
2329'important-return-value' or 'side-effect-free' (but not 'error-free').
2330
2331---
2332*** Warn about docstrings that contain control characters.
2333The compiler now warns about docstrings with control characters other
2334than newline and tab. This is often a result of improper escaping.
2335Example:
2336
2337 (defun my-fun ()
2338 "Uses c:\remote\dir\files and the key \C-x."
2339 ...)
2340
2341where the docstring contains the four control characters 'CR', 'DEL',
2342'FF' and 'C-x'.
2343
2344The warning name is 'docstrings-control-chars'.
2345
2346---
2347*** The warning about wide docstrings can now be disabled separately.
2348Its warning name is 'docstrings-wide'.
2349
2350+++
2351** 'fset', 'defalias' and 'defvaralias' now signal an error for cyclic aliases.
2352Previously, 'fset', 'defalias' and 'defvaralias' could be made to
2353build circular function and variable indirection chains as in
2354
2355 (defalias 'able 'baker)
2356 (defalias 'baker 'able)
2357
2358but trying to use them would sometimes make Emacs hang. Now, an attempt
2359to create such a loop results in an error.
2360
2361Since circular alias chains now cannot occur, 'function-alias-p',
2362'indirect-function' and 'indirect-variable' will never signal an error.
2363Their 'noerror' arguments have no effect and are therefore obsolete.
2364
2365--- 2155---
2366** The escape sequence '\x' not followed by hex digits is now an error. 2156** The escape sequence '\x' not followed by hex digits is now an error.
2367Previously, '\x' without at least one hex digit denoted character code 2157Previously, '\x' without at least one hex digit denoted character code
@@ -2447,13 +2237,6 @@ When it has a non-nil value, then completion functions like
2447'completing-read' don't discard text properties from the returned 2237'completing-read' don't discard text properties from the returned
2448completion candidate. 2238completion candidate.
2449 2239
2450** 'defadvice' is marked as obsolete.
2451See the "(elisp) Porting Old Advice" Info node for help converting
2452them to use 'advice-add' or 'define-advice' instead.
2453
2454** 'cl-old-struct-compat-mode' is marked as obsolete.
2455You may need to recompile our code if it was compiled with Emacs < 24.3.
2456
2457+++ 2240+++
2458** X color support compatibility aliases are now obsolete. 2241** X color support compatibility aliases are now obsolete.
2459The compatibility aliases 'x-defined-colors', 'x-color-defined-p', 2242The compatibility aliases 'x-defined-colors', 'x-color-defined-p',
@@ -2560,7 +2343,7 @@ t only if the argument is a function rather than a special-form,
2560and 'cl-functionp' is like 'functionp' except it returns nil 2343and 'cl-functionp' is like 'functionp' except it returns nil
2561for lists and symbols. 2344for lists and symbols.
2562 2345
2563** Built-in types now have corresponding classes. 2346** Built-in types have now corresponding classes.
2564At the Lisp level, this means that things like '(cl-find-class 'integer)' 2347At the Lisp level, this means that things like '(cl-find-class 'integer)'
2565will now return a class object, and at the UI level it means that 2348will now return a class object, and at the UI level it means that
2566things like 'C-h o integer RET' will show some information about that type. 2349things like 'C-h o integer RET' will show some information about that type.
@@ -2697,6 +2480,13 @@ characters in length, provided that the LONG_XLFDs argument is true.
2697Other features in Emacs which employ XLFDs have been modified to 2480Other features in Emacs which employ XLFDs have been modified to
2698produce and understand XLFDs larger than 255 characters. 2481produce and understand XLFDs larger than 255 characters.
2699 2482
2483** 'defadvice' is marked as obsolete.
2484See the "(elisp) Porting Old Advice" Info node for help converting
2485them to use 'advice-add' or 'define-advice' instead.
2486
2487** 'cl-old-struct-compat-mode' is marked as obsolete.
2488You may need to recompile our code if it was compiled with Emacs < 24.3.
2489
2700+++ 2490+++
2701** New macro 'static-if' for conditional evaluation of code. 2491** New macro 'static-if' for conditional evaluation of code.
2702This macro hides a form from the evaluator or byte-compiler based on a 2492This macro hides a form from the evaluator or byte-compiler based on a
@@ -2828,6 +2618,194 @@ Tree-sitter conditionally sets 'forward-sexp-function' for major modes
2828that have defined 'sexp' in 'treesit-thing-settings' to enable 2618that have defined 'sexp' in 'treesit-thing-settings' to enable
2829sexp-related motion commands. 2619sexp-related motion commands.
2830 2620
2621+++
2622** Returned strings are never docstrings.
2623Functions and macros whose bodies consist of a single string literal now
2624only return that string; it is not used as a docstring. Example:
2625
2626 (defun sing-a-song ()
2627 "Sing a song.")
2628
2629The above function returns the string '"Sing a song."' but has no
2630docstring. Previously, that string was used as both a docstring and
2631return value, which was never what the programmer wanted. If you want
2632the string to be a docstring, add an explicit return value.
2633
2634This change applies to 'defun', 'defsubst', 'defmacro' and 'lambda'
2635forms; other defining forms such as 'cl-defun' already worked this way.
2636
2637** New or changed byte-compilation warnings
2638
2639---
2640*** Warn about missing 'lexical-binding' directive.
2641The compiler now warns if an Elisp file lacks the standard
2642'-*- lexical-binding: ... -*-' cookie on the first line.
2643This line typically looks something like
2644
2645 ;;; My little pony mode -*- lexical-binding: t -*-
2646
2647It is needed to inform the compiler about which dialect of ELisp
2648your code is using: the modern dialect with lexical binding or
2649the old dialect with only dynamic binding.
2650
2651Lexical binding avoids some name conflicts and allows the compiler to
2652detect more mistakes and generate more efficient code, so it is
2653recommended. For how to adapt your code to lexical binding, see the
2654manual section "(elisp) Converting to Lexical Binding".
2655
2656If your code cannot be converted to lexical binding, you can insert
2657the line
2658
2659 ;;; -*- lexical-binding: nil -*-
2660
2661first in the file to declare that it uses the old dialect.
2662
2663---
2664*** Warn about empty bodies for more special forms and macros.
2665The compiler now warns about an empty body argument to 'when',
2666'unless', 'ignore-error' and 'with-suppressed-warnings' in addition to
2667the existing warnings for 'let' and 'let*'. Example:
2668
2669 (when (> x 2))
2670
2671This warning can be suppressed using 'with-suppressed-warnings' with
2672the warning name 'empty-body'.
2673
2674---
2675*** Warn about quoted error names in 'condition-case' and 'ignore-error'.
2676The compiler now warns about quoted condition (error) names
2677in 'condition-case' and 'ignore-error'. Example:
2678
2679 (condition-case nil
2680 (/ x y)
2681 ('arith-error "division by zero"))
2682
2683Quoting them adds the error name 'quote' to those handled or ignored
2684respectively, which was probably not intended.
2685
2686---
2687*** Warn about comparison with literal constants without defined identity.
2688The compiler now warns about comparisons by identity with a literal
2689string, cons, vector, record, function, large integer or float as this
2690may not match any value at all. Example:
2691
2692 (eq x "hello")
2693
2694Only literals for symbols and small integers (fixnums), including
2695characters, are guaranteed to have a consistent (unique) identity.
2696This warning applies to 'eq', 'eql', 'memq', 'memql', 'assq', 'rassq',
2697'remq' and 'delq'.
2698
2699To compare by (structural) value, use 'equal', 'member', 'assoc',
2700'rassoc', 'remove' or 'delete' instead. Floats and bignums can also
2701be compared using 'eql', '=' and 'memql'. Function literals cannot be
2702compared reliably at all.
2703
2704This warning can be suppressed using 'with-suppressed-warnings' with
2705the warning name 'suspicious'.
2706
2707---
2708*** Warn about 'condition-case' without handlers.
2709The compiler now warns when the 'condition-case' form is used without
2710any actual handlers, as in
2711
2712 (condition-case nil (read buffer))
2713
2714because it has no effect other than the execution of the body form.
2715In particular, no errors are caught or suppressed. If the intention
2716was to catch all errors, add an explicit handler for 'error', or use
2717'ignore-error' or 'ignore-errors'.
2718
2719This warning can be suppressed using 'with-suppressed-warnings' with
2720the warning name 'suspicious'.
2721
2722---
2723*** Warn about 'unwind-protect' without unwind forms.
2724The compiler now warns when the 'unwind-protect' form is used without
2725any unwind forms, as in
2726
2727 (unwind-protect (read buffer))
2728
2729because the behavior is identical to that of the argument; there is
2730no protection of any kind. Perhaps the intended unwind forms have
2731been misplaced or forgotten, or the use of 'unwind-protect' could be
2732simplified away.
2733
2734This warning can be suppressed using 'with-suppressed-warnings' with
2735the warning name 'suspicious'.
2736
2737---
2738*** Warn about useless trailing 'cond' clauses.
2739The compiler now warns when a 'cond' form contains clauses following a
2740default (unconditional) clause. Example:
2741
2742 (cond ((= x 0) (say "none"))
2743 (t (say "some"))
2744 (say "goodbye"))
2745
2746Such a clause will never be executed but is likely to be a mistake,
2747perhaps due to misplaced brackets.
2748
2749This warning can be suppressed using 'with-suppressed-warnings' with
2750the warning name 'suspicious'.
2751
2752---
2753*** Warn about mutation of constant values.
2754The compiler now warns about code that modifies program constants in
2755some obvious cases. Examples:
2756
2757 (setcar '(1 2) 7)
2758 (aset [3 4] 0 8)
2759 (aset "abc" 1 ?d)
2760
2761Such code may have unpredictable behavior because the constants are
2762part of the program, not data structures generated afresh during
2763execution, and the compiler does not expect them to change.
2764
2765To avoid the warning, operate on an object created by the program
2766(maybe a copy of the constant), or use a non-destructive operation
2767instead.
2768
2769This warning can be suppressed using 'with-suppressed-warnings' with
2770the warning name 'mutate-constant'.
2771
2772---
2773*** Warn about more ignored function return values.
2774The compiler now warns when the return value from certain functions is
2775implicitly ignored. Example:
2776
2777 (progn (nreverse my-list) my-list)
2778
2779will elicit a warning because it is usually pointless to call
2780'nreverse' on a list without using the returned value.
2781
2782To silence the warning, make use of the value in some way, such as
2783assigning it to a variable. You can also wrap the function call in
2784'(ignore ...)', or use 'with-suppressed-warnings' with the warning
2785name 'ignored-return-value'.
2786
2787The warning will only be issued for calls to functions declared
2788'important-return-value' or 'side-effect-free' (but not 'error-free').
2789
2790---
2791*** Warn about docstrings that contain control characters.
2792The compiler now warns about docstrings with control characters other
2793than newline and tab. This is often a result of improper escaping.
2794Example:
2795
2796 (defun my-fun ()
2797 "Uses c:\remote\dir\files and the key \C-x."
2798 ...)
2799
2800where the docstring contains the four control characters 'CR', 'DEL',
2801'FF' and 'C-x'.
2802
2803The warning name is 'docstrings-control-chars'.
2804
2805---
2806*** The warning about wide docstrings can now be disabled separately.
2807Its warning name is 'docstrings-wide'.
2808
2831--- 2809---
2832** New user option 'native-comp-async-warnings-errors-kind'. 2810** New user option 'native-comp-async-warnings-errors-kind'.
2833It allows control of what kinds of warnings and errors from asynchronous 2811It allows control of what kinds of warnings and errors from asynchronous
@@ -2861,6 +2839,13 @@ The declaration '(important-return-value t)' sets the
2861'important-return-value' property which indicates that the function 2839'important-return-value' property which indicates that the function
2862return value should probably not be thrown away implicitly. 2840return value should probably not be thrown away implicitly.
2863 2841
2842** Bytecode is now always loaded eagerly.
2843Bytecode compiled with older Emacs versions for lazy loading using
2844'byte-compile-dynamic' is now loaded all at once.
2845As a consequence, 'fetch-bytecode' has no use, does nothing, and is
2846now obsolete. The variable 'byte-compile-dynamic' has no effect any
2847more; compilation will always yield bytecode for eager loading.
2848
2864+++ 2849+++
2865** New functions 'file-user-uid' and 'file-group-gid'. 2850** New functions 'file-user-uid' and 'file-group-gid'.
2866These functions are like 'user-uid' and 'group-gid', respectively, but 2851These functions are like 'user-uid' and 'group-gid', respectively, but
@@ -2868,6 +2853,21 @@ are aware of file name handlers, so they will return the remote UID or
2868GID for remote files (or -1 if the connection has no associated user). 2853GID for remote files (or -1 if the connection has no associated user).
2869 2854
2870+++ 2855+++
2856** 'fset', 'defalias' and 'defvaralias' now signal an error for cyclic aliases.
2857Previously, 'fset', 'defalias' and 'defvaralias' could be made to
2858build circular function and variable indirection chains as in
2859
2860 (defalias 'able 'baker)
2861 (defalias 'baker 'able)
2862
2863but trying to use them would sometimes make Emacs hang. Now, an attempt
2864to create such a loop results in an error.
2865
2866Since circular alias chains now cannot occur, 'function-alias-p',
2867'indirect-function' and 'indirect-variable' will never signal an error.
2868Their 'noerror' arguments have no effect and are therefore obsolete.
2869
2870+++
2871** 'treesit-font-lock-rules' now accepts additional global keywords. 2871** 'treesit-font-lock-rules' now accepts additional global keywords.
2872When supplied with ':default-language LANGUAGE', rules after it will 2872When supplied with ':default-language LANGUAGE', rules after it will
2873default to use 'LANGUAGE'. 2873default to use 'LANGUAGE'.
@@ -2982,7 +2982,7 @@ this was not possible.) In addition, LOCATION can be an integer, a
2982(BEFORE is ignored in this case). 2982(BEFORE is ignored in this case).
2983 2983
2984+++ 2984+++
2985** New function 'sqlite-execute-batch'. 2985**** New function 'sqlite-execute-batch'.
2986This function lets the user execute multiple SQL statements in one go. 2986This function lets the user execute multiple SQL statements in one go.
2987It is useful, for example, when a Lisp program needs to evaluate an 2987It is useful, for example, when a Lisp program needs to evaluate an
2988entire SQL file. 2988entire SQL file.