emacs/doc
Stéphane Marks 0bee754a72 system-sleep sleep blocker and sleep/wake event package (bug#80348)
This package provides platform-neutral interfaces to block your
system from entering idle sleep and a hook to process pre-sleep
and post-wake events.

Implementations are for D-Bus on GNU/Linux, macOS/GNUstep, and
MS-Windows.

* lisp/system-sleep.el: New package.
* src/fns.c: Qpre_sleep, Qpost_wake: New DEFSYM.
* src/nsfns.m (Fns_block_system_sleep, Fns_unblock_system_sleep)
(syms_of_nsfns): New functions.
* src/nsterm.m (applicationDidFinishLaunching): Subscribe to
pre-sleep and post-wake notifications.
(systemWillSleep, systemDidWake): New function.
* src/w32fns.c (Fw32_block_system_sleep)
(Fw32_unblock_system_sleep, Fw32_system_sleep_block_count)
(sleep_notification_callback)
(w32_register_for_sleep_notifications): New function.
(syms_of_w32fns): Sw32_unblock_system_sleep
Sw32_block_system_sleep Sw32_system_sleep_block_count: New
defsubr.
* src/w32term.h (Fw32_block_system_sleep): New extern.
* src/w32term.c (w32_initialize): Call
w32_register_for_sleep_notifications.
* doc/lispref/os.texi: Document the system-sleep package.
* doc/lispref/commands.texi: Update sleep-event special
documentation.
* etc/NEWS: Announce the new package.
2026-02-11 09:52:38 +01:00
..
emacs Do cache and timed invalidation in "VC-aware" project backend 2026-02-10 02:54:14 +02:00
lispintro ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
lispref system-sleep sleep blocker and sleep/wake event package (bug#80348) 2026-02-11 09:52:38 +01:00
man ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
misc Support D-Bus file descriptor manipulation 2026-02-07 11:32:54 +01:00
translations ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00