patches: fix remaining line-length violations and doc string corruption

- Correct three pre-existing DEFVAR_BOOL doc strings (ns-use-native-
  fullscreen, ns-use-mwheel-acceleration, ns-use-mwheel-momentum) that
  were accidentally modified by an earlier rebase; restore original text
- Break @property line in nsterm.h to 79 chars
- Replace em-dash with --- and break 80-char comment line in patch 0004
This commit is contained in:
2026-03-01 10:05:49 +01:00
parent 71c81abcae
commit f108952af1
8 changed files with 50 additions and 71 deletions

View File

@@ -1,4 +1,4 @@
From 63788743619d25f4f41cb90b2eea5b48e0fcbc15 Mon Sep 17 00:00:00 2001 From 18e509b9307d232559549da448be008bed11d03c Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz> From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100 Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 1/8] ns: add accessibility base classes and text extraction Subject: [PATCH 1/8] ns: add accessibility base classes and text extraction
@@ -28,15 +28,15 @@ rect via glyph matrix.
ns-accessibility-enabled with corrected doc: initial value is nil, ns-accessibility-enabled with corrected doc: initial value is nil,
set non-nil automatically when an AT is detected at startup. set non-nil automatically when an AT is detected at startup.
--- ---
src/nsterm.h | 130 +++++++++++++++ src/nsterm.h | 131 +++++++++++++++
src/nsterm.m | 462 ++++++++++++++++++++++++++++++++++++++++++++++++++- src/nsterm.m | 456 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 589 insertions(+), 3 deletions(-) 2 files changed, 587 insertions(+)
diff --git a/src/nsterm.h b/src/nsterm.h diff --git a/src/nsterm.h b/src/nsterm.h
index ea6e7ba..7adbb92 100644 index ea6e7ba..5746e9e 100644
--- a/src/nsterm.h --- a/src/nsterm.h
+++ b/src/nsterm.h +++ b/src/nsterm.h
@@ -453,6 +453,123 @@ enum ns_return_frame_mode @@ -453,6 +453,124 @@ enum ns_return_frame_mode
@end @end
@@ -144,7 +144,8 @@ index ea6e7ba..7adbb92 100644
+@property (nonatomic, assign) EmacsAXSpanType spanType; +@property (nonatomic, assign) EmacsAXSpanType spanType;
+@property (nonatomic, copy) NSString *spanLabel; +@property (nonatomic, copy) NSString *spanLabel;
+@property (nonatomic, copy) NSString *spanValue; +@property (nonatomic, copy) NSString *spanValue;
+@property (nonatomic, unsafe_unretained) EmacsAccessibilityBuffer *parentBuffer; +@property (nonatomic, unsafe_unretained)
+ EmacsAccessibilityBuffer *parentBuffer;
+ +
+- (NSAccessibilityRole) accessibilityRole; +- (NSAccessibilityRole) accessibilityRole;
+- (NSString *) accessibilityLabel; +- (NSString *) accessibilityLabel;
@@ -160,7 +161,7 @@ index ea6e7ba..7adbb92 100644
/* ========================================================================== /* ==========================================================================
The main Emacs view The main Emacs view
@@ -471,6 +588,12 @@ enum ns_return_frame_mode @@ -471,6 +589,12 @@ enum ns_return_frame_mode
#ifdef NS_IMPL_COCOA #ifdef NS_IMPL_COCOA
char *old_title; char *old_title;
BOOL maximizing_resize; BOOL maximizing_resize;
@@ -173,7 +174,7 @@ index ea6e7ba..7adbb92 100644
#endif #endif
BOOL font_panel_active; BOOL font_panel_active;
NSFont *font_panel_result; NSFont *font_panel_result;
@@ -534,6 +657,13 @@ enum ns_return_frame_mode @@ -534,6 +658,13 @@ enum ns_return_frame_mode
- (void)windowWillExitFullScreen; - (void)windowWillExitFullScreen;
- (void)windowDidExitFullScreen; - (void)windowDidExitFullScreen;
- (void)windowDidBecomeKey; - (void)windowDidBecomeKey;
@@ -188,7 +189,7 @@ index ea6e7ba..7adbb92 100644
diff --git a/src/nsterm.m b/src/nsterm.m diff --git a/src/nsterm.m b/src/nsterm.m
index fc75910..e9ebac0 100644 index fc75910..852e7f9 100644
--- a/src/nsterm.m --- a/src/nsterm.m
+++ b/src/nsterm.m +++ b/src/nsterm.m
@@ -46,6 +46,7 @@ Updated by Christian Limpach (chris@nice.ch) @@ -46,6 +46,7 @@ Updated by Christian Limpach (chris@nice.ch)
@@ -659,16 +660,7 @@ index fc75910..e9ebac0 100644
Fput (Qalt, Qmodifier_value, make_fixnum (alt_modifier)); Fput (Qalt, Qmodifier_value, make_fixnum (alt_modifier));
Fput (Qhyper, Qmodifier_value, make_fixnum (hyper_modifier)); Fput (Qhyper, Qmodifier_value, make_fixnum (hyper_modifier));
Fput (Qmeta, Qmodifier_value, make_fixnum (meta_modifier)); Fput (Qmeta, Qmodifier_value, make_fixnum (meta_modifier));
@@ -11797,7 +12244,7 @@ Convert an X font name (XLFD) to an NS font name. @@ -11813,6 +12260,15 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
doc: /* Non-nil means to use native fullscreen on Mac OS X 10.7 and later.
Nil means use fullscreen the old (< 10.7) way. The old way works better with
multiple monitors, but lacks tool bar. This variable is ignored on
-Mac OS X < 10.7. Default is t. */);
+Mac OS X < 10.7. Default is nil. Set to t to enable VoiceOver support. */);
ns_use_native_fullscreen = YES;
ns_last_use_native_fullscreen = ns_use_native_fullscreen;
@@ -11813,10 +12260,19 @@ 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. */); This variable is ignored on Mac OS X < 10.7 and GNUstep. */);
ns_use_srgb_colorspace = YES; ns_use_srgb_colorspace = YES;
@@ -684,20 +676,6 @@ index fc75910..e9ebac0 100644
DEFVAR_BOOL ("ns-use-mwheel-acceleration", DEFVAR_BOOL ("ns-use-mwheel-acceleration",
ns_use_mwheel_acceleration, ns_use_mwheel_acceleration,
doc: /* Non-nil means use macOS's standard mouse wheel acceleration. doc: /* Non-nil means use macOS's standard mouse wheel acceleration.
-This variable is ignored on macOS < 10.7 and GNUstep. Default is t. */);
+This variable is ignored on macOS < 10.7 and GNUstep. Default is nil. Set to t to enable VoiceOver support. */);
ns_use_mwheel_acceleration = YES;
DEFVAR_LISP ("ns-mwheel-line-height", ns_mwheel_line_height,
@@ -11827,7 +12283,7 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
DEFVAR_BOOL ("ns-use-mwheel-momentum", ns_use_mwheel_momentum,
doc: /* Non-nil means mouse wheel scrolling uses momentum.
-This variable is ignored on macOS < 10.7 and GNUstep. Default is t. */);
+This variable is ignored on macOS < 10.7 and GNUstep. Default is nil. Set to t to enable VoiceOver support. */);
ns_use_mwheel_momentum = YES;
/* TODO: Move to common code. */
-- --
2.43.0 2.43.0

