summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/edebug.el
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>2015-04-05 08:36:56 -0400
committerRichard Stallman <rms@gnu.org>2015-04-05 08:42:43 -0400
commit4e23cd0ccde4ad1e14fe2870ccf140487af649b2 (patch)
treeb709ac1e92a892f6ec1faa85eb59a9e5960c25dd /lisp/emacs-lisp/edebug.el
parentdca743f0941909a80e3f28c023977120b6203e20 (diff)
parent16eec6fc55dcc05d1d819f18998e84a9580b2521 (diff)
downloademacs-4e23cd0ccde4ad1e14fe2870ccf140487af649b2.tar.gz
emacs-4e23cd0ccde4ad1e14fe2870ccf140487af649b2.tar.bz2
emacs-4e23cd0ccde4ad1e14fe2870ccf140487af649b2.zip
* mail/rmail.el (rmail-show-message-1): When displaying a mime message,
indicate start and finish in the echo area. * mail/rmail.el (rmail-epa-decrypt): Disregard <pre> before armor. Ignore more kinds of whitespace in mime headers. Modify the decrypted mime part's mime type so it will be displayed by default when visiting this message again. * net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc. (browse-url-firefox-arguments) (browse-url-firefox-startup-arguments): Doc fix.
Diffstat (limited to 'lisp/emacs-lisp/edebug.el')
-rw-r--r--lisp/emacs-lisp/edebug.el71
1 files changed, 21 insertions, 50 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 7faa101299e..aa7cdf96337 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -2358,6 +2358,12 @@ MSG is printed after `::::} '."
(defalias 'edebug-mark-marker 'mark-marker)
(defun edebug--display (value offset-index arg-mode)
+ ;; edebug--display-1 is too big, we should split it. This function
+ ;; here was just introduced to avoid making edebug--display-1
+ ;; yet a bit deeper.
+ (save-excursion (edebug--display-1 value offset-index arg-mode)))
+
+(defun edebug--display-1 (value offset-index arg-mode)
(unless (marker-position edebug-def-mark)
;; The buffer holding the source has been killed.
;; Let's at least show a backtrace so the user can figure out
@@ -2440,18 +2446,6 @@ MSG is printed after `::::} '."
edebug-function)
))
- (setcdr edebug-window-data
- (edebug-adjust-window (cdr edebug-window-data)))
-
- ;; Test if there is input, not including keyboard macros.
- (if (input-pending-p)
- (progn
- (setq edebug-execution-mode 'step
- edebug-stop t)
- (edebug-stop)
- ;; (discard-input) ; is this unfriendly??
- ))
-
;; Make sure we bind those in the right buffer (bug#16410).
(let ((overlay-arrow-position overlay-arrow-position)
(overlay-arrow-string overlay-arrow-string))
@@ -2504,14 +2498,18 @@ MSG is printed after `::::} '."
((eq edebug-execution-mode 'Trace-fast)
(sit-for 0))) ; Force update and continue.
+ (when (input-pending-p)
+ (setq edebug-stop t)
+ (setq edebug-execution-mode 'step) ; for `edebug-overlay-arrow'
+ (edebug-stop))
+
+ (edebug-overlay-arrow)
+
(unwind-protect
(if (or edebug-stop
(memq edebug-execution-mode '(step next))
(eq arg-mode 'error))
- (progn
- ;; (setq edebug-execution-mode 'step)
- ;; (edebug-overlay-arrow) ; This doesn't always show up.
- (edebug--recursive-edit arg-mode))) ; <--- Recursive edit
+ (edebug--recursive-edit arg-mode)) ; <--- Recursive edit
;; Reset the edebug-window-data to whatever it is now.
(let ((window (if (eq (window-buffer) edebug-buffer)
@@ -2671,12 +2669,6 @@ MSG is printed after `::::} '."
(defining-kbd-macro
(if edebug-continue-kbd-macro defining-kbd-macro))
- ;; Disable command hooks. This is essential when
- ;; a hook function is instrumented - to avoid infinite loop.
- ;; This may be more than we need, however.
- (pre-command-hook nil)
- (post-command-hook nil)
-
;; others??
)
@@ -2705,8 +2697,9 @@ MSG is printed after `::::} '."
(if (buffer-name edebug-buffer) ; if it still exists
(progn
(set-buffer edebug-buffer)
- (if (memq edebug-execution-mode '(go Go-nonstop))
- (edebug-overlay-arrow))
+ (when (memq edebug-execution-mode '(go Go-nonstop))
+ (edebug-overlay-arrow)
+ (sit-for 0))
(edebug-mode -1))
;; gotta have a buffer to let its buffer local variables be set
(get-buffer-create " bogus edebug buffer"))
@@ -2716,31 +2709,6 @@ MSG is printed after `::::} '."
;;; Display related functions
-(defun edebug-adjust-window (old-start)
- ;; If pos is not visible, adjust current window to fit following context.
- ;; (message "window: %s old-start: %s window-start: %s pos: %s"
- ;; (selected-window) old-start (window-start) (point)) (sit-for 5)
- (if (not (pos-visible-in-window-p))
- (progn
- ;; First try old-start
- (if old-start
- (set-window-start (selected-window) old-start))
- (if (not (pos-visible-in-window-p))
- (progn
- ;; (message "resetting window start") (sit-for 2)
- (set-window-start
- (selected-window)
- (save-excursion
- (forward-line
- (if (< (point) (window-start)) -1 ; one line before if in back
- (- (/ (window-height) 2)) ; center the line moving forward
- ))
- (beginning-of-line)
- (point)))))))
- (window-start))
-
-
-
(defconst edebug-arrow-alist
'((Continue-fast . "=")
(Trace-fast . "-")
@@ -2749,7 +2717,7 @@ MSG is printed after `::::} '."
(step . "=>")
(next . "=>")
(go . "<>")
- (Go-nonstop . "..") ; not used
+ (Go-nonstop . "..")
)
"Association list of arrows for each edebug mode.")
@@ -3317,6 +3285,9 @@ Return the result of the last expression."
;; Restore outside context.
(setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w)
(unwind-protect
+ ;; FIXME: This restoring of edebug-outside-buffer and
+ ;; edebug-outside-point is redundant now that backtrace-eval does it
+ ;; for us.
(with-current-buffer edebug-outside-buffer ; of edebug-buffer
(goto-char edebug-outside-point)
(if (marker-buffer (edebug-mark-marker))