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.
This commit is contained in:
Gemini Lasswell 2018-08-23 12:19:04 -07:00
parent e19ca77534
commit 703b1cf9e2

View file

@ -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