emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 703b1cf 08/12: Add check in list-threads for --with


From: Gemini Lasswell
Subject: [Emacs-diffs] master 703b1cf 08/12: Add check in list-threads for --without-threads configuration
Date: Sun, 9 Sep 2018 11:31:41 -0400 (EDT)

branch: master
commit 703b1cf9e232061648af11e9772d86895735158d
Author: Gemini Lasswell <address@hidden>
Commit: Gemini Lasswell <address@hidden>

    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.
---
 lisp/thread.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/thread.el b/lisp/thread.el
index c9f50ff..5320885 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]