patches: fix duplicate EmacsAccessibilityBuffer(InteractiveSpans)

Stub @implementation added in 0001 was never removed when 0004
added the full implementation, causing Clang to error:
  reimplementation of category 'InteractiveSpans'

Remove the stub block in 0004 (interactive span elements for Tab).
This commit is contained in:
2026-03-04 19:42:01 +01:00
parent ad868e0fab
commit abc518a60a
5 changed files with 69 additions and 51 deletions

View File

@@ -1,4 +1,4 @@
From 40650cf6d2272083b62c9a60b3ef61908c3b0092 Mon Sep 17 00:00:00 2001
From a6b1def9a83e23cc0e3325d795ac22b46eb16a5d Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Wed, 4 Mar 2026 15:23:56 +0100
Subject: [PATCH 9/9] ns: announce child frame completions to VoiceOver
@@ -155,7 +155,7 @@ index ff81675bb5..9ee6c86f18 100644
@end
diff --git a/src/nsterm.m b/src/nsterm.m
index 90c59c47b4..79a4fa371d 100644
index 209b8a0a1d..13696786ab 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1287,6 +1287,12 @@ If a completion candidate is selected (overlay or child frame),
@@ -304,7 +304,7 @@ index 90c59c47b4..79a4fa371d 100644
if (b != current_buffer)
set_buffer_internal_1 (b);
@@ -8600,6 +8721,11 @@ - (void)setAccessibilitySelectedTextRange:(NSRange)range
@@ -8589,6 +8710,11 @@ - (void)setAccessibilitySelectedTextRange:(NSRange)range
[self ensureTextCache];
@@ -316,7 +316,7 @@ index 90c59c47b4..79a4fa371d 100644
specpdl_ref count = SPECPDL_INDEX ();
record_unwind_current_buffer ();
/* Ensure block_input is always matched by unblock_input even if
@@ -9048,20 +9174,38 @@ - (void)postFocusedCursorNotification:(ptrdiff_t)point
@@ -9037,20 +9163,38 @@ - (void)postFocusedCursorNotification:(ptrdiff_t)point
&& granularity
== ns_ax_text_selection_granularity_character);
@@ -365,7 +365,7 @@ index 90c59c47b4..79a4fa371d 100644
ns_ax_post_notification_with_info (
self,
NSAccessibilitySelectedTextChangedNotification,
@@ -9161,12 +9305,17 @@ user expectation ("w" jumps to next word and reads it). */
@@ -9150,12 +9294,17 @@ user expectation ("w" jumps to next word and reads it). */
}
}
@@ -388,7 +388,7 @@ index 90c59c47b4..79a4fa371d 100644
if (cachedText
&& granularity == ns_ax_text_selection_granularity_line)
{
@@ -9231,6 +9380,11 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
@@ -9220,6 +9369,11 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
block_input ();
specpdl_ref count2 = SPECPDL_INDEX ();
@@ -400,7 +400,7 @@ index 90c59c47b4..79a4fa371d 100644
record_unwind_protect_void (unblock_input);
record_unwind_current_buffer ();
if (b != current_buffer)
@@ -9407,12 +9561,29 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
@@ -9396,12 +9550,29 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
if (!b)
return;
@@ -430,7 +430,7 @@ index 90c59c47b4..79a4fa371d 100644
if (modiff != self.cachedModiff)
{
self.cachedModiff = modiff;
@@ -9426,6 +9597,7 @@ Text property changes (e.g. face updates from
@@ -9415,6 +9586,7 @@ Text property changes (e.g. face updates from
{
self.cachedCharsModiff = chars_modiff;
[self postTextChangedNotification:point];
@@ -438,7 +438,7 @@ index 90c59c47b4..79a4fa371d 100644
}
}
@@ -9448,41 +9620,49 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
@@ -9437,41 +9609,49 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
displayed in the minibuffer. In normal editing buffers,
font-lock and other modes change BUF_OVERLAY_MODIFF on
every redisplay, triggering O(overlays) work per keystroke.
@@ -517,7 +517,7 @@ index 90c59c47b4..79a4fa371d 100644
/* --- Cursor moved or selection changed ---
Independent check from the overlay branch above. */
if (point != self.cachedPoint || markActive != self.cachedMarkActive)
@@ -9492,7 +9672,18 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
@@ -9481,7 +9661,18 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
self.cachedPoint = point;
self.cachedMarkActive = markActive;
@@ -537,7 +537,7 @@ index 90c59c47b4..79a4fa371d 100644
NSInteger direction = ns_ax_text_selection_direction_discontiguous;
if (point > oldPoint)
direction = ns_ax_text_selection_direction_next;
@@ -9511,6 +9702,7 @@ granularity hint (defaulting to unknown), which causes VoiceOver
@@ -9500,6 +9691,7 @@ granularity hint (defaulting to unknown), which causes VoiceOver
to make its own determination. Fresh text is always available
to VoiceOver via the AX getter path (accessibilityValue etc.). */
NSInteger granularity = ns_ax_text_selection_granularity_unknown;
@@ -545,7 +545,7 @@ index 90c59c47b4..79a4fa371d 100644
if (cachedText && oldPoint > 0)
{
NSUInteger tlen = [cachedText length];
@@ -9524,7 +9716,18 @@ to VoiceOver via the AX getter path (accessibilityValue etc.). */
@@ -9513,7 +9705,18 @@ to VoiceOver via the AX getter path (accessibilityValue etc.). */
NSRange newLine = [cachedText lineRangeForRange:
NSMakeRange (newIdx, 0)];
if (oldLine.location != newLine.location)
@@ -565,7 +565,7 @@ index 90c59c47b4..79a4fa371d 100644
else
{
NSUInteger dist = (newIdx > oldIdx
@@ -9546,38 +9749,23 @@ to VoiceOver via the AX getter path (accessibilityValue etc.). */
@@ -9535,38 +9738,23 @@ to VoiceOver via the AX getter path (accessibilityValue etc.). */
granularity = ns_ax_text_selection_granularity_line;
}
@@ -617,7 +617,7 @@ index 90c59c47b4..79a4fa371d 100644
{
NSWindow *win = [self.emacsView window];
if (win)
@@ -9736,6 +9924,13 @@ - (NSRect)accessibilityFrame
@@ -9725,6 +9913,13 @@ - (NSRect)accessibilityFrame
if (vis_start >= vis_end)
return @[];
@@ -631,7 +631,7 @@ index 90c59c47b4..79a4fa371d 100644
block_input ();
specpdl_ref blk_count = SPECPDL_INDEX ();
record_unwind_protect_void (unblock_input);
@@ -10043,6 +10238,10 @@ - (void)dealloc
@@ -10032,6 +10227,10 @@ - (void)dealloc
#endif
[accessibilityElements release];
@@ -642,7 +642,7 @@ index 90c59c47b4..79a4fa371d 100644
[[self menu] release];
[super dealloc];
}
@@ -11492,6 +11691,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
@@ -11481,6 +11680,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
windowClosing = NO;
processingCompose = NO;
@@ -652,7 +652,7 @@ index 90c59c47b4..79a4fa371d 100644
scrollbarsNeedingUpdate = 0;
fs_state = FULLSCREEN_NONE;
fs_before_fs = next_maximized = -1;
@@ -12800,6 +13002,156 @@ - (id)accessibilityFocusedUIElement
@@ -12789,6 +12991,156 @@ - (id)accessibilityFocusedUIElement
The existing elements carry cached state (modiff, point) from the
previous redisplay cycle. Rebuilding first would create fresh
elements with current values, making change detection impossible. */
@@ -809,7 +809,7 @@ index 90c59c47b4..79a4fa371d 100644
- (void)postAccessibilityUpdates
{
NSTRACE ("[EmacsView postAccessibilityUpdates]");
@@ -12810,11 +13162,69 @@ - (void)postAccessibilityUpdates
@@ -12799,11 +13151,69 @@ - (void)postAccessibilityUpdates
/* Re-entrance guard: VoiceOver callbacks during notification posting
can trigger redisplay, which calls ns_update_end, which calls us