aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/thread.c b/src/thread.c
index 551f3de10e4..7de260ee3c0 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -881,6 +881,25 @@ DEFUN ("all-threads", Fall_threads, Sall_threads, 0, 0, 0,
881 881
882 882
883 883
884int
885thread_check_current_buffer (struct buffer *buffer)
886{
887 struct thread_state *iter;
888
889 for (iter = all_threads; iter; iter = iter->next_thread)
890 {
891 if (iter == current_thread)
892 continue;
893
894 if (iter->m_current_buffer == buffer)
895 return 1;
896 }
897
898 return 0;
899}
900
901
902
884static void 903static void
885init_primary_thread (void) 904init_primary_thread (void)
886{ 905{