[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/benchmarks b2f0a4e 4/6: Bug#31671 band-aid
From: |
Gemini Lasswell |
Subject: |
[Emacs-diffs] scratch/benchmarks b2f0a4e 4/6: Bug#31671 band-aid |
Date: |
Sun, 25 Nov 2018 20:11:15 -0500 (EST) |
branch: scratch/benchmarks
commit b2f0a4e86c6d13977ec2d57e4c282c7c849905cb
Author: Gemini Lasswell <address@hidden>
Commit: Gemini Lasswell <address@hidden>
Bug#31671 band-aid
---
lisp/emacs-lisp/debug.el | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 7fc2b41..4a0442e 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -169,14 +169,28 @@ first will be printed into the backtrace buffer."
(inhibit-redisplay
;; Don't really try to enter debugger within an eval from redisplay.
debugger-value)
- ((and (eq t (framep (selected-frame)))
- (equal "initial_terminal" (terminal-name)))
+ ((or (and (eq t (framep (selected-frame)))
+ (equal "initial_terminal" (terminal-name)))
+ (and (bound-and-true-p main-thread)
+ (not (eq main-thread (current-thread)))))
+ ;; Either:
;; We're in the initial-frame (where `message' just outputs to stdout) so
;; there's no tty or GUI frame to display the backtrace and interact with
- ;; it: just dump a backtrace to stdout.
+ ;; it.
+ ;;
;; This happens for example while handling an error in code from
;; early-init.el with --debug-init.
+ ;;
+ ;; Or:
+ ;; We're in a non-main thread, in which keyboard interaction is currently
+ ;; not implemented.
+ ;;
+ ;; So:
+ ;; Just dump a backtrace to stdout/Messages.
(message "Error: %S" args)
+ (when (and (bound-and-true-p main-thread)
+ (not (eq main-thread (current-thread))))
+ (message "Thread: %s" (current-thread)))
(let ((print-escape-newlines t)
(print-escape-control-characters t)
(print-level 8)
- [Emacs-diffs] branch scratch/benchmarks created (now e2b5f51), Gemini Lasswell, 2018/11/25
- [Emacs-diffs] scratch/benchmarks ef44d4b 2/6: Add per-symbol mutexes, Gemini Lasswell, 2018/11/25
- [Emacs-diffs] scratch/benchmarks b2f0a4e 4/6: Bug#31671 band-aid,
Gemini Lasswell <=
- [Emacs-diffs] scratch/benchmarks 632a12d 1/6: Add thread-safe messages and thread-safe queues, Gemini Lasswell, 2018/11/25
- [Emacs-diffs] scratch/benchmarks 40f179e 3/6: Instrument file descriptor mask code (bug#33198), Gemini Lasswell, 2018/11/25
- [Emacs-diffs] scratch/benchmarks e2b5f51 6/6: Create benchmark directory and add some benchmark tasks, Gemini Lasswell, 2018/11/25
- [Emacs-diffs] scratch/benchmarks 52c7cc8 5/6: Add ERB, a tool for running historical benchmarks, Gemini Lasswell, 2018/11/25