patches: fix em-dash and SPECPDL_INDEX ordering
Replace all Unicode em-dashes (---) with ASCII triple-dash (---) across 0001-0007 (39 occurrences). GNU Emacs source files must be ASCII; em-dash in comments would cause encoding issues on some systems. Fix SPECPDL_INDEX() call order in postCompletionAnnouncementForBuffer: (0003): specpdl_ref must be taken BEFORE block_input() so the snapshot captures the pre-block_input specpdl depth. This matches the pattern established in patches 0001 and 0002.
This commit is contained in:
@@ -52,11 +52,11 @@ index ea6e7ba4f5..f245675513 100644
|
||||
+/* Base class for virtual accessibility elements attached to EmacsView. */
|
||||
+@interface EmacsAccessibilityElement : NSAccessibilityElement
|
||||
+@property (nonatomic, unsafe_unretained) EmacsView *emacsView;
|
||||
+/* Lisp window object — safe across GC cycles.
|
||||
+/* Lisp window object --- safe across GC cycles.
|
||||
+ GC safety: these Lisp_Objects are NOT visible to GC via staticpro
|
||||
+ or the specpdl stack. This is safe because:
|
||||
+ (1) Emacs GC runs only on the main thread, at well-defined safe
|
||||
+ points during Lisp evaluation — never during redisplay.
|
||||
+ points during Lisp evaluation --- never during redisplay.
|
||||
+ (2) Accessibility elements are owned by EmacsView which belongs to
|
||||
+ an active frame; windows referenced here are always reachable
|
||||
+ from the frame's window tree until rebuildAccessibilityTree
|
||||
@@ -81,7 +81,7 @@ index ea6e7ba4f5..f245675513 100644
|
||||
+ NSUInteger ax_length; /* Length in accessibility string (UTF-16 units). */
|
||||
+} ns_ax_visible_run;
|
||||
+
|
||||
+/* Virtual AXTextArea element — one per visible Emacs window (buffer). */
|
||||
+/* Virtual AXTextArea element --- one per visible Emacs window (buffer). */
|
||||
+@interface EmacsAccessibilityBuffer
|
||||
+ : EmacsAccessibilityElement <NSAccessibility>
|
||||
+{
|
||||
@@ -119,7 +119,7 @@ index ea6e7ba4f5..f245675513 100644
|
||||
+- (void)invalidateInteractiveSpans;
|
||||
+@end
|
||||
+
|
||||
+/* Virtual AXStaticText element — one per mode line. */
|
||||
+/* Virtual AXStaticText element --- one per mode line. */
|
||||
+@interface EmacsAccessibilityModeLine : EmacsAccessibilityElement
|
||||
+@end
|
||||
+
|
||||
@@ -294,7 +294,7 @@ index 88c9251c18..3b923ee5fa 100644
|
||||
+
|
||||
+ /* Extract this visible run's text. Use
|
||||
+ Fbuffer_substring_no_properties which correctly handles the
|
||||
+ buffer gap — raw BUF_BYTE_ADDRESS reads across the gap would
|
||||
+ buffer gap --- raw BUF_BYTE_ADDRESS reads across the gap would
|
||||
+ include garbage bytes when the run spans the gap position. */
|
||||
+ Lisp_Object lstr = Fbuffer_substring_no_properties (
|
||||
+ make_fixnum (pos), make_fixnum (run_end));
|
||||
@@ -375,7 +375,7 @@ index 88c9251c18..3b923ee5fa 100644
|
||||
+ return NSZeroRect;
|
||||
+
|
||||
+ /* charpos_start and charpos_len are already in buffer charpos
|
||||
+ space — the caller maps AX string indices through
|
||||
+ space --- the caller maps AX string indices through
|
||||
+ charposForAccessibilityIndex which handles invisible text. */
|
||||
+ ptrdiff_t cp_start = charpos_start;
|
||||
+ ptrdiff_t cp_end = cp_start + charpos_len;
|
||||
|
||||
Reference in New Issue
Block a user