diff options
| author | Alan Mackenzie | 2016-05-07 06:42:29 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2016-05-07 06:42:29 +0000 |
| commit | ed5282d239b4304bcc6274dd06e1ce2b5e575053 (patch) | |
| tree | cee75575e047eadccdf270f6199a215188bb4f6a | |
| parent | bf7fc7a8047752b6b1cff65dc8b8e2bc8173f626 (diff) | |
| download | emacs-ed5282d239b4304bcc6274dd06e1ce2b5e575053.tar.gz emacs-ed5282d239b4304bcc6274dd06e1ce2b5e575053.zip | |
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.
| -rw-r--r-- | doc/lispref/edebug.texi | 39 | ||||
| -rw-r--r-- | etc/NEWS | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 6 |
3 files changed, 51 insertions, 0 deletions
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 47fe02a4a57..65ccb646909 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi | |||
| @@ -384,6 +384,11 @@ now, it returns from the function and then stops. In other words, this | |||
| 384 | command does not exit the currently executing function unless you are | 384 | command does not exit the currently executing function unless you are |
| 385 | positioned after the last sexp. | 385 | positioned after the last sexp. |
| 386 | 386 | ||
| 387 | Normally, the @kbd{h}, @kbd{f}, and @kbd{o} commands display ``Break'' | ||
| 388 | and pause for @code{edebug-sit-for-seconds} before showing the result | ||
| 389 | of the form just evaluated. You can avoid this pause by setting | ||
| 390 | @code{edebug-sit-on-break} to @code{nil}. @xref{Edebug Options}. | ||
| 391 | |||
| 387 | The @kbd{i} command steps into the function or macro called by the list | 392 | The @kbd{i} command steps into the function or macro called by the list |
| 388 | form after point, and stops at its first stop point. Note that the form | 393 | form after point, and stops at its first stop point. Note that the form |
| 389 | need not be the one about to be evaluated. But if the form is a | 394 | 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 | |||
| 1543 | option. @xref{Instrumenting}. | 1548 | option. @xref{Instrumenting}. |
| 1544 | @end defopt | 1549 | @end defopt |
| 1545 | 1550 | ||
| 1551 | @defopt edebug-eval-macro-args | ||
| 1552 | When this is non-@code{nil}, all macro arguments will be instrumented | ||
| 1553 | in the generated code. For any macro, an @code{edebug-form-spec} | ||
| 1554 | overrides this option. So to specify exceptions for macros that have | ||
| 1555 | some arguments evaluated and some not, use @code{def-edebug-spec} to | ||
| 1556 | specify an @code{edebug-form-spec}. | ||
| 1557 | @end defopt | ||
| 1558 | |||
| 1546 | @defopt edebug-save-windows | 1559 | @defopt edebug-save-windows |
| 1547 | If this is non-@code{nil}, Edebug saves and restores the window | 1560 | If this is non-@code{nil}, Edebug saves and restores the window |
| 1548 | configuration. That takes some time, so if your program does not care | 1561 | configuration. That takes some time, so if your program does not care |
| @@ -1601,6 +1614,21 @@ debugged. | |||
| 1601 | @xref{Edebug Execution Modes}. | 1614 | @xref{Edebug Execution Modes}. |
| 1602 | @end defopt | 1615 | @end defopt |
| 1603 | 1616 | ||
| 1617 | @defopt edebug-print-length | ||
| 1618 | If non-@code{nil}, the default value of @code{print-length} for | ||
| 1619 | printing results in Edebug. @xref{Output Variables}. | ||
| 1620 | @end defopt | ||
| 1621 | |||
| 1622 | @defopt edebug-print-level | ||
| 1623 | If non-@code{nil}, the default value of @code{print-level} for | ||
| 1624 | printing results in Edebug. @xref{Output Variables}. | ||
| 1625 | @end defopt | ||
| 1626 | |||
| 1627 | @defopt edebug-print-circle | ||
| 1628 | If non-@code{nil}, the default value of @code{print-circle} for | ||
| 1629 | printing results in Edebug. @xref{Output Variables}. | ||
| 1630 | @end defopt | ||
| 1631 | |||
| 1604 | @defopt edebug-unwrap-results | 1632 | @defopt edebug-unwrap-results |
| 1605 | If non-@code{nil}, Edebug tries to remove any of its own | 1633 | If non-@code{nil}, Edebug tries to remove any of its own |
| 1606 | instrumentation when showing the results of expressions. This is | 1634 | 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 | |||
| 1647 | the result is non-@code{nil}, then break. Errors are ignored. | 1675 | the result is non-@code{nil}, then break. Errors are ignored. |
| 1648 | @xref{Global Break Condition}. | 1676 | @xref{Global Break Condition}. |
| 1649 | @end defopt | 1677 | @end defopt |
| 1678 | |||
| 1679 | @defopt edebug-sit-for-seconds | ||
| 1680 | Number of seconds to pause when a breakpoint is reached and the execution | ||
| 1681 | mode is trace or continue. @xref{Edebug Execution Modes}. | ||
| 1682 | @end defopt | ||
| 1683 | |||
| 1684 | @defopt edebug-sit-on-break | ||
| 1685 | Whether or not to pause for @code{edebug-sit-for-seconds} on reaching | ||
| 1686 | a breakpoint. Set to @code{nil} to prevent the pause, non-@code{nil} | ||
| 1687 | to allow it. | ||
| 1688 | @end defopt | ||
| @@ -203,6 +203,12 @@ this is controlled by the 'wdired-create-parent-directories' variable. | |||
| 203 | *** 'W' is now bound to 'browse-url-of-dired-file', and is useful for | 203 | *** 'W' is now bound to 'browse-url-of-dired-file', and is useful for |
| 204 | viewing HTML files and the like. | 204 | viewing HTML files and the like. |
| 205 | 205 | ||
| 206 | ** Ediff | ||
| 207 | |||
| 208 | *** Ediff can be prevented from pausing 1 second after reaching a | ||
| 209 | breakpoint (e.g. with "f" and "o") by customizing the new option | ||
| 210 | `edebug-sit-on-break'. | ||
| 211 | |||
| 206 | ** eww | 212 | ** eww |
| 207 | 213 | ||
| 208 | +++ | 214 | +++ |
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index e8484fa1f94..07a846f5986 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -233,6 +233,11 @@ If the result is non-nil, then break. Errors are ignored." | |||
| 233 | :type 'number | 233 | :type 'number |
| 234 | :group 'edebug) | 234 | :group 'edebug) |
| 235 | 235 | ||
| 236 | (defcustom edebug-sit-on-break t | ||
| 237 | "Whether or not to pause for `edebug-sit-for-seconds' on reaching a break." | ||
| 238 | :type 'boolean | ||
| 239 | :group 'edebug) | ||
| 240 | |||
| 236 | ;;; Form spec utilities. | 241 | ;;; Form spec utilities. |
| 237 | 242 | ||
| 238 | (defun get-edebug-spec (symbol) | 243 | (defun get-edebug-spec (symbol) |
| @@ -2489,6 +2494,7 @@ MSG is printed after `::::} '." | |||
| 2489 | (progn | 2494 | (progn |
| 2490 | ;; Display result of previous evaluation. | 2495 | ;; Display result of previous evaluation. |
| 2491 | (if (and edebug-break | 2496 | (if (and edebug-break |
| 2497 | edebug-sit-on-break | ||
| 2492 | (not (eq edebug-execution-mode 'Continue-fast))) | 2498 | (not (eq edebug-execution-mode 'Continue-fast))) |
| 2493 | (sit-for edebug-sit-for-seconds)) ; Show message. | 2499 | (sit-for edebug-sit-for-seconds)) ; Show message. |
| 2494 | (edebug-previous-result))) | 2500 | (edebug-previous-result))) |