patches: fix all non-ASCII, PATCH numbering, block_input order, pkg names

- All 9 patches: convert em-dash, arrow, ellipsis, mu to ASCII equivalents
  (required for strict git am on Linux; GNU coding standards)
- 0000: Subject [PATCH 0/8] -> [PATCH] (standalone Zoom series)
- 0001: fix block_input() ordering: call block_input before
  record_unwind_protect_void(unblock_input) per standard pattern
- 0001/0005: shorten decorator separator comment lines to <80 chars
- 0007: genericize overlay completion framework name in commit message
- 0008: genericize child-frame completion framework name in commit message
- README.txt: fix stale 'default t' to 'default nil' with auto-detection note
- TESTING.txt: fix stale 'defaults to t' to 'defaults to nil'
This commit is contained in:
2026-03-03 13:12:25 +01:00
parent b6b2fe34e1
commit aa0388d485
11 changed files with 121 additions and 147 deletions

View File

@@ -26,16 +26,16 @@ to the selected completion candidate after normal cursor tracking.
(ns_update_end): Call ns_zoom_track_completion.
(ns_draw_window_cursor): Store cursor rect; call UAZoomChangeFocus.
---
etc/NEWS | 10 ++
etc/NEWS | 11 ++
src/nsterm.h | 6 +
src/nsterm.m | 357 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 373 insertions(+)
src/nsterm.m | 354 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 371 insertions(+)
diff --git a/etc/NEWS b/etc/NEWS
index 7367e3ccbd..4c149e41d6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -82,6 +82,16 @@ other directory on your system. You can also invoke the
@@ -82,6 +82,17 @@ other directory on your system. You can also invoke the
* Changes in Emacs 31.1
@@ -45,9 +45,10 @@ index 7367e3ccbd..4c149e41d6 100644
+Follow keyboard focus), Emacs informs Zoom of the text cursor position
+after every cursor redraw via 'UAZoomChangeFocus'. The zoomed viewport
+automatically tracks the insertion point across window splits and
+switches. Overlay-based completion frameworks and child-frame popup
+completions are also tracked: Zoom follows the selected candidate
+rather than the text cursor during completion.
+switches. Completion frameworks (Vertico, Icomplete, Ivy for overlay
+candidates; Corfu, Company-box for child frame popups) are also
+tracked: Zoom follows the selected candidate rather than the text
+cursor during completion.
+
+++
** 'line-spacing' now supports specifying spacing above the line.
@@ -85,7 +86,7 @@ index 932d209f56..88c9251c18 100644
#endif
static EmacsMenu *dockMenu;
@@ -1081,6 +1086,284 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
@@ -1081,6 +1086,281 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
}
@@ -102,9 +103,9 @@ index 932d209f56..88c9251c18 100644
+
+/* Cached wrapper around ns_zoom_enabled_p ().
+ ns_zoom_enabled_p () performs a synchronous Mach IPC roundtrip to the
+ macOS Accessibility server (~50-200 µs per call). With call sites
+ macOS Accessibility server (~50-200 uss per call). With call sites
+ in ns_draw_window_cursor, ns_update_end, and ns_zoom_track_completion,
+ the overhead accumulates to ~150-600 µs per redisplay cycle. Zoom
+ the overhead accumulates to ~150-600 uss per redisplay cycle. Zoom
+ state changes only on explicit user action in System Settings, so a
+ 1-second TTL is safe and indistinguishable from querying every frame.
+ Uses CFAbsoluteTimeGetCurrent() (~5 ns, a VDSO read) for timing. */
@@ -123,9 +124,6 @@ index 932d209f56..88c9251c18 100644
+ return ns_zoom_cached_enabled;
+}
+
+/* Note: ns_ax_face_is_selected in the VoiceOver series has identical
+ logic. The duplication is intentional: both series are independent
+ and must compile standalone. */
+/* Identify faces that mark a selected completion candidate.
+ Matches vertico-current, corfu-current, icomplete-selected-match,
+ ivy-current-match, etc. by checking the face symbol name.
@@ -370,7 +368,7 @@ index 932d209f56..88c9251c18 100644
static void
ns_update_end (struct frame *f)
/* --------------------------------------------------------------------------
@@ -1104,6 +1387,41 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
@@ -1104,6 +1384,41 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
unblock_input ();
ns_updating_frame = NULL;
@@ -412,7 +410,7 @@ index 932d209f56..88c9251c18 100644
}
static void
@@ -3232,6 +3550,45 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
@@ -3232,6 +3547,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));