diff options
Diffstat (limited to 'src/thread.c')
| -rw-r--r-- | src/thread.c | 19 |
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 | ||
| 884 | int | ||
| 885 | thread_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 | |||
| 884 | static void | 903 | static void |
| 885 | init_primary_thread (void) | 904 | init_primary_thread (void) |
| 886 | { | 905 | { |