summaryrefslogtreecommitdiff
path: root/lisp/thread.el
diff options
context:
space:
mode:
authorGemini Lasswell <gazally@runbox.com>2018-08-23 12:19:04 -0700
committerGemini Lasswell <gazally@runbox.com>2018-09-09 07:41:50 -0700
commit703b1cf9e232061648af11e9772d86895735158d (patch)
treefd9d95507e6722715c9d8d5fb4980e676b32cb34 /lisp/thread.el
parente19ca77534002ae118acb707cf6313df1a908814 (diff)
downloademacs-703b1cf9e232061648af11e9772d86895735158d.tar.gz
Add check in list-threads for --without-threads configuration
* lisp/thread.el (list-threads): Signal an error if the Emacs configuration doesn't have threads.
Diffstat (limited to 'lisp/thread.el')
-rw-r--r--lisp/thread.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/thread.el b/lisp/thread.el
index c9f50ff5dba..53208851b78 100644
--- a/lisp/thread.el
+++ b/lisp/thread.el
@@ -82,6 +82,9 @@ An EVENT has the format
(defun list-threads ()
"Display a list of threads."
(interactive)
+ ;; Threads may not exist, if Emacs was configured --without-threads.
+ (unless (bound-and-true-p main-thread)
+ (error "Threads are not supported in this configuration"))
;; Generate the Threads list buffer, and switch to it.
(let ((buf (get-buffer-create "*Threads*")))
(with-current-buffer buf