From: Alan Third Date: Wed, 26 Sep 2018 21:21:37 +0000 (+0100) Subject: Fix deprecation warning X-Git-Tag: emacs-26.1.90~125 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9ad0f1d15c06eb07dfbd9bd3e3b8a0d747942152;p=emacs.git Fix deprecation warning * src/nsterm.m (ns_term_init): Use writeToFile or writeToURL as required. --- diff --git a/src/nsterm.m b/src/nsterm.m index 954020dcde9..d92d6c32448 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -5193,7 +5193,21 @@ ns_term_init (Lisp_Object display_name) alpha: 1.0] forKey: [NSString stringWithUTF8String: name]]; } - [cl writeToFile: nil]; + + /* FIXME: Report any errors writing the color file below. */ +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 +#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100 + if ([cl respondsToSelector:@selector(writeToURL:error:)]) +#endif + [cl writeToURL:nil error:nil]; +#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100 + else +#endif +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 */ +#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100 \ + || defined (NS_IMPL_GNUSTEP) + [cl writeToFile: nil]; +#endif } }