summaryrefslogtreecommitdiff
path: root/src/nsfns.m
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2020-03-02 17:54:32 +0000
committerAlan Third <alan@idiocy.org>2020-03-02 18:30:44 +0000
commitb4911a6f0da0bfae3832b3aa0c111db4bb2f49d5 (patch)
tree7c909d1bcc75f7ecb8bacd81d8a04648f7c8902c /src/nsfns.m
parent68109c56e45ff531934bfe81f9bd14a530a35574 (diff)
downloademacs-b4911a6f0da0bfae3832b3aa0c111db4bb2f49d5.tar.gz
Fix macOS/GNUstep compilation warnings
* src/nsfns.m (handlePanelKeys): Unused function. * src/nsterm.m (ns_set_appearance): ([EmacsView initFrameFromEmacs:]): Use EmacsWindow type instead of NSWindow. (ns_clip_to_row): Unused function. (ns_dumpglyphs_stretch): Remove unused variable. (ns_term_init): ([EmacsWindow setAppearance]): Only compile on macOS. (ns_mouse_position): Make sure f is initialised on GNUstep. * src/emacs.c (main): Move allocation of autorelease pool to before first use.
Diffstat (limited to 'src/nsfns.m')
-rw-r--r--src/nsfns.m74
1 files changed, 0 insertions, 74 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index cbde93b3f10..f6e7f4e9acb 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -3012,80 +3012,6 @@ DEFUN ("ns-show-character-palette",
========================================================================== */
-/*
- Handle arrow/function/control keys and copy/paste/cut in file dialogs.
- Return YES if handled, NO if not.
- */
-static BOOL
-handlePanelKeys (NSSavePanel *panel, NSEvent *theEvent)
-{
- NSString *s;
- int i;
- BOOL ret = NO;
-
- if ([theEvent type] != NSEventTypeKeyDown) return NO;
- s = [theEvent characters];
-
- for (i = 0; i < [s length]; ++i)
- {
- int ch = (int) [s characterAtIndex: i];
- switch (ch)
- {
- case NSHomeFunctionKey:
- case NSDownArrowFunctionKey:
- case NSUpArrowFunctionKey:
- case NSLeftArrowFunctionKey:
- case NSRightArrowFunctionKey:
- case NSPageUpFunctionKey:
- case NSPageDownFunctionKey:
- case NSEndFunctionKey:
- /* Don't send command modified keys, as those are handled in the
- performKeyEquivalent method of the super class. */
- if (! ([theEvent modifierFlags] & NSEventModifierFlagCommand))
- {
- [panel sendEvent: theEvent];
- ret = YES;
- }
- break;
- /* As we don't have the standard key commands for
- copy/paste/cut/select-all in our edit menu, we must handle
- them here. TODO: handle Emacs key bindings for copy/cut/select-all
- here, paste works, because we have that in our Edit menu.
- I.e. refactor out code in nsterm.m, keyDown: to figure out the
- correct modifier. */
- case 'x': // Cut
- case 'c': // Copy
- case 'v': // Paste
- case 'a': // Select all
- if ([theEvent modifierFlags] & NSEventModifierFlagCommand)
- {
- [NSApp sendAction:
- (ch == 'x'
- ? @selector(cut:)
- : (ch == 'c'
- ? @selector(copy:)
- : (ch == 'v'
- ? @selector(paste:)
- : @selector(selectAll:))))
- to:nil from:panel];
- ret = YES;
- }
- default:
- // Send all control keys, as the text field supports C-a, C-f, C-e
- // C-b and more.
- if ([theEvent modifierFlags] & NSEventModifierFlagControl)
- {
- [panel sendEvent: theEvent];
- ret = YES;
- }
- break;
- }
- }
-
-
- return ret;
-}
-
@implementation EmacsFileDelegate
/* --------------------------------------------------------------------------
Delegate methods for Open/Save panels