patches: fix two more compile errors

- Remove f->child_frame_list (field does not exist in struct frame)
- Fix dangling else-if after goto label (skip_overlay_scan)
This commit is contained in:
2026-03-01 04:33:35 +01:00
parent 3d2fa7a54e
commit bc71e58123
9 changed files with 76 additions and 74 deletions

View File

@@ -1,4 +1,4 @@
From 19ab5ca41d38959b8f92ae2e1b7f724972515c3d Mon Sep 17 00:00:00 2001
From 8ef9b7f50f9ebb1c23e8e8bf2b5158e073b35e37 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 22:39:35 +0100
Subject: [PATCH 1/9] ns: integrate with macOS Zoom for cursor tracking
@@ -38,8 +38,8 @@ window splits, switches (C-x o), and completion frameworks.
---
etc/NEWS | 11 ++
src/nsterm.h | 6 ++
src/nsterm.m | 289 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 306 insertions(+)
src/nsterm.m | 287 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 304 insertions(+)
diff --git a/etc/NEWS b/etc/NEWS
index ef36df5..80661a9 100644
@@ -81,10 +81,10 @@ index 7c1ee4c..ea6e7ba 100644
}
diff --git a/src/nsterm.m b/src/nsterm.m
index 74e4ad5..eee4cd9 100644
index 74e4ad5..f7875b3 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1081,6 +1081,218 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
@@ -1081,6 +1081,216 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
}
@@ -266,9 +266,7 @@ index 74e4ad5..eee4cd9 100644
+
+ /* 2. Check child frame completions (Corfu, Company-box). */
+ struct frame *cf = NULL;
+ int cf_line = -1;
+ if (!NILP (f->child_frame_list))
+ cf_line = ns_zoom_find_child_frame_candidate (f, &cf);
+ int cf_line = ns_zoom_find_child_frame_candidate (f, &cf);
+ if (cf_line >= 0 && cf)
+ {
+ EmacsView *cv = FRAME_NS_VIEW (cf);
@@ -303,7 +301,7 @@ index 74e4ad5..eee4cd9 100644
static void
ns_update_end (struct frame *f)
/* --------------------------------------------------------------------------
@@ -1104,6 +1316,41 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
@@ -1104,6 +1314,41 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
unblock_input ();
ns_updating_frame = NULL;
@@ -345,7 +343,7 @@ index 74e4ad5..eee4cd9 100644
}
static void
@@ -3232,6 +3479,45 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
@@ -3232,6 +3477,45 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
/* Prevent the cursor from being drawn outside the text area. */
r = NSIntersectionRect (r, ns_row_rect (w, glyph_row, TEXT_AREA));
@@ -391,7 +389,7 @@ index 74e4ad5..eee4cd9 100644
ns_focus (f, NULL, 0);
NSGraphicsContext *ctx = [NSGraphicsContext currentContext];
@@ -8321,6 +8607,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
@@ -8321,6 +8605,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
windowClosing = NO;
processingCompose = NO;

View File

@@ -1,4 +1,4 @@
From 34602bfe4251677ac922f35cf02b3274c457d1d7 Mon Sep 17 00:00:00 2001
From 6e8cc407d6f407c2201a35438bab60b112a11c9e Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 2/9] ns: add accessibility base classes and text extraction
@@ -188,7 +188,7 @@ index ea6e7ba..6e830de 100644
diff --git a/src/nsterm.m b/src/nsterm.m
index eee4cd9..28ee1d5 100644
index f7875b3..cbfcf23 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -46,6 +46,7 @@ Updated by Christian Limpach (chris@nice.ch)
@@ -199,7 +199,7 @@ index eee4cd9..28ee1d5 100644
#include "systime.h"
#include "character.h"
#include "xwidget.h"
@@ -7142,6 +7143,430 @@ - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg
@@ -7140,6 +7141,430 @@ - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg
}
#endif
@@ -630,7 +630,7 @@ index eee4cd9..28ee1d5 100644
/* ==========================================================================
EmacsView implementation
@@ -11601,6 +12026,28 @@ Convert an X font name (XLFD) to an NS font name.
@@ -11599,6 +12024,28 @@ Convert an X font name (XLFD) to an NS font name.
DEFSYM (Qns_drag_operation_generic, "ns-drag-operation-generic");
DEFSYM (Qns_handle_drag_motion, "ns-handle-drag-motion");
@@ -659,7 +659,7 @@ index eee4cd9..28ee1d5 100644
Fput (Qalt, Qmodifier_value, make_fixnum (alt_modifier));
Fput (Qhyper, Qmodifier_value, make_fixnum (hyper_modifier));
Fput (Qmeta, Qmodifier_value, make_fixnum (meta_modifier));
@@ -11749,6 +12196,15 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
@@ -11747,6 +12194,15 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
This variable is ignored on Mac OS X < 10.7 and GNUstep. */);
ns_use_srgb_colorspace = YES;

