Mercurial > emacs
comparison lispref/edebug.texi @ 52840:590f500fb14b
(Edebug Execution Modes): Clarify t.
Document edebug-sit-for-seconds.
(Coverage Testing): Document C-x X = and =.
(Instrumenting Macro Calls): Fix typo.
(Specification List): Don't index the specification keywords.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 13 Oct 2003 19:23:30 +0000 |
parents | 695cf19ef79e |
children | 3e34838fbfac |
comparison
equal
deleted
inserted
replaced
52839:f4f7a204bc03 | 52840:590f500fb14b |
---|---|
255 Next: stop at the next stop point encountered after an expression | 255 Next: stop at the next stop point encountered after an expression |
256 (@code{edebug-next-mode}). Also see @code{edebug-forward-sexp} in | 256 (@code{edebug-next-mode}). Also see @code{edebug-forward-sexp} in |
257 @ref{Edebug Misc}. | 257 @ref{Edebug Misc}. |
258 | 258 |
259 @item t | 259 @item t |
260 Trace: pause one second at each Edebug stop point (@code{edebug-trace-mode}). | 260 Trace: pause (normally one second) at each Edebug stop point |
261 (@code{edebug-trace-mode}). | |
261 | 262 |
262 @item T | 263 @item T |
263 Rapid trace: update the display at each stop point, but don't actually | 264 Rapid trace: update the display at each stop point, but don't actually |
264 pause (@code{edebug-Trace-fast-mode}). | 265 pause (@code{edebug-Trace-fast-mode}). |
265 | 266 |
305 the value of the variable @code{edebug-initial-mode}. By default, this | 306 the value of the variable @code{edebug-initial-mode}. By default, this |
306 specifies step mode. Note that you may reenter the same Edebug level | 307 specifies step mode. Note that you may reenter the same Edebug level |
307 several times if, for example, an instrumented function is called | 308 several times if, for example, an instrumented function is called |
308 several times from one command. | 309 several times from one command. |
309 | 310 |
311 @defopt edebug-sit-for-seconds | |
312 This option specifies how many seconds to wait between execution steps | |
313 in trace mode. The default is 1 second. | |
314 @end defvar | |
310 | 315 |
311 @node Jumping | 316 @node Jumping |
312 @subsection Jumping | 317 @subsection Jumping |
313 | 318 |
314 The commands described in this section execute until they reach a | 319 The commands described in this section execute until they reach a |
869 @code{edebug-test-coverage} is non-@code{nil}. Frequency counting is | 874 @code{edebug-test-coverage} is non-@code{nil}. Frequency counting is |
870 performed for all execution of an instrumented function, even if the | 875 performed for all execution of an instrumented function, even if the |
871 execution mode is Go-nonstop, and regardless of whether coverage testing | 876 execution mode is Go-nonstop, and regardless of whether coverage testing |
872 is enabled. | 877 is enabled. |
873 | 878 |
874 Use @kbd{M-x edebug-display-freq-count} to display both the | 879 @kindex C-x X = |
875 coverage information and the frequency counts for a definition. | 880 @findex edebug-temp-display-freq-count |
881 Use @kbd{C-x X =} (@code{edebug-display-freq-count}) to display both | |
882 the coverage information and the frequency counts for a definition. | |
883 Just @kbd{=} (@code{edebug-temp-display-freq-count}) displays the same | |
884 information temporarily, only until you type another key. | |
876 | 885 |
877 @deffn Command edebug-display-freq-count | 886 @deffn Command edebug-display-freq-count |
878 This command displays the frequency count data for each line of the | 887 This command displays the frequency count data for each line of the |
879 current definition. | 888 current definition. |
880 | 889 |
1075 For example, (for i from 1 to 10 do (print i))." | 1084 For example, (for i from 1 to 10 do (print i))." |
1076 (declare (edebug symbolp "from" form "to" form "do" &rest form)) | 1085 (declare (edebug symbolp "from" form "to" form "do" &rest form)) |
1077 ...) | 1086 ...) |
1078 @end example | 1087 @end example |
1079 | 1088 |
1080 The Edebug specifation says which parts of a call to the macro are | 1089 The Edebug specification says which parts of a call to the macro are |
1081 forms to be evaluated. For simple macros, the @var{specification} | 1090 forms to be evaluated. For simple macros, the @var{specification} |
1082 often looks very similar to the formal argument list of the macro | 1091 often looks very similar to the formal argument list of the macro |
1083 definition, but specifications are much more general than macro | 1092 definition, but specifications are much more general than macro |
1084 arguments. @xref{Defining Macros}, for more explanation of | 1093 arguments. @xref{Defining Macros}, for more explanation of |
1085 the @code{declare} special form. | 1094 the @code{declare} special form. |
1182 | 1191 |
1183 @item lambda-expr | 1192 @item lambda-expr |
1184 A lambda expression with no quoting. | 1193 A lambda expression with no quoting. |
1185 | 1194 |
1186 @item &optional | 1195 @item &optional |
1187 @kindex &optional @r{(Edebug)} | 1196 @c @kindex &optional @r{(Edebug)} |
1188 All following elements in the specification list are optional; as soon | 1197 All following elements in the specification list are optional; as soon |
1189 as one does not match, Edebug stops matching at this level. | 1198 as one does not match, Edebug stops matching at this level. |
1190 | 1199 |
1191 To make just a few elements optional followed by non-optional elements, | 1200 To make just a few elements optional followed by non-optional elements, |
1192 use @code{[&optional @var{specs}@dots{}]}. To specify that several | 1201 use @code{[&optional @var{specs}@dots{}]}. To specify that several |
1193 elements must all match or none, use @code{&optional | 1202 elements must all match or none, use @code{&optional |
1194 [@var{specs}@dots{}]}. See the @code{defun} example below. | 1203 [@var{specs}@dots{}]}. See the @code{defun} example below. |
1195 | 1204 |
1196 @item &rest | 1205 @item &rest |
1197 @kindex &rest @r{(Edebug)} | 1206 @c @kindex &rest @r{(Edebug)} |
1198 All following elements in the specification list are repeated zero or | 1207 All following elements in the specification list are repeated zero or |
1199 more times. In the last repetition, however, it is not a problem if the | 1208 more times. In the last repetition, however, it is not a problem if the |
1200 expression runs out before matching all of the elements of the | 1209 expression runs out before matching all of the elements of the |
1201 specification list. | 1210 specification list. |
1202 | 1211 |
1203 To repeat only a few elements, use @code{[&rest @var{specs}@dots{}]}. | 1212 To repeat only a few elements, use @code{[&rest @var{specs}@dots{}]}. |
1204 To specify several elements that must all match on every repetition, use | 1213 To specify several elements that must all match on every repetition, use |
1205 @code{&rest [@var{specs}@dots{}]}. | 1214 @code{&rest [@var{specs}@dots{}]}. |
1206 | 1215 |
1207 @item &or | 1216 @item &or |
1208 @kindex &or @r{(Edebug)} | 1217 @c @kindex &or @r{(Edebug)} |
1209 Each of the following elements in the specification list is an | 1218 Each of the following elements in the specification list is an |
1210 alternative. One of the alternatives must match, or the @code{&or} | 1219 alternative. One of the alternatives must match, or the @code{&or} |
1211 specification fails. | 1220 specification fails. |
1212 | 1221 |
1213 Each list element following @code{&or} is a single alternative. To | 1222 Each list element following @code{&or} is a single alternative. To |
1214 group two or more list elements as a single alternative, enclose them in | 1223 group two or more list elements as a single alternative, enclose them in |
1215 @code{[@dots{}]}. | 1224 @code{[@dots{}]}. |
1216 | 1225 |
1217 @item ¬ | 1226 @item ¬ |
1218 @kindex ¬ @r{(Edebug)} | 1227 @c @kindex ¬ @r{(Edebug)} |
1219 Each of the following elements is matched as alternatives as if by using | 1228 Each of the following elements is matched as alternatives as if by using |
1220 @code{&or}, but if any of them match, the specification fails. If none | 1229 @code{&or}, but if any of them match, the specification fails. If none |
1221 of them match, nothing is matched, but the @code{¬} specification | 1230 of them match, nothing is matched, but the @code{¬} specification |
1222 succeeds. | 1231 succeeds. |
1223 | 1232 |
1224 @item &define | 1233 @item &define |
1225 @kindex &define @r{(Edebug)} | 1234 @c @kindex &define @r{(Edebug)} |
1226 Indicates that the specification is for a defining form. The defining | 1235 Indicates that the specification is for a defining form. The defining |
1227 form itself is not instrumented (that is, Edebug does not stop before and | 1236 form itself is not instrumented (that is, Edebug does not stop before and |
1228 after the defining form), but forms inside it typically will be | 1237 after the defining form), but forms inside it typically will be |
1229 instrumented. The @code{&define} keyword should be the first element in | 1238 instrumented. The @code{&define} keyword should be the first element in |
1230 a list specification. | 1239 a list specification. |