Add an option in Edebug to prevent pauses after h', 'f', and o'.

Requested by Paul Pogonyshev.  Also add in documentation for Edebug config
variables which was missing.

* lisp/emacs-lisp/edebug.el (edebug-sit-on-break): New customizable option.
(edebug--display-1): Test edebug-sit-on-break before pausing 1 second.

* doc/lispref/edebug.texi (Jumping): Document the effect of the new option.
(Edebug Options): Document the new option.  Also add documentation for
edebug-eval-macro-args, edebug-print-length, edebug-print-level,
edebug-print-circle, edebug-sit-for-seconds.

* etc/NEWS: Note the new feature.
This commit is contained in:
Alan Mackenzie 2016-05-07 06:42:29 +00:00
parent bf7fc7a804
commit ed5282d239
3 changed files with 51 additions and 0 deletions

View file

@ -384,6 +384,11 @@ now, it returns from the function and then stops. In other words, this
command does not exit the currently executing function unless you are
positioned after the last sexp.
Normally, the @kbd{h}, @kbd{f}, and @kbd{o} commands display ``Break''
and pause for @code{edebug-sit-for-seconds} before showing the result
of the form just evaluated. You can avoid this pause by setting
@code{edebug-sit-on-break} to @code{nil}. @xref{Edebug Options}.
The @kbd{i} command steps into the function or macro called by the list
form after point, and stops at its first stop point. Note that the form
need not be the one about to be evaluated. But if the form is a
@ -1543,6 +1548,14 @@ Use the command @kbd{M-x edebug-all-forms} to toggle the value of this
option. @xref{Instrumenting}.
@end defopt
@defopt edebug-eval-macro-args
When this is non-@code{nil}, all macro arguments will be instrumented
in the generated code. For any macro, an @code{edebug-form-spec}
overrides this option. So to specify exceptions for macros that have
some arguments evaluated and some not, use @code{def-edebug-spec} to
specify an @code{edebug-form-spec}.
@end defopt
@defopt edebug-save-windows
If this is non-@code{nil}, Edebug saves and restores the window
configuration. That takes some time, so if your program does not care
@ -1601,6 +1614,21 @@ debugged.
@xref{Edebug Execution Modes}.
@end defopt
@defopt edebug-print-length
If non-@code{nil}, the default value of @code{print-length} for
printing results in Edebug. @xref{Output Variables}.
@end defopt
@defopt edebug-print-level
If non-@code{nil}, the default value of @code{print-level} for
printing results in Edebug. @xref{Output Variables}.
@end defopt
@defopt edebug-print-circle
If non-@code{nil}, the default value of @code{print-circle} for
printing results in Edebug. @xref{Output Variables}.
@end defopt
@defopt edebug-unwrap-results
If non-@code{nil}, Edebug tries to remove any of its own
instrumentation when showing the results of expressions. This is
@ -1647,3 +1675,14 @@ If non-@code{nil}, an expression to test for at every stop point. If
the result is non-@code{nil}, then break. Errors are ignored.
@xref{Global Break Condition}.
@end defopt
@defopt edebug-sit-for-seconds
Number of seconds to pause when a breakpoint is reached and the execution
mode is trace or continue. @xref{Edebug Execution Modes}.
@end defopt
@defopt edebug-sit-on-break
Whether or not to pause for @code{edebug-sit-for-seconds} on reaching
a breakpoint. Set to @code{nil} to prevent the pause, non-@code{nil}
to allow it.
@end defopt

View file

@ -203,6 +203,12 @@ this is controlled by the 'wdired-create-parent-directories' variable.
*** 'W' is now bound to 'browse-url-of-dired-file', and is useful for
viewing HTML files and the like.
** Ediff
*** Ediff can be prevented from pausing 1 second after reaching a
breakpoint (e.g. with "f" and "o") by customizing the new option
`edebug-sit-on-break'.
** eww
+++

View file

@ -233,6 +233,11 @@ If the result is non-nil, then break. Errors are ignored."
:type 'number
:group 'edebug)
(defcustom edebug-sit-on-break t
"Whether or not to pause for `edebug-sit-for-seconds' on reaching a break."
:type 'boolean
:group 'edebug)
;;; Form spec utilities.
(defun get-edebug-spec (symbol)
@ -2489,6 +2494,7 @@ MSG is printed after `::::} '."
(progn
;; Display result of previous evaluation.
(if (and edebug-break
edebug-sit-on-break
(not (eq edebug-execution-mode 'Continue-fast)))
(sit-for edebug-sit-for-seconds)) ; Show message.
(edebug-previous-result)))