From: Alan Third <alan@idiocy.org>
To: "Perry E. Metzger" <perry@piermont.com>
Cc: "Herbert J. Skuhra" <herbert@gojira.at>, emacs-devel@gnu.org
Subject: [PATCH] Fix deprecation warning
Date: Wed, 26 Sep 2018 22:36:52 +0100 [thread overview]
Message-ID: <20180926213652.GA45144@breton.holly.idiocy.org> (raw)
In-Reply-To: <20180926144225.632cebb1@jabberwock.cb.piermont.com>
* src/nsterm.m (ns_term_init): Use writeToFile or writeToURL as
required.
---
I believe this should fix the colour list error.
src/nsterm.m | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 954020dcde..d92d6c3244 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5193,7 +5193,21 @@ Needs to be here because ns_initialize_display_info () uses AppKit classes.
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
}
}
--
2.18.0
--
Alan Third
next prev parent reply other threads:[~2018-09-26 21:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 13:46 weird startup error in MacOS Mojave Perry E. Metzger
2018-09-25 14:26 ` Herbert J. Skuhra
2018-09-25 22:08 ` Perry E. Metzger
2018-09-25 22:56 ` Herbert J. Skuhra
2018-09-25 23:13 ` Perry E. Metzger
2018-09-26 18:35 ` Alan Third
2018-09-26 18:42 ` Perry E. Metzger
2018-09-26 21:36 ` Alan Third [this message]
2018-09-28 17:51 ` [PATCH] Fix deprecation warning Herbert J. Skuhra
2018-09-28 19:26 ` Alan Third
2018-09-29 14:43 ` Perry E. Metzger
2018-09-29 16:41 ` Alan Third
2018-09-29 19:33 ` Perry E. Metzger
2018-09-29 21:20 ` Alan Third
2018-09-28 19:35 ` weird startup error in MacOS Mojave Alan Third
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180926213652.GA45144@breton.holly.idiocy.org \
--to=alan@idiocy.org \
--cc=emacs-devel@gnu.org \
--cc=herbert@gojira.at \
--cc=perry@piermont.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.