Function: edebug-bounce-to-previous-value

edebug-bounce-to-previous-value is an interactive and byte-compiled function defined in edebug.el.gz.

Signature

(edebug-bounce-to-previous-value ARG)

Documentation

Bounce point to previous value in the outside current buffer.

The previous value is what Edebug has evaluated before its last stop point or what you have evaluated in the context outside of Edebug, for example, by calling function edebug-eval-expression, whatever comes later. If prefix argument ARG is supplied, sit for that many seconds before returning. The default is one second.

View in manual

Probably introduced at or before Emacs version 31.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/edebug.el.gz
(defun edebug-bounce-to-previous-value (arg)
  "Bounce point to previous value in the outside current buffer.
The previous value is what Edebug has evaluated before its last stop
point or what you have evaluated in the context outside of Edebug, for
example, by calling function `edebug-eval-expression', whatever comes
later.
If prefix argument ARG is supplied, sit for that many seconds before
returning.  The default is one second."
  (interactive "p")
  (if (not edebug-active)
      (error "Edebug is not active"))
  (if (not (integer-or-marker-p edebug-previous-value))
      (error "Previous value not a number or marker"))
  (save-excursion
    ;; If the buffer's currently displayed, avoid set-window-configuration.
    (save-window-excursion
      (let ((point-info ""))
        (edebug-pop-to-buffer edebug-outside-buffer)
        (cond
         ((< edebug-previous-value (point-min))
          (setq point-info (format " (< Point min: %s)" (point-min))))
         ((> edebug-previous-value (point-max))
          (setq point-info (format " (> Point max: %s)" (point-max))))
         ((invisible-p edebug-previous-value)
          (setq point-info (format " (invisible)"))))
        (goto-char edebug-previous-value)
        (message "Current buffer: %s Point: %s%s"
                 (current-buffer) edebug-previous-value point-info)
        (sit-for arg)
        (edebug-pop-to-buffer edebug-buffer (car edebug-window-data))))))