View File

@@ -1,4 +1,4 @@
From 5273b52fe8e4c596574eff4392416d30c2942b7d Mon Sep 17 00:00:00 2001 From 53141d7302932cdf7b4141c9617dd5eca68a14b6 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz> From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100 Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 2/8] ns: implement buffer accessibility element (core Subject: [PATCH 2/8] ns: implement buffer accessibility element (core
@@ -27,7 +27,7 @@ loop is safe: it runs only on actual character modifications.
1 file changed, 1127 insertions(+) 1 file changed, 1127 insertions(+)
diff --git a/src/nsterm.m b/src/nsterm.m diff --git a/src/nsterm.m b/src/nsterm.m
index e9ebac0..64a6011 100644 index 852e7f9..3e1ac74 100644
--- a/src/nsterm.m --- a/src/nsterm.m
+++ b/src/nsterm.m +++ b/src/nsterm.m
@@ -7631,6 +7631,1133 @@ - (id)accessibilityTopLevelUIElement @@ -7631,6 +7631,1133 @@ - (id)accessibilityTopLevelUIElement

View File

@@ -1,4 +1,4 @@
From 5f8b5394ec9bfdd344dbc10aee7514b1891b00d8 Mon Sep 17 00:00:00 2001 From 5d1917d141ffb41a7d4e0c2d17633466cf8e506f Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz> From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100 Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 3/8] ns: add buffer notification dispatch and mode-line Subject: [PATCH 3/8] ns: add buffer notification dispatch and mode-line
@@ -26,7 +26,7 @@ mode line.
1 file changed, 546 insertions(+) 1 file changed, 546 insertions(+)
diff --git a/src/nsterm.m b/src/nsterm.m diff --git a/src/nsterm.m b/src/nsterm.m
index 64a6011..350111a 100644 index 3e1ac74..d3015e2 100644
--- a/src/nsterm.m --- a/src/nsterm.m
+++ b/src/nsterm.m +++ b/src/nsterm.m
@@ -8758,6 +8758,552 @@ - (NSRect)accessibilityFrame @@ -8758,6 +8758,552 @@ - (NSRect)accessibilityFrame

View File

@@ -1,4 +1,4 @@
From 9c7e408085f52f1e44b6cb71e64448162e5c3e68 Mon Sep 17 00:00:00 2001 From 45e436cf80b9adb67972bd1f5953ced3c90c0b61 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz> From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100 Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 4/8] ns: add interactive span elements for Tab navigation Subject: [PATCH 4/8] ns: add interactive span elements for Tab navigation
@@ -14,14 +14,14 @@ elements with an AXPress action that sends a synthetic TAB keystroke.
(accessibilityChildrenInNavigationOrder): Return cached span array, (accessibilityChildrenInNavigationOrder): Return cached span array,
rebuilding lazily when interactiveSpansDirty is set. rebuilding lazily when interactiveSpansDirty is set.
--- ---
src/nsterm.m | 286 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/nsterm.m | 287 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 286 insertions(+) 1 file changed, 287 insertions(+)
diff --git a/src/nsterm.m b/src/nsterm.m diff --git a/src/nsterm.m b/src/nsterm.m
index 350111a..992a5ce 100644 index d3015e2..6d3b87a 100644
--- a/src/nsterm.m --- a/src/nsterm.m
+++ b/src/nsterm.m +++ b/src/nsterm.m
@@ -9304,6 +9304,292 @@ - (NSRect)accessibilityFrame @@ -9304,6 +9304,293 @@ - (NSRect)accessibilityFrame
@end @end
@@ -219,7 +219,8 @@ index 350111a..992a5ce 100644
+- (BOOL) isAccessibilityFocused +- (BOOL) isAccessibilityFocused
+{ +{
+ /* Read the cached point stored by EmacsAccessibilityBuffer on the main + /* Read the cached point stored by EmacsAccessibilityBuffer on the main
+ thread safe to read from any thread (plain ptrdiff_t, no Lisp calls). */ + thread --- safe to read from any thread (plain ptrdiff_t,
+ no Lisp calls). */
+ EmacsAccessibilityBuffer *pb = self.parentBuffer; + EmacsAccessibilityBuffer *pb = self.parentBuffer;
+ if (!pb) + if (!pb)
+ return NO; + return NO;

View File

@@ -1,4 +1,4 @@
From 0e8d5540c8993b2e91c437d20e47e7abeb12543f Mon Sep 17 00:00:00 2001 From bd3036ae2bd5740e8275637bb32c674ed11c210f Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz> From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100 Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 5/8] ns: integrate accessibility with EmacsView and redisplay Subject: [PATCH 5/8] ns: integrate accessibility with EmacsView and redisplay
@@ -51,7 +51,7 @@ index 80661a9..2b1f9e6 100644
** Re-introduced dictation, lost in Emacs v30 (macOS). ** Re-introduced dictation, lost in Emacs v30 (macOS).
We lost macOS dictation in v30 when migrating to NSTextInputClient. We lost macOS dictation in v30 when migrating to NSTextInputClient.
diff --git a/src/nsterm.m b/src/nsterm.m diff --git a/src/nsterm.m b/src/nsterm.m
index 992a5ce..d9b8ecd 100644 index 6d3b87a..7574da4 100644
--- a/src/nsterm.m --- a/src/nsterm.m
+++ b/src/nsterm.m +++ b/src/nsterm.m
@@ -1275,7 +1275,7 @@ If a completion candidate is selected (overlay or child frame), @@ -1275,7 +1275,7 @@ If a completion candidate is selected (overlay or child frame),
@@ -173,7 +173,7 @@ index 992a5ce..d9b8ecd 100644
/* =================================================================== /* ===================================================================
EmacsAccessibilityInteractiveSpan — helpers and implementation EmacsAccessibilityInteractiveSpan — helpers and implementation
=================================================================== */ =================================================================== */
@@ -9635,6 +9683,7 @@ - (void)dealloc @@ -9636,6 +9684,7 @@ - (void)dealloc
[layer release]; [layer release];
#endif #endif
@@ -181,7 +181,7 @@ index 992a5ce..d9b8ecd 100644
[[self menu] release]; [[self menu] release];
[super dealloc]; [super dealloc];
} }
@@ -10983,6 +11032,32 @@ - (void)windowDidBecomeKey /* for direct calls */ @@ -10984,6 +11033,32 @@ - (void)windowDidBecomeKey /* for direct calls */
XSETFRAME (event.frame_or_window, emacsframe); XSETFRAME (event.frame_or_window, emacsframe);
kbd_buffer_store_event (&event); kbd_buffer_store_event (&event);
ns_send_appdefined (-1); // Kick main loop ns_send_appdefined (-1); // Kick main loop
@@ -214,7 +214,7 @@ index 992a5ce..d9b8ecd 100644
} }
@@ -12220,6 +12295,332 @@ - (int) fullscreenState @@ -12221,6 +12296,332 @@ - (int) fullscreenState
return fs_state; return fs_state;
} }
@@ -547,7 +547,7 @@ index 992a5ce..d9b8ecd 100644
@end /* EmacsView */ @end /* EmacsView */
@@ -14220,12 +14621,17 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with @@ -14221,12 +14622,17 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
ns_use_srgb_colorspace = YES; ns_use_srgb_colorspace = YES;
DEFVAR_BOOL ("ns-accessibility-enabled", ns_accessibility_enabled, DEFVAR_BOOL ("ns-accessibility-enabled", ns_accessibility_enabled,

View File

@@ -1,4 +1,4 @@
From 4b77c5a182863322da1d42b4f4f2ba5a2ce7179d Mon Sep 17 00:00:00 2001 From c30855d5c11e33c954fb055f97be4bafccee2576 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz> From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 12:58:11 +0100 Date: Sat, 28 Feb 2026 12:58:11 +0100
Subject: [PATCH 6/8] doc: add VoiceOver accessibility section to macOS Subject: [PATCH 6/8] doc: add VoiceOver accessibility section to macOS
@@ -110,10 +110,10 @@ index 6bd334f..6514dfc 100644
@section GNUstep Support @section GNUstep Support
diff --git a/src/nsterm.m b/src/nsterm.m diff --git a/src/nsterm.m b/src/nsterm.m
index d9b8ecd..7d48e6b 100644 index 7574da4..426b029 100644
--- a/src/nsterm.m --- a/src/nsterm.m
+++ b/src/nsterm.m +++ b/src/nsterm.m
@@ -14622,9 +14622,13 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with @@ -14623,9 +14623,13 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
DEFVAR_BOOL ("ns-accessibility-enabled", ns_accessibility_enabled, DEFVAR_BOOL ("ns-accessibility-enabled", ns_accessibility_enabled,
doc: /* Non-nil enables Zoom cursor tracking and VoiceOver support. doc: /* Non-nil enables Zoom cursor tracking and VoiceOver support.

View File

@@ -1,4 +1,4 @@
From c383dc0e225d831283db7fdfccc22c12951a1077 Mon Sep 17 00:00:00 2001 From 09734c4bdb06d7e683e166213ab02406692c3f21 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz> From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 14:46:25 +0100 Date: Sat, 28 Feb 2026 14:46:25 +0100
Subject: [PATCH 7/8] ns: announce overlay completion candidates for VoiceOver Subject: [PATCH 7/8] ns: announce overlay completion candidates for VoiceOver
@@ -22,7 +22,7 @@ race where an AX query consumes the change before notification.
2 files changed, 289 insertions(+), 42 deletions(-) 2 files changed, 289 insertions(+), 42 deletions(-)
diff --git a/src/nsterm.h b/src/nsterm.h diff --git a/src/nsterm.h b/src/nsterm.h
index 7adbb92..483fed3 100644 index 5746e9e..21a93bc 100644
--- a/src/nsterm.h --- a/src/nsterm.h
+++ b/src/nsterm.h +++ b/src/nsterm.h
@@ -510,6 +510,7 @@ typedef struct ns_ax_visible_run @@ -510,6 +510,7 @@ typedef struct ns_ax_visible_run
@@ -34,7 +34,7 @@ index 7adbb92..483fed3 100644
@property (nonatomic, assign) BOOL cachedMarkActive; @property (nonatomic, assign) BOOL cachedMarkActive;
@property (nonatomic, copy) NSString *cachedCompletionAnnouncement; @property (nonatomic, copy) NSString *cachedCompletionAnnouncement;
diff --git a/src/nsterm.m b/src/nsterm.m diff --git a/src/nsterm.m b/src/nsterm.m
index 7d48e6b..20ba0b9 100644 index 426b029..8d44b5f 100644
--- a/src/nsterm.m --- a/src/nsterm.m
+++ b/src/nsterm.m +++ b/src/nsterm.m
@@ -7271,11 +7271,154 @@ Accessibility virtual elements (macOS / Cocoa only) @@ -7271,11 +7271,154 @@ Accessibility virtual elements (macOS / Cocoa only)
@@ -486,7 +486,7 @@ index 7d48e6b..20ba0b9 100644
=================================================================== */ =================================================================== */
/* Scan visible range of window W for interactive spans. /* Scan visible range of window W for interactive spans.
@@ -9563,7 +9809,7 @@ - (void) setAccessibilityFocused: (BOOL) focused @@ -9564,7 +9810,7 @@ - (void) setAccessibilityFocused: (BOOL) focused
dispatch_async (dispatch_get_main_queue (), ^{ dispatch_async (dispatch_get_main_queue (), ^{
/* lwin is a Lisp_Object captured by value. This is GC-safe /* lwin is a Lisp_Object captured by value. This is GC-safe
because Lisp_Objects are tagged integers/pointers that because Lisp_Objects are tagged integers/pointers that
@@ -495,7 +495,7 @@ index 7d48e6b..20ba0b9 100644
Emacs. The WINDOW_LIVE_P check below guards against the Emacs. The WINDOW_LIVE_P check below guards against the
window being deleted between capture and execution. */ window being deleted between capture and execution. */
if (!WINDOWP (lwin) || NILP (Fwindow_live_p (lwin))) if (!WINDOWP (lwin) || NILP (Fwindow_live_p (lwin)))
@@ -9589,7 +9835,7 @@ - (void) setAccessibilityFocused: (BOOL) focused @@ -9590,7 +9836,7 @@ - (void) setAccessibilityFocused: (BOOL) focused
@end @end
@@ -504,7 +504,7 @@ index 7d48e6b..20ba0b9 100644
Methods are kept here (same .m file) so they access the ivars Methods are kept here (same .m file) so they access the ivars
declared in the @interface ivar block. */ declared in the @interface ivar block. */
@implementation EmacsAccessibilityBuffer (InteractiveSpans) @implementation EmacsAccessibilityBuffer (InteractiveSpans)
@@ -12311,7 +12557,7 @@ - (int) fullscreenState @@ -12312,7 +12558,7 @@ - (int) fullscreenState
if (WINDOW_LEAF_P (w)) if (WINDOW_LEAF_P (w))
{ {
@@ -513,7 +513,7 @@ index 7d48e6b..20ba0b9 100644
EmacsAccessibilityBuffer *elem EmacsAccessibilityBuffer *elem
= [existing objectForKey:[NSValue valueWithPointer:w]]; = [existing objectForKey:[NSValue valueWithPointer:w]];
if (!elem) if (!elem)
@@ -12345,7 +12591,7 @@ - (int) fullscreenState @@ -12346,7 +12592,7 @@ - (int) fullscreenState
} }
else else
{ {
@@ -522,7 +522,7 @@ index 7d48e6b..20ba0b9 100644
Lisp_Object child = w->contents; Lisp_Object child = w->contents;
while (!NILP (child)) while (!NILP (child))
{ {
@@ -12457,7 +12703,7 @@ - (void)postAccessibilityUpdates @@ -12458,7 +12704,7 @@ - (void)postAccessibilityUpdates
accessibilityUpdating = YES; accessibilityUpdating = YES;
/* Detect window tree change (split, delete, new buffer). Compare /* Detect window tree change (split, delete, new buffer). Compare
@@ -531,7 +531,7 @@ index 7d48e6b..20ba0b9 100644
Lisp_Object curRoot = FRAME_ROOT_WINDOW (emacsframe); Lisp_Object curRoot = FRAME_ROOT_WINDOW (emacsframe);
if (!EQ (curRoot, lastRootWindow)) if (!EQ (curRoot, lastRootWindow))
{ {
@@ -12466,12 +12712,12 @@ - (void)postAccessibilityUpdates @@ -12467,12 +12713,12 @@ - (void)postAccessibilityUpdates
} }
/* If tree is stale, rebuild FIRST so we don't iterate freed /* If tree is stale, rebuild FIRST so we don't iterate freed

View File

@@ -1,4 +1,4 @@
From 2f655a0fa3071046169011ecdc97f0a3f7c1105c Mon Sep 17 00:00:00 2001 From 17cd7eabf984a7de09ac277b4831836a44c4cf81 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz> From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 16:01:29 +0100 Date: Sat, 28 Feb 2026 16:01:29 +0100
Subject: [PATCH 8/8] ns: announce child frame completion candidates for Subject: [PATCH 8/8] ns: announce child frame completion candidates for
@@ -63,10 +63,10 @@ index 2b1f9e6..8a40850 100644
for the *Completions* buffer. The implementation uses a virtual for the *Completions* buffer. The implementation uses a virtual
accessibility tree with per-window elements, hybrid SelectedTextChanged accessibility tree with per-window elements, hybrid SelectedTextChanged
diff --git a/src/nsterm.h b/src/nsterm.h diff --git a/src/nsterm.h b/src/nsterm.h
index 483fed3..8bf867a 100644 index 21a93bc..75c731f 100644
--- a/src/nsterm.h --- a/src/nsterm.h
+++ b/src/nsterm.h +++ b/src/nsterm.h
@@ -595,6 +595,10 @@ typedef NS_ENUM (NSInteger, EmacsAXSpanType) @@ -596,6 +596,10 @@ typedef NS_ENUM (NSInteger, EmacsAXSpanType)
Lisp_Object lastRootWindow; Lisp_Object lastRootWindow;
BOOL accessibilityTreeValid; BOOL accessibilityTreeValid;
BOOL accessibilityUpdating; BOOL accessibilityUpdating;
@@ -77,7 +77,7 @@ index 483fed3..8bf867a 100644
#endif #endif
BOOL font_panel_active; BOOL font_panel_active;
NSFont *font_panel_result; NSFont *font_panel_result;
@@ -664,6 +668,7 @@ typedef NS_ENUM (NSInteger, EmacsAXSpanType) @@ -665,6 +669,7 @@ typedef NS_ENUM (NSInteger, EmacsAXSpanType)
- (void)rebuildAccessibilityTree; - (void)rebuildAccessibilityTree;
- (void)invalidateAccessibilityTree; - (void)invalidateAccessibilityTree;
- (void)postAccessibilityUpdates; - (void)postAccessibilityUpdates;
@@ -86,7 +86,7 @@ index 483fed3..8bf867a 100644
@end @end
diff --git a/src/nsterm.m b/src/nsterm.m diff --git a/src/nsterm.m b/src/nsterm.m
index 20ba0b9..f911d93 100644 index 8d44b5f..8d88273 100644
--- a/src/nsterm.m --- a/src/nsterm.m
+++ b/src/nsterm.m +++ b/src/nsterm.m
@@ -7415,6 +7415,112 @@ visual line index for Zoom (skip whitespace-only lines @@ -7415,6 +7415,112 @@ visual line index for Zoom (skip whitespace-only lines
@@ -253,7 +253,7 @@ index 20ba0b9..f911d93 100644
specpdl_ref count2 = SPECPDL_INDEX (); specpdl_ref count2 = SPECPDL_INDEX ();
record_unwind_current_buffer (); record_unwind_current_buffer ();
if (b != current_buffer) if (b != current_buffer)
@@ -9930,6 +10046,10 @@ - (void)dealloc @@ -9931,6 +10047,10 @@ - (void)dealloc
#endif #endif
[accessibilityElements release]; [accessibilityElements release];
@@ -264,7 +264,7 @@ index 20ba0b9..f911d93 100644
[[self menu] release]; [[self menu] release];
[super dealloc]; [super dealloc];
} }
@@ -11379,6 +11499,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f @@ -11380,6 +11500,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
windowClosing = NO; windowClosing = NO;
processingCompose = NO; processingCompose = NO;
@@ -274,7 +274,7 @@ index 20ba0b9..f911d93 100644
scrollbarsNeedingUpdate = 0; scrollbarsNeedingUpdate = 0;
fs_state = FULLSCREEN_NONE; fs_state = FULLSCREEN_NONE;
fs_before_fs = next_maximized = -1; fs_before_fs = next_maximized = -1;
@@ -12687,6 +12810,80 @@ - (id)accessibilityFocusedUIElement @@ -12688,6 +12811,80 @@ - (id)accessibilityFocusedUIElement
The existing elements carry cached state (modiff, point) from the The existing elements carry cached state (modiff, point) from the
previous redisplay cycle. Rebuilding first would create fresh previous redisplay cycle. Rebuilding first would create fresh
elements with current values, making change detection impossible. */ elements with current values, making change detection impossible. */
@@ -355,7 +355,7 @@ index 20ba0b9..f911d93 100644
- (void)postAccessibilityUpdates - (void)postAccessibilityUpdates
{ {
NSTRACE ("[EmacsView postAccessibilityUpdates]"); NSTRACE ("[EmacsView postAccessibilityUpdates]");
@@ -12697,11 +12894,59 @@ - (void)postAccessibilityUpdates @@ -12698,11 +12895,59 @@ - (void)postAccessibilityUpdates
/* Re-entrance guard: VoiceOver callbacks during notification posting /* Re-entrance guard: VoiceOver callbacks during notification posting
can trigger redisplay, which calls ns_update_end, which calls us can trigger redisplay, which calls ns_update_end, which calls us