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:
@@ -585,8 +585,6 @@ index 932d209..da40369 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- (void) noteUserCancelledSelection
|
-- (void) noteUserCancelledSelection
|
||||||
+extern Lisp_Object last_command_event;
|
|
||||||
+
|
|
||||||
+static bool
|
+static bool
|
||||||
+ns_ax_event_is_ctrl_n_or_p (int *which)
|
+ns_ax_event_is_ctrl_n_or_p (int *which)
|
||||||
{
|
{
|
||||||
@@ -603,13 +601,13 @@ index 932d209..da40369 100644
|
|||||||
|
|
||||||
- [NSApp stop: self];
|
- [NSApp stop: self];
|
||||||
+ EMACS_INT c = XFIXNUM (ev);
|
+ EMACS_INT c = XFIXNUM (ev);
|
||||||
+ if (c == '\C-n')
|
+ if (c == ('n' & 0x1f))
|
||||||
+ {
|
+ {
|
||||||
+ if (which)
|
+ if (which)
|
||||||
+ *which = 1;
|
+ *which = 1;
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+ if (c == '\C-p')
|
+ if (c == ('p' & 0x1f))
|
||||||
+ {
|
+ {
|
||||||
+ if (which)
|
+ if (which)
|
||||||
+ *which = -1;
|
+ *which = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user