From: Eli Zaretskii Date: Sun, 30 Jun 2024 19:25:31 +0000 (+0300) Subject: More updates of documentation for Emacs 30 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9d48dd5eab7dbbd4ec9ca54e362cbf2ce0a6fa56;p=emacs.git 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'. (cherry picked from commit 2f71460d52fb8ec36766edc297de559b318ee5e1) --- 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 5919ba20b23..45d5d635371 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -871,14 +871,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