emacs/doc
Dmitry Gutov 07eb39f113 Allow thread's buffer to be killed, by default
* src/thread.c (Fmake_thread): Add new argument (bug#76969).
(thread_set_error): New function, extracted from thread-signal.
(Fthread_buffer_disposition): Add getter.
(Fthread_set_buffer_disposition): And setter.
(thread_check_current_buffer): Check the values of threads'
buffer_disposition.
(thread_all_before_buffer_killed): New function.
(init_threads): Set buffer_disposition to nil for the main thread.
(syms_of_threads): Add new symbols and define the error.

* src/thread.h (thread_state): New field buffer_disposition.
(thread_all_before_buffer_killed): Declare.

* src/buffer.c (Fkill_buffer): Call thread_check_current_buffer
one more time after all hooks and after that call
thread_all_before_buffer_killed.

* src/comp.c (ABI_VERSION): Increase the value.

* test/src/thread-tests.el (thread-buffer-disposition-t)
(thread-buffer-disposition-nil)
(thread-buffer-disposition-silently)
(thread-set-buffer-disposition)
(thread-set-buffer-disposition-main-thread): New tests.

* doc/lispref/threads.texi (Basic Thread Functions): Document
buffer-disposition in make-thread and its getter and setter.

* etc/NEWS: Add entry.
2025-08-09 22:40:07 +03:00
..
emacs Add 'other-window-backward' for a default binding (bug#78803) 2025-08-02 17:25:14 +03:00
lispintro ; Fix file name in "Loading Files" doc. 2025-07-24 22:13:47 -07:00
lispref Allow thread's buffer to be killed, by default 2025-08-09 22:40:07 +03:00
man Remove ctags program 2025-03-22 11:57:29 -07:00
misc Autoinsert: Allow condition to be a function 2025-08-09 13:35:48 +03:00
translations Update copyright year to 2025 2025-01-02 18:39:42 +01:00