Revert "; * etc/NEWS: Move items to "Incompatible Lisp Changes"."
authorMattias Engdegård <mattiase@acm.org>
Sun, 30 Jun 2024 15:06:30 +0000 (17:06 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sun, 30 Jun 2024 15:27:08 +0000 (17:27 +0200)
This reverts commit 000ef8876ae9e2098cf98e1b1c468c09be3acd43.
Most of the moved items weren't actually incompatible changes.

etc/NEWS

index a6eda6afdddee763fb6b0dd074cf29d2f9976c65..7cc1949af2dae5ced6be44a06ce01c22d591e273 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2135,13 +2135,6 @@ preventing the installation of Compat if unnecessary.
 \f
 * Incompatible Lisp Changes in Emacs 30.1
 
-** Bytecode is now always loaded eagerly.
-Bytecode compiled with older Emacs versions for lazy loading using
-'byte-compile-dynamic' is now loaded all at once.
-As a consequence, 'fetch-bytecode' has no use, does nothing, and is
-now obsolete.  The variable 'byte-compile-dynamic' has no effect any
-more; compilation will always yield bytecode for eager loading.
-
 +++
 ** Evaluating a 'lambda' returns an object of type 'interpreted-function'.
 Instead 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
 various subparts (when 'interactive-form', 'documentation', and
 'help-function-arglist' aren't adequate).
 
-+++
-** Returned strings from functions and macros are never docstrings.
-Functions and macros whose bodies consist of a single string literal now
-only return that string; it is not used as a docstring.  Example:
-
-    (defun sing-a-song ()
-      "Sing a song.")
-
-The above function returns the string '"Sing a song."' but has no
-docstring.  Previously, that string was used as both a docstring and
-return value, which was never what the programmer wanted.  If you want
-the string to be a docstring, add an explicit return value.
-
-This change applies to 'defun', 'defsubst', 'defmacro' and 'lambda'
-forms; other defining forms such as 'cl-defun' already worked this way.
-
-** New or changed byte-compilation warnings
-
----
-*** Warn about missing 'lexical-binding' directive.
-The compiler now warns if an Elisp file lacks the standard
-'-*- lexical-binding: ... -*-' cookie on the first line.
-This line typically looks something like
-
-    ;;; My little pony mode  -*- lexical-binding: t -*-
-
-It is needed to inform the compiler about which dialect of ELisp
-your code is using: the modern dialect with lexical binding or
-the old dialect with only dynamic binding.
-
-Lexical binding avoids some name conflicts and allows the compiler to
-detect more mistakes and generate more efficient code, so it is
-recommended.  For how to adapt your code to lexical binding, see the
-manual section "(elisp) Converting to Lexical Binding".
-
-If your code cannot be converted to lexical binding, you can insert
-the line
-
-    ;;; -*- lexical-binding: nil -*-
-
-first in the file to declare that it uses the old dialect.
-
----
-*** Warn about empty bodies for more special forms and macros.
-The compiler now warns about an empty body argument to 'when',
-'unless', 'ignore-error' and 'with-suppressed-warnings' in addition to
-the existing warnings for 'let' and 'let*'.  Example:
-
-    (when (> x 2))
-
-This warning can be suppressed using 'with-suppressed-warnings' with
-the warning name 'empty-body'.
-
----
-*** Warn about quoted error names in 'condition-case' and 'ignore-error'.
-The compiler now warns about quoted condition (error) names
-in 'condition-case' and 'ignore-error'.  Example:
-
-    (condition-case nil
-        (/ x y)
-      ('arith-error "division by zero"))
-
-Quoting them adds the error name 'quote' to those handled or ignored
-respectively, which was probably not intended.
-
----
-*** Warn about comparison with literal constants without defined identity.
-The compiler now warns about comparisons by identity with a literal
-string, cons, vector, record, function, large integer or float as this
-may not match any value at all.  Example:
-
-    (eq x "hello")
-
-Only literals for symbols and small integers (fixnums), including
-characters, are guaranteed to have a consistent (unique) identity.
-This warning applies to 'eq', 'eql', 'memq', 'memql', 'assq', 'rassq',
-'remq' and 'delq'.
-
-To compare by (structural) value, use 'equal', 'member', 'assoc',
-'rassoc', 'remove' or 'delete' instead.  Floats and bignums can also
-be compared using 'eql', '=' and 'memql'.  Function literals cannot be
-compared reliably at all.
-
-This warning can be suppressed using 'with-suppressed-warnings' with
-the warning name 'suspicious'.
-
----
-*** Warn about 'condition-case' without handlers.
-The compiler now warns when the 'condition-case' form is used without
-any actual handlers, as in
-
-    (condition-case nil (read buffer))
-
-because it has no effect other than the execution of the body form.
-In particular, no errors are caught or suppressed.  If the intention
-was to catch all errors, add an explicit handler for 'error', or use
-'ignore-error' or 'ignore-errors'.
-
-This warning can be suppressed using 'with-suppressed-warnings' with
-the warning name 'suspicious'.
-
----
-*** Warn about 'unwind-protect' without unwind forms.
-The compiler now warns when the 'unwind-protect' form is used without
-any unwind forms, as in
-
-    (unwind-protect (read buffer))
-
-because the behavior is identical to that of the argument; there is
-no protection of any kind.  Perhaps the intended unwind forms have
-been misplaced or forgotten, or the use of 'unwind-protect' could be
-simplified away.
-
-This warning can be suppressed using 'with-suppressed-warnings' with
-the warning name 'suspicious'.
-
----
-*** Warn about useless trailing 'cond' clauses.
-The compiler now warns when a 'cond' form contains clauses following a
-default (unconditional) clause.  Example:
-
-    (cond ((= x 0) (say "none"))
-          (t (say "some"))
-          (say "goodbye"))
-
-Such a clause will never be executed but is likely to be a mistake,
-perhaps due to misplaced brackets.
-
-This warning can be suppressed using 'with-suppressed-warnings' with
-the warning name 'suspicious'.
-
----
-*** Warn about mutation of constant values.
-The compiler now warns about code that modifies program constants in
-some obvious cases.  Examples:
-
-    (setcar '(1 2) 7)
-    (aset [3 4] 0 8)
-    (aset "abc" 1 ?d)
-
-Such code may have unpredictable behavior because the constants are
-part of the program, not data structures generated afresh during
-execution, and the compiler does not expect them to change.
-
-To avoid the warning, operate on an object created by the program
-(maybe a copy of the constant), or use a non-destructive operation
-instead.
-
-This warning can be suppressed using 'with-suppressed-warnings' with
-the warning name 'mutate-constant'.
-
----
-*** Warn about more ignored function return values.
-The compiler now warns when the return value from certain functions is
-implicitly ignored.  Example:
-
-    (progn (nreverse my-list) my-list)
-
-will elicit a warning because it is usually pointless to call
-'nreverse' on a list without using the returned value.
-
-To silence the warning, make use of the value in some way, such as
-assigning it to a variable.  You can also wrap the function call in
-'(ignore ...)', or use 'with-suppressed-warnings' with the warning
-name 'ignored-return-value'.
-
-The warning will only be issued for calls to functions declared
-'important-return-value' or 'side-effect-free' (but not 'error-free').
-
----
-*** Warn about docstrings that contain control characters.
-The compiler now warns about docstrings with control characters other
-than newline and tab.  This is often a result of improper escaping.
-Example:
-
-    (defun my-fun ()
-      "Uses c:\remote\dir\files and the key \C-x."
-      ...)
-
-where the docstring contains the four control characters 'CR', 'DEL',
-'FF' and 'C-x'.
-
-The warning name is 'docstrings-control-chars'.
-
----
-*** The warning about wide docstrings can now be disabled separately.
-Its warning name is 'docstrings-wide'.
-
-+++
-** 'fset', 'defalias' and 'defvaralias' now signal an error for cyclic aliases.
-Previously, 'fset', 'defalias' and 'defvaralias' could be made to
-build circular function and variable indirection chains as in
-
-    (defalias 'able 'baker)
-    (defalias 'baker 'able)
-
-but trying to use them would sometimes make Emacs hang.  Now, an attempt
-to create such a loop results in an error.
-
-Since circular alias chains now cannot occur, 'function-alias-p',
-'indirect-function' and 'indirect-variable' will never signal an error.
-Their 'noerror' arguments have no effect and are therefore obsolete.
-
 ---
 ** The escape sequence '\x' not followed by hex digits is now an error.
 Previously, '\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
 'completing-read' don't discard text properties from the returned
 completion candidate.
 
-** 'defadvice' is marked as obsolete.
-See the "(elisp) Porting Old Advice" Info node for help converting
-them to use 'advice-add' or 'define-advice' instead.
-
-** 'cl-old-struct-compat-mode' is marked as obsolete.
-You may need to recompile our code if it was compiled with Emacs < 24.3.
-
 +++
 ** X color support compatibility aliases are now obsolete.
 The 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,
 and 'cl-functionp' is like 'functionp' except it returns nil
 for lists and symbols.
 
-** Built-in types now have corresponding classes.
+** Built-in types have now corresponding classes.
 At the Lisp level, this means that things like '(cl-find-class 'integer)'
 will now return a class object, and at the UI level it means that
 things 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.
 Other features in Emacs which employ XLFDs have been modified to
 produce and understand XLFDs larger than 255 characters.
 
+** 'defadvice' is marked as obsolete.
+See the "(elisp) Porting Old Advice" Info node for help converting
+them to use 'advice-add' or 'define-advice' instead.
+
+** 'cl-old-struct-compat-mode' is marked as obsolete.
+You may need to recompile our code if it was compiled with Emacs < 24.3.
+
 +++
 ** New macro 'static-if' for conditional evaluation of code.
 This 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
 that have defined 'sexp' in 'treesit-thing-settings' to enable
 sexp-related motion commands.
 
++++
+** Returned strings are never docstrings.
+Functions and macros whose bodies consist of a single string literal now
+only return that string; it is not used as a docstring.  Example:
+
+    (defun sing-a-song ()
+      "Sing a song.")
+
+The above function returns the string '"Sing a song."' but has no
+docstring.  Previously, that string was used as both a docstring and
+return value, which was never what the programmer wanted.  If you want
+the string to be a docstring, add an explicit return value.
+
+This change applies to 'defun', 'defsubst', 'defmacro' and 'lambda'
+forms; other defining forms such as 'cl-defun' already worked this way.
+
+** New or changed byte-compilation warnings
+
+---
+*** Warn about missing 'lexical-binding' directive.
+The compiler now warns if an Elisp file lacks the standard
+'-*- lexical-binding: ... -*-' cookie on the first line.
+This line typically looks something like
+
+    ;;; My little pony mode  -*- lexical-binding: t -*-
+
+It is needed to inform the compiler about which dialect of ELisp
+your code is using: the modern dialect with lexical binding or
+the old dialect with only dynamic binding.
+
+Lexical binding avoids some name conflicts and allows the compiler to
+detect more mistakes and generate more efficient code, so it is
+recommended.  For how to adapt your code to lexical binding, see the
+manual section "(elisp) Converting to Lexical Binding".
+
+If your code cannot be converted to lexical binding, you can insert
+the line
+
+    ;;; -*- lexical-binding: nil -*-
+
+first in the file to declare that it uses the old dialect.
+
+---
+*** Warn about empty bodies for more special forms and macros.
+The compiler now warns about an empty body argument to 'when',
+'unless', 'ignore-error' and 'with-suppressed-warnings' in addition to
+the existing warnings for 'let' and 'let*'.  Example:
+
+    (when (> x 2))
+
+This warning can be suppressed using 'with-suppressed-warnings' with
+the warning name 'empty-body'.
+
+---
+*** Warn about quoted error names in 'condition-case' and 'ignore-error'.
+The compiler now warns about quoted condition (error) names
+in 'condition-case' and 'ignore-error'.  Example:
+
+    (condition-case nil
+        (/ x y)
+      ('arith-error "division by zero"))
+
+Quoting them adds the error name 'quote' to those handled or ignored
+respectively, which was probably not intended.
+
+---
+*** Warn about comparison with literal constants without defined identity.
+The compiler now warns about comparisons by identity with a literal
+string, cons, vector, record, function, large integer or float as this
+may not match any value at all.  Example:
+
+    (eq x "hello")
+
+Only literals for symbols and small integers (fixnums), including
+characters, are guaranteed to have a consistent (unique) identity.
+This warning applies to 'eq', 'eql', 'memq', 'memql', 'assq', 'rassq',
+'remq' and 'delq'.
+
+To compare by (structural) value, use 'equal', 'member', 'assoc',
+'rassoc', 'remove' or 'delete' instead.  Floats and bignums can also
+be compared using 'eql', '=' and 'memql'.  Function literals cannot be
+compared reliably at all.
+
+This warning can be suppressed using 'with-suppressed-warnings' with
+the warning name 'suspicious'.
+
+---
+*** Warn about 'condition-case' without handlers.
+The compiler now warns when the 'condition-case' form is used without
+any actual handlers, as in
+
+    (condition-case nil (read buffer))
+
+because it has no effect other than the execution of the body form.
+In particular, no errors are caught or suppressed.  If the intention
+was to catch all errors, add an explicit handler for 'error', or use
+'ignore-error' or 'ignore-errors'.
+
+This warning can be suppressed using 'with-suppressed-warnings' with
+the warning name 'suspicious'.
+
+---
+*** Warn about 'unwind-protect' without unwind forms.
+The compiler now warns when the 'unwind-protect' form is used without
+any unwind forms, as in
+
+    (unwind-protect (read buffer))
+
+because the behavior is identical to that of the argument; there is
+no protection of any kind.  Perhaps the intended unwind forms have
+been misplaced or forgotten, or the use of 'unwind-protect' could be
+simplified away.
+
+This warning can be suppressed using 'with-suppressed-warnings' with
+the warning name 'suspicious'.
+
+---
+*** Warn about useless trailing 'cond' clauses.
+The compiler now warns when a 'cond' form contains clauses following a
+default (unconditional) clause.  Example:
+
+    (cond ((= x 0) (say "none"))
+          (t (say "some"))
+          (say "goodbye"))
+
+Such a clause will never be executed but is likely to be a mistake,
+perhaps due to misplaced brackets.
+
+This warning can be suppressed using 'with-suppressed-warnings' with
+the warning name 'suspicious'.
+
+---
+*** Warn about mutation of constant values.
+The compiler now warns about code that modifies program constants in
+some obvious cases.  Examples:
+
+    (setcar '(1 2) 7)
+    (aset [3 4] 0 8)
+    (aset "abc" 1 ?d)
+
+Such code may have unpredictable behavior because the constants are
+part of the program, not data structures generated afresh during
+execution, and the compiler does not expect them to change.
+
+To avoid the warning, operate on an object created by the program
+(maybe a copy of the constant), or use a non-destructive operation
+instead.
+
+This warning can be suppressed using 'with-suppressed-warnings' with
+the warning name 'mutate-constant'.
+
+---
+*** Warn about more ignored function return values.
+The compiler now warns when the return value from certain functions is
+implicitly ignored.  Example:
+
+    (progn (nreverse my-list) my-list)
+
+will elicit a warning because it is usually pointless to call
+'nreverse' on a list without using the returned value.
+
+To silence the warning, make use of the value in some way, such as
+assigning it to a variable.  You can also wrap the function call in
+'(ignore ...)', or use 'with-suppressed-warnings' with the warning
+name 'ignored-return-value'.
+
+The warning will only be issued for calls to functions declared
+'important-return-value' or 'side-effect-free' (but not 'error-free').
+
+---
+*** Warn about docstrings that contain control characters.
+The compiler now warns about docstrings with control characters other
+than newline and tab.  This is often a result of improper escaping.
+Example:
+
+    (defun my-fun ()
+      "Uses c:\remote\dir\files and the key \C-x."
+      ...)
+
+where the docstring contains the four control characters 'CR', 'DEL',
+'FF' and 'C-x'.
+
+The warning name is 'docstrings-control-chars'.
+
+---
+*** The warning about wide docstrings can now be disabled separately.
+Its warning name is 'docstrings-wide'.
+
 ---
 ** New user option 'native-comp-async-warnings-errors-kind'.
 It allows control of what kinds of warnings and errors from asynchronous
@@ -2861,12 +2839,34 @@ The declaration '(important-return-value t)' sets the
 'important-return-value' property which indicates that the function
 return value should probably not be thrown away implicitly.
 
+** Bytecode is now always loaded eagerly.
+Bytecode compiled with older Emacs versions for lazy loading using
+'byte-compile-dynamic' is now loaded all at once.
+As a consequence, 'fetch-bytecode' has no use, does nothing, and is
+now obsolete.  The variable 'byte-compile-dynamic' has no effect any
+more; compilation will always yield bytecode for eager loading.
+
 +++
 ** New functions 'file-user-uid' and 'file-group-gid'.
 These functions are like 'user-uid' and 'group-gid', respectively, but
 are aware of file name handlers, so they will return the remote UID or
 GID for remote files (or -1 if the connection has no associated user).
 
++++
+** 'fset', 'defalias' and 'defvaralias' now signal an error for cyclic aliases.
+Previously, 'fset', 'defalias' and 'defvaralias' could be made to
+build circular function and variable indirection chains as in
+
+    (defalias 'able 'baker)
+    (defalias 'baker 'able)
+
+but trying to use them would sometimes make Emacs hang.  Now, an attempt
+to create such a loop results in an error.
+
+Since circular alias chains now cannot occur, 'function-alias-p',
+'indirect-function' and 'indirect-variable' will never signal an error.
+Their 'noerror' arguments have no effect and are therefore obsolete.
+
 +++
 ** 'treesit-font-lock-rules' now accepts additional global keywords.
 When supplied with ':default-language LANGUAGE', rules after it will
@@ -2982,7 +2982,7 @@ this was not possible.)  In addition, LOCATION can be an integer, a
 (BEFORE is ignored in this case).
 
 +++
-** New function 'sqlite-execute-batch'.
+**** New function 'sqlite-execute-batch'.
 This function lets the user execute multiple SQL statements in one go.
 It is useful, for example, when a Lisp program needs to evaluate an
 entire SQL file.