aboutsummaryrefslogtreecommitdiffstats
path: root/lispref/debugging.texi
diff options
context:
space:
mode:
authorRichard M. Stallman2004-11-16 17:26:18 +0000
committerRichard M. Stallman2004-11-16 17:26:18 +0000
commit6657986f006b932cd7e88f67084d0052655fc724 (patch)
tree5635d5f15849b62fa683991796757fedc328590e /lispref/debugging.texi
parent231401514ae0aee4a1761b09265215b613db17d3 (diff)
downloademacs-6657986f006b932cd7e88f67084d0052655fc724.tar.gz
emacs-6657986f006b932cd7e88f67084d0052655fc724.zip
(Function Debugging, Explicit Debug): Clarified.
(Test Coverage): Don't talk about "splotches". Clarified.
Diffstat (limited to 'lispref/debugging.texi')
-rw-r--r--lispref/debugging.texi35
1 files changed, 19 insertions, 16 deletions
diff --git a/lispref/debugging.texi b/lispref/debugging.texi
index f9096cbef2a..e893b77ed84 100644
--- a/lispref/debugging.texi
+++ b/lispref/debugging.texi
@@ -221,6 +221,8 @@ up to invoke the debugger on entry, @code{debug-on-entry} does nothing.
221discarded by the redefinition. In effect, redefining the function 221discarded by the redefinition. In effect, redefining the function
222cancels the break-on-entry feature for that function. 222cancels the break-on-entry feature for that function.
223 223
224Here's an example to illustrate use of this function:
225
224@example 226@example
225@group 227@group
226(defun fact (n) 228(defun fact (n)
@@ -276,9 +278,9 @@ not currently set up to break on entry. It always returns
276 You can cause the debugger to be called at a certain point in your 278 You can cause the debugger to be called at a certain point in your
277program by writing the expression @code{(debug)} at that point. To do 279program by writing the expression @code{(debug)} at that point. To do
278this, visit the source file, insert the text @samp{(debug)} at the 280this, visit the source file, insert the text @samp{(debug)} at the
279proper place, and type @kbd{C-M-x}. @strong{Warning:} if you do this 281proper place, and type @kbd{C-M-x} (@code{eval-defun}, a Lisp mode key
280for temporary debugging purposes, be sure to undo this insertion before 282binding). @strong{Warning:} if you do this for temporary debugging
281you save the file! 283purposes, be sure to undo this insertion before you save the file!
282 284
283 The place where you insert @samp{(debug)} must be a place where an 285 The place where you insert @samp{(debug)} must be a place where an
284additional form can be evaluated and its value ignored. (If the value 286additional form can be evaluated and its value ignored. (If the value
@@ -746,20 +748,21 @@ anything.
746@findex testcover-start 748@findex testcover-start
747@findex testcover-mark-all 749@findex testcover-mark-all
748@findex testcover-next-mark 750@findex testcover-next-mark
749 You can do coverage testing for a file of Lisp code by first using 751 You can do coverage testing for a file of Lisp code by loading the
750the command @kbd{M-x testcover-start @key{RET} @var{file} @key{RET}} 752@code{testcover} library and using the command @kbd{M-x
751to instrument it. Then test your code by calling it one or more 753testcover-start @key{RET} @var{file} @key{RET}} to instrument the
752times. Then use the command @kbd{M-x testcover-mark-all} to display 754code. Then test your code by calling it one or more times. Then use
753``splotches'' on the code to show where coverage is insufficient. The 755the command @kbd{M-x testcover-mark-all} to display colored highlights
754command @kbd{M-x testcover-next-mark} will move point forward to the 756on the code to show where coverage is insufficient. The command
755next spot that has a splotch. 757@kbd{M-x testcover-next-mark} will move point forward to the next
756 758highlighted spot.
757 Normally, a red splotch indicates the form was never completely 759
758evaluated; a brown splotch means it always evaluated to the same value 760 Normally, a red highlight indicates the form was never completely
759(meaning there has been little testing of what is done with the 761evaluated; a brown highlight means it always evaluated to the same
760result). However, the red splotch is skipped for forms that can't 762value (meaning there has been little testing of what is done with the
763result). However, the red highlight is skipped for forms that can't
761possibly complete their evaluation, such as @code{error}. The brown 764possibly complete their evaluation, such as @code{error}. The brown
762splotch is skipped for forms that are expected to always evaluate to 765highlight is skipped for forms that are expected to always evaluate to
763the same value, such as @code{(setq x 14)}. 766the same value, such as @code{(setq x 14)}.
764 767
765 For difficult cases, you can add do-nothing macros to your code to 768 For difficult cases, you can add do-nothing macros to your code to