aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/debugging.texi44
-rw-r--r--doc/lispref/display.texi6
-rw-r--r--doc/lispref/functions.texi8
-rw-r--r--doc/lispref/loading.texi2
-rw-r--r--doc/lispref/objects.texi3
-rw-r--r--doc/lispref/os.texi10
-rw-r--r--doc/lispref/processes.texi1
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
106this.) 107this.)
107 108
109Note that, for technical reasons, you cannot use the facilities
110defined in this subsection to debug errors in Lisp that the redisplay
111code has invoked. @xref{Debugging Redisplay}, for help with these.
112
108@defopt debug-on-error 113@defopt debug-on-error
109This variable determines whether the debugger is called when an error 114This variable determines whether the debugger is called when an error
110is signaled and not handled. If @code{debug-on-error} is @code{t}, 115is 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
213bypasses the @code{condition-case} which normally catches errors in the 218bypasses the @code{condition-case} which normally catches errors in the
214init file. 219init file.
215 220
221@node Debugging Redisplay
222@subsection Debugging Redisplay Errors
223@cindex redisplay errors
224@cindex debugging redisplay errors
225
226When an error occurs in Lisp code which redisplay has invoked, Emacs's
227usual debugging mechanisms are unusable, for technical reasons. This
228subsection describes how to get a backtrace from such an error, which
229should be helpful in debugging it.
230
231These directions apply to Lisp forms used, for example, in
232@code{:eval} mode line constructs (@pxref{Mode Line Data}), and in all
233hooks 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
242Note that if you have had an error in a hook function called from
243redisplay, the error handling might have removed this function from
244the hook. You will thus need to reinitialize that hook somehow,
245perhaps with @code{add-hook}, to be able to replay the bug.
246
247To generate a backtrace in these circumstances, set the variable
248@code{backtrace-on-redisplay-error} to non-@code{nil}. When the error
249occurs, Emacs will dump the backtrace to the buffer
250@file{*Redisplay-trace*}, but won't automatically display it in a
251window. This is to avoid needlessly corrupting the redisplay you are
252debugging. You will thus need to display the buffer yourself, with a
253command such as @code{switch-to-buffer-other-frame} @key{C-x 5 b}.
254
255@defvar backtrace-on-redisplay-error
256Set this variable to non-@code{nil} to enable the generation of a
257backtrace 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
8596images, such as U+00AD @sc{soft hyphen}. 8596images, such as U+00AD @sc{soft hyphen}.
8597 8597
8598@item variation-selectors 8598@item variation-selectors
8599Unicode VS-1 through VS-16 (U+FE00 through U+FE0F), which are used to 8599Unicode VS-1 through VS-256 (U+FE00 through U+FE0F and U+E0100 through
8600select between different glyphs for the same codepoints (typically 8600U+E01EF), which are used to select between different glyphs for the same
8601emojis). 8601codepoints (typically emojis).
8602 8602
8603@item no-font 8603@item no-font
8604Characters for which there is no suitable font, or which cannot be 8604Characters 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
221This function returns @code{t} if @var{object} is a function object
222that was either built-in (a.k.a.@: ``primitive'', @pxref{What Is a
223Function}), or byte-compiled (@pxref{Byte Compilation}), or
224natively-compiled (@pxref{Native Compilation}), or a function loaded
225from a dynamic module (@pxref{Dynamic Modules}).
226@end defun
227
220@defun subr-arity subr 228@defun subr-arity subr
221This works like @code{func-arity}, but only for built-in functions and 229This works like @code{func-arity}, but only for built-in functions and
222without symbol indirection. It signals an error for non-built-in 230without 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}.
440For instance, suppose @code{load-path} is set to 440For 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
1545This function converts a time value into a Lisp timestamp. 1545This function converts a time value into a Lisp timestamp.
1546 1546
1547The optional @var{form} argument specifies the timestamp form to be 1547The @var{form} argument specifies the timestamp form to be returned.
1548returned. If @var{form} is the symbol @code{integer}, this function 1548If @var{form} is the symbol @code{integer}, this function returns an
1549returns an integer count of seconds. If @var{form} is a positive 1549integer count of seconds. If @var{form} is a positive integer, it
1550integer, it specifies a clock frequency and this function returns an 1550specifies a clock frequency and this function returns an integer-pair
1551integer-pair timestamp @code{(@var{ticks} . @var{form})}. If @var{form} is 1551timestamp @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
1553representing the timestamp; for example, it is treated as 1000000000 1553representing the timestamp; for example, it is treated as 1000000000
1554if @var{time} is @code{nil} and the platform timestamp has nanosecond 1554if @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
1960waiting a fractional number of seconds. If @var{seconds} is 0, the 1960waiting a fractional number of seconds. If @var{seconds} is 0, the
1961function accepts whatever output is pending but does not wait. 1961function accepts whatever output is pending but does not wait.
1962 1962
1963@c Emacs 22.1 feature
1964If @var{process} is a process, and the argument @var{just-this-one} is 1963If @var{process} is a process, and the argument @var{just-this-one} is
1965non-@code{nil}, only output from that process is handled, suspending output 1964non-@code{nil}, only output from that process is handled, suspending output
1966from other processes until some output has been received from that 1965from other processes until some output has been received from that