patches: address all non-blocking review findings

Fix remaining issues identified in core maintainer review:
- 0000: correct [PATCH 0/8] to [PATCH] (standalone Zoom series)
- 0006: add paragraph break in macos.texi VoiceOver section
- 0001/0005: shorten separator comment lines to 79 chars
- 0007/0008: genericize third-party package names in commit messages
- 0001: fix block_input ordering (block before registering unwind)
- 0000/0007: document intentional face_is_selected duplication
This commit is contained in:
2026-03-03 12:48:31 +01:00
parent 9bee2a1987
commit 61c23aed2c
12 changed files with 202 additions and 126 deletions

View File

@@ -24,7 +24,7 @@ com.apple.accessibility.api distributed notification.
---
etc/NEWS | 13 ++
src/nsterm.m | 474 +++++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 475 insertions(+), 12 deletions(-)
2 files changed, 479 insertions(+), 12 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 4c149e41d6..7f917f93b2 100644
@@ -54,7 +54,7 @@ diff --git a/src/nsterm.m b/src/nsterm.m
index 8aa5b6ac1b..32eb04acef 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1275,7 +1275,7 @@ If a completion candidate is selected (overlay or child frame),
@@ -1278,7 +1278,7 @@ If a completion candidate is selected (overlay or child frame),
static void
ns_zoom_track_completion (struct frame *f, EmacsView *view)
{
@@ -63,7 +63,7 @@ index 8aa5b6ac1b..32eb04acef 100644
return;
if (!WINDOWP (f->selected_window))
return;
@@ -1393,7 +1393,8 @@ so the visual offset is (ov_line + 1) * line_h from
@@ -1396,7 +1396,8 @@ so the visual offset is (ov_line + 1) * line_h from
(zoomCursorUpdated is NO). */
#if defined (MAC_OS_X_VERSION_MIN_REQUIRED) \
&& MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
@@ -73,7 +73,7 @@ index 8aa5b6ac1b..32eb04acef 100644
&& !NSIsEmptyRect (view->lastCursorRect))
{
NSRect r = view->lastCursorRect;
@@ -1420,6 +1421,9 @@ so the visual offset is (ov_line + 1) * line_h from
@@ -1423,6 +1424,9 @@ so the visual offset is (ov_line + 1) * line_h from
if (view)
ns_zoom_track_completion (f, view);
#endif /* NS_IMPL_COCOA */
@@ -83,7 +83,7 @@ index 8aa5b6ac1b..32eb04acef 100644
}
static void
@@ -3567,7 +3571,7 @@ EmacsView pixels (AppKit, flipped, top-left origin)
@@ -3570,7 +3574,7 @@ EmacsView pixels (AppKit, flipped, top-left origin)
#if defined (MAC_OS_X_VERSION_MIN_REQUIRED) \
&& MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
@@ -92,7 +92,7 @@ index 8aa5b6ac1b..32eb04acef 100644
{
NSRect windowRect = [view convertRect:r toView:nil];
NSRect screenRect
@@ -6723,9 +6727,56 @@ - (void)applicationDidFinishLaunching: (NSNotification *)notification
@@ -6726,9 +6730,56 @@ - (void)applicationDidFinishLaunching: (NSNotification *)notification
}
#endif
@@ -149,7 +149,7 @@ index 8aa5b6ac1b..32eb04acef 100644
- (void)antialiasThresholdDidChange:(NSNotification *)notification
{
#ifdef NS_IMPL_COCOA
@@ -7628,7 +7679,6 @@ - (id)accessibilityTopLevelUIElement
@@ -7631,7 +7682,6 @@ - (id)accessibilityTopLevelUIElement
@@ -157,7 +157,7 @@ index 8aa5b6ac1b..32eb04acef 100644
static BOOL
ns_ax_find_completion_overlay_range (struct buffer *b, ptrdiff_t point,
ptrdiff_t *out_start,
@@ -8741,7 +8791,6 @@ - (NSRect)accessibilityFrame
@@ -8744,7 +8794,6 @@ - (NSRect)accessibilityFrame
@end
@@ -165,12 +165,12 @@ index 8aa5b6ac1b..32eb04acef 100644
/* ===================================================================
EmacsAccessibilityBuffer (Notifications) — AX event dispatch
@@ -9235,6 +9284,50 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
@@ -9238,6 +9287,50 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
granularity = ns_ax_text_selection_granularity_line;
}
+ /* Programmatic jumps that cross a line boundary (]], [[, M-<,
+ xref, imenu, ) are discontiguous: the cursor teleported to an
+ xref, imenu, ...) are discontiguous: the cursor teleported to an
+ arbitrary position, not one sequential step forward/backward.
+ Reporting AXTextSelectionDirectionDiscontiguous causes VoiceOver
+ to re-anchor its rotor browse cursor at the new
@@ -179,6 +179,10 @@ index 8aa5b6ac1b..32eb04acef 100644
+ if (!isCtrlNP && granularity == ns_ax_text_selection_granularity_line)
+ direction = ns_ax_text_selection_direction_discontiguous;
+
+ /* Until voiceoverSetPoint tracking is added, treat all cursor
+ moves as Emacs-initiated (refined in a later patch). */
+ BOOL emacsMovedCursor = YES;
+
+ /* If Emacs moved the cursor (not VoiceOver), force discontiguous
+ so VoiceOver re-anchors its browse cursor to the current
+ accessibilitySelectedTextRange. This covers all Emacs-initiated
@@ -216,7 +220,7 @@ index 8aa5b6ac1b..32eb04acef 100644
/* Post notifications for focused and non-focused elements. */
if ([self isAccessibilityFocused])
[self postFocusedCursorNotification:point
@@ -9347,7 +9440,6 @@ - (NSRect)accessibilityFrame
@@ -9350,7 +9443,6 @@ - (NSRect)accessibilityFrame
@end
@@ -224,7 +228,7 @@ index 8aa5b6ac1b..32eb04acef 100644
/* ===================================================================
EmacsAccessibilityInteractiveSpan --- helpers and implementation
=================================================================== */
@@ -9683,6 +9775,7 @@ - (void)dealloc
@@ -9686,6 +9778,7 @@ - (void)dealloc
[layer release];
#endif
@@ -232,7 +236,7 @@ index 8aa5b6ac1b..32eb04acef 100644
[[self menu] release];
[super dealloc];
}
@@ -11031,6 +11124,32 @@ - (void)windowDidBecomeKey /* for direct calls */
@@ -11034,6 +11127,32 @@ - (void)windowDidBecomeKey /* for direct calls */
XSETFRAME (event.frame_or_window, emacsframe);
kbd_buffer_store_event (&event);
ns_send_appdefined (-1); // Kick main loop
@@ -265,7 +269,7 @@ index 8aa5b6ac1b..32eb04acef 100644
}
@@ -12268,6 +12387,332 @@ - (int) fullscreenState
@@ -12271,6 +12390,332 @@ - (int) fullscreenState
return fs_state;
}
@@ -285,7 +289,7 @@ index 8aa5b6ac1b..32eb04acef 100644
+
+ if (WINDOW_LEAF_P (w))
+ {
+ /* Buffer element reuse existing if available. */
+ /* Buffer element --- reuse existing if available. */
+ EmacsAccessibilityBuffer *elem
+ = [existing objectForKey:[NSValue valueWithPointer:w]];
+ if (!elem)
@@ -319,7 +323,7 @@ index 8aa5b6ac1b..32eb04acef 100644
+ }
+ else
+ {
+ /* Internal (combination) window recurse into children. */
+ /* Internal (combination) window --- recurse into children. */
+ Lisp_Object child = w->contents;
+ while (!NILP (child))
+ {
@@ -431,7 +435,7 @@ index 8aa5b6ac1b..32eb04acef 100644
+ accessibilityUpdating = YES;
+
+ /* Detect window tree change (split, delete, new buffer). Compare
+ FRAME_ROOT_WINDOW if it changed, the tree structure changed. */
+ FRAME_ROOT_WINDOW --- if it changed, the tree structure changed. */
+ Lisp_Object curRoot = FRAME_ROOT_WINDOW (emacsframe);
+ if (!EQ (curRoot, lastRootWindow))
+ {
@@ -440,12 +444,12 @@ index 8aa5b6ac1b..32eb04acef 100644
+ }
+
+ /* If tree is stale, rebuild FIRST so we don't iterate freed
+ window pointers. Skip notifications for this cycle the
+ window pointers. Skip notifications for this cycle --- the
+ freshly-built elements have no previous state to diff against. */
+ if (!accessibilityTreeValid)
+ {
+ [self rebuildAccessibilityTree];
+ /* Invalidate span cache window layout changed. */
+ /* Invalidate span cache --- window layout changed. */
+ for (EmacsAccessibilityElement *elem in accessibilityElements)
+ if ([elem isKindOfClass: [EmacsAccessibilityBuffer class]])
+ [(EmacsAccessibilityBuffer *) elem invalidateInteractiveSpans];
@@ -598,7 +602,7 @@ index 8aa5b6ac1b..32eb04acef 100644
@end /* EmacsView */
@@ -14264,12 +14709,17 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
@@ -14267,12 +14712,17 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
ns_use_srgb_colorspace = YES;
DEFVAR_BOOL ("ns-accessibility-enabled", ns_accessibility_enabled,