summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/debug.el
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2018-12-27 10:29:02 +0100
committerMartin Rudalics <rudalics@gmx.at>2018-12-27 10:29:02 +0100
commit091450811b983a8cdd765c25eb347238d9a4c633 (patch)
tree11999bad54e2f49cd31ba57f36aac42ea86a3546 /lisp/emacs-lisp/debug.el
parent806ae9fc48f59751a8fce543be40ffe473f548bf (diff)
downloademacs-091450811b983a8cdd765c25eb347238d9a4c633.tar.gz
Fix last change of debug.el
* lisp/emacs-lisp/debug.el (debug): In noninteractive calls do the buffer text truncation in the debugger buffer.
Diffstat (limited to 'lisp/emacs-lisp/debug.el')
-rw-r--r--lisp/emacs-lisp/debug.el38
1 files changed, 19 insertions, 19 deletions
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 5c186f70197..3affa9cbdd8 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -239,23 +239,23 @@ first will be printed into the backtrace buffer."
(with-current-buffer debugger-buffer
(unless (derived-mode-p 'debugger-mode)
(debugger-mode))
- (debugger-setup-buffer debugger-args))
- (when noninteractive
- ;; If the backtrace is long, save the beginning
- ;; and the end, but discard the middle.
- (when (> (count-lines (point-min) (point-max))
- debugger-batch-max-lines)
+ (debugger-setup-buffer debugger-args)
+ (when noninteractive
+ ;; If the backtrace is long, save the beginning
+ ;; and the end, but discard the middle.
+ (when (> (count-lines (point-min) (point-max))
+ debugger-batch-max-lines)
+ (goto-char (point-min))
+ (forward-line (/ 2 debugger-batch-max-lines))
+ (let ((middlestart (point)))
+ (goto-char (point-max))
+ (forward-line (- (/ 2 debugger-batch-max-lines)
+ debugger-batch-max-lines))
+ (delete-region middlestart (point)))
+ (insert "...\n"))
(goto-char (point-min))
- (forward-line (/ 2 debugger-batch-max-lines))
- (let ((middlestart (point)))
- (goto-char (point-max))
- (forward-line (- (/ 2 debugger-batch-max-lines)
- debugger-batch-max-lines))
- (delete-region middlestart (point)))
- (insert "...\n"))
- (goto-char (point-min))
- (message "%s" (buffer-string))
- (kill-emacs -1))
+ (message "%s" (buffer-string))
+ (kill-emacs -1)))
(pop-to-buffer
debugger-buffer
`((display-buffer-reuse-window
@@ -264,9 +264,9 @@ first will be printed into the backtrace buffer."
. ((window-min-height . 10)
(window-height . fit-window-to-buffer)
,@(when (and (window-live-p debugger-previous-window)
- (frame-visible-p
- (window-frame debugger-previous-window)))
- `((previous-window . ,debugger-previous-window))))))
+ (frame-visible-p
+ (window-frame debugger-previous-window)))
+ `((previous-window . ,debugger-previous-window))))))
(setq debugger-window (selected-window))
(if (eq debugger-previous-window debugger-window)
(when debugger-jumping-flag