From 2f71460d52fb8ec36766edc297de559b318ee5e1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 30 Jun 2024 22:25:31 +0300 Subject: [PATCH] More updates of documentation for Emacs 30 * etc/NEWS: Improve wording and move/mark entries. * doc/lispref/positions.texi (List Motion): Document 'forward-sentence-function'. * doc/lispref/functions.texi (What Is a Function): Document 'primitive-function-p' and 'cl-functionp'. * doc/emacs/misc.texi (Saving Emacs Sessions): Improve wording and indexing. * doc/lispref/tips.texi (Documentation Tips): Adapt to the new value of 'emacs-lisp-docstring-fill-column'. * doc/emacs/fixit.texi (Spelling): Document 'flyspell-check-changes'. --- doc/emacs/fixit.texi | 7 + doc/emacs/misc.texi | 5 +- doc/lispref/functions.texi | 18 +- doc/lispref/positions.texi | 23 ++- doc/lispref/tips.texi | 2 +- etc/NEWS | 365 +++++++++++++++++++++---------------- 6 files changed, 250 insertions(+), 170 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 doesn't automatically check the text you didn't type or move across; use @code{flyspell-region} or @code{flyspell-buffer} for that. +@vindex flyspell-check-changes + Normally, Flyspell mode highlights misspelled words that you typed or +modified, but also words you move across without changing them. But if +you customize the variable @code{flyspell-check-changes} to a +non-@code{nil} value, Flyspell mode will check only the words you typed +or edited in some way. + @findex flyspell-correct-word @findex flyspell-auto-correct-word @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 according to your customizations in the init file. @vindex desktop-files-not-to-save -@vindex remote-file-name-access-timeout +@vindex remote-file-name-access-timeout@r{, and desktop restoring} Information about buffers visiting remote files is not saved by default. Customize the variable @code{desktop-files-not-to-save} to change this. In this case, you might also consider customizing @code{remote-file-name-access-timeout}, which is the number of seconds after which buffer restoration of a remote file is -stopped. This prevents Emacs being blocked. +stopped. This prevents Emacs from being blocked when restoring sessions +that visited remote files. @vindex desktop-restore-eager 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. @end defun @noindent -Unlike @code{functionp}, the next three functions do @emph{not} treat -a symbol as its function definition. +Unlike @code{functionp}, the next functions do @emph{not} treat a symbol +as its function definition. @defun subrp object This 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 functions. We recommend to use @code{func-arity} instead. @end defun +@defun cl-functionp object +This function is like @code{functionp}, except it returns @code{nil} for +lists and symbols. +@end defun + +@findex subr-primitive-p +@defun primitive-function-p object +This function returns @code{t} if @var{object} is a built-in primitive +written in C (@pxref{Primitive Function Type}). Note that special forms +are explicitly excluded, as they are not functions. Use +@code{subr-primitive-p} if you need to recognize special forms as well. +@end defun + + @node Lambda Expressions @section Lambda Expressions @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. @findex treesit-forward-sentence @findex forward-sentence @findex backward-sentence -If Emacs is compiled with tree-sitter, it can use the tree-sitter -parser information to move across syntax constructs. Since what -exactly is considered a sentence varies between languages, a major -mode should set @code{treesit-thing-settings} to determine that. -Then the mode can get navigation-by-sentence functionality for free, -by using @code{forward-sentence} and -@code{backward-sentence}(@pxref{Moving by Sentences,,, emacs, The -extensible self-documenting text editor}). +@vindex forward-sentence-function +@cindex sentence, in program source files +The function that is the value of the variable +@code{forward-sentence-function} determines how to move across syntax +constructs known as @dfn{sentences}. Major modes can assign their own +functions to this variable to customize the behavior of +@code{forward-sentence} command. If Emacs is compiled with tree-sitter, +it can use the tree-sitter parser information to move across syntax +constructs. Since what exactly is considered a sentence varies between +languages, a major mode should set @code{treesit-thing-settings} to +determine that. Then @code{forward-sentence-function} will be set to +@code{treesit-forward-sentence}, and the mode will get +navigation-by-sentence functionality for free, by using +@code{forward-sentence} and @code{backward-sentence}(@pxref{Moving by +Sentences,,, emacs, The extensible self-documenting text editor}). @findex treesit-forward-sexp @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. @item Format the documentation string so that it fits in an Emacs window on an 80-column screen. It is a good idea for most lines to be no wider than -60 characters. The first line should not be wider than 67 characters +60 characters. The first line should not be wider than 74 characters, or it will look bad in the output of @code{apropos}. @vindex emacs-lisp-docstring-fill-column diff --git a/etc/NEWS b/etc/NEWS index 28bfe38b84b..d0534ad7538 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -744,6 +744,8 @@ bind 'M-TAB' to 'ispell-complete-word' as it did in previous Emacs versions, or disable Ispell word completion in Text mode altogether, by customizing the new user option 'text-mode-ispell-word-completion'. +** Internationalization + --- ** Mode-line mnemonics for some coding-systems have changed. The 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': (coding-system-put 'koi8-u :mnemonic ?U) -** Internationalization +--- +** 'vietnamese-tcvn' is now a coding system alias for 'vietnamese-vscii'. +VSCII-1 and TCVN-5712 are different names for the same character +encoding. Therefore, the duplicate coding system definition has been +dropped in favor of an alias. + +The mode-line mnemonic for 'vietnamese-vscii' and its aliases is the +lowercase letter 'v'. --- *** Users in CJK locales can control width of some non-CJK characters. @@ -1593,10 +1602,12 @@ mouse to consult an error message. ** Flyspell ++++ *** New user option 'flyspell-check-changes'. When non-nil, Flyspell mode spell-checks only words that you edited; it does not check unedited words just because you move point across them. +--- ** JS mode. The binding 'M-.' has been removed from the major mode keymaps in '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 better for you, use 'define-key' in your init script to bind 'js-find-symbol' to that combination again. +--- ** Json mode. 'js-json-mode' does not derive from 'js-mode' any more so as not to confuse tools like Eglot or YASnippet into thinking that those @@ -1627,19 +1639,16 @@ instead of: and another_expression): do_something() +--- *** New user option 'python-interpreter-args'. This allows the user to specify command line arguments to the non interactive Python interpreter specified by 'python-interpreter'. +--- *** New function 'python-shell-send-block'. It sends the python block delimited by 'python-nav-beginning-of-block' and 'python-nav-end-of-block' to the inferior Python process. -*** 'eldoc' no longer truncates to a single line by default. -Previously, the entire docstring was not available to eldoc, which made -'eldoc-echo-area-use-multiline-p' ineffective. The old behavior may be -kept by customizing 'eldoc-echo-area-use-multiline-p'. - ** Inferior Python mode --- @@ -1648,6 +1657,15 @@ Support for Python's ExceptionGroup has been added, so in the Python shell, the line indicating the source of error in the error messages from ExceptionGroup will be recognized as well. +** Eldoc + +--- +*** 'eldoc' no longer truncates to a single line by default. +Previously, the entire docstring was not available to eldoc, which made +'eldoc-echo-area-use-multiline-p' ineffective. The old behavior may be +kept by customizing 'eldoc-echo-area-use-multiline-p'. + +--- ** Scheme mode Scheme mode now handles regular expression literal '#/regexp/' that is available in some Scheme implementations. @@ -1711,7 +1729,7 @@ provide dictionary-based minibuffer completion for word selection. *** New user option 'dictionary-read-word-prompt'. This allows the user to customize the prompt that is used by 'dictionary-search' when asking for a word to search in the -dictionary. +dictionaries. --- *** New user option 'dictionary-display-definition-function'. @@ -1750,13 +1768,19 @@ the mode was turned on. ** Pp ++++ *** New 'pp-default-function' user option replaces 'pp-use-max-width'. +Its default value is 'pp-fill', a new default pretty-printing function, +which tries to obey 'fill-column'. -*** New default pretty printing function, which tries to obey 'fill-column'. - +--- *** 'pp-to-string' takes an additional PP-FUNCTION argument. This argument specifies the prettifying algorithm to use. +--- +*** 'pp' and 'pp-to-string' now always include a terminating newline. +In the past they included a terminating newline in most cases but not all. + ** Emacs Lisp mode --- @@ -1765,7 +1789,7 @@ Previously, the '@' character, which normally has 'symbol' syntax, would combine with a following Lisp symbol and interfere with symbol searching. ---- ++++ *** 'emacs-lisp-docstring-fill-column' now defaults to 72. It was previously 65. The new default formats documentation strings to fit on fewer lines without negatively impacting readability. @@ -1777,10 +1801,12 @@ fit on fewer lines without negatively impacting readability. CPerl mode fontifies subroutine signatures like variable declarations which makes them visually distinct from subroutine prototypes. +--- *** Syntax of Perl up to version 5.40 is supported. CPerl mode supports the new keywords for exception handling and the object oriented syntax which were added in Perl 5.36, 5.38 and 5.40. +--- *** New user option 'cperl-fontify-trailer'. This user option takes the values 'perl-code' or 'comment' and treats text 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 modules, the value 'comment' makes CPerl mode treat trailers as comment, like Perl mode does. +--- *** New command 'cperl-file-style'. This command sets the indentation style for the current buffer. To change the default style, either use the user option with the same name or use the command 'cperl-set-style'. -*** New minor mode cperl-extra-paired-delimiters-mode +--- +*** New minor mode 'cperl-extra-paired-delimiters-mode'. Perl 5.36 and newer allows using more than 200 non-ASCII paired delimiters for quote-like constructs, eg. "q«text»". Use this minor mode in buffers where this feature is activated. -*** Commands using the Perl info page are obsolete. -The Perl documentation in info format is no longer distributed with +--- +*** Commands using the Perl Info manual are obsolete. +The Perl documentation in Info format is no longer distributed with Perl or on CPAN since more than 10 years. Perl documentation can be read with 'cperl-perldoc' instead. +--- *** Highlighting trailing whitespace has been removed. The user option 'cperl-invalid-face' is now obsolete, and does nothing. See the user option 'show-trailing-whitespace' instead. @@ -1828,8 +1858,9 @@ of the accessibility of remote files can now time out if ** Image Dired ++++ *** New user option 'image-dired-thumb-naming'. -You can now configure how a thumbnail is named using this option. +You can now configure how thumbnails are named using this option. ** ERT @@ -1874,10 +1905,10 @@ macros with many lines, such as from 'kmacro-edit-lossage'. Fractions of the form "123⁄456" are handled as if written "123:456". Note in particular the difference in behavior from U+2215 DIVISION SLASH and U+002F SOLIDUS, which result in division rather than a rational -fraction. You may also be interested to know that precomposed fraction -characters, such as ½ (U+00BD VULGAR FRACTION ONE HALF), are also -recognized as rational fractions. They have been since 2004, but it -looks like it was never mentioned in the NEWS, or even the manual. +fraction. In addition, precomposed fraction characters, such as ½ +(U+00BD VULGAR FRACTION ONE HALF), are also recognized as rational +fractions. (They have been recognized since 2004, but it looks like it +was never mentioned in the NEWS, or even the Calc manual.) ** IELM @@ -1904,12 +1935,14 @@ labels of unselected active radio-button or checkbox widgets from the labels of unselected inactive widgets (the default value inherits from the 'widget-inactive' face). ++++ *** New user option 'widget-skip-inactive'. If non-nil, moving point forward or backward between widgets by typing 'TAB' or 'S-TAB' skips over inactive widgets. The default value is nil. ** Ruby mode +--- *** New user option 'ruby-rubocop-use-bundler'. By default it retains the previous behavior: read the contents of Gemfile 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. *** New helper functions for text property-based thingatpt providers. The new helper functions 'thing-at-point-for-char-property', 'bounds-of-thing-at-point-for-char-property', and -'forward-thing-for-char-property' can help to help implement custom -thingatpt providers for "things" that are defined by a text property. +'forward-thing-for-char-property' can help to implement custom thingatpt +providers for "things" that are defined by text properties. --- *** 'bug-reference-mode' now supports 'thing-at-point'. @@ -1957,7 +1990,7 @@ in Buffer Menu mode. --- *** 'ffap-lax-url' now defaults to nil. -Previously, it was set to t but this broke remote file name detection. +Previously, it was set to t, but this broke remote file name detection. --- *** More control on automatic update of Proced buffers. @@ -1976,6 +2009,7 @@ The following new XML schemas are now supported: - Nuget package specification file - Nuget packages config file +--- *** color.el now supports the Oklab color representation. +++ @@ -1989,9 +2023,9 @@ This allows disabling JavaScript in xwidget Webkit sessions. options of GNU 'ls'. --- -*** 'M-x ping' can now give "ping" additional flags. +*** 'M-x ping' can now give additional flags to the 'ping' program. Typing 'C-u M-x ping' prompts first for the host, and then for the flags -to give to "ping". +to give to the 'ping' command. --- *** Webjump now assumes URIs are HTTPS instead of HTTP. @@ -2004,11 +2038,13 @@ URIs are now prefixed with "https://" instead. Most of the variables and functions in the file have been renamed to make sure they all use a 'tit-' namespace prefix. +--- *** 'xref-revert-buffer' is now an alias of 'revert-buffer'. The Xref buffer now sets up 'revert-buffer-function' such that 'revert-buffer' behaves like 'xref-revert-buffer' did in previous Emacs versions, and the latter is now an alias of the former. +--- *** The Makefile browser is now obsolete. The command 'makefile-switch-to-browser' command is now obsolete, together 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. *** New major mode 'php-ts-mode'. A major mode based on the tree-sitter library for editing PHP files. ++++ ** New package EditorConfig. This package provides support for the EditorConfig standard, an 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 in all buffers. +++ -** New package Track-Changes. +** New library Track-Changes. This library is a layer of abstraction above 'before-change-functions' and 'after-change-functions' which provides a superset of the functionality of 'after-change-functions': @@ -2095,7 +2132,7 @@ the functionality of 'after-change-functions': ** New global minor mode 'minibuffer-regexp-mode'. This is a minor mode for editing regular expressions in the minibuffer, for example in 'query-replace-regexp'. It correctly highlights parens -via ‘show-paren-mode’ and ‘blink-matching-paren’ in a user-friendly way, +via 'show-paren-mode' and 'blink-matching-paren' in a user-friendly way, avoids reporting alleged paren mismatches and makes sexp navigation more intuitive. @@ -2112,13 +2149,14 @@ The Info manual "(modus-themes) Top" describes the details and showcases all their customization options. +++ -** New package PEG. +** New library PEG. Emacs now includes a library for writing Parsing Expression Grammars (PEG), an approach to text parsing that provides more structure than regular expressions, but less complexity than context-free grammars. The Info manual "(elisp) Parsing Expression Grammars" has documentation and examples. +--- ** New major mode 'shell-command-mode'. This mode is used by default for the output of asynchronous 'shell-command'. To revert to the previous behavior, set the (also new) variable @@ -2170,9 +2208,7 @@ whose major modes fail to use 'run-mode-hooks'. Major modes defined with 'define-derived-mode' are not affected. 'run-mode-hooks' has been the recommended way to run major mode hooks since Emacs 22. -** 'pp' and 'pp-to-string' now always include a terminating newline. -In the past they included a terminating newline in most cases but not all. - ++++ ** 'buffer-match-p' and 'match-buffers' take '&rest args'. They used to take a single '&optional arg' and were documented to use an unreliable hack to try and support condition predicates that @@ -2180,10 +2216,11 @@ don't accept this optional arg. The new semantics makes no such accommodation, but the code still supports it (with a warning) for backward compatibility. +--- ** 'post-gc-hook' runs after updating 'gcs-done' and 'gcs-elapsed'. --- -** Connection-local variables are applied in buffers visiting a remote file. +** Connection-local variables are applied in buffers visiting remote files. This overrides possible directory-local or file-local variables with the same name. @@ -2198,15 +2235,6 @@ assertion only (which is useless). For historical compatibility, an operator character following '^' or '\`' becomes literal, but we advise against relying on this. ---- -** 'vietnamese-tcvn' is now a coding system alias for 'vietnamese-vscii'. -VSCII-1 and TCVN-5712 are different names for the same character -encoding. Therefore, the duplicate coding system definition has been -dropped in favor of an alias. - -The mode-line mnemonic for 'vietnamese-vscii' and its aliases is the -lowercase letter 'v'. - +++ ** Infinities and NaNs no longer act as symbols on non-IEEE platforms. On old platforms like the VAX that do not support IEEE floating-point, @@ -2246,6 +2274,7 @@ The compatibility aliases 'x-defined-colors', 'x-color-defined-p', ** 'easy-mmode-define-{minor,global}-mode' aliases are now obsolete. Use 'define-minor-mode' and 'define-globalized-minor-mode' instead. ++++ ** The 'millisec' argument of 'sleep-for' is now obsolete. Use a float value for the first argument instead. @@ -2264,9 +2293,19 @@ values. This user option has been obsoleted in Emacs 27, use 'remote-file-name-inhibit-cache' instead. ++++ ** The obsolete calling convention of 'sit-for' has been removed. That convention was: '(sit-for SECONDS MILLISEC &optional NODISP)'. +--- +** '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 your code if it was compiled with Emacs < 24.3. + --- ** Old derived.el functions removed. The following functions have been deleted because they were only used @@ -2287,6 +2326,7 @@ to specify the 'mouse-4/5/6/7' events that might still happen to be generated by some old packages (or if 'mouse-wheel-buttons' has been set to nil). +--- ** Xterm Mouse mode now emits 'wheel-up/down/right/left' events. This is instead of 'mouse-4/5/6/7' events for the mouse wheel. It uses the new variable 'mouse-wheel-buttons' to decide which button maps to @@ -2312,6 +2352,7 @@ compilation, by customizing this user option. It is also possible to control this at function granularity by using the new 'safety' parameter in the function's 'declare' form. ++++ ** New types 'closure' and 'interpreted-function'. 'interpreted-function' is the new type used for interpreted functions, and 'closure' is the common parent type of 'interpreted-function' @@ -2321,6 +2362,7 @@ Those new types come with the associated new predicates 'closurep' and 'interpreted-function-p' as well as a new constructor 'make-interpreted-closure'. +--- ** New function 'help-fns-function-name'. For named functions, it just returns the name and otherwise it returns a short "unique" string that identifies the function. @@ -2332,22 +2374,26 @@ further details. This is a convenience function to return the Unicode name of a char (if it has one). ++++ ** New function 'cl-type-of'. This function is like 'type-of' except that it sometimes returns a more precise type. For example, for nil and t it returns 'null' and 'boolean' respectively, instead of just 'symbol'. ++++ ** New functions 'primitive-function-p' and 'cl-functionp'. 'primitive-function-p' is like 'subr-primitive-p' except that it returns 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. 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. +--- ** New variable 'major-mode-remap-defaults' and function 'major-mode-remap'. The first is like Emacs-29's 'major-mode-remap-alist' but to be set by packages (instead of users). The second looks up those two variables. @@ -2392,6 +2438,7 @@ more details. This has the same effect as the variable of the same name and takes precedence over the variable when present. +--- ** New function 'merge-ordered-lists'. Mostly used internally to do a kind of topological sort of inheritance hierarchies. @@ -2469,6 +2516,7 @@ without specifying a file, like this: (notifications-notify :title "I am playing music" :app-icon 'multimedia-player) +--- ** New function 're-disassemble' to see the innards of a regexp. If you built Emacs with '--enable-checking', you can use this to help debug either your regexp performance problems or the regexp engine. @@ -2480,13 +2528,6 @@ 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 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 @@ -2536,98 +2577,24 @@ as a single word. This is useful for programming languages and styles where only the first letter of a symbol's name is ever capitalized. The default value of this variable is nil. -** Touch Screen support +--- +** 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. +++ -*** 'x-popup-menu' now understands touch screen events. -When a 'touchscreen-begin' or 'touchscreen-end' event is passed as the -POSITION argument, it will behave as if that event was a mouse event. - -+++ -*** New functions for handling touch screen events. -The new functions 'touch-screen-track-tap' and -'touch-screen-track-drag' handle tracking common touch screen gestures -from within a command. - -+++ -*** New parameter to 'touchscreen-end' events. -CANCEL non-nil establishes that the touch sequence has been -intercepted by programs such as window managers and should be ignored -with Emacs. - -** New variable 'inhibit-auto-fill' to temporarily prevent auto-fill. - -+++ -** New variable 'secondary-tool-bar-map'. -If non-nil, this variable contains a keymap of menu items that are -displayed along tool bar items inside 'tool-bar-map'. - -** New variable 'completion-lazy-hilit'. -Lisp programs that present completion candidates may bind this -variable non-nil around calls to functions such as -'completion-all-completions'. This tells the underlying completion -styles to skip eager fontification of completion candidates, which -improves performance. Such a Lisp program can then use the -'completion-lazy-hilit' function to fontify candidates just in time. - -** New primitive 'buffer-last-name'. -It returns the name of a buffer before the last time it was renamed or -killed. - -** New primitive 'marker-last-position'. -It returns the last position of a marker in its buffer even if that -buffer has been killed. ('marker-position' would return nil in that -case.) - -** Functions and variables to transpose sexps - -+++ -*** New helper variable 'transpose-sexps-function'. -Emacs now can set this variable to customize the behavior of the -'transpose-sexps' function. - -+++ -*** New function 'transpose-sexps-default-function'. -The previous implementation is moved into its own function, to be -bound by 'transpose-sexps-function'. - -*** New function 'treesit-transpose-sexps'. -Tree-sitter now unconditionally sets 'transpose-sexps-function' for all -tree-sitter enabled modes. This functionality utilizes the new -'transpose-sexps-function'. - -** Functions and variables to move by program statements - -*** New variable 'forward-sentence-function'. -Major modes can now set this variable to customize the behavior of the -'forward-sentence' command. - -*** New function 'forward-sentence-default-function'. -The previous implementation of 'forward-sentence' is moved into its -own function, to be bound by 'forward-sentence-function'. - -*** New function 'treesit-forward-sentence'. -All tree-sitter enabled modes that define 'sentence' in -'treesit-thing-settings' now set 'forward-sentence-function' to call -'treesit-forward-sentence'. - -** Functions and variables to move by program sexps - -*** New function 'treesit-forward-sexp'. -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. +** 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: +only return that string, and will not use it 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 +The above function returns the string '"Sing a song."' and has no doc +string. Previously, that string was used as both the doc string and return value, which was never what the programmer wanted. If you want the string to be a docstring, add an explicit return value. @@ -2743,8 +2710,8 @@ default (unconditional) clause. Example: (t (say "some")) (say "goodbye")) -Such a clause will never be executed but is likely to be a mistake, -perhaps due to misplaced brackets. +Such a clause will never be executed, and is likely to be a mistake, +perhaps due to misplaced parens. This warning can be suppressed using 'with-suppressed-warnings' with the warning name 'suspicious'. @@ -2758,8 +2725,8 @@ some obvious cases. Examples: (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 +Such code may have unpredictable behavior because the constants are part +of the program, not of the 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 @@ -2806,6 +2773,112 @@ 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. + +** Touch Screen support + ++++ +*** 'x-popup-menu' now understands touch screen events. +When a 'touchscreen-begin' or 'touchscreen-end' event is passed as the +POSITION argument, it will behave as if that event was a mouse event. + ++++ +*** New functions for handling touch screen events. +The new functions 'touch-screen-track-tap' and 'touch-screen-track-drag' +handle tracking common touch screen gestures from within a command. + ++++ +*** New parameter to 'touchscreen-end' events. +CANCEL non-nil establishes that the touch sequence has been intercepted +by programs such as window managers and should be ignored with Emacs. + +--- +** New variable 'inhibit-auto-fill' to temporarily prevent auto-fill. + ++++ +** New variable 'secondary-tool-bar-map'. +If non-nil, this variable contains a keymap of menu items that are +displayed along tool bar items defined by 'tool-bar-map'. These items +are displayed below the tool bar if the value of 'tool-bar-position' is +'top', and above it if the value is 'bottom'. This is used by +'modifier-bar-mode'. + +--- +** New variable 'completion-lazy-hilit'. +Lisp programs that present completion candidates may bind this +variable non-nil around calls to functions such as +'completion-all-completions'. This tells the underlying completion +styles to skip eager fontification of completion candidates, which +improves performance. Such a Lisp program can then use the +'completion-lazy-hilit' function to fontify candidates just in time. + ++++ +** New primitive 'buffer-last-name'. +It returns the name of a buffer before the last time it was renamed or +killed. + ++++ +** New primitive 'marker-last-position'. +It returns the last position of a marker in its buffer even if that +buffer has been killed. ('marker-position' would return nil in that +case.) + +** Functions and variables to transpose sexps + +--- +*** New helper variable 'transpose-sexps-function'. +Lisp programs can now set this variable to customize the behavior of the +'transpose-sexps' command. + +--- +*** New function 'transpose-sexps-default-function'. +The previous implementation of 'transpose-sexps' was moved into its own +function, to be used in 'transpose-sexps-function'. + +--- +*** New function 'treesit-transpose-sexps'. +Tree-sitter now unconditionally sets 'transpose-sexps-function' for all +tree-sitter enabled modes to this function. + +** Functions and variables to move by program statements + ++++ +*** New variable 'forward-sentence-function'. +Major modes can now set this variable to customize the behavior of the +'forward-sentence' command. + +--- +*** New function 'forward-sentence-default-function'. +The previous implementation of 'forward-sentence' is moved into its +own function, to be bound by 'forward-sentence-function'. + ++++ +*** New function 'treesit-forward-sentence'. +All tree-sitter enabled modes that define 'sentence' in +'treesit-thing-settings' now set 'forward-sentence-function' to call +'treesit-forward-sentence'. + +** Functions and variables to move by program sexps + ++++ +*** New function 'treesit-forward-sexp'. +Tree-sitter conditionally sets 'forward-sexp-function' for major modes +that have defined 'sexp' in 'treesit-thing-settings' to enable +sexp-related motion commands. + --- ** New user option 'native-comp-async-warnings-errors-kind'. It allows control of what kinds of warnings and errors from asynchronous @@ -2839,34 +2912,12 @@ 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