diff options
| author | Gemini Lasswell | 2018-09-07 17:41:24 -0700 |
|---|---|---|
| committer | Gemini Lasswell | 2018-09-09 07:41:50 -0700 |
| commit | b7719f0cdee4aa21dce16304d410f156c65011e2 (patch) | |
| tree | 1bfef591d95039216e6976cd56c17995ddb55700 | |
| parent | 8adc0e518fe36b6251d79ac61b6de9d4766a6afd (diff) | |
| download | emacs-b7719f0cdee4aa21dce16304d410f156c65011e2.tar.gz emacs-b7719f0cdee4aa21dce16304d410f156c65011e2.zip | |
Use thread-live-p instead of obsolete thread-alive-p
* lisp/thread.el (thread-list--get-status)
(thread-list--send-signal, thread-list-pop-to-backtrace)
(thread-list-backtrace--revert-hook-function)
(thread-list-backtrace--insert-header): Use thread-live-p instead of
thread-alive-p.
| -rw-r--r-- | lisp/thread.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/thread.el b/lisp/thread.el index 53208851b78..1c5dccf5ce4 100644 --- a/lisp/thread.el +++ b/lisp/thread.el | |||
| @@ -121,7 +121,7 @@ An EVENT has the format | |||
| 121 | Return a list of two strings, one describing THREAD's status, the | 121 | Return a list of two strings, one describing THREAD's status, the |
| 122 | other describing THREAD's blocker, if any." | 122 | other describing THREAD's blocker, if any." |
| 123 | (cond | 123 | (cond |
| 124 | ((not (thread-alive-p thread)) '("Finished" "")) | 124 | ((not (thread-live-p thread)) '("Finished" "")) |
| 125 | ((eq thread (current-thread)) '("Running" "")) | 125 | ((eq thread (current-thread)) '("Running" "")) |
| 126 | (t (if-let ((blocker (thread--blocker thread))) | 126 | (t (if-let ((blocker (thread--blocker thread))) |
| 127 | `("Blocked" ,(prin1-to-string blocker)) | 127 | `("Blocked" ,(prin1-to-string blocker)) |
| @@ -141,9 +141,9 @@ other describing THREAD's blocker, if any." | |||
| 141 | "Send the specified SIGNAL to the thread at point. | 141 | "Send the specified SIGNAL to the thread at point. |
| 142 | Ask for user confirmation before signaling the thread." | 142 | Ask for user confirmation before signaling the thread." |
| 143 | (let ((thread (tabulated-list-get-id))) | 143 | (let ((thread (tabulated-list-get-id))) |
| 144 | (if (thread-alive-p thread) | 144 | (if (thread-live-p thread) |
| 145 | (when (y-or-n-p (format "Send %s signal to %s? " signal thread)) | 145 | (when (y-or-n-p (format "Send %s signal to %s? " signal thread)) |
| 146 | (if (thread-alive-p thread) | 146 | (if (thread-live-p thread) |
| 147 | (thread-signal thread signal nil) | 147 | (thread-signal thread signal nil) |
| 148 | (message "This thread is no longer alive"))) | 148 | (message "This thread is no longer alive"))) |
| 149 | (message "This thread is no longer alive")))) | 149 | (message "This thread is no longer alive")))) |
| @@ -155,7 +155,7 @@ Ask for user confirmation before signaling the thread." | |||
| 155 | "Display the backtrace for the thread at point." | 155 | "Display the backtrace for the thread at point." |
| 156 | (interactive) | 156 | (interactive) |
| 157 | (let ((thread (tabulated-list-get-id))) | 157 | (let ((thread (tabulated-list-get-id))) |
| 158 | (if (thread-alive-p thread) | 158 | (if (thread-live-p thread) |
| 159 | (let ((buffer (get-buffer-create "*Thread Backtrace*"))) | 159 | (let ((buffer (get-buffer-create "*Thread Backtrace*"))) |
| 160 | (pop-to-buffer buffer) | 160 | (pop-to-buffer buffer) |
| 161 | (unless (derived-mode-p 'backtrace-mode) | 161 | (unless (derived-mode-p 'backtrace-mode) |
| @@ -172,7 +172,7 @@ Ask for user confirmation before signaling the thread." | |||
| 172 | 172 | ||
| 173 | (defun thread-list-backtrace--revert-hook-function () | 173 | (defun thread-list-backtrace--revert-hook-function () |
| 174 | (setq backtrace-frames | 174 | (setq backtrace-frames |
| 175 | (when (thread-alive-p thread-list-backtrace--thread) | 175 | (when (thread-live-p thread-list-backtrace--thread) |
| 176 | (mapcar #'thread-list--make-backtrace-frame | 176 | (mapcar #'thread-list--make-backtrace-frame |
| 177 | (backtrace--frames-from-thread | 177 | (backtrace--frames-from-thread |
| 178 | thread-list-backtrace--thread))))) | 178 | thread-list-backtrace--thread))))) |
| @@ -182,7 +182,7 @@ Ask for user confirmation before signaling the thread." | |||
| 182 | 182 | ||
| 183 | (defun thread-list-backtrace--insert-header () | 183 | (defun thread-list-backtrace--insert-header () |
| 184 | (let ((name (thread-list--name thread-list-backtrace--thread))) | 184 | (let ((name (thread-list--name thread-list-backtrace--thread))) |
| 185 | (if (thread-alive-p thread-list-backtrace--thread) | 185 | (if (thread-live-p thread-list-backtrace--thread) |
| 186 | (progn | 186 | (progn |
| 187 | (insert (substitute-command-keys "Backtrace for thread `")) | 187 | (insert (substitute-command-keys "Backtrace for thread `")) |
| 188 | (insert name) | 188 | (insert name) |