diff options
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/debugging.texi | 44 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/functions.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/loading.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/objects.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 10 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 1 |
7 files changed, 64 insertions, 10 deletions
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 058c9319544..9ae40949d1e 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi | |||
| @@ -77,6 +77,7 @@ debugger recursively. @xref{Recursive Editing}. | |||
| 77 | 77 | ||
| 78 | @menu | 78 | @menu |
| 79 | * Error Debugging:: Entering the debugger when an error happens. | 79 | * Error Debugging:: Entering the debugger when an error happens. |
| 80 | * Debugging Redisplay:: Getting backtraces from redisplay errors. | ||
| 80 | * Infinite Loops:: Stopping and debugging a program that doesn't exit. | 81 | * Infinite Loops:: Stopping and debugging a program that doesn't exit. |
| 81 | * Function Debugging:: Entering it when a certain function is called. | 82 | * Function Debugging:: Entering it when a certain function is called. |
| 82 | * Variable Debugging:: Entering it when a variable is modified. | 83 | * Variable Debugging:: Entering it when a variable is modified. |
| @@ -105,6 +106,10 @@ debugger, set the variable @code{debug-on-error} to non-@code{nil}. | |||
| 105 | (The command @code{toggle-debug-on-error} provides an easy way to do | 106 | (The command @code{toggle-debug-on-error} provides an easy way to do |
| 106 | this.) | 107 | this.) |
| 107 | 108 | ||
| 109 | Note that, for technical reasons, you cannot use the facilities | ||
| 110 | defined in this subsection to debug errors in Lisp that the redisplay | ||
| 111 | code has invoked. @xref{Debugging Redisplay}, for help with these. | ||
| 112 | |||
| 108 | @defopt debug-on-error | 113 | @defopt debug-on-error |
| 109 | This variable determines whether the debugger is called when an error | 114 | This variable determines whether the debugger is called when an error |
| 110 | is signaled and not handled. If @code{debug-on-error} is @code{t}, | 115 | is signaled and not handled. If @code{debug-on-error} is @code{t}, |
| @@ -213,6 +218,45 @@ file, use the option @samp{--debug-init}. This binds | |||
| 213 | bypasses the @code{condition-case} which normally catches errors in the | 218 | bypasses the @code{condition-case} which normally catches errors in the |
| 214 | init file. | 219 | init file. |
| 215 | 220 | ||
| 221 | @node Debugging Redisplay | ||
| 222 | @subsection Debugging Redisplay Errors | ||
| 223 | @cindex redisplay errors | ||
| 224 | @cindex debugging redisplay errors | ||
| 225 | |||
| 226 | When an error occurs in Lisp code which redisplay has invoked, Emacs's | ||
| 227 | usual debugging mechanisms are unusable, for technical reasons. This | ||
| 228 | subsection describes how to get a backtrace from such an error, which | ||
| 229 | should be helpful in debugging it. | ||
| 230 | |||
| 231 | These directions apply to Lisp forms used, for example, in | ||
| 232 | @code{:eval} mode line constructs (@pxref{Mode Line Data}), and in all | ||
| 233 | hooks invoked from redisplay, such as: | ||
| 234 | |||
| 235 | @itemize | ||
| 236 | @item | ||
| 237 | @code{fontification-functions} (@pxref{Auto Faces}). | ||
| 238 | @item | ||
| 239 | @code{window-scroll-functions} (@pxref{Window Hooks}). | ||
| 240 | @end itemize | ||
| 241 | |||
| 242 | Note that if you have had an error in a hook function called from | ||
| 243 | redisplay, the error handling might have removed this function from | ||
| 244 | the hook. You will thus need to reinitialize that hook somehow, | ||
| 245 | perhaps with @code{add-hook}, to be able to replay the bug. | ||
| 246 | |||
| 247 | To generate a backtrace in these circumstances, set the variable | ||
| 248 | @code{backtrace-on-redisplay-error} to non-@code{nil}. When the error | ||
| 249 | occurs, Emacs will dump the backtrace to the buffer | ||
| 250 | @file{*Redisplay-trace*}, but won't automatically display it in a | ||
| 251 | window. This is to avoid needlessly corrupting the redisplay you are | ||
| 252 | debugging. You will thus need to display the buffer yourself, with a | ||
| 253 | command such as @code{switch-to-buffer-other-frame} @key{C-x 5 b}. | ||
| 254 | |||
| 255 | @defvar backtrace-on-redisplay-error | ||
| 256 | Set this variable to non-@code{nil} to enable the generation of a | ||
| 257 | backtrace when an error occurs in any Lisp called from redisplay. | ||
| 258 | @end defvar | ||
| 259 | |||
| 216 | @node Infinite Loops | 260 | @node Infinite Loops |
| 217 | @subsection Debugging Infinite Loops | 261 | @subsection Debugging Infinite Loops |
| 218 | @cindex infinite loops | 262 | @cindex infinite loops |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index ace67fbedb7..96079dc106a 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -8596,9 +8596,9 @@ Characters of Unicode General Category [Cf], such as U+200E | |||
| 8596 | images, such as U+00AD @sc{soft hyphen}. | 8596 | images, such as U+00AD @sc{soft hyphen}. |
| 8597 | 8597 | ||
| 8598 | @item variation-selectors | 8598 | @item variation-selectors |
| 8599 | Unicode VS-1 through VS-16 (U+FE00 through U+FE0F), which are used to | 8599 | Unicode VS-1 through VS-256 (U+FE00 through U+FE0F and U+E0100 through |
| 8600 | select between different glyphs for the same codepoints (typically | 8600 | U+E01EF), which are used to select between different glyphs for the same |
| 8601 | emojis). | 8601 | codepoints (typically emojis). |
| 8602 | 8602 | ||
| 8603 | @item no-font | 8603 | @item no-font |
| 8604 | Characters for which there is no suitable font, or which cannot be | 8604 | Characters for which there is no suitable font, or which cannot be |
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 8265e58210e..ddf7cff6c2e 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi | |||
| @@ -217,6 +217,14 @@ function. For example: | |||
| 217 | @end example | 217 | @end example |
| 218 | @end defun | 218 | @end defun |
| 219 | 219 | ||
| 220 | @defun compiled-function-p object | ||
| 221 | This function returns @code{t} if @var{object} is a function object | ||
| 222 | that was either built-in (a.k.a.@: ``primitive'', @pxref{What Is a | ||
| 223 | Function}), or byte-compiled (@pxref{Byte Compilation}), or | ||
| 224 | natively-compiled (@pxref{Native Compilation}), or a function loaded | ||
| 225 | from a dynamic module (@pxref{Dynamic Modules}). | ||
| 226 | @end defun | ||
| 227 | |||
| 220 | @defun subr-arity subr | 228 | @defun subr-arity subr |
| 221 | This works like @code{func-arity}, but only for built-in functions and | 229 | This works like @code{func-arity}, but only for built-in functions and |
| 222 | without symbol indirection. It signals an error for non-built-in | 230 | without symbol indirection. It signals an error for non-built-in |
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 0972a7a123c..4e4f12dc324 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi | |||
| @@ -440,7 +440,7 @@ similarly-named file in a directory earlier on @code{load-path}. | |||
| 440 | For instance, suppose @code{load-path} is set to | 440 | For instance, suppose @code{load-path} is set to |
| 441 | 441 | ||
| 442 | @example | 442 | @example |
| 443 | ("/opt/emacs/site-lisp" "/usr/share/emacs/23.3/lisp") | 443 | ("/opt/emacs/site-lisp" "/usr/share/emacs/29.1/lisp") |
| 444 | @end example | 444 | @end example |
| 445 | 445 | ||
| 446 | @noindent | 446 | @noindent |
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index 1bae1924557..7b5e9adee29 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi | |||
| @@ -2022,6 +2022,9 @@ with references to further information. | |||
| 2022 | @item byte-code-function-p | 2022 | @item byte-code-function-p |
| 2023 | @xref{Byte-Code Type, byte-code-function-p}. | 2023 | @xref{Byte-Code Type, byte-code-function-p}. |
| 2024 | 2024 | ||
| 2025 | @item compiled-function-p | ||
| 2026 | @xref{Byte-Code Type, compiled-function-p}. | ||
| 2027 | |||
| 2025 | @item case-table-p | 2028 | @item case-table-p |
| 2026 | @xref{Case Tables, case-table-p}. | 2029 | @xref{Case Tables, case-table-p}. |
| 2027 | 2030 | ||
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index d591b219cd0..35828018417 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -1544,11 +1544,11 @@ as traditional Gregorian years do; for example, the year number | |||
| 1544 | @defun time-convert time form | 1544 | @defun time-convert time form |
| 1545 | This function converts a time value into a Lisp timestamp. | 1545 | This function converts a time value into a Lisp timestamp. |
| 1546 | 1546 | ||
| 1547 | The optional @var{form} argument specifies the timestamp form to be | 1547 | The @var{form} argument specifies the timestamp form to be returned. |
| 1548 | returned. If @var{form} is the symbol @code{integer}, this function | 1548 | If @var{form} is the symbol @code{integer}, this function returns an |
| 1549 | returns an integer count of seconds. If @var{form} is a positive | 1549 | integer count of seconds. If @var{form} is a positive integer, it |
| 1550 | integer, it specifies a clock frequency and this function returns an | 1550 | specifies a clock frequency and this function returns an integer-pair |
| 1551 | integer-pair timestamp @code{(@var{ticks} . @var{form})}. If @var{form} is | 1551 | timestamp @code{(@var{ticks} . @var{form})}. If @var{form} is |
| 1552 | @code{t}, this function treats it as a positive integer suitable for | 1552 | @code{t}, this function treats it as a positive integer suitable for |
| 1553 | representing the timestamp; for example, it is treated as 1000000000 | 1553 | representing the timestamp; for example, it is treated as 1000000000 |
| 1554 | if @var{time} is @code{nil} and the platform timestamp has nanosecond | 1554 | if @var{time} is @code{nil} and the platform timestamp has nanosecond |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 382053ab24a..db6b4c35ef7 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -1960,7 +1960,6 @@ because @var{seconds} can be floating point to specify | |||
| 1960 | waiting a fractional number of seconds. If @var{seconds} is 0, the | 1960 | waiting a fractional number of seconds. If @var{seconds} is 0, the |
| 1961 | function accepts whatever output is pending but does not wait. | 1961 | function accepts whatever output is pending but does not wait. |
| 1962 | 1962 | ||
| 1963 | @c Emacs 22.1 feature | ||
| 1964 | If @var{process} is a process, and the argument @var{just-this-one} is | 1963 | If @var{process} is a process, and the argument @var{just-this-one} is |
| 1965 | non-@code{nil}, only output from that process is handled, suspending output | 1964 | non-@code{nil}, only output from that process is handled, suspending output |
| 1966 | from other processes until some output has been received from that | 1965 | from other processes until some output has been received from that |