Fix build errors in Zoom/VoiceOver patch

- Remove 'extern Lisp_Object last_command_event' - last_command_event
  is a macro in globals.h (expands to globals.f_last_command_event),
  so an extern declaration conflicts with the existing
  'extern struct emacs_globals globals'
- Replace invalid C escape sequences '\C-n' and '\C-p' with
  ('n' & 0x1f) and ('p' & 0x1f) respectively
This commit is contained in:
2026-02-26 21:43:04 +01:00
parent 3bad798541
commit 220e90144f

View File

@@ -585,8 +585,6 @@ index 932d209..da40369 100644
}
-- (void) noteUserCancelledSelection
+extern Lisp_Object last_command_event;
+
+static bool
+ns_ax_event_is_ctrl_n_or_p (int *which)
{
@@ -603,13 +601,13 @@ index 932d209..da40369 100644
- [NSApp stop: self];
+ EMACS_INT c = XFIXNUM (ev);
+ if (c == '\C-n')
+ if (c == ('n' & 0x1f))
+ {
+ if (which)
+ *which = 1;
+ return true;
+ }
+ if (c == '\C-p')
+ if (c == ('p' & 0x1f))
+ {
+ if (which)
+ *which = -1;