[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 9ad0f1d 2/2: Fix deprecation warning
From: |
Alan Third |
Subject: |
[Emacs-diffs] emacs-26 9ad0f1d 2/2: Fix deprecation warning |
Date: |
Fri, 28 Sep 2018 15:25:30 -0400 (EDT) |
branch: emacs-26
commit 9ad0f1d15c06eb07dfbd9bd3e3b8a0d747942152
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>
Fix deprecation warning
* src/nsterm.m (ns_term_init): Use writeToFile or writeToURL as
required.
---
src/nsterm.m | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 954020d..d92d6c3 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
}
}