aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2024-07-01 18:12:38 +0800
committerPo Lu2024-07-01 18:12:38 +0800
commitd5cae5ea3675d05fe5df13f122f302e9993bb803 (patch)
tree4e863ea6637af925bca09b26c59bd1eb9316ce73
parentebf5bcb9f0b6adeb97a3918b8f3845844c9091b0 (diff)
parent2f71460d52fb8ec36766edc297de559b318ee5e1 (diff)
downloademacs-d5cae5ea3675d05fe5df13f122f302e9993bb803.tar.gz
emacs-d5cae5ea3675d05fe5df13f122f302e9993bb803.zip
Merge from savannah/emacs-30
2f71460d52f More updates of documentation for Emacs 30 a9df581c403 ; * etc/NEWS: Copy-edit. dfbdd38f701 Revert "; * etc/NEWS: Move items to "Incompatible Lisp Ch... # Conflicts: # etc/NEWS
-rw-r--r--doc/emacs/fixit.texi7
-rw-r--r--doc/emacs/misc.texi5
-rw-r--r--doc/lispref/functions.texi18
-rw-r--r--doc/lispref/positions.texi23
-rw-r--r--doc/lispref/tips.texi2
-rw-r--r--etc/NEWS.30593
6 files changed, 364 insertions, 284 deletions
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index f3c876cf3f7..af9ca5fcdf6 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -473,6 +473,13 @@ it will slow down cursor motion and scrolling commands. It also
473doesn't automatically check the text you didn't type or move across; 473doesn't automatically check the text you didn't type or move across;
474use @code{flyspell-region} or @code{flyspell-buffer} for that. 474use @code{flyspell-region} or @code{flyspell-buffer} for that.
475 475
476@vindex flyspell-check-changes
477 Normally, Flyspell mode highlights misspelled words that you typed or
478modified, but also words you move across without changing them. But if
479you customize the variable @code{flyspell-check-changes} to a
480non-@code{nil} value, Flyspell mode will check only the words you typed
481or edited in some way.
482
476@findex flyspell-correct-word 483@findex flyspell-correct-word
477@findex flyspell-auto-correct-word 484@findex flyspell-auto-correct-word
478@findex flyspell-correct-word-before-point 485@findex flyspell-correct-word-before-point
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 13d86a32e79..d1e8217f579 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -2849,13 +2849,14 @@ frame parameters you don't want to be restored; they will then be set
2849according to your customizations in the init file. 2849according to your customizations in the init file.
2850 2850
2851@vindex desktop-files-not-to-save 2851@vindex desktop-files-not-to-save
2852@vindex remote-file-name-access-timeout 2852@vindex remote-file-name-access-timeout@r{, and desktop restoring}
2853 Information about buffers visiting remote files is not saved by 2853 Information about buffers visiting remote files is not saved by
2854default. Customize the variable @code{desktop-files-not-to-save} to 2854default. Customize the variable @code{desktop-files-not-to-save} to
2855change this. In this case, you might also consider customizing 2855change this. In this case, you might also consider customizing
2856@code{remote-file-name-access-timeout}, which is the number of 2856@code{remote-file-name-access-timeout}, which is the number of
2857seconds after which buffer restoration of a remote file is 2857seconds after which buffer restoration of a remote file is
2858stopped. This prevents Emacs being blocked. 2858stopped. This prevents Emacs from being blocked when restoring sessions
2859that visited remote files.
2859 2860
2860@vindex desktop-restore-eager 2861@vindex desktop-restore-eager
2861 By default, all the buffers in the desktop are restored in one go. 2862 By default, all the buffers in the desktop are restored in one go.
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index dcce4043064..695e1c3efb5 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -186,8 +186,8 @@ their code.
186@end defun 186@end defun
187 187
188@noindent 188@noindent
189Unlike @code{functionp}, the next three functions do @emph{not} treat 189Unlike @code{functionp}, the next functions do @emph{not} treat a symbol
190a symbol as its function definition. 190as its function definition.
191 191
192@defun subrp object 192@defun subrp object
193This function returns @code{t} if @var{object} is a built-in function 193This function returns @code{t} if @var{object} is a built-in function
@@ -243,6 +243,20 @@ without symbol indirection. It signals an error for non-built-in
243functions. We recommend to use @code{func-arity} instead. 243functions. We recommend to use @code{func-arity} instead.
244@end defun 244@end defun
245 245
246@defun cl-functionp object
247This function is like @code{functionp}, except it returns @code{nil} for
248lists and symbols.
249@end defun
250
251@findex subr-primitive-p
252@defun primitive-function-p object
253This function returns @code{t} if @var{object} is a built-in primitive
254written in C (@pxref{Primitive Function Type}). Note that special forms
255are explicitly excluded, as they are not functions. Use
256@code{subr-primitive-p} if you need to recognize special forms as well.
257@end defun
258
259
246@node Lambda Expressions 260@node Lambda Expressions
247@section Lambda Expressions 261@section Lambda Expressions
248@cindex lambda expression 262@cindex lambda expression
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index 9193c1063d1..ead7833af61 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -875,14 +875,21 @@ nested defuns.
875@findex treesit-forward-sentence 875@findex treesit-forward-sentence
876@findex forward-sentence 876@findex forward-sentence
877@findex backward-sentence 877@findex backward-sentence
878If Emacs is compiled with tree-sitter, it can use the tree-sitter 878@vindex forward-sentence-function
879parser information to move across syntax constructs. Since what 879@cindex sentence, in program source files
880exactly is considered a sentence varies between languages, a major 880The function that is the value of the variable
881mode should set @code{treesit-thing-settings} to determine that. 881@code{forward-sentence-function} determines how to move across syntax
882Then the mode can get navigation-by-sentence functionality for free, 882constructs known as @dfn{sentences}. Major modes can assign their own
883by using @code{forward-sentence} and 883functions to this variable to customize the behavior of
884@code{backward-sentence}(@pxref{Moving by Sentences,,, emacs, The 884@code{forward-sentence} command. If Emacs is compiled with tree-sitter,
885extensible self-documenting text editor}). 885it can use the tree-sitter parser information to move across syntax
886constructs. Since what exactly is considered a sentence varies between
887languages, a major mode should set @code{treesit-thing-settings} to
888determine that. Then @code{forward-sentence-function} will be set to
889@code{treesit-forward-sentence}, and the mode will get
890navigation-by-sentence functionality for free, by using
891@code{forward-sentence} and @code{backward-sentence}(@pxref{Moving by
892Sentences,,, emacs, The extensible self-documenting text editor}).
886 893
887@findex treesit-forward-sexp 894@findex treesit-forward-sexp
888@findex forward-sexp@r{, and tree-sitter} 895@findex forward-sexp@r{, and tree-sitter}
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 1e35b82e413..802fa0febed 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -611,7 +611,7 @@ little space in a running Emacs.
611@item 611@item
612Format the documentation string so that it fits in an Emacs window on an 612Format the documentation string so that it fits in an Emacs window on an
61380-column screen. It is a good idea for most lines to be no wider than 61380-column screen. It is a good idea for most lines to be no wider than
61460 characters. The first line should not be wider than 67 characters 61460 characters. The first line should not be wider than 74 characters,
615or it will look bad in the output of @code{apropos}. 615or it will look bad in the output of @code{apropos}.
616 616
617@vindex emacs-lisp-docstring-fill-column 617@vindex emacs-lisp-docstring-fill-column
diff --git a/etc/NEWS.30 b/etc/NEWS.30
index a6eda6afddd..d0534ad7538 100644
--- a/etc/NEWS.30
+++ b/etc/NEWS.30
@@ -744,6 +744,8 @@ bind 'M-TAB' to 'ispell-complete-word' as it did in previous Emacs
744versions, or disable Ispell word completion in Text mode altogether, by 744versions, or disable Ispell word completion in Text mode altogether, by
745customizing the new user option 'text-mode-ispell-word-completion'. 745customizing the new user option 'text-mode-ispell-word-completion'.
746 746
747** Internationalization
748
747--- 749---
748** Mode-line mnemonics for some coding-systems have changed. 750** Mode-line mnemonics for some coding-systems have changed.
749The mode-line mnemonic for 'utf-7' is now the lowercase 'u', to be 751The mode-line mnemonic for 'utf-7' is now the lowercase 'u', to be
@@ -760,7 +762,14 @@ previous behavior of showing 'U' in the mode line for 'koi8-u':
760 762
761 (coding-system-put 'koi8-u :mnemonic ?U) 763 (coding-system-put 'koi8-u :mnemonic ?U)
762 764
763** Internationalization 765---
766** 'vietnamese-tcvn' is now a coding system alias for 'vietnamese-vscii'.
767VSCII-1 and TCVN-5712 are different names for the same character
768encoding. Therefore, the duplicate coding system definition has been
769dropped in favor of an alias.
770
771The mode-line mnemonic for 'vietnamese-vscii' and its aliases is the
772lowercase letter 'v'.
764 773
765--- 774---
766*** Users in CJK locales can control width of some non-CJK characters. 775*** Users in CJK locales can control width of some non-CJK characters.
@@ -1593,10 +1602,12 @@ mouse to consult an error message.
1593 1602
1594** Flyspell 1603** Flyspell
1595 1604
1605+++
1596*** New user option 'flyspell-check-changes'. 1606*** New user option 'flyspell-check-changes'.
1597When non-nil, Flyspell mode spell-checks only words that you edited; it 1607When non-nil, Flyspell mode spell-checks only words that you edited; it
1598does not check unedited words just because you move point across them. 1608does not check unedited words just because you move point across them.
1599 1609
1610---
1600** JS mode. 1611** JS mode.
1601The binding 'M-.' has been removed from the major mode keymaps in 1612The binding 'M-.' has been removed from the major mode keymaps in
1602'js-mode' and 'js-ts-mode', having it default to the global binding 1613'js-mode' and 'js-ts-mode', having it default to the global binding
@@ -1604,6 +1615,7 @@ which calls 'xref-find-definitions'. If the previous one worked
1604better for you, use 'define-key' in your init script to bind 1615better for you, use 'define-key' in your init script to bind
1605'js-find-symbol' to that combination again. 1616'js-find-symbol' to that combination again.
1606 1617
1618---
1607** Json mode. 1619** Json mode.
1608'js-json-mode' does not derive from 'js-mode' any more so as not 1620'js-json-mode' does not derive from 'js-mode' any more so as not
1609to confuse tools like Eglot or YASnippet into thinking that those 1621to confuse tools like Eglot or YASnippet into thinking that those
@@ -1627,19 +1639,16 @@ instead of:
1627 and another_expression): 1639 and another_expression):
1628 do_something() 1640 do_something()
1629 1641
1642---
1630*** New user option 'python-interpreter-args'. 1643*** New user option 'python-interpreter-args'.
1631This allows the user to specify command line arguments to the non 1644This allows the user to specify command line arguments to the non
1632interactive Python interpreter specified by 'python-interpreter'. 1645interactive Python interpreter specified by 'python-interpreter'.
1633 1646
1647---
1634*** New function 'python-shell-send-block'. 1648*** New function 'python-shell-send-block'.
1635It sends the python block delimited by 'python-nav-beginning-of-block' 1649It sends the python block delimited by 'python-nav-beginning-of-block'
1636and 'python-nav-end-of-block' to the inferior Python process. 1650and 'python-nav-end-of-block' to the inferior Python process.
1637 1651
1638*** 'eldoc' no longer truncates to a single line by default.
1639Previously, the entire docstring was not available to eldoc, which made
1640'eldoc-echo-area-use-multiline-p' ineffective. The old behavior may be
1641kept by customizing 'eldoc-echo-area-use-multiline-p'.
1642
1643** Inferior Python mode 1652** Inferior Python mode
1644 1653
1645--- 1654---
@@ -1648,6 +1657,15 @@ Support for Python's ExceptionGroup has been added, so in the Python
1648shell, the line indicating the source of error in the error messages 1657shell, the line indicating the source of error in the error messages
1649from ExceptionGroup will be recognized as well. 1658from ExceptionGroup will be recognized as well.
1650 1659
1660** Eldoc
1661
1662---
1663*** 'eldoc' no longer truncates to a single line by default.
1664Previously, the entire docstring was not available to eldoc, which made
1665'eldoc-echo-area-use-multiline-p' ineffective. The old behavior may be
1666kept by customizing 'eldoc-echo-area-use-multiline-p'.
1667
1668---
1651** Scheme mode 1669** Scheme mode
1652Scheme mode now handles regular expression literal '#/regexp/' that is 1670Scheme mode now handles regular expression literal '#/regexp/' that is
1653available in some Scheme implementations. 1671available in some Scheme implementations.
@@ -1711,7 +1729,7 @@ provide dictionary-based minibuffer completion for word selection.
1711*** New user option 'dictionary-read-word-prompt'. 1729*** New user option 'dictionary-read-word-prompt'.
1712This allows the user to customize the prompt that is used by 1730This allows the user to customize the prompt that is used by
1713'dictionary-search' when asking for a word to search in the 1731'dictionary-search' when asking for a word to search in the
1714dictionary. 1732dictionaries.
1715 1733
1716--- 1734---
1717*** New user option 'dictionary-display-definition-function'. 1735*** New user option 'dictionary-display-definition-function'.
@@ -1750,13 +1768,19 @@ the mode was turned on.
1750 1768
1751** Pp 1769** Pp
1752 1770
1771+++
1753*** New 'pp-default-function' user option replaces 'pp-use-max-width'. 1772*** New 'pp-default-function' user option replaces 'pp-use-max-width'.
1773Its default value is 'pp-fill', a new default pretty-printing function,
1774which tries to obey 'fill-column'.
1754 1775
1755*** New default pretty printing function, which tries to obey 'fill-column'. 1776---
1756
1757*** 'pp-to-string' takes an additional PP-FUNCTION argument. 1777*** 'pp-to-string' takes an additional PP-FUNCTION argument.
1758This argument specifies the prettifying algorithm to use. 1778This argument specifies the prettifying algorithm to use.
1759 1779
1780---
1781*** 'pp' and 'pp-to-string' now always include a terminating newline.
1782In the past they included a terminating newline in most cases but not all.
1783
1760** Emacs Lisp mode 1784** Emacs Lisp mode
1761 1785
1762--- 1786---
@@ -1765,7 +1789,7 @@ Previously, the '@' character, which normally has 'symbol' syntax,
1765would combine with a following Lisp symbol and interfere with symbol 1789would combine with a following Lisp symbol and interfere with symbol
1766searching. 1790searching.
1767 1791
1768--- 1792+++
1769*** 'emacs-lisp-docstring-fill-column' now defaults to 72. 1793*** 'emacs-lisp-docstring-fill-column' now defaults to 72.
1770It was previously 65. The new default formats documentation strings to 1794It was previously 65. The new default formats documentation strings to
1771fit on fewer lines without negatively impacting readability. 1795fit on fewer lines without negatively impacting readability.
@@ -1777,10 +1801,12 @@ fit on fewer lines without negatively impacting readability.
1777CPerl mode fontifies subroutine signatures like variable declarations 1801CPerl mode fontifies subroutine signatures like variable declarations
1778which makes them visually distinct from subroutine prototypes. 1802which makes them visually distinct from subroutine prototypes.
1779 1803
1804---
1780*** Syntax of Perl up to version 5.40 is supported. 1805*** Syntax of Perl up to version 5.40 is supported.
1781CPerl mode supports the new keywords for exception handling and the 1806CPerl mode supports the new keywords for exception handling and the
1782object oriented syntax which were added in Perl 5.36, 5.38 and 5.40. 1807object oriented syntax which were added in Perl 5.36, 5.38 and 5.40.
1783 1808
1809---
1784*** New user option 'cperl-fontify-trailer'. 1810*** New user option 'cperl-fontify-trailer'.
1785This user option takes the values 'perl-code' or 'comment' and treats 1811This user option takes the values 'perl-code' or 'comment' and treats
1786text after an "__END__" or "__DATA__" token accordingly. The default 1812text after an "__END__" or "__DATA__" token accordingly. The default
@@ -1788,21 +1814,25 @@ value of 'perl-code' is useful for trailing POD and for AutoSplit
1788modules, the value 'comment' makes CPerl mode treat trailers as 1814modules, the value 'comment' makes CPerl mode treat trailers as
1789comment, like Perl mode does. 1815comment, like Perl mode does.
1790 1816
1817---
1791*** New command 'cperl-file-style'. 1818*** New command 'cperl-file-style'.
1792This command sets the indentation style for the current buffer. To 1819This command sets the indentation style for the current buffer. To
1793change the default style, either use the user option with the same name 1820change the default style, either use the user option with the same name
1794or use the command 'cperl-set-style'. 1821or use the command 'cperl-set-style'.
1795 1822
1796*** New minor mode cperl-extra-paired-delimiters-mode 1823---
1824*** New minor mode 'cperl-extra-paired-delimiters-mode'.
1797Perl 5.36 and newer allows using more than 200 non-ASCII paired 1825Perl 5.36 and newer allows using more than 200 non-ASCII paired
1798delimiters for quote-like constructs, eg. "q«text»". Use this minor 1826delimiters for quote-like constructs, eg. "q«text»". Use this minor
1799mode in buffers where this feature is activated. 1827mode in buffers where this feature is activated.
1800 1828
1801*** Commands using the Perl info page are obsolete. 1829---
1802The Perl documentation in info format is no longer distributed with 1830*** Commands using the Perl Info manual are obsolete.
1831The Perl documentation in Info format is no longer distributed with
1803Perl or on CPAN since more than 10 years. Perl documentation can be 1832Perl or on CPAN since more than 10 years. Perl documentation can be
1804read with 'cperl-perldoc' instead. 1833read with 'cperl-perldoc' instead.
1805 1834
1835---
1806*** Highlighting trailing whitespace has been removed. 1836*** Highlighting trailing whitespace has been removed.
1807The user option 'cperl-invalid-face' is now obsolete, and does 1837The user option 'cperl-invalid-face' is now obsolete, and does
1808nothing. See the user option 'show-trailing-whitespace' instead. 1838nothing. See the user option 'show-trailing-whitespace' instead.
@@ -1828,8 +1858,9 @@ of the accessibility of remote files can now time out if
1828 1858
1829** Image Dired 1859** Image Dired
1830 1860
1861+++
1831*** New user option 'image-dired-thumb-naming'. 1862*** New user option 'image-dired-thumb-naming'.
1832You can now configure how a thumbnail is named using this option. 1863You can now configure how thumbnails are named using this option.
1833 1864
1834** ERT 1865** ERT
1835 1866
@@ -1874,10 +1905,10 @@ macros with many lines, such as from 'kmacro-edit-lossage'.
1874Fractions of the form "123⁄456" are handled as if written "123:456". 1905Fractions of the form "123⁄456" are handled as if written "123:456".
1875Note in particular the difference in behavior from U+2215 DIVISION SLASH 1906Note in particular the difference in behavior from U+2215 DIVISION SLASH
1876and U+002F SOLIDUS, which result in division rather than a rational 1907and U+002F SOLIDUS, which result in division rather than a rational
1877fraction. You may also be interested to know that precomposed fraction 1908fraction. In addition, precomposed fraction characters, such as ½
1878characters, such as ½ (U+00BD VULGAR FRACTION ONE HALF), are also 1909(U+00BD VULGAR FRACTION ONE HALF), are also recognized as rational
1879recognized as rational fractions. They have been since 2004, but it 1910fractions. (They have been recognized since 2004, but it looks like it
1880looks like it was never mentioned in the NEWS, or even the manual. 1911was never mentioned in the NEWS, or even the Calc manual.)
1881 1912
1882** IELM 1913** IELM
1883 1914
@@ -1904,12 +1935,14 @@ labels of unselected active radio-button or checkbox widgets from the
1904labels of unselected inactive widgets (the default value inherits from 1935labels of unselected inactive widgets (the default value inherits from
1905the 'widget-inactive' face). 1936the 'widget-inactive' face).
1906 1937
1938+++
1907*** New user option 'widget-skip-inactive'. 1939*** New user option 'widget-skip-inactive'.
1908If non-nil, moving point forward or backward between widgets by typing 1940If non-nil, moving point forward or backward between widgets by typing
1909'TAB' or 'S-TAB' skips over inactive widgets. The default value is nil. 1941'TAB' or 'S-TAB' skips over inactive widgets. The default value is nil.
1910 1942
1911** Ruby mode 1943** Ruby mode
1912 1944
1945---
1913*** New user option 'ruby-rubocop-use-bundler'. 1946*** New user option 'ruby-rubocop-use-bundler'.
1914By default it retains the previous behavior: read the contents of 1947By default it retains the previous behavior: read the contents of
1915Gemfile and act accordingly. But you can also set it to t or nil to 1948Gemfile and act accordingly. But you can also set it to t or nil to
@@ -1927,8 +1960,8 @@ of 'bounds-of-thing-at-point' and 'forward-thing', respectively.
1927*** New helper functions for text property-based thingatpt providers. 1960*** New helper functions for text property-based thingatpt providers.
1928The new helper functions 'thing-at-point-for-char-property', 1961The new helper functions 'thing-at-point-for-char-property',
1929'bounds-of-thing-at-point-for-char-property', and 1962'bounds-of-thing-at-point-for-char-property', and
1930'forward-thing-for-char-property' can help to help implement custom 1963'forward-thing-for-char-property' can help to implement custom thingatpt
1931thingatpt providers for "things" that are defined by a text property. 1964providers for "things" that are defined by text properties.
1932 1965
1933--- 1966---
1934*** 'bug-reference-mode' now supports 'thing-at-point'. 1967*** 'bug-reference-mode' now supports 'thing-at-point'.
@@ -1957,7 +1990,7 @@ in Buffer Menu mode.
1957 1990
1958--- 1991---
1959*** 'ffap-lax-url' now defaults to nil. 1992*** 'ffap-lax-url' now defaults to nil.
1960Previously, it was set to t but this broke remote file name detection. 1993Previously, it was set to t, but this broke remote file name detection.
1961 1994
1962--- 1995---
1963*** More control on automatic update of Proced buffers. 1996*** More control on automatic update of Proced buffers.
@@ -1976,6 +2009,7 @@ The following new XML schemas are now supported:
1976- Nuget package specification file 2009- Nuget package specification file
1977- Nuget packages config file 2010- Nuget packages config file
1978 2011
2012---
1979*** color.el now supports the Oklab color representation. 2013*** color.el now supports the Oklab color representation.
1980 2014
1981+++ 2015+++
@@ -1989,9 +2023,9 @@ This allows disabling JavaScript in xwidget Webkit sessions.
1989options of GNU 'ls'. 2023options of GNU 'ls'.
1990 2024
1991--- 2025---
1992*** 'M-x ping' can now give "ping" additional flags. 2026*** 'M-x ping' can now give additional flags to the 'ping' program.
1993Typing 'C-u M-x ping' prompts first for the host, and then for the flags 2027Typing 'C-u M-x ping' prompts first for the host, and then for the flags
1994to give to "ping". 2028to give to the 'ping' command.
1995 2029
1996--- 2030---
1997*** Webjump now assumes URIs are HTTPS instead of HTTP. 2031*** Webjump now assumes URIs are HTTPS instead of HTTP.
@@ -2004,11 +2038,13 @@ URIs are now prefixed with "https://" instead.
2004Most of the variables and functions in the file have been renamed to 2038Most of the variables and functions in the file have been renamed to
2005make sure they all use a 'tit-' namespace prefix. 2039make sure they all use a 'tit-' namespace prefix.
2006 2040
2041---
2007*** 'xref-revert-buffer' is now an alias of 'revert-buffer'. 2042*** 'xref-revert-buffer' is now an alias of 'revert-buffer'.
2008The Xref buffer now sets up 'revert-buffer-function' such that 2043The Xref buffer now sets up 'revert-buffer-function' such that
2009'revert-buffer' behaves like 'xref-revert-buffer' did in previous Emacs 2044'revert-buffer' behaves like 'xref-revert-buffer' did in previous Emacs
2010versions, and the latter is now an alias of the former. 2045versions, and the latter is now an alias of the former.
2011 2046
2047---
2012*** The Makefile browser is now obsolete. 2048*** The Makefile browser is now obsolete.
2013The command 'makefile-switch-to-browser' command is now obsolete, 2049The command 'makefile-switch-to-browser' command is now obsolete,
2014together with related commands used in the "*Macros and Targets*" 2050together with related commands used in the "*Macros and Targets*"
@@ -2040,6 +2076,7 @@ A major mode based on the tree-sitter library for editing Lua files.
2040*** New major mode 'php-ts-mode'. 2076*** New major mode 'php-ts-mode'.
2041A major mode based on the tree-sitter library for editing PHP files. 2077A major mode based on the tree-sitter library for editing PHP files.
2042 2078
2079+++
2043** New package EditorConfig. 2080** New package EditorConfig.
2044This package provides support for the EditorConfig standard, 2081This package provides support for the EditorConfig standard,
2045an editor-neutral way to provide directory local (project-wide) settings. 2082an editor-neutral way to provide directory local (project-wide) settings.
@@ -2080,7 +2117,7 @@ global minor mode 'global-window-tool-bar-mode' enables this minor mode
2080in all buffers. 2117in all buffers.
2081 2118
2082+++ 2119+++
2083** New package Track-Changes. 2120** New library Track-Changes.
2084This library is a layer of abstraction above 'before-change-functions' 2121This library is a layer of abstraction above 'before-change-functions'
2085and 'after-change-functions' which provides a superset of 2122and 'after-change-functions' which provides a superset of
2086the functionality of 'after-change-functions': 2123the functionality of 'after-change-functions':
@@ -2095,7 +2132,7 @@ the functionality of 'after-change-functions':
2095** New global minor mode 'minibuffer-regexp-mode'. 2132** New global minor mode 'minibuffer-regexp-mode'.
2096This is a minor mode for editing regular expressions in the minibuffer, 2133This is a minor mode for editing regular expressions in the minibuffer,
2097for example in 'query-replace-regexp'. It correctly highlights parens 2134for example in 'query-replace-regexp'. It correctly highlights parens
2098via show-paren-mode and blink-matching-paren in a user-friendly way, 2135via 'show-paren-mode' and 'blink-matching-paren' in a user-friendly way,
2099avoids reporting alleged paren mismatches and makes sexp navigation more 2136avoids reporting alleged paren mismatches and makes sexp navigation more
2100intuitive. 2137intuitive.
2101 2138
@@ -2112,13 +2149,14 @@ The Info manual "(modus-themes) Top" describes the details and
2112showcases all their customization options. 2149showcases all their customization options.
2113 2150
2114+++ 2151+++
2115** New package PEG. 2152** New library PEG.
2116Emacs now includes a library for writing Parsing Expression 2153Emacs now includes a library for writing Parsing Expression
2117Grammars (PEG), an approach to text parsing that provides more structure 2154Grammars (PEG), an approach to text parsing that provides more structure
2118than regular expressions, but less complexity than context-free 2155than regular expressions, but less complexity than context-free
2119grammars. The Info manual "(elisp) Parsing Expression Grammars" has 2156grammars. The Info manual "(elisp) Parsing Expression Grammars" has
2120documentation and examples. 2157documentation and examples.
2121 2158
2159---
2122** New major mode 'shell-command-mode'. 2160** New major mode 'shell-command-mode'.
2123This mode is used by default for the output of asynchronous 'shell-command'. 2161This mode is used by default for the output of asynchronous 'shell-command'.
2124To revert to the previous behavior, set the (also new) variable 2162To revert to the previous behavior, set the (also new) variable
@@ -2135,13 +2173,6 @@ preventing the installation of Compat if unnecessary.
2135 2173
2136* Incompatible Lisp Changes in Emacs 30.1 2174* Incompatible Lisp Changes in Emacs 30.1
2137 2175
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+++ 2176+++
2146** Evaluating a 'lambda' returns an object of type 'interpreted-function'. 2177** Evaluating a 'lambda' returns an object of type 'interpreted-function'.
2147Instead of representing interpreted functions as lists that start with 2178Instead of representing interpreted functions as lists that start with
@@ -2159,209 +2190,6 @@ no longer work and will need to use 'aref' instead to extract its
2159various subparts (when 'interactive-form', 'documentation', and 2190various subparts (when 'interactive-form', 'documentation', and
2160'help-function-arglist' aren't adequate). 2191'help-function-arglist' aren't adequate).
2161 2192
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--- 2193---
2366** The escape sequence '\x' not followed by hex digits is now an error. 2194** The escape sequence '\x' not followed by hex digits is now an error.
2367Previously, '\x' without at least one hex digit denoted character code 2195Previously, '\x' without at least one hex digit denoted character code
@@ -2380,9 +2208,7 @@ whose major modes fail to use 'run-mode-hooks'. Major modes defined
2380with 'define-derived-mode' are not affected. 'run-mode-hooks' has been the 2208with 'define-derived-mode' are not affected. 'run-mode-hooks' has been the
2381recommended way to run major mode hooks since Emacs 22. 2209recommended way to run major mode hooks since Emacs 22.
2382 2210
2383** 'pp' and 'pp-to-string' now always include a terminating newline. 2211+++
2384In the past they included a terminating newline in most cases but not all.
2385
2386** 'buffer-match-p' and 'match-buffers' take '&rest args'. 2212** 'buffer-match-p' and 'match-buffers' take '&rest args'.
2387They used to take a single '&optional arg' and were documented to use 2213They used to take a single '&optional arg' and were documented to use
2388an unreliable hack to try and support condition predicates that 2214an unreliable hack to try and support condition predicates that
@@ -2390,10 +2216,11 @@ don't accept this optional arg.
2390The new semantics makes no such accommodation, but the code still 2216The new semantics makes no such accommodation, but the code still
2391supports it (with a warning) for backward compatibility. 2217supports it (with a warning) for backward compatibility.
2392 2218
2219---
2393** 'post-gc-hook' runs after updating 'gcs-done' and 'gcs-elapsed'. 2220** 'post-gc-hook' runs after updating 'gcs-done' and 'gcs-elapsed'.
2394 2221
2395--- 2222---
2396** Connection-local variables are applied in buffers visiting a remote file. 2223** Connection-local variables are applied in buffers visiting remote files.
2397This overrides possible directory-local or file-local variables with 2224This overrides possible directory-local or file-local variables with
2398the same name. 2225the same name.
2399 2226
@@ -2408,15 +2235,6 @@ assertion only (which is useless). For historical compatibility, an
2408operator character following '^' or '\`' becomes literal, but we 2235operator character following '^' or '\`' becomes literal, but we
2409advise against relying on this. 2236advise against relying on this.
2410 2237
2411---
2412** 'vietnamese-tcvn' is now a coding system alias for 'vietnamese-vscii'.
2413VSCII-1 and TCVN-5712 are different names for the same character
2414encoding. Therefore, the duplicate coding system definition has been
2415dropped in favor of an alias.
2416
2417The mode-line mnemonic for 'vietnamese-vscii' and its aliases is the
2418lowercase letter 'v'.
2419
2420+++ 2238+++
2421** Infinities and NaNs no longer act as symbols on non-IEEE platforms. 2239** Infinities and NaNs no longer act as symbols on non-IEEE platforms.
2422On old platforms like the VAX that do not support IEEE floating-point, 2240On old platforms like the VAX that do not support IEEE floating-point,
@@ -2447,13 +2265,6 @@ When it has a non-nil value, then completion functions like
2447'completing-read' don't discard text properties from the returned 2265'completing-read' don't discard text properties from the returned
2448completion candidate. 2266completion candidate.
2449 2267
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+++ 2268+++
2458** X color support compatibility aliases are now obsolete. 2269** X color support compatibility aliases are now obsolete.
2459The compatibility aliases 'x-defined-colors', 'x-color-defined-p', 2270The compatibility aliases 'x-defined-colors', 'x-color-defined-p',
@@ -2463,6 +2274,7 @@ The compatibility aliases 'x-defined-colors', 'x-color-defined-p',
2463** 'easy-mmode-define-{minor,global}-mode' aliases are now obsolete. 2274** 'easy-mmode-define-{minor,global}-mode' aliases are now obsolete.
2464Use 'define-minor-mode' and 'define-globalized-minor-mode' instead. 2275Use 'define-minor-mode' and 'define-globalized-minor-mode' instead.
2465 2276
2277+++
2466** The 'millisec' argument of 'sleep-for' is now obsolete. 2278** The 'millisec' argument of 'sleep-for' is now obsolete.
2467Use a float value for the first argument instead. 2279Use a float value for the first argument instead.
2468 2280
@@ -2481,10 +2293,20 @@ values.
2481This user option has been obsoleted in Emacs 27, use 2293This user option has been obsoleted in Emacs 27, use
2482'remote-file-name-inhibit-cache' instead. 2294'remote-file-name-inhibit-cache' instead.
2483 2295
2296+++
2484** The obsolete calling convention of 'sit-for' has been removed. 2297** The obsolete calling convention of 'sit-for' has been removed.
2485That convention was: '(sit-for SECONDS MILLISEC &optional NODISP)'. 2298That convention was: '(sit-for SECONDS MILLISEC &optional NODISP)'.
2486 2299
2487--- 2300---
2301** 'defadvice' is marked as obsolete.
2302See the "(elisp) Porting Old Advice" Info node for help converting
2303them to use 'advice-add' or 'define-advice' instead.
2304
2305---
2306** 'cl-old-struct-compat-mode' is marked as obsolete.
2307You may need to recompile your code if it was compiled with Emacs < 24.3.
2308
2309---
2488** Old derived.el functions removed. 2310** Old derived.el functions removed.
2489The following functions have been deleted because they were only used 2311The following functions have been deleted because they were only used
2490by code compiled with Emacs<21: 2312by code compiled with Emacs<21:
@@ -2504,6 +2326,7 @@ to specify the 'mouse-4/5/6/7' events that might still happen to be
2504generated by some old packages (or if 'mouse-wheel-buttons' has been set 2326generated by some old packages (or if 'mouse-wheel-buttons' has been set
2505to nil). 2327to nil).
2506 2328
2329---
2507** Xterm Mouse mode now emits 'wheel-up/down/right/left' events. 2330** Xterm Mouse mode now emits 'wheel-up/down/right/left' events.
2508This is instead of 'mouse-4/5/6/7' events for the mouse wheel. It uses 2331This is instead of 'mouse-4/5/6/7' events for the mouse wheel. It uses
2509the new variable 'mouse-wheel-buttons' to decide which button maps to 2332the new variable 'mouse-wheel-buttons' to decide which button maps to
@@ -2529,6 +2352,7 @@ compilation, by customizing this user option. It is also possible to
2529control this at function granularity by using the new 'safety' parameter 2352control this at function granularity by using the new 'safety' parameter
2530in the function's 'declare' form. 2353in the function's 'declare' form.
2531 2354
2355+++
2532** New types 'closure' and 'interpreted-function'. 2356** New types 'closure' and 'interpreted-function'.
2533'interpreted-function' is the new type used for interpreted functions, 2357'interpreted-function' is the new type used for interpreted functions,
2534and 'closure' is the common parent type of 'interpreted-function' 2358and 'closure' is the common parent type of 'interpreted-function'
@@ -2538,6 +2362,7 @@ Those new types come with the associated new predicates 'closurep' and
2538'interpreted-function-p' as well as a new constructor 2362'interpreted-function-p' as well as a new constructor
2539'make-interpreted-closure'. 2363'make-interpreted-closure'.
2540 2364
2365---
2541** New function 'help-fns-function-name'. 2366** New function 'help-fns-function-name'.
2542For named functions, it just returns the name and otherwise 2367For named functions, it just returns the name and otherwise
2543it returns a short "unique" string that identifies the function. 2368it returns a short "unique" string that identifies the function.
@@ -2549,22 +2374,26 @@ further details.
2549This is a convenience function to return the Unicode name of a char (if 2374This is a convenience function to return the Unicode name of a char (if
2550it has one). 2375it has one).
2551 2376
2377+++
2552** New function 'cl-type-of'. 2378** New function 'cl-type-of'.
2553This function is like 'type-of' except that it sometimes returns 2379This function is like 'type-of' except that it sometimes returns
2554a more precise type. For example, for nil and t it returns 'null' 2380a more precise type. For example, for nil and t it returns 'null'
2555and 'boolean' respectively, instead of just 'symbol'. 2381and 'boolean' respectively, instead of just 'symbol'.
2556 2382
2383+++
2557** New functions 'primitive-function-p' and 'cl-functionp'. 2384** New functions 'primitive-function-p' and 'cl-functionp'.
2558'primitive-function-p' is like 'subr-primitive-p' except that it returns 2385'primitive-function-p' is like 'subr-primitive-p' except that it returns
2559t only if the argument is a function rather than a special-form, 2386t only if the argument is a function rather than a special-form,
2560and 'cl-functionp' is like 'functionp' except it returns nil 2387and 'cl-functionp' is like 'functionp' except it returns nil
2561for lists and symbols. 2388for lists and symbols.
2562 2389
2390---
2563** Built-in types now have corresponding classes. 2391** Built-in types now have corresponding classes.
2564At the Lisp level, this means that things like '(cl-find-class 'integer)' 2392At 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 2393will 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. 2394things like 'C-h o integer RET' will show some information about that type.
2567 2395
2396---
2568** New variable 'major-mode-remap-defaults' and function 'major-mode-remap'. 2397** New variable 'major-mode-remap-defaults' and function 'major-mode-remap'.
2569The first is like Emacs-29's 'major-mode-remap-alist' but to be set by 2398The first is like Emacs-29's 'major-mode-remap-alist' but to be set by
2570packages (instead of users). The second looks up those two variables. 2399packages (instead of users). The second looks up those two variables.
@@ -2609,6 +2438,7 @@ more details.
2609This has the same effect as the variable of the same name and takes 2438This has the same effect as the variable of the same name and takes
2610precedence over the variable when present. 2439precedence over the variable when present.
2611 2440
2441---
2612** New function 'merge-ordered-lists'. 2442** New function 'merge-ordered-lists'.
2613Mostly used internally to do a kind of topological sort of 2443Mostly used internally to do a kind of topological sort of
2614inheritance hierarchies. 2444inheritance hierarchies.
@@ -2686,6 +2516,7 @@ without specifying a file, like this:
2686 (notifications-notify 2516 (notifications-notify
2687 :title "I am playing music" :app-icon 'multimedia-player) 2517 :title "I am playing music" :app-icon 'multimedia-player)
2688 2518
2519---
2689** New function 're-disassemble' to see the innards of a regexp. 2520** New function 're-disassemble' to see the innards of a regexp.
2690If you built Emacs with '--enable-checking', you can use this to help 2521If you built Emacs with '--enable-checking', you can use this to help
2691debug either your regexp performance problems or the regexp engine. 2522debug either your regexp performance problems or the regexp engine.
@@ -2746,6 +2577,217 @@ as a single word. This is useful for programming languages and styles
2746where only the first letter of a symbol's name is ever capitalized. 2577where only the first letter of a symbol's name is ever capitalized.
2747The default value of this variable is nil. 2578The default value of this variable is nil.
2748 2579
2580---
2581** Bytecode is now always loaded eagerly.
2582Bytecode compiled with older Emacs versions for lazy loading using
2583'byte-compile-dynamic' is now loaded all at once.
2584As a consequence, 'fetch-bytecode' has no use, does nothing, and is
2585now obsolete. The variable 'byte-compile-dynamic' has no effect any
2586more; compilation will always yield bytecode for eager loading.
2587
2588+++
2589** Returned strings from functions and macros are never docstrings.
2590Functions and macros whose bodies consist of a single string literal now
2591only return that string, and will not use it as a docstring. Example:
2592
2593 (defun sing-a-song ()
2594 "Sing a song.")
2595
2596The above function returns the string '"Sing a song."' and has no doc
2597string. Previously, that string was used as both the doc string and
2598return value, which was never what the programmer wanted. If you want
2599the string to be a docstring, add an explicit return value.
2600
2601This change applies to 'defun', 'defsubst', 'defmacro' and 'lambda'
2602forms; other defining forms such as 'cl-defun' already worked this way.
2603
2604** New or changed byte-compilation warnings
2605
2606---
2607*** Warn about missing 'lexical-binding' directive.
2608The compiler now warns if an Elisp file lacks the standard
2609'-*- lexical-binding: ... -*-' cookie on the first line.
2610This line typically looks something like
2611
2612 ;;; My little pony mode -*- lexical-binding: t -*-
2613
2614It is needed to inform the compiler about which dialect of ELisp
2615your code is using: the modern dialect with lexical binding or
2616the old dialect with only dynamic binding.
2617
2618Lexical binding avoids some name conflicts and allows the compiler to
2619detect more mistakes and generate more efficient code, so it is
2620recommended. For how to adapt your code to lexical binding, see the
2621manual section "(elisp) Converting to Lexical Binding".
2622
2623If your code cannot be converted to lexical binding, you can insert
2624the line
2625
2626 ;;; -*- lexical-binding: nil -*-
2627
2628first in the file to declare that it uses the old dialect.
2629
2630---
2631*** Warn about empty bodies for more special forms and macros.
2632The compiler now warns about an empty body argument to 'when',
2633'unless', 'ignore-error' and 'with-suppressed-warnings' in addition to
2634the existing warnings for 'let' and 'let*'. Example:
2635
2636 (when (> x 2))
2637
2638This warning can be suppressed using 'with-suppressed-warnings' with
2639the warning name 'empty-body'.
2640
2641---
2642*** Warn about quoted error names in 'condition-case' and 'ignore-error'.
2643The compiler now warns about quoted condition (error) names
2644in 'condition-case' and 'ignore-error'. Example:
2645
2646 (condition-case nil
2647 (/ x y)
2648 ('arith-error "division by zero"))
2649
2650Quoting them adds the error name 'quote' to those handled or ignored
2651respectively, which was probably not intended.
2652
2653---
2654*** Warn about comparison with literal constants without defined identity.
2655The compiler now warns about comparisons by identity with a literal
2656string, cons, vector, record, function, large integer or float as this
2657may not match any value at all. Example:
2658
2659 (eq x "hello")
2660
2661Only literals for symbols and small integers (fixnums), including
2662characters, are guaranteed to have a consistent (unique) identity.
2663This warning applies to 'eq', 'eql', 'memq', 'memql', 'assq', 'rassq',
2664'remq' and 'delq'.
2665
2666To compare by (structural) value, use 'equal', 'member', 'assoc',
2667'rassoc', 'remove' or 'delete' instead. Floats and bignums can also
2668be compared using 'eql', '=' and 'memql'. Function literals cannot be
2669compared reliably at all.
2670
2671This warning can be suppressed using 'with-suppressed-warnings' with
2672the warning name 'suspicious'.
2673
2674---
2675*** Warn about 'condition-case' without handlers.
2676The compiler now warns when the 'condition-case' form is used without
2677any actual handlers, as in
2678
2679 (condition-case nil (read buffer))
2680
2681because it has no effect other than the execution of the body form.
2682In particular, no errors are caught or suppressed. If the intention
2683was to catch all errors, add an explicit handler for 'error', or use
2684'ignore-error' or 'ignore-errors'.
2685
2686This warning can be suppressed using 'with-suppressed-warnings' with
2687the warning name 'suspicious'.
2688
2689---
2690*** Warn about 'unwind-protect' without unwind forms.
2691The compiler now warns when the 'unwind-protect' form is used without
2692any unwind forms, as in
2693
2694 (unwind-protect (read buffer))
2695
2696because the behavior is identical to that of the argument; there is
2697no protection of any kind. Perhaps the intended unwind forms have
2698been misplaced or forgotten, or the use of 'unwind-protect' could be
2699simplified away.
2700
2701This warning can be suppressed using 'with-suppressed-warnings' with
2702the warning name 'suspicious'.
2703
2704---
2705*** Warn about useless trailing 'cond' clauses.
2706The compiler now warns when a 'cond' form contains clauses following a
2707default (unconditional) clause. Example:
2708
2709 (cond ((= x 0) (say "none"))
2710 (t (say "some"))
2711 (say "goodbye"))
2712
2713Such a clause will never be executed, and is likely to be a mistake,
2714perhaps due to misplaced parens.
2715
2716This warning can be suppressed using 'with-suppressed-warnings' with
2717the warning name 'suspicious'.
2718
2719---
2720*** Warn about mutation of constant values.
2721The compiler now warns about code that modifies program constants in
2722some obvious cases. Examples:
2723
2724 (setcar '(1 2) 7)
2725 (aset [3 4] 0 8)
2726 (aset "abc" 1 ?d)
2727
2728Such code may have unpredictable behavior because the constants are part
2729of the program, not of the data structures generated afresh during
2730execution, and the compiler does not expect them to change.
2731
2732To avoid the warning, operate on an object created by the program
2733(maybe a copy of the constant), or use a non-destructive operation
2734instead.
2735
2736This warning can be suppressed using 'with-suppressed-warnings' with
2737the warning name 'mutate-constant'.
2738
2739---
2740*** Warn about more ignored function return values.
2741The compiler now warns when the return value from certain functions is
2742implicitly ignored. Example:
2743
2744 (progn (nreverse my-list) my-list)
2745
2746will elicit a warning because it is usually pointless to call
2747'nreverse' on a list without using the returned value.
2748
2749To silence the warning, make use of the value in some way, such as
2750assigning it to a variable. You can also wrap the function call in
2751'(ignore ...)', or use 'with-suppressed-warnings' with the warning
2752name 'ignored-return-value'.
2753
2754The warning will only be issued for calls to functions declared
2755'important-return-value' or 'side-effect-free' (but not 'error-free').
2756
2757---
2758*** Warn about docstrings that contain control characters.
2759The compiler now warns about docstrings with control characters other
2760than newline and tab. This is often a result of improper escaping.
2761Example:
2762
2763 (defun my-fun ()
2764 "Uses c:\remote\dir\files and the key \C-x."
2765 ...)
2766
2767where the docstring contains the four control characters 'CR', 'DEL',
2768'FF' and 'C-x'.
2769
2770The warning name is 'docstrings-control-chars'.
2771
2772---
2773*** The warning about wide docstrings can now be disabled separately.
2774Its warning name is 'docstrings-wide'.
2775
2776+++
2777** 'fset', 'defalias' and 'defvaralias' now signal an error for cyclic aliases.
2778Previously, 'fset', 'defalias' and 'defvaralias' could be made to
2779build circular function and variable indirection chains as in
2780
2781 (defalias 'able 'baker)
2782 (defalias 'baker 'able)
2783
2784but trying to use them would sometimes make Emacs hang. Now, an attempt
2785to create such a loop results in an error.
2786
2787Since circular alias chains now cannot occur, 'function-alias-p',
2788'indirect-function' and 'indirect-variable' will never signal an error.
2789Their 'noerror' arguments have no effect and are therefore obsolete.
2790
2749** Touch Screen support 2791** Touch Screen support
2750 2792
2751+++ 2793+++
@@ -2755,23 +2797,26 @@ POSITION argument, it will behave as if that event was a mouse event.
2755 2797
2756+++ 2798+++
2757*** New functions for handling touch screen events. 2799*** New functions for handling touch screen events.
2758The new functions 'touch-screen-track-tap' and 2800The new functions 'touch-screen-track-tap' and 'touch-screen-track-drag'
2759'touch-screen-track-drag' handle tracking common touch screen gestures 2801handle tracking common touch screen gestures from within a command.
2760from within a command.
2761 2802
2762+++ 2803+++
2763*** New parameter to 'touchscreen-end' events. 2804*** New parameter to 'touchscreen-end' events.
2764CANCEL non-nil establishes that the touch sequence has been 2805CANCEL non-nil establishes that the touch sequence has been intercepted
2765intercepted by programs such as window managers and should be ignored 2806by programs such as window managers and should be ignored with Emacs.
2766with Emacs.
2767 2807
2808---
2768** New variable 'inhibit-auto-fill' to temporarily prevent auto-fill. 2809** New variable 'inhibit-auto-fill' to temporarily prevent auto-fill.
2769 2810
2770+++ 2811+++
2771** New variable 'secondary-tool-bar-map'. 2812** New variable 'secondary-tool-bar-map'.
2772If non-nil, this variable contains a keymap of menu items that are 2813If non-nil, this variable contains a keymap of menu items that are
2773displayed along tool bar items inside 'tool-bar-map'. 2814displayed along tool bar items defined by 'tool-bar-map'. These items
2815are displayed below the tool bar if the value of 'tool-bar-position' is
2816'top', and above it if the value is 'bottom'. This is used by
2817'modifier-bar-mode'.
2774 2818
2819---
2775** New variable 'completion-lazy-hilit'. 2820** New variable 'completion-lazy-hilit'.
2776Lisp programs that present completion candidates may bind this 2821Lisp programs that present completion candidates may bind this
2777variable non-nil around calls to functions such as 2822variable non-nil around calls to functions such as
@@ -2780,10 +2825,12 @@ styles to skip eager fontification of completion candidates, which
2780improves performance. Such a Lisp program can then use the 2825improves performance. Such a Lisp program can then use the
2781'completion-lazy-hilit' function to fontify candidates just in time. 2826'completion-lazy-hilit' function to fontify candidates just in time.
2782 2827
2828+++
2783** New primitive 'buffer-last-name'. 2829** New primitive 'buffer-last-name'.
2784It returns the name of a buffer before the last time it was renamed or 2830It returns the name of a buffer before the last time it was renamed or
2785killed. 2831killed.
2786 2832
2833+++
2787** New primitive 'marker-last-position'. 2834** New primitive 'marker-last-position'.
2788It returns the last position of a marker in its buffer even if that 2835It returns the last position of a marker in its buffer even if that
2789buffer has been killed. ('marker-position' would return nil in that 2836buffer has been killed. ('marker-position' would return nil in that
@@ -2791,31 +2838,34 @@ case.)
2791 2838
2792** Functions and variables to transpose sexps 2839** Functions and variables to transpose sexps
2793 2840
2794+++ 2841---
2795*** New helper variable 'transpose-sexps-function'. 2842*** New helper variable 'transpose-sexps-function'.
2796Emacs now can set this variable to customize the behavior of the 2843Lisp programs can now set this variable to customize the behavior of the
2797'transpose-sexps' function. 2844'transpose-sexps' command.
2798 2845
2799+++ 2846---
2800*** New function 'transpose-sexps-default-function'. 2847*** New function 'transpose-sexps-default-function'.
2801The previous implementation is moved into its own function, to be 2848The previous implementation of 'transpose-sexps' was moved into its own
2802bound by 'transpose-sexps-function'. 2849function, to be used in 'transpose-sexps-function'.
2803 2850
2851---
2804*** New function 'treesit-transpose-sexps'. 2852*** New function 'treesit-transpose-sexps'.
2805Tree-sitter now unconditionally sets 'transpose-sexps-function' for all 2853Tree-sitter now unconditionally sets 'transpose-sexps-function' for all
2806tree-sitter enabled modes. This functionality utilizes the new 2854tree-sitter enabled modes to this function.
2807'transpose-sexps-function'.
2808 2855
2809** Functions and variables to move by program statements 2856** Functions and variables to move by program statements
2810 2857
2858+++
2811*** New variable 'forward-sentence-function'. 2859*** New variable 'forward-sentence-function'.
2812Major modes can now set this variable to customize the behavior of the 2860Major modes can now set this variable to customize the behavior of the
2813'forward-sentence' command. 2861'forward-sentence' command.
2814 2862
2863---
2815*** New function 'forward-sentence-default-function'. 2864*** New function 'forward-sentence-default-function'.
2816The previous implementation of 'forward-sentence' is moved into its 2865The previous implementation of 'forward-sentence' is moved into its
2817own function, to be bound by 'forward-sentence-function'. 2866own function, to be bound by 'forward-sentence-function'.
2818 2867
2868+++
2819*** New function 'treesit-forward-sentence'. 2869*** New function 'treesit-forward-sentence'.
2820All tree-sitter enabled modes that define 'sentence' in 2870All tree-sitter enabled modes that define 'sentence' in
2821'treesit-thing-settings' now set 'forward-sentence-function' to call 2871'treesit-thing-settings' now set 'forward-sentence-function' to call
@@ -2823,6 +2873,7 @@ All tree-sitter enabled modes that define 'sentence' in
2823 2873
2824** Functions and variables to move by program sexps 2874** Functions and variables to move by program sexps
2825 2875
2876+++
2826*** New function 'treesit-forward-sexp'. 2877*** New function 'treesit-forward-sexp'.
2827Tree-sitter conditionally sets 'forward-sexp-function' for major modes 2878Tree-sitter conditionally sets 'forward-sexp-function' for major modes
2828that have defined 'sexp' in 'treesit-thing-settings' to enable 2879that have defined 'sexp' in 'treesit-thing-settings' to enable