View File

@@ -1,4 +1,4 @@
From 76f92d7c652350db9a7c0ded206c2e167094378b Mon Sep 17 00:00:00 2001
From aa788f7df93a3307f52cf10d16fe4af10eaae03d Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 3/9] ns: implement buffer accessibility element (core
@@ -22,10 +22,10 @@ line-by-line navigation, word/character announcements.
1 file changed, 1097 insertions(+)
diff --git a/src/nsterm.m b/src/nsterm.m
index 28ee1d5..c752bed 100644
index cbfcf23..62cc72d 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -7564,6 +7564,1103 @@ - (id)accessibilityTopLevelUIElement
@@ -7562,6 +7562,1103 @@ - (id)accessibilityTopLevelUIElement
@end

View File

@@ -1,4 +1,4 @@
From c3d8dd23094bf49eeba5beac414cfd4321011256 Mon Sep 17 00:00:00 2001
From 3da80e1c56c7270d458dfacd45e78e111359f526 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 4/9] ns: add buffer notification dispatch and mode-line
@@ -24,10 +24,10 @@ region selection feedback, completion popups, mode-line reading.
1 file changed, 545 insertions(+)
diff --git a/src/nsterm.m b/src/nsterm.m
index c752bed..d7e6660 100644
index 62cc72d..ab619ab 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8661,6 +8661,551 @@ - (NSRect)accessibilityFrame
@@ -8659,6 +8659,551 @@ - (NSRect)accessibilityFrame
@end

View File

@@ -1,4 +1,4 @@
From 19a7509084e919d229267f835d86c31d97fb9784 Mon Sep 17 00:00:00 2001
From 9e13d137b009d4c2ecd2b6f55afa672637e8d62c 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
@@ -17,10 +17,10 @@ Tested on macOS 14. Verified: Tab-cycling through org-mode links,
1 file changed, 286 insertions(+)
diff --git a/src/nsterm.m b/src/nsterm.m
index d7e6660..7fc542b 100644
index ab619ab..217f4f8 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -9206,6 +9206,292 @@ - (NSRect)accessibilityFrame
@@ -9204,6 +9204,292 @@ - (NSRect)accessibilityFrame
@end

View File

@@ -1,4 +1,4 @@
From ef42812ff2e18ac2492a679a47da350ace8fab54 Mon Sep 17 00:00:00 2001
From 8d882bfbad959b55915da0a43897acf2aca3b2ed Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 6/9] ns: integrate accessibility with EmacsView and redisplay
@@ -51,10 +51,10 @@ index 80661a9..2b1f9e6 100644
** Re-introduced dictation, lost in Emacs v30 (macOS).
We lost macOS dictation in v30 when migrating to NSTextInputClient.
diff --git a/src/nsterm.m b/src/nsterm.m
index 7fc542b..c35db76 100644
index 217f4f8..9de92fb 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1352,6 +1352,9 @@ so the visual offset is (ov_line + 1) * line_h from
@@ -1350,6 +1350,9 @@ so the visual offset is (ov_line + 1) * line_h from
if (view)
ns_zoom_track_completion (f, view);
#endif /* NS_IMPL_COCOA */
@@ -64,7 +64,7 @@ index 7fc542b..c35db76 100644
}
static void
@@ -7567,7 +7570,6 @@ - (id)accessibilityTopLevelUIElement
@@ -7565,7 +7568,6 @@ - (id)accessibilityTopLevelUIElement
@@ -72,7 +72,7 @@ index 7fc542b..c35db76 100644
static BOOL
ns_ax_find_completion_overlay_range (struct buffer *b, ptrdiff_t point,
ptrdiff_t *out_start,
@@ -8662,7 +8664,6 @@ - (NSRect)accessibilityFrame
@@ -8660,7 +8662,6 @@ - (NSRect)accessibilityFrame
@end
@@ -80,7 +80,7 @@ index 7fc542b..c35db76 100644
/* ===================================================================
EmacsAccessibilityBuffer (Notifications) — AX event dispatch
@@ -9207,7 +9208,6 @@ - (NSRect)accessibilityFrame
@@ -9205,7 +9206,6 @@ - (NSRect)accessibilityFrame
@end
@@ -88,7 +88,7 @@ index 7fc542b..c35db76 100644
/* ===================================================================
EmacsAccessibilityInteractiveSpan — helpers and implementation
=================================================================== */
@@ -9537,6 +9537,7 @@ - (void)dealloc
@@ -9535,6 +9535,7 @@ - (void)dealloc
[layer release];
#endif
@@ -96,7 +96,7 @@ index 7fc542b..c35db76 100644
[[self menu] release];
[super dealloc];
}
@@ -10885,6 +10886,32 @@ - (void)windowDidBecomeKey /* for direct calls */
@@ -10883,6 +10884,32 @@ - (void)windowDidBecomeKey /* for direct calls */
XSETFRAME (event.frame_or_window, emacsframe);
kbd_buffer_store_event (&event);
ns_send_appdefined (-1); // Kick main loop
@@ -129,7 +129,7 @@ index 7fc542b..c35db76 100644
}
@@ -12125,6 +12152,332 @@ - (int) fullscreenState
@@ -12123,6 +12150,332 @@ - (int) fullscreenState
return fs_state;
}

