patches: review pass 3 - move block_input to origin patches

block_input protection moved from P0008 to their respective origin
patches for independent compilability (GNU Emacs requirement):
- P0001 (ns_ax_buffer_text): now has block_input + record_unwind
- P0003 (postCompletionAnnouncementForBuffer): now has block_input
- P0004 (ns_ax_scan_interactive_spans): now has block_input

P0008 now only adds its own new functionality (child frame completion
announcements, echo area announcements) without duplicating block_input
from earlier patches.

All 9 patches apply cleanly with git am on Linux git 2.43.0.
This commit is contained in:
2026-03-02 18:55:33 +01:00
parent 6176087cfb
commit 6fd28e19a8
9 changed files with 97 additions and 105 deletions

View File

@@ -1,7 +1,7 @@
From e3c3878e65d8273e5fca97e942fe97ff3c5c113f Mon Sep 17 00:00:00 2001
From 589f1536255d1ad28552d8047387fbf3e9288235 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 5/9] ns: add interactive span elements for Tab navigation
Subject: [PATCH 4/8] ns: add interactive span elements for Tab navigation
* src/nsterm.m (ns_ax_scan_interactive_spans): New function; scans the
visible portion of a buffer for interactive text properties
@@ -14,14 +14,14 @@ elements with an AXPress action that sends a synthetic TAB keystroke.
(accessibilityChildrenInNavigationOrder): Return cached span array,
rebuilding lazily when interactiveSpansDirty is set.
---
src/nsterm.m | 287 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 287 insertions(+)
src/nsterm.m | 291 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 291 insertions(+)
diff --git a/src/nsterm.m b/src/nsterm.m
index cbf29694dd..e8bbc1ffe1 100644
index 9e0e317237..b460beb00c 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -9342,6 +9342,293 @@ - (NSRect)accessibilityFrame
@@ -9346,6 +9346,297 @@ - (NSRect)accessibilityFrame
@end
@@ -57,6 +57,10 @@ index cbf29694dd..e8bbc1ffe1 100644
+ if (vis_start >= vis_end)
+ return @[];
+
+ block_input ();
+ specpdl_ref blk_count = SPECPDL_INDEX ();
+ record_unwind_protect_void (unblock_input);
+
+ /* Symbols are interned once at startup via DEFSYM in syms_of_nsterm;
+ reference them directly here (GC-safe, no repeated obarray lookup). */
+