patches: fix two compile errors (stray unbind_to, voiceoverSetPoint scope)
Two bugs introduced during rebase/amend: 1. Stray 'unbind_to (count, Qnil)' in ns_focus (P0000): A hunk was misplaced into ns_focus where 'count' is not declared. The comment and unbind_to belonged at the end of ns_zoom_track_completion, which already has a correct unbind_to. Remove the duplicate from ns_focus. 2. 'voiceoverSetPoint = NO' in EmacsView::initFrameFromEmacs: (P0008): voiceoverSetPoint is a BOOL ivar of EmacsAXBuffer, not EmacsView. Setting it in EmacsView's init method causes 'undeclared identifier'. ObjC BOOL ivars zero-initialize to NO automatically. Remove the line. voiceoverSetPoint is consumed/set in EmacsAXBuffer methods only.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 2de5c652dbcc355549941cc9940bac9f31ab3ea6 Mon Sep 17 00:00:00 2001
|
||||
From 13da736610fc631a9ea420d6918eefd2791940d3 Mon Sep 17 00:00:00 2001
|
||||
From: Daneel <daneel@sukany.cz>
|
||||
Date: Mon, 2 Mar 2026 18:49:13 +0100
|
||||
Subject: [PATCH 8/8] ns: announce child frame completion candidates for
|
||||
@@ -33,8 +33,8 @@ area announcements.
|
||||
doc/emacs/macos.texi | 14 +-
|
||||
etc/NEWS | 18 +-
|
||||
src/nsterm.h | 20 ++
|
||||
src/nsterm.m | 515 ++++++++++++++++++++++++++++++++++++++++---
|
||||
4 files changed, 519 insertions(+), 48 deletions(-)
|
||||
src/nsterm.m | 508 ++++++++++++++++++++++++++++++++++++++++---
|
||||
4 files changed, 512 insertions(+), 48 deletions(-)
|
||||
|
||||
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
|
||||
index 8d4a7825d8..03a657f970 100644
|
||||
@@ -149,7 +149,7 @@ index 21a93bc799..bdd40b8eb7 100644
|
||||
@end
|
||||
|
||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||
index 523f79d235..a885249f30 100644
|
||||
index 523f79d235..45f83f3ac6 100644
|
||||
--- a/src/nsterm.m
|
||||
+++ b/src/nsterm.m
|
||||
@@ -1126,24 +1126,19 @@ Uses CFAbsoluteTimeGetCurrent() (~5 ns, a VDSO read) for timing. */
|
||||
@@ -187,20 +187,7 @@ index 523f79d235..a885249f30 100644
|
||||
}
|
||||
|
||||
/* Scan overlay before-string / after-string properties in the
|
||||
@@ -1464,6 +1459,12 @@ so the visual offset is (ov_line + 1) * line_h from
|
||||
#endif
|
||||
gsaved = YES;
|
||||
}
|
||||
+ /* Unbind record_unwind_current_buffer for both overlay and child
|
||||
+ frame paths. The overlay path calls unbind_to before return;
|
||||
+ this call covers the child frame path and the no-candidate path.
|
||||
+ unbind_to is idempotent if count equals the current specpdl
|
||||
+ index (i.e. already unbound by the overlay path). */
|
||||
+ unbind_to (count, Qnil);
|
||||
}
|
||||
|
||||
|
||||
@@ -7407,6 +7408,112 @@ visual line index for Zoom (skip whitespace-only lines
|
||||
@@ -7407,6 +7402,112 @@ visual line index for Zoom (skip whitespace-only lines
|
||||
|
||||
return nil;
|
||||
}
|
||||
@@ -313,7 +300,7 @@ index 523f79d235..a885249f30 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
|
||||
@@ -8149,15 +8256,23 @@ - (void)ensureTextCache
|
||||
@@ -8149,15 +8250,23 @@ - (void)ensureTextCache
|
||||
if (!b)
|
||||
return;
|
||||
|
||||
@@ -343,7 +330,7 @@ index 523f79d235..a885249f30 100644
|
||||
if (cachedText && cachedTextModiff == chars_modiff
|
||||
&& cachedTextStart == BUF_BEGV (b)
|
||||
&& pt >= cachedTextStart
|
||||
@@ -8587,6 +8702,11 @@ - (void)setAccessibilitySelectedTextRange:(NSRange)range
|
||||
@@ -8587,6 +8696,11 @@ - (void)setAccessibilitySelectedTextRange:(NSRange)range
|
||||
|
||||
[self ensureTextCache];
|
||||
|
||||
@@ -355,7 +342,7 @@ index 523f79d235..a885249f30 100644
|
||||
specpdl_ref count = SPECPDL_INDEX ();
|
||||
record_unwind_current_buffer ();
|
||||
/* Ensure block_input is always matched by unblock_input even if
|
||||
@@ -9042,15 +9162,23 @@ - (void)postFocusedCursorNotification:(ptrdiff_t)point
|
||||
@@ -9042,15 +9156,23 @@ - (void)postFocusedCursorNotification:(ptrdiff_t)point
|
||||
= @(ns_ax_text_state_change_selection_move);
|
||||
moveInfo[@"AXTextSelectionDirection"] = @(direction);
|
||||
moveInfo[@"AXTextChangeElement"] = self;
|
||||
@@ -385,7 +372,7 @@ index 523f79d235..a885249f30 100644
|
||||
NSAccessibilitySelectedTextChangedNotification,
|
||||
moveInfo);
|
||||
|
||||
@@ -9148,12 +9276,17 @@ user expectation ("w" jumps to next word and reads it). */
|
||||
@@ -9148,12 +9270,17 @@ user expectation ("w" jumps to next word and reads it). */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,7 +395,7 @@ index 523f79d235..a885249f30 100644
|
||||
if (cachedText
|
||||
&& granularity == ns_ax_text_selection_granularity_line)
|
||||
{
|
||||
@@ -9218,6 +9351,11 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
|
||||
@@ -9218,6 +9345,11 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
|
||||
|
||||
block_input ();
|
||||
specpdl_ref count2 = SPECPDL_INDEX ();
|
||||
@@ -420,7 +407,7 @@ index 523f79d235..a885249f30 100644
|
||||
record_unwind_protect_void (unblock_input);
|
||||
record_unwind_current_buffer ();
|
||||
if (b != current_buffer)
|
||||
@@ -9394,12 +9532,29 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
|
||||
@@ -9394,12 +9526,29 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
|
||||
if (!b)
|
||||
return;
|
||||
|
||||
@@ -450,7 +437,7 @@ index 523f79d235..a885249f30 100644
|
||||
if (modiff != self.cachedModiff)
|
||||
{
|
||||
self.cachedModiff = modiff;
|
||||
@@ -9413,6 +9568,7 @@ Text property changes (e.g. face updates from
|
||||
@@ -9413,6 +9562,7 @@ Text property changes (e.g. face updates from
|
||||
{
|
||||
self.cachedCharsModiff = chars_modiff;
|
||||
[self postTextChangedNotification:point];
|
||||
@@ -458,7 +445,7 @@ index 523f79d235..a885249f30 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9435,8 +9591,15 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
@@ -9435,8 +9585,15 @@ 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.
|
||||
@@ -476,7 +463,7 @@ index 523f79d235..a885249f30 100644
|
||||
goto skip_overlay_scan;
|
||||
|
||||
int selected_line = -1;
|
||||
@@ -9482,7 +9645,18 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
@@ -9482,7 +9639,18 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
self.cachedPoint = point;
|
||||
self.cachedMarkActive = markActive;
|
||||
|
||||
@@ -496,7 +483,7 @@ index 523f79d235..a885249f30 100644
|
||||
NSInteger direction = ns_ax_text_selection_direction_discontiguous;
|
||||
if (point > oldPoint)
|
||||
direction = ns_ax_text_selection_direction_next;
|
||||
@@ -9530,6 +9704,58 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
@@ -9530,6 +9698,58 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
granularity = ns_ax_text_selection_granularity_line;
|
||||
}
|
||||
|
||||
@@ -555,7 +542,7 @@ index 523f79d235..a885249f30 100644
|
||||
/* Post notifications for focused and non-focused elements. */
|
||||
if ([self isAccessibilityFocused])
|
||||
[self postFocusedCursorNotification:point
|
||||
@@ -9672,6 +9898,13 @@ - (NSRect)accessibilityFrame
|
||||
@@ -9672,6 +9892,13 @@ - (NSRect)accessibilityFrame
|
||||
if (vis_start >= vis_end)
|
||||
return @[];
|
||||
|
||||
@@ -569,7 +556,7 @@ index 523f79d235..a885249f30 100644
|
||||
block_input ();
|
||||
specpdl_ref blk_count = SPECPDL_INDEX ();
|
||||
record_unwind_protect_void (unblock_input);
|
||||
@@ -9796,6 +10029,7 @@ than O(chars). Fall back to pos+1 as safety net. */
|
||||
@@ -9796,6 +10023,7 @@ than O(chars). Fall back to pos+1 as safety net. */
|
||||
pos = span_end;
|
||||
}
|
||||
|
||||
@@ -577,7 +564,7 @@ index 523f79d235..a885249f30 100644
|
||||
return [[spans copy] autorelease];
|
||||
}
|
||||
|
||||
@@ -9977,6 +10211,10 @@ - (void)dealloc
|
||||
@@ -9977,6 +10205,10 @@ - (void)dealloc
|
||||
#endif
|
||||
|
||||
[accessibilityElements release];
|
||||
@@ -588,18 +575,17 @@ index 523f79d235..a885249f30 100644
|
||||
[[self menu] release];
|
||||
[super dealloc];
|
||||
}
|
||||
@@ -11426,6 +11664,10 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
|
||||
@@ -11426,6 +11658,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
|
||||
|
||||
windowClosing = NO;
|
||||
processingCompose = NO;
|
||||
+#ifdef NS_IMPL_COCOA
|
||||
+ childFrameLastBuffer = Qnil;
|
||||
+ voiceoverSetPoint = NO;
|
||||
+#endif
|
||||
scrollbarsNeedingUpdate = 0;
|
||||
fs_state = FULLSCREEN_NONE;
|
||||
fs_before_fs = next_maximized = -1;
|
||||
@@ -12734,6 +12976,154 @@ - (id)accessibilityFocusedUIElement
|
||||
@@ -12734,6 +12969,154 @@ - (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. */
|
||||
@@ -754,7 +740,7 @@ index 523f79d235..a885249f30 100644
|
||||
- (void)postAccessibilityUpdates
|
||||
{
|
||||
NSTRACE ("[EmacsView postAccessibilityUpdates]");
|
||||
@@ -12744,11 +13134,64 @@ - (void)postAccessibilityUpdates
|
||||
@@ -12744,11 +13127,64 @@ - (void)postAccessibilityUpdates
|
||||
|
||||
/* Re-entrance guard: VoiceOver callbacks during notification posting
|
||||
can trigger redisplay, which calls ns_update_end, which calls us
|
||||
|
||||
Reference in New Issue
Block a user