View File

@@ -1,4 +1,4 @@
From 58616020bbd9e088428e7fd76cc28c19c60cbe05 Mon Sep 17 00:00:00 2001
From 6eddc6fb5933f561e7459198e403519d1c7eecd0 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 7/9] doc: add VoiceOver accessibility section to macOS

View File

@@ -1,4 +1,4 @@
From 8c424f291b8a635e2b1cd7f3303bc726b5d21a8a Mon Sep 17 00:00:00 2001
From 5cd1b5f46e670f031ce5fcca2d9312059d6efa87 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 14:46:25 +0100
Subject: [PATCH 8/9] ns: announce overlay completion candidates for VoiceOver
@@ -45,8 +45,8 @@ Key implementation details:
Independent overlay branch, BUF_CHARS_MODIFF gating, candidate
---
src/nsterm.h | 1 +
src/nsterm.m | 315 ++++++++++++++++++++++++++++++++++++++++++++++-----
2 files changed, 285 insertions(+), 31 deletions(-)
src/nsterm.m | 319 +++++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 287 insertions(+), 33 deletions(-)
diff --git a/src/nsterm.h b/src/nsterm.h
index 6e830de..2102fb9 100644
@@ -61,10 +61,10 @@ index 6e830de..2102fb9 100644
@property (nonatomic, assign) BOOL cachedMarkActive;
@property (nonatomic, copy) NSString *cachedCompletionAnnouncement;
diff --git a/src/nsterm.m b/src/nsterm.m
index c35db76..7e34286 100644
index 9de92fb..7c44e9c 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -7156,11 +7156,154 @@ Accessibility virtual elements (macOS / Cocoa only)
@@ -7154,11 +7154,154 @@ Accessibility virtual elements (macOS / Cocoa only)
/* ---- Helper: extract buffer text for accessibility ---- */
@@ -220,7 +220,7 @@ index c35db76..7e34286 100644
static NSString *
ns_ax_buffer_text (struct window *w, ptrdiff_t *out_start,
ns_ax_visible_run **out_runs, NSUInteger *out_nruns)
@@ -7231,7 +7374,7 @@ Accessibility virtual elements (macOS / Cocoa only)
@@ -7229,7 +7372,7 @@ Accessibility virtual elements (macOS / Cocoa only)
/* Extract this visible run's text. Use
Fbuffer_substring_no_properties which correctly handles the
@@ -229,7 +229,7 @@ index c35db76..7e34286 100644
include garbage bytes when the run spans the gap position. */
Lisp_Object lstr = Fbuffer_substring_no_properties (
make_fixnum (pos), make_fixnum (run_end));
@@ -7312,7 +7455,7 @@ Mode lines using icon fonts (e.g. doom-modeline with nerd-font)
@@ -7310,7 +7453,7 @@ Mode lines using icon fonts (e.g. doom-modeline with nerd-font)
return NSZeroRect;
/* charpos_start and charpos_len are already in buffer charpos
@@ -238,7 +238,7 @@ index c35db76..7e34286 100644
charposForAccessibilityIndex which handles invisible text. */
ptrdiff_t cp_start = charpos_start;
ptrdiff_t cp_end = cp_start + charpos_len;
@@ -7791,6 +7934,7 @@ @implementation EmacsAccessibilityBuffer
@@ -7789,6 +7932,7 @@ @implementation EmacsAccessibilityBuffer
@synthesize cachedOverlayModiff;
@synthesize cachedTextStart;
@synthesize cachedModiff;
@@ -246,7 +246,7 @@ index c35db76..7e34286 100644
@synthesize cachedPoint;
@synthesize cachedMarkActive;
@synthesize cachedCompletionAnnouncement;
@@ -7888,7 +8032,7 @@ - (void)ensureTextCache
@@ -7886,7 +8030,7 @@ - (void)ensureTextCache
NSTRACE ("EmacsAccessibilityBuffer ensureTextCache");
/* This method is only called from the main thread (AX getters
dispatch_sync to main first). Reads of cachedText/cachedTextModiff
@@ -255,7 +255,7 @@ index c35db76..7e34286 100644
write section at the end needs synchronization to protect
against concurrent reads from AX server thread. */
eassert ([NSThread isMainThread]);
@@ -7901,16 +8045,15 @@ - (void)ensureTextCache
@@ -7899,16 +8043,15 @@ - (void)ensureTextCache
return;
ptrdiff_t modiff = BUF_MODIFF (b);
@@ -278,7 +278,7 @@ index c35db76..7e34286 100644
&& cachedTextStart == BUF_BEGV (b)
&& pt >= cachedTextStart
&& (textLen == 0
@@ -7927,7 +8070,6 @@ - (void)ensureTextCache
@@ -7925,7 +8068,6 @@ - (void)ensureTextCache
[cachedText release];
cachedText = [text retain];
cachedTextModiff = modiff;
@@ -286,7 +286,7 @@ index c35db76..7e34286 100644
cachedTextStart = start;
if (visibleRuns)
@@ -7992,7 +8134,7 @@ - (NSUInteger)accessibilityIndexForCharpos:(ptrdiff_t)charpos
@@ -7990,7 +8132,7 @@ - (NSUInteger)accessibilityIndexForCharpos:(ptrdiff_t)charpos
/* Binary search: runs are sorted by charpos (ascending). Find the
run whose [charpos, charpos+length) range contains the target,
or the nearest run after an invisible gap. O(log n) instead of
@@ -295,7 +295,7 @@ index c35db76..7e34286 100644
NSUInteger lo = 0, hi = visibleRunCount;
while (lo < hi)
{
@@ -8005,7 +8147,7 @@ - (NSUInteger)accessibilityIndexForCharpos:(ptrdiff_t)charpos
@@ -8003,7 +8145,7 @@ - (NSUInteger)accessibilityIndexForCharpos:(ptrdiff_t)charpos
else
{
/* Found: charpos is inside this run. Compute UTF-16 delta
@@ -304,7 +304,7 @@ index c35db76..7e34286 100644
NSUInteger chars_in = (NSUInteger)(charpos - r->charpos);
if (chars_in == 0 || !cachedText)
return r->ax_start;
@@ -8030,10 +8172,10 @@ - (NSUInteger)accessibilityIndexForCharpos:(ptrdiff_t)charpos
@@ -8028,10 +8170,10 @@ - (NSUInteger)accessibilityIndexForCharpos:(ptrdiff_t)charpos
/* Convert accessibility string index to buffer charpos.
Safe to call from any thread: uses only cachedText (NSString) and
@@ -317,7 +317,7 @@ index c35db76..7e34286 100644
@synchronized (self)
{
if (visibleRunCount == 0)
@@ -8067,7 +8209,7 @@ - (ptrdiff_t)charposForAccessibilityIndex:(NSUInteger)ax_idx
@@ -8065,7 +8207,7 @@ - (ptrdiff_t)charposForAccessibilityIndex:(NSUInteger)ax_idx
return cp;
}
}
@@ -326,7 +326,7 @@ index c35db76..7e34286 100644
if (lo > 0)
{
ns_ax_visible_run *last = &visibleRuns[visibleRunCount - 1];
@@ -8089,7 +8231,7 @@ - (ptrdiff_t)charposForAccessibilityIndex:(NSUInteger)ax_idx
@@ -8087,7 +8229,7 @@ - (ptrdiff_t)charposForAccessibilityIndex:(NSUInteger)ax_idx
deadlocking the AX server thread. This is prevented by:
1. validWindow checks WINDOW_LIVE_P and BUFFERP before every
@@ -335,7 +335,7 @@ index c35db76..7e34286 100644
2. All dispatch_sync blocks run on the main thread where no
concurrent Lisp code can modify state between checks.
3. block_input prevents timer events and process output from
@@ -8443,6 +8585,50 @@ - (NSInteger)accessibilityInsertionPointLineNumber
@@ -8441,6 +8583,50 @@ - (NSInteger)accessibilityInsertionPointLineNumber
return [self lineForAXIndex:point_idx];
}
@@ -386,7 +386,7 @@ index c35db76..7e34286 100644
- (NSRange)accessibilityRangeForLine:(NSInteger)line
{
if (![NSThread isMainThread])
@@ -8665,7 +8851,7 @@ - (NSRect)accessibilityFrame
@@ -8663,7 +8849,7 @@ - (NSRect)accessibilityFrame
/* ===================================================================
@@ -395,7 +395,7 @@ index c35db76..7e34286 100644
These methods notify VoiceOver of text and selection changes.
Called from the redisplay cycle (postAccessibilityUpdates).
@@ -8680,7 +8866,7 @@ - (void)postTextChangedNotification:(ptrdiff_t)point
@@ -8678,7 +8864,7 @@ - (void)postTextChangedNotification:(ptrdiff_t)point
if (point > self.cachedPoint
&& point - self.cachedPoint == 1)
{
@@ -404,7 +404,7 @@ index c35db76..7e34286 100644
[self invalidateTextCache];
[self ensureTextCache];
if (cachedText)
@@ -8699,7 +8885,7 @@ - (void)postTextChangedNotification:(ptrdiff_t)point
@@ -8697,7 +8883,7 @@ - (void)postTextChangedNotification:(ptrdiff_t)point
/* Update cachedPoint here so the selection-move branch does NOT
fire for point changes caused by edits. WebKit and Chromium
never send both ValueChanged and SelectedTextChanged for the
@@ -413,7 +413,7 @@ index c35db76..7e34286 100644
self.cachedPoint = point;
NSDictionary *change = @{
@@ -9032,14 +9218,81 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
@@ -9030,16 +9216,83 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
BOOL markActive = !NILP (BVAR (b, mark_active));
/* --- Text changed (edit) --- */
@@ -493,11 +493,15 @@ index c35db76..7e34286 100644
/* --- Cursor moved or selection changed ---
- Use 'else if' — edits and selection moves are mutually exclusive
+ Use 'else if' --- edits and selection moves are mutually exclusive
per the WebKit/Chromium pattern. */
else if (point != self.cachedPoint || markActive != self.cachedMarkActive)
- per the WebKit/Chromium pattern. */
- else if (point != self.cachedPoint || markActive != self.cachedMarkActive)
+ Independent check: the goto above may jump here from the overlay
+ branch, so this must be a standalone if, not else-if. */
+ if (point != self.cachedPoint || markActive != self.cachedMarkActive)
{
@@ -9209,7 +9462,7 @@ - (NSRect)accessibilityFrame
ptrdiff_t oldPoint = self.cachedPoint;
BOOL oldMarkActive = self.cachedMarkActive;
@@ -9207,7 +9460,7 @@ - (NSRect)accessibilityFrame
/* ===================================================================
@@ -506,7 +510,7 @@ index c35db76..7e34286 100644
=================================================================== */
/* Scan visible range of window W for interactive spans.
@@ -9417,7 +9670,7 @@ - (void) setAccessibilityFocused: (BOOL) focused
@@ -9415,7 +9668,7 @@ - (void) setAccessibilityFocused: (BOOL) focused
dispatch_async (dispatch_get_main_queue (), ^{
/* lwin is a Lisp_Object captured by value. This is GC-safe
because Lisp_Objects are tagged integers/pointers that
@@ -515,7 +519,7 @@ index c35db76..7e34286 100644
Emacs. The WINDOW_LIVE_P check below guards against the
window being deleted between capture and execution. */
if (!WINDOWP (lwin) || NILP (Fwindow_live_p (lwin)))
@@ -9443,7 +9696,7 @@ - (void) setAccessibilityFocused: (BOOL) focused
@@ -9441,7 +9694,7 @@ - (void) setAccessibilityFocused: (BOOL) focused
@end
@@ -524,7 +528,7 @@ index c35db76..7e34286 100644
Methods are kept here (same .m file) so they access the ivars
declared in the @interface ivar block. */
@implementation EmacsAccessibilityBuffer (InteractiveSpans)
@@ -12168,7 +12421,7 @@ - (int) fullscreenState
@@ -12166,7 +12419,7 @@ - (int) fullscreenState
if (WINDOW_LEAF_P (w))
{
@@ -533,7 +537,7 @@ index c35db76..7e34286 100644
EmacsAccessibilityBuffer *elem
= [existing objectForKey:[NSValue valueWithPointer:w]];
if (!elem)
@@ -12202,7 +12455,7 @@ - (int) fullscreenState
@@ -12200,7 +12453,7 @@ - (int) fullscreenState
}
else
{
@@ -542,7 +546,7 @@ index c35db76..7e34286 100644
Lisp_Object child = w->contents;
while (!NILP (child))
{
@@ -12314,7 +12567,7 @@ - (void)postAccessibilityUpdates
@@ -12312,7 +12565,7 @@ - (void)postAccessibilityUpdates
accessibilityUpdating = YES;
/* Detect window tree change (split, delete, new buffer). Compare
@@ -551,7 +555,7 @@ index c35db76..7e34286 100644
Lisp_Object curRoot = FRAME_ROOT_WINDOW (emacsframe);
if (!EQ (curRoot, lastRootWindow))
{
@@ -12323,12 +12576,12 @@ - (void)postAccessibilityUpdates
@@ -12321,12 +12574,12 @@ - (void)postAccessibilityUpdates
}
/* If tree is stale, rebuild FIRST so we don't iterate freed

View File

@@ -1,4 +1,4 @@
From 2a266c4f8af0277ccd5c7c1997232c2da4eb315c Mon Sep 17 00:00:00 2001
From 5db9f29f8a8fee97f01ae716f36f37c605dbd70d Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 16:01:29 +0100
Subject: [PATCH 9/9] ns: announce child frame completion candidates for
@@ -109,10 +109,10 @@ index 2102fb9..dd98d56 100644
@end
diff --git a/src/nsterm.m b/src/nsterm.m
index 7e34286..c25abfd 100644
index 7c44e9c..12c451b 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -7300,6 +7300,112 @@ visual line index for Zoom (skip whitespace-only lines
@@ -7298,6 +7298,112 @@ visual line index for Zoom (skip whitespace-only lines
return nil;
}
@@ -225,7 +225,7 @@ index 7e34286..c25abfd 100644
/* Build accessibility text for window W, skipping invisible text.
Populates *OUT_START with the buffer start charpos.
Populates *OUT_RUNS with an array of visible runs and *OUT_NRUNS
@@ -9037,6 +9143,7 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
@@ -9035,6 +9141,7 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
ptrdiff_t currentOverlayStart = 0;
ptrdiff_t currentOverlayEnd = 0;
@@ -233,7 +233,7 @@ index 7e34286..c25abfd 100644
specpdl_ref count2 = SPECPDL_INDEX ();
record_unwind_current_buffer ();
if (b != current_buffer)
@@ -9195,6 +9302,7 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
@@ -9193,6 +9300,7 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
self.cachedCompletionOverlayEnd = 0;
self.cachedCompletionPoint = 0;
}
@@ -241,7 +241,7 @@ index 7e34286..c25abfd 100644
}
/* ---- Notification dispatch (main entry point) ---- */
@@ -9791,6 +9899,10 @@ - (void)dealloc
@@ -9789,6 +9897,10 @@ - (void)dealloc
#endif
[accessibilityElements release];
@@ -252,7 +252,7 @@ index 7e34286..c25abfd 100644
[[self menu] release];
[super dealloc];
}
@@ -12551,6 +12663,80 @@ - (id)accessibilityFocusedUIElement
@@ -12549,6 +12661,80 @@ - (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. */
@@ -333,7 +333,7 @@ index 7e34286..c25abfd 100644
- (void)postAccessibilityUpdates
{
NSTRACE ("[EmacsView postAccessibilityUpdates]");
@@ -12561,11 +12747,59 @@ - (void)postAccessibilityUpdates
@@ -12559,11 +12745,59 @@ - (void)postAccessibilityUpdates
/* Re-entrance guard: VoiceOver callbacks during notification posting
can trigger redisplay, which calls ns_update_end, which calls us