emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Use "macOS" in documentation and comments


From: p . stephani2
Subject: [PATCH] Use "macOS" in documentation and comments
Date: Sat, 19 Nov 2016 20:28:15 +0100

From: Philipp Stephani <address@hidden>

Apple has rebranded OS X as macOS.  Adapt documentation and comments
accordingly.
---
 INSTALL                                  |  4 +--
 Makefile.in                              |  2 +-
 README                                   |  2 +-
 admin/CPP-DEFINES                        |  4 +--
 configure.ac                             | 26 +++++++--------
 doc/emacs/cmdargs.texi                   |  4 +--
 doc/emacs/macos.texi                     | 16 +++++-----
 doc/emacs/mule.texi                      |  6 ++--
 doc/lispref/display.texi                 |  2 +-
 doc/lispref/files.texi                   |  6 ++--
 doc/lispref/nonascii.texi                |  2 +-
 doc/lispref/os.texi                      |  2 +-
 doc/misc/efaq.texi                       | 18 ++++++-----
 doc/misc/gnus.texi                       |  2 +-
 doc/misc/idlwave.texi                    | 21 +++++++------
 doc/misc/mairix-el.texi                  |  2 +-
 doc/misc/org.texi                        |  2 +-
 doc/misc/tramp.texi                      |  2 +-
 etc/MACHINES                             |  2 +-
 etc/NEXTSTEP                             |  8 ++---
 etc/PROBLEMS                             |  6 ++--
 etc/TODO                                 | 20 ++++++------
 lib-src/Makefile.in                      |  2 +-
 lib/acl-internal.c                       |  4 +--
 lib/acl-internal.h                       |  8 ++---
 lib/acl_entries.c                        |  6 ++--
 lib/euidaccess.c                         |  2 +-
 lib/filemode.h                           |  2 +-
 lib/get-permissions.c                    |  6 ++--
 lib/getgroups.c                          |  2 +-
 lib/gettimeofday.c                       |  2 +-
 lib/secure_getenv.c                      |  2 +-
 lib/set-permissions.c                    |  6 ++--
 lib/signal.in.h                          | 12 +++----
 lib/stdint.in.h                          |  2 +-
 lib/stdlib.in.h                          |  4 +--
 lib/string.in.h                          |  2 +-
 lib/sys_select.in.h                      |  2 +-
 lib/unistd.in.h                          |  4 +--
 lisp/battery.el                          |  6 ++--
 lisp/cedet/semantic/bovine/gcc.el        |  2 +-
 lisp/faces.el                            |  4 +--
 lisp/files.el                            |  2 +-
 lisp/international/mule-cmds.el          |  2 +-
 lisp/mail/emacsbug.el                    |  4 +--
 lisp/man.el                              |  2 +-
 lisp/menu-bar.el                         |  2 +-
 lisp/net/ange-ftp.el                     |  2 +-
 lisp/net/browse-url.el                   |  6 ++--
 lisp/net/tramp-sh.el                     |  6 ++--
 lisp/net/tramp.el                        |  2 +-
 lisp/org/org.el                          |  4 +--
 lisp/progmodes/gdb-mi.el                 |  8 ++---
 lisp/progmodes/idlwave.el                |  4 +--
 lisp/progmodes/python.el                 |  2 +-
 lisp/term/ns-win.el                      | 12 +++----
 lisp/term/xterm.el                       |  2 +-
 lisp/textmodes/rst.el                    |  2 +-
 lisp/vc/pcvs.el                          |  4 +--
 m4/acl.m4                                |  4 +--
 m4/extern-inline.m4                      |  4 +--
 m4/fdatasync.m4                          |  2 +-
 m4/getloadavg.m4                         |  2 +-
 m4/getopt.m4                             |  6 ++--
 m4/gettimeofday.m4                       |  2 +-
 m4/gnulib-common.m4                      |  2 +-
 m4/largefile.m4                          |  6 ++--
 m4/mktime.m4                             |  2 +-
 m4/multiarch.m4                          |  2 +-
 m4/nocrash.m4                            |  2 +-
 m4/readlinkat.m4                         |  2 +-
 msdos/autogen/config.in                  | 12 +++----
 nextstep/INSTALL                         |  4 +--
 nextstep/Makefile.in                     |  4 +--
 nextstep/README                          | 20 ++++++------
 nextstep/templates/Emacs.desktop.in      |  2 +-
 nextstep/templates/Info-gnustep.plist.in |  4 +--
 nextstep/templates/Info.plist.in         |  2 +-
 src/conf_post.h                          |  4 +--
 src/emacs.c                              |  2 +-
 src/fileio.c                             | 10 +++---
 src/frame.c                              |  2 +-
 src/gtkutil.c                            |  2 +-
 src/macfont.h                            |  2 +-
 src/macfont.m                            | 20 ++++++------
 src/nsfns.m                              |  8 ++---
 src/nsfont.m                             |  4 +--
 src/nsimage.m                            |  4 +--
 src/nsmenu.m                             | 10 +++---
 src/nsselect.m                           |  4 +--
 src/nsterm.m                             | 54 ++++++++++++++++----------------
 src/sysdep.c                             |  2 +-
 src/unexmacosx.c                         | 14 ++++-----
 src/xterm.c                              |  4 +--
 94 files changed, 270 insertions(+), 265 deletions(-)

diff --git a/INSTALL b/INSTALL
index bc859b2..76fe87d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -5,7 +5,7 @@ See the end of the file for license conditions.
 
 
 This file contains general information on building GNU Emacs.
-For more information specific to the MS-Windows, GNUstep/Mac OS X, and
+For more information specific to the MS-Windows, GNUstep/macOS, and
 MS-DOS ports, also read the files nt/INSTALL, nextstep/INSTALL, and
 msdos/INSTALL.  For information about building from a repository checkout
 (rather than a release), also read the file INSTALL.REPO.
@@ -208,7 +208,7 @@ corresponding command is 'yum-builddep emacs'.
 
 DETAILED BUILDING AND INSTALLATION:
 
-(This is for a Unix or Unix-like system.  For GNUstep and Mac OS X,
+(This is for a Unix or Unix-like system.  For GNUstep and macOS,
 see nextstep/INSTALL.  For non-ancient versions of MS Windows, see
 the file nt/INSTALL.  For MS-DOS and MS Windows 3.X, see msdos/INSTALL.)
 
diff --git a/Makefile.in b/Makefile.in
index 1095837..2351537 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -113,7 +113,7 @@ am__v_at_1 =
 
 # ==================== Where To Install Things ====================
 
-# Location to install Emacs.app under GNUstep / Mac OS X.
+# Location to install Emacs.app under GNUstep / macOS.
 # Later values may use these.
 address@hidden@
 address@hidden@
diff --git a/README b/README
index 941cdfc..4cd2500 100644
--- a/README
+++ b/README
@@ -86,7 +86,7 @@ There are several subdirectories:
                 in Emacs Lisp manual.
 'msdos'     holds configuration files for compiling Emacs under MS-DOS.
 'nextstep'  holds instructions and some other files for compiling the
-            Nextstep port of Emacs, for GNUstep and Mac OS X Cocoa.
+            Nextstep port of Emacs, for GNUstep and macOS Cocoa.
 'nt'        holds various command files and documentation files that pertain
             to building and running Emacs on Windows 9X/ME/NT/2000/XP.
 'test'      holds tests for various aspects of Emacs's functionality.
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES
index 5e6146b..487c150 100644
--- a/admin/CPP-DEFINES
+++ b/admin/CPP-DEFINES
@@ -21,7 +21,7 @@ WINDOWSNT     Compiling the native MS-Windows (W32) port.
 __MINGW32__    Compiling the W32 port with the MinGW or MinGW-w64 ports of GCC.
 _MSC_VER       Compiling the W32 port with the Microsoft C compiler.
 MINGW_W64      Compiling the W32 port with the MinGW-w64 port of GCC.
-DARWIN_OS      Compiling on Mac OS X or pure Darwin (and using s/darwin.h).
+DARWIN_OS      Compiling on macOS or pure Darwin (and using s/darwin.h).
 SOLARIS2
 USG
 USG5_4
@@ -29,7 +29,7 @@ USG5_4
 ** Distinguishing GUIs **
 
 HAVE_NTGUI     Use the native W32 GUI for windows, frames, menus&scrollbars.
-HAVE_NS                Use the NeXT/OpenStep/Cocoa UI under Mac OS X or 
GNUstep.
+HAVE_NS                Use the NeXT/OpenStep/Cocoa UI under macOS or GNUstep.
 NS_IMPL_GNUSTEP        Compile support for GNUstep implementation of NS GUI 
API.
 NS_IMPL_COCOA  Compile support for Cocoa (Apple) implementation of NS GUI API.
 HAVE_X11       Compile support for the X11 GUI.
diff --git a/configure.ac b/configure.ac
index d9f52e5..c0434a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -343,8 +343,8 @@ AC_DEFUN
 OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
 OPTION_DEFAULT_ON([xim],[don't use X11 XIM])
 AC_ARG_WITH([ns],[AS_HELP_STRING([--with-ns],
-[use Nextstep (OS X Cocoa or GNUstep) windowing system.
-On by default on Mac OS X.])],[],[with_ns=maybe])
+[use Nextstep (macOS Cocoa or GNUstep) windowing system.
+On by default on macOS.])],[],[with_ns=maybe])
 OPTION_DEFAULT_OFF([w32], [use native MS Windows GUI in a Cygwin build])
 
 OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux 
console])
@@ -608,7 +608,7 @@ AC_DEFUN
     opsys=openbsd
   ;;
 
-  ## Apple Darwin / Mac OS X
+  ## Apple Darwin / macOS
   *-apple-darwin* )
     case "${canonical}" in
       *-apple-darwin[0-9].*) unported=yes ;;
@@ -1895,14 +1895,14 @@ AC_DEFUN
 
   macfont_file=""
   if test "${NS_IMPL_COCOA}" = "yes"; then
-    AC_MSG_CHECKING([for OSX 10.6 or newer])
+    AC_MSG_CHECKING([for macOS 10.6 or newer])
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AppKit/AppKit.h>],
                                      [
 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
  ; /* OK */
 #else
- error "OSX 10.6 or newer required";
+ error "macOS 10.6 or newer required";
 #endif
 #endif
                    ])],
@@ -1911,7 +1911,7 @@ AC_DEFUN
     AC_MSG_RESULT([$ns_osx_have_106])
 
     if test $ns_osx_have_106 = no; then
-       AC_MSG_ERROR([OSX 10.6 or newer is required]);
+       AC_MSG_ERROR([macOS 10.6 or newer is required]);
     fi
   fi
 fi
@@ -3615,9 +3615,9 @@ AC_DEFUN
 GNUSTEP_CFLAGS=
 ### Use NeXTstep API to implement GUI.
 if test "${HAVE_NS}" = "yes"; then
-  AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either 
GNUstep or Cocoa on Mac OS X.])
+  AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either 
GNUstep or Cocoa on macOS.])
   if test "${NS_IMPL_COCOA}" = "yes"; then
-    AC_DEFINE(NS_IMPL_COCOA, 1, [Define to 1 if you are using NS windowing 
under MacOS X.])
+    AC_DEFINE(NS_IMPL_COCOA, 1, [Define to 1 if you are using NS windowing 
under macOS.])
   fi
   if test "${NS_IMPL_GNUSTEP}" = "yes"; then
     AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing 
under GNUstep.])
@@ -3737,7 +3737,7 @@ AC_DEFUN
 if test "${with_xml2}" != "no"; then
   ### I'm not sure what the version number should be, so I just guessed.
   EMACS_CHECK_MODULES([LIBXML2], [libxml-2.0 > 2.6.17])
-  # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
+  # Built-in libxml2 on macOS 10.8 lacks libxml-2.0.pc.
   if test "${HAVE_LIBXML2}" != "yes" && test "$opsys" = "darwin"; then
     SAVE_CPPFLAGS="$CPPFLAGS"
     if test -z "$xcsdkdir" -a -n "$XCRUN" -a ! -d /usr/include; then
@@ -3961,7 +3961,7 @@ AC_DEFUN
 case "$opsys" in
   ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
   ##  The ncurses library has been moved out of the System framework in
-  ##  Mac OS X 10.2.  So if configure detects it, set the command-line
+  ##  macOS 10.2.  So if configure detects it, set the command-line
   ##  option to use it.
   darwin) LIBS_TERMCAP="-lncurses" ;;
 
@@ -4732,9 +4732,9 @@ AC_DEFUN
     ;;
 
   darwin)
-    dnl Not __APPLE__, as this may not be defined on non-OSX Darwin.
+    dnl Not __APPLE__, as this may not be defined on non-macOS Darwin.
     dnl Not DARWIN, because Panther and lower CoreFoundation.h use DARWIN to
-    dnl distinguish OS X from pure Darwin.
+    dnl distinguish macOS from pure Darwin.
     AC_DEFINE(DARWIN_OS, [], [Define if the system is Darwin.])
     ;;
 
@@ -5047,7 +5047,7 @@ AC_DEFUN
 dnl verbatim defined above.  The tricky name is apropos, as this hack
 dnl makes Fortify go sour!
 AH_VERBATIM([FORTIFY_SOUR],
-[/* Without the following workaround, Emacs runs slowly on OS X 10.8.
+[/* Without the following workaround, Emacs runs slowly on macOS 10.8.
    The workaround disables some useful run-time checking, so it
    should be conditional to the platforms with the performance bug.
    Perhaps Apple will fix this some day; also see m4/extern-inline.m4.  */
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 8d3d936..524cd8d 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -558,11 +558,11 @@ General Variables
 @env{LANG} is not set.  But if @env{LC_ALL} is specified, it overrides
 the settings of all the other locale environment variables.
 
-On MS-Windows and OS X, if @env{LANG} is not already set in the
+On MS-Windows and macOS, if @env{LANG} is not already set in the
 environment, Emacs sets it based on the system-wide default.  You can
 set this in the ``Regional Settings'' Control Panel on some versions
 of MS-Windows, and in the ``Language and Region'' System Preference on
-OS X.
+macOS.
 
 The value of the @env{LC_CTYPE} category is
 matched against entries in @code{locale-language-names},
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index b0597dc..de54c56 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -2,20 +2,22 @@
 @c Copyright (C) 2000-2016 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Mac OS / GNUstep
address@hidden Emacs and Mac OS / GNUstep
address@hidden Emacs and macOS / GNUstep
address@hidden macOS
address@hidden OS X
 @cindex Mac OS X
 @cindex Macintosh
 @cindex GNUstep
 
   This section describes the peculiarities of using Emacs built with
 the GNUstep libraries on GNU/Linux or other operating systems, or on
-Mac OS X with native window system support.  On Mac OS X, Emacs can be
+macOS with native window system support.  On macOS, Emacs can be
 built either without window system support, with X11, or with the
 Cocoa interface; this section only applies to the Cocoa build.  This
-does not support versions of Mac OS X earlier than 10.6.
+does not support versions of macOS earlier than 10.6.
 
   For various historical and technical reasons, Emacs uses the term
address@hidden internally, instead of ``Cocoa'' or ``Mac OS X''; for
address@hidden internally, instead of ``Cocoa'' or ``macOS''; for
 instance, most of the commands and variables described in this section
 begin with @samp{ns-}, which is short for @samp{Nextstep}.  NeXTstep
 was an application interface released by NeXT Inc during the 1980s, of
@@ -84,7 +86,7 @@ Mac / GNUstep Basics
 they would when launched from the shell.
 
 For the PATH and MANPATH variables, a system-wide method
-of setting PATH is recommended on Mac OS X, using the
+of setting PATH is recommended on macOS, using the
 @file{/etc/paths} files and the @file{/etc/paths.d} directory.
 
 @node Mac / GNUstep Customization
@@ -117,8 +119,8 @@ Mac / GNUstep Customization
 Useful in this context is the listing of all faces obtained by
 @kbd{M-x list-faces-display}.
 
address@hidden Core Text, on Mac OS X
-In Mac OS X, Emacs uses a Core Text based font backend
address@hidden Core Text, on macOS
+In macOS, Emacs uses a Core Text based font backend
 by default.  If you prefer the older font style, enter the following
 at the command-line before starting Emacs:
 
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index e735343..cc2d894 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -745,7 +745,7 @@ Coding Systems
 @item @dots{}-unix
 Don't do any end-of-line conversion; assume the file uses
 newline to separate lines.  (This is the convention normally used
-on Unix and GNU systems, and Mac OS X.)
+on Unix and GNU systems, and macOS.)
 
 @item @dots{}-dos
 Assume the file uses carriage-return linefeed to separate lines, and do
@@ -758,7 +758,7 @@ Coding Systems
 @item @dots{}-mac
 Assume the file uses carriage-return to separate lines, and do the
 appropriate conversion.  (This was the convention used on the
-Macintosh system prior to OS X.)
+Macintosh system prior to macOS.)
 @end table
 
   These variant coding systems are omitted from the
@@ -1393,7 +1393,7 @@ Defining Fontsets
 @noindent
 or just @samp{fontset-standard} for short.
 
-  On GNUstep and Mac OS X, the standard fontset is created using the value of
+  On GNUstep and macOS, the standard fontset is created using the value of
 @code{ns-standard-fontset-spec}, and on MS Windows it is
 created using the value of @code{w32-standard-fontset-spec}.
 
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index d050738..e58956c 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -7155,7 +7155,7 @@ Window Systems
 Emacs is displaying the frame using native MS-Windows GUI.
 @item ns
 Emacs is displaying the frame using the Nextstep interface (used on
-GNUstep and Mac OS X).
+GNUstep and macOS).
 @item pc
 Emacs is displaying the frame using MS-DOS direct screen writes.
 @item nil
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index e189da9..ad506e3 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1145,14 +1145,14 @@ Truenames
 which case it's important to know whether the underlying filesystem is
 case-insensitive.  This function returns @code{t} if file
 @var{filename} is on a case-insensitive filesystem.  It always returns
address@hidden on MS-DOS and MS-Windows.  On Cygwin and Mac OS X,
address@hidden on MS-DOS and MS-Windows.  On Cygwin and macOS,
 filesystems may or may not be case-insensitive, and the function tries
 to determine case-sensitivity by a runtime test.  If the test is
 inconclusive, the function returns @code{t} on Cygwin and @code{nil}
-on Mac OS X.
+on macOS.
 
 Currently this function always returns @code{nil} on platforms other
-than MS-DOS, MS-Windows, Cygwin, and Mac OS X.  It does not detect
+than MS-DOS, MS-Windows, Cygwin, and macOS.  It does not detect
 case-insensitivity of mounted filesystems, such as Samba shares or
 NFS-mounted Windows volumes.  On remote hosts, it assumes @code{t} for
 the @samp{smb} method.  For all other connection methods, runtime
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index fd2ce32..43be056 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1050,7 +1050,7 @@ Coding System Basics
 MS-Windows and MS-DOS systems, is to use a carriage-return and a
 linefeed at the end of a line.  The Mac convention is to use just
 carriage-return.  (This was the convention used on the Macintosh
-system prior to OS X.)
+system prior to macOS.)
 
 @cindex base coding system
 @cindex variant coding system
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 3312705..903bad3 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -891,7 +891,7 @@ System Environment
 Cygwin, a Posix layer on top of MS-Windows.
 
 @item darwin
-Darwin (Mac OS X).
+Darwin (macOS).
 
 @item gnu
 The GNU system (using the GNU kernel, which consists of the HURD and Mach).
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index 72a90a1..f76adec 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -1206,11 +1206,11 @@ New in Emacs 23
 
 @cindex NeXTstep port
 @cindex GNUstep port
address@hidden Mac OS X Cocoa
address@hidden macOS Cocoa
 @item
 There is a new NeXTstep port of Emacs.  This supports GNUstep and Mac OS
 X (via the Cocoa libraries).  The Carbon port of Emacs, which supported
-Mac OS X in Emacs 22, has been removed.
+macOS in Emacs 22, has been removed.
 
 @cindex Directory-local variables
 @item
@@ -1245,11 +1245,11 @@ New in Emacs 22
 @cindex Supported systems
 @item
 Emacs 22 features support for GNU/Linux systems on S390 and x86-64
-machines, as well as support for the Mac OS X and Cygwin operating
+machines, as well as support for the macOS and Cygwin operating
 systems.
 
 @item
-The native MS-Windows, and Mac OS X builds include full support
+The native MS-Windows, and macOS builds include full support
 for images, toolbar, and tooltips.
 
 @item
@@ -3341,7 +3341,7 @@ Finding Emacs and related packages
 * Emacs for MS-DOS::
 * Emacs for MS-Windows::
 * Emacs for GNUstep::
-* Emacs for Mac OS X::
+* Emacs for macOS::
 @end menu
 
 @node Finding Emacs on the Internet
@@ -3561,13 +3561,15 @@ Emacs for GNUstep
 Beginning with version 23.1, Emacs supports GNUstep natively.
 See the file @file{nextstep/INSTALL} in the distribution.
 
address@hidden Emacs for Mac OS X
address@hidden Where can I get Emacs for Mac OS X?
address@hidden Emacs for macOS
address@hidden Where can I get Emacs for macOS?
 @cindex Apple computers, Emacs for
 @cindex Macintosh, Emacs for
address@hidden macOS, Emacs for
address@hidden OS X, Emacs for
 @cindex Mac OS X, Emacs for
 
-Beginning with version 22.1, Emacs supports Mac OS X natively.
+Beginning with version 22.1, Emacs supports macOS natively.
 See the file @file{nextstep/INSTALL} in the distribution.
 
 @c ------------------------------------------------------------
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 2473d26..c34dd7c 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -21522,7 +21522,7 @@ About mairix
 Mairix is a tool for indexing and searching words in locally stored
 mail.  It was written by Richard Curnow and is licensed under the
 address@hidden  Mairix comes with most popular GNU/Linux distributions, but it 
also
-runs under Windows (with cygwin), Mac OS X and Solaris.  The homepage can
+runs under Windows (with cygwin), macOS and Solaris.  The homepage can
 be found at
 @uref{http://www.rpcurnow.force9.co.uk/mairix/index.html}
 
diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi
index 26c81d6..3321226 100644
--- a/doc/misc/idlwave.texi
+++ b/doc/misc/idlwave.texi
@@ -2382,7 +2382,7 @@ The IDLWAVE Shell
 Emacs packages which handles the communication with the IDL program.
 Unfortunately, IDL for Windows does not have command-prompt versions and
 thus do not allow the interaction with Emacs, so the IDLWAVE shell
-currently only works under Unix and MacOSX.
+currently only works under Unix and macOS.
 
 @menu
 * Starting the Shell::          How to launch IDL as a subprocess
@@ -3533,14 +3533,14 @@ Catalogs
 @end defopt
 
 @defopt idlwave-library-path
-IDL library path for Windows and address@hidden  Under Unix/MacOSX, will be
+IDL library path for Windows.  Under Unix/macOS, will be
 obtained from the Shell when run.
 @end defopt
 
 @defopt idlwave-system-directory
-The IDL system directory for Windows and address@hidden  Also needed for
+The IDL system directory for Windows.  Also needed for
 locating HTML help and the IDL Assistant for IDL v6.2 and later.  Under
-Unix/MacOSX, will be obtained from the Shell and recorded, if run.
+Unix/macOS, will be obtained from the Shell and recorded, if run.
 @end defopt
 
 @defopt idlwave-config-directory (@file{~/.emacs.d/idlwave})
@@ -3651,7 +3651,7 @@ User Catalog
 also much slower than scanning library catalogs.
 
 You can scan any of the directories on the currently known path.  Under
-Windows and MacOS (not OSX), you need to specify the IDL search path in
+Windows, you need to specify the IDL search path in
 the variable @code{idlwave-library-path}, and the location of the IDL
 directory (the value of the @code{!DIR} system variable) in the variable
 @code{idlwave-system-directory}, like address@hidden initial @samp{+}
@@ -3822,7 +3822,7 @@ HTML Help Browser Tips
 @noindent Individual platform recommendations:
 
 @itemize @bullet
address@hidden Unix/MacOSX: The @uref{http://www.w3m.org,@code{w3m}} browser
address@hidden Unix/macOS: The @uref{http://www.w3m.org,@code{w3m}} browser
 and its associated
 @uref{http://emacs-w3m.namazu.org/,@code{emacs-w3m}} emacs mode
 provide in-buffer browsing with image display, and excellent speed and
@@ -4023,8 +4023,9 @@ Configuration Examples
 @node Windows and MacOS
 @appendix Windows and MacOS
 @cindex Windows
address@hidden MacOS
address@hidden MacOSX
address@hidden macOS
address@hidden OS X
address@hidden Mac OS X
 
 IDLWAVE was developed on a UNIX system.  However, thanks to the
 portability of Emacs, much of IDLWAVE does also work under different
@@ -4112,10 +4113,10 @@ Troubleshooting
 pathname to the idl program with the variable
 @code{idlwave-shell-explicit-file-name}.  Note that you may need to
 set your shell search path in two places when running Emacs as an Aqua
-application with MacOSX; see the next topic.
+application with macOS; see the next topic.
 
 @item @strong{IDLWAVE is disregarding my @samp{IDL_PATH} which I set
-under MacOSX}
+under macOS}
 
 If you run Emacs directly as an Aqua application, rather than from the
 console shell, the environment is set not from your usual shell
diff --git a/doc/misc/mairix-el.texi b/doc/misc/mairix-el.texi
index 8deead5..69d3fc4 100644
--- a/doc/misc/mairix-el.texi
+++ b/doc/misc/mairix-el.texi
@@ -68,7 +68,7 @@ About
 Mairix is a tool for indexing and searching words in locally stored
 mail.  It was written by Richard Curnow and is licensed under the
 address@hidden  Mairix comes with most popular GNU/Linux distributions, but it 
also
-runs under Windows (with cygwin), Mac OS X and Solaris.  The homepage can
+runs under Windows (with cygwin), macOS and Solaris.  The homepage can
 be found at
 @uref{http://www.rpcurnow.force9.co.uk/mairix/index.html}
 
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index a5239ac..a6f9dbd 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -6616,7 +6616,7 @@ Resolving idle time
 @vindex org-clock-idle-time
 By customizing the variable @code{org-clock-idle-time} to some integer, such
 as 10 or 15, Emacs can alert you when you get back to your computer after
-being idle for that many address@hidden computers using Mac OS X,
+being idle for that many address@hidden computers using macOS,
 idleness is based on actual user idleness, not just Emacs' idle time.  For
 X11, you can install a utility program @file{x11idle.c}, available in the
 @code{contrib/scripts} directory of the Org git distribution, or install the
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 0e09cf7..955a13e 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -933,7 +933,7 @@ GVFS based methods
 @cindex afp method
 
 This method is for connecting to remote hosts with the Apple Filing
-Protocol for accessing files on Mac OS X volumes.  @value{tramp} access
+Protocol for accessing files on macOS volumes.  @value{tramp} access
 syntax requires a leading volume (share) name, for example:
 @address@hidden,user@@host,/volume}}.
 
diff --git a/etc/MACHINES b/etc/MACHINES
index 5562dc2..352537b 100644
--- a/etc/MACHINES
+++ b/etc/MACHINES
@@ -64,7 +64,7 @@ the list at the end of this file.
   This was tested on a little-endian sh4 system (cpu type SH7751R) running
   Gentoo Linux 2008.0.
 
-** Mac OS X
+** macOS
 
   Version 10.6 or newer.  PowerPC is not supported.
   For installation instructions see the file nextstep/INSTALL.
diff --git a/etc/NEXTSTEP b/etc/NEXTSTEP
index ad2ab95..3ab0529 100644
--- a/etc/NEXTSTEP
+++ b/etc/NEXTSTEP
@@ -3,7 +3,7 @@ See the end of the file for license conditions.
 
 This file contains information about GNU Emacs on "Nextstep" platforms.
 The Nextstep support code works on many POSIX systems (and possibly
-W32) using the GNUstep libraries, and on MacOS X systems using the
+W32) using the GNUstep libraries, and on macOS systems using the
 Cocoa libraries.
 
 Background
@@ -17,7 +17,7 @@ system in the late 1980's.  Later on, in collaboration with 
Sun, this
 API was published as a specification called OpenStep.  The GNUstep
 project started in the early 1990's to provide a free implementation
 of this API.  Later on, Apple bought NeXT (some would say "NeXT bought
-Apple") and made OpenStep the basis of OS X, calling the API "Cocoa".
+Apple") and made OpenStep the basis of macOS, calling the API "Cocoa".
 Since then, Cocoa has evolved beyond the OpenStep specification, and
 GNUstep has followed it.
 
@@ -30,7 +30,7 @@ begin with the letters "NS".
 (See http://en.wikipedia.org/wiki/Nextstep)
 
 This Emacs port was first released in the early 1990's on the NeXT
-computer, and was successively updated to OpenStep, Rhapsody, OS X,
+computer, and was successively updated to OpenStep, Rhapsody, macOS,
 and then finally GNUstep, tracking GNU emacs core releases in the
 meantime.
 
@@ -247,7 +247,7 @@ Christian Limpach
 Scott Bender
     OpenStep, Rhapsody ports
 Christophe de Dinechin
-    MacOS X port
+    macOS port
 Adrian Robert
     GNUstep port, update Emacs 20 -> 21+
 
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index bbf865c..69ded1f 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -2416,11 +2416,11 @@ please call support for your X-server and see if you 
can get a fix.
 If you do, please send it to address@hidden so we can list it here.
 
 
-* Runtime problems specific to Mac OS X
+* Runtime problems specific to macOS
 
-** On Mac OS X, file-name-case-insensitive-p may be unreliable
+** On macOS, file-name-case-insensitive-p may be unreliable
 
-The implementation of that function on Mac OS X uses pathconf with the
+The implementation of that function on macOS uses pathconf with the
 _PC_CASE_SENSITIVE flag.  There have been reports that this use of
 pathconf does not work reliably.  If you have a problem, please
 recompile Emacs with -DDARWIN_OS_CASE_SENSITIVE_FIXME=1 or
diff --git a/etc/TODO b/etc/TODO
index 48c1654..2f5be64 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -700,7 +700,7 @@ resize the frame.
 **** Support 'proced' (implement 'process-attributes')
 
 Unfortunately, a user-level process like Emacs does not have the
-privileges to get information about other processes under OS X.
+privileges to get information about other processes under macOS.
 
 There are other ways to do this:
 
@@ -711,7 +711,7 @@ There are other ways to do this:
  3) Ask the user to self-sign Emacs, if this feature is of interest.
 
 Anders Lindgren <address@hidden> has implemented
-'process-attributes' for OS X, which currently only work when
+'process-attributes' for macOS, which currently only work when
 running Emacs as root.
 
 See this article by Bozhidar Batsov for an overview of Proced:
@@ -724,11 +724,11 @@ even though Emacs allows a user to customize such 
features.
 
 *** New features
 
-This section contains features unique to Nextstep and/or OS X.
+This section contains features unique to Nextstep and/or macOS.
 
 **** PressAndHold for writing accented character
 
-On OS X, many application support the press and hold pattern to
+On macOS, many application support the press and hold pattern to
 invoke a menu of accented characters.  (See example at
 https://support.apple.com/en-us/HT201586 .)
 
@@ -741,7 +741,7 @@ implemented in Emacs for a free system.
 
 **** Floating scroll bars
 
-In modern OS X applications, the scroll bar often floats over the
+In modern macOS applications, the scroll bar often floats over the
 content, and is invisible unless actually used.  This makes the user
 interface less cluttered and more area could be used to contain text.
 
@@ -804,7 +804,7 @@ This section contains issues where there is an ongoing 
debate.
 **** Key bindings of CMD and ALT
 
 Currently in the "ns" port, ALT is bound to Meta and CMD is bound to
-Super -- allowing the user to use typical OS X commands like CMD-A to
+Super -- allowing the user to use typical macOS commands like CMD-A to
 mark everything.
 
 Unfortunately, when using an international keyboard, you can't type
@@ -852,9 +852,9 @@ Emacs can be build in a number of different ways.  For each 
feature,
 consider if is really is "NS" specific, or if it should be applied to
 all build versions.
 
-- With the "NS" interface.  This is the normal way to build Emacs on OS X.
+- With the "NS" interface.  This is the normal way to build Emacs on macOS.
 
-- With the "X11" interface.  On OS X, this is mainly of interest to
+- With the "X11" interface.  On macOS, this is mainly of interest to
   developers of Emacs to get a "reference" interface implementations.
   However, it might be of interest for people working remotely, as X11
   applications can be used over a network connection.
@@ -863,11 +863,11 @@ all build versions.
 
 *** Bugs
 
-**** Incorrect translation of Super modifier with Ctrl or Meta on OS X
+**** Incorrect translation of Super modifier with Ctrl or Meta on macOS
 
 When pressing 'M-s-a', Emacs replies "M-s-å is undefined".  What
 happened is a mix of Emacs view that Meta and Super has been pressed,
-and OS X view that ALT-a should yield "å" (U+00E5 LATIN SMALL LETTER A
+and macOS view that ALT-a should yield "å" (U+00E5 LATIN SMALL LETTER A
 WITH RING ABOVE).
 
 The bug reports suggest two different patches; unfortunately, neither
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 150d943..c3693ab 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -75,7 +75,7 @@ am__v_at_1 =
 
 # ==================== Where To Install Things ====================
 
-# Location to install Emacs.app under GNUstep / Mac OS X.
+# Location to install Emacs.app under GNUstep / macOS.
 # Later values may use this.
 address@hidden@
 
diff --git a/lib/acl-internal.c b/lib/acl-internal.c
index 4de60c3..9b8104c 100644
--- a/lib/acl-internal.c
+++ b/lib/acl-internal.c
@@ -25,7 +25,7 @@
 
 #if USE_ACL && HAVE_ACL_GET_FILE
 
-# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
+# if HAVE_ACL_TYPE_EXTENDED /* macOS */
 
 /* ACL is an ACL, from a file, stored as type ACL_TYPE_EXTENDED.
    Return 1 if the given ACL is non-trivial.
@@ -479,7 +479,7 @@ void
 free_permission_context (struct permission_context *ctx)
 {
 #if USE_ACL
-# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, macOS, IRIX, Tru64 */
   if (ctx->acl)
     acl_free (ctx->acl);
 #  if !HAVE_ACL_TYPE_EXTENDED
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index 636273e..f4cb010 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -72,7 +72,7 @@ _GL_INLINE_HEADER_BEGIN
 
 # if HAVE_ACL_GET_FILE
 /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
-/* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+/* Linux, FreeBSD, macOS, IRIX, Tru64 */
 
 #  ifndef MIN_ACL_ENTRIES
 #   define MIN_ACL_ENTRIES 4
@@ -132,7 +132,7 @@ rpl_acl_set_fd (int fd, acl_t acl)
 #  endif
 
 /* Set to 0 if a file's mode is stored independently from the ACL.  */
-#  if (HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP) || defined __sgi 
/* Mac OS X, IRIX */
+#  if (HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP) || defined __sgi 
/* macOS, IRIX */
 #   define MODE_INSIDE_ACL 0
 #  endif
 
@@ -144,7 +144,7 @@ rpl_acl_set_fd (int fd, acl_t acl)
 extern int acl_entries (acl_t);
 #  endif
 
-#  if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
+#  if HAVE_ACL_TYPE_EXTENDED /* macOS */
 /* ACL is an ACL, from a file, stored as type ACL_TYPE_EXTENDED.
    Return 1 if the given ACL is non-trivial.
    Return 0 if it is trivial.  */
@@ -256,7 +256,7 @@ extern int acl_nontrivial (int count, struct acl *entries);
 struct permission_context {
   mode_t mode;
 #if USE_ACL
-# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, macOS, IRIX, Tru64 */
   acl_t acl;
 #  if !HAVE_ACL_TYPE_EXTENDED
   acl_t default_acl;
diff --git a/lib/acl_entries.c b/lib/acl_entries.c
index 9fc9cf5..b6644a7 100644
--- a/lib/acl_entries.c
+++ b/lib/acl_entries.c
@@ -22,7 +22,7 @@
 #include "acl-internal.h"
 
 /* This file assumes POSIX-draft like ACLs
-   (Linux, FreeBSD, Mac OS X, IRIX, Tru64).  */
+   (Linux, FreeBSD, macOS, IRIX, Tru64).  */
 
 /* Return the number of entries in ACL.
    Return -1 and set errno upon failure to determine it.  */
@@ -34,8 +34,8 @@ acl_entries (acl_t acl)
 
   if (acl != NULL)
     {
-#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, Mac OS X */
-# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
+#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, macOS */
+# if HAVE_ACL_TYPE_EXTENDED /* macOS */
       /* acl_get_entry returns 0 when it successfully fetches an entry,
          and -1/EINVAL at the end.  */
       acl_entry_t ace;
diff --git a/lib/euidaccess.c b/lib/euidaccess.c
index e9eb0e9..fcc0b38 100644
--- a/lib/euidaccess.c
+++ b/lib/euidaccess.c
@@ -84,7 +84,7 @@ euidaccess (const char *file, int mode)
   return accessx (file, mode, ACC_SELF);
 #elif HAVE_EACCESS                      /* FreeBSD */
   return eaccess (file, mode);
-#else       /* Mac OS X, NetBSD, OpenBSD, HP-UX, Solaris, Cygwin, mingw, BeOS 
*/
+#else       /* macOS, NetBSD, OpenBSD, HP-UX, Solaris, Cygwin, mingw, BeOS */
 
   uid_t uid = getuid ();
   gid_t gid = getgid ();
diff --git a/lib/filemode.h b/lib/filemode.h
index 09f345e..ed4aadf 100644
--- a/lib/filemode.h
+++ b/lib/filemode.h
@@ -23,7 +23,7 @@
 
 /* Get the declaration of strmode.  */
 # if HAVE_DECL_STRMODE
-#  include <string.h> /* Mac OS X, FreeBSD, OpenBSD */
+#  include <string.h> /* macOS, FreeBSD, OpenBSD */
 #  include <unistd.h> /* NetBSD */
 # endif
 
diff --git a/lib/get-permissions.c b/lib/get-permissions.c
index bf40dad..2aca895 100644
--- a/lib/get-permissions.c
+++ b/lib/get-permissions.c
@@ -38,7 +38,7 @@ get_permissions (const char *name, int desc, mode_t mode,
 
 #if USE_ACL && HAVE_ACL_GET_FILE
   /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
-  /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+  /* Linux, FreeBSD, macOS, IRIX, Tru64 */
 # if !HAVE_ACL_TYPE_EXTENDED
   /* Linux, FreeBSD, IRIX, Tru64 */
 
@@ -67,9 +67,9 @@ get_permissions (const char *name, int desc, mode_t mode,
 # endif
 
 #  else /* HAVE_ACL_TYPE_EXTENDED */
-  /* Mac OS X */
+  /* macOS */
 
-  /* On Mac OS X,  acl_get_file (name, ACL_TYPE_ACCESS)
+  /* On macOS,     acl_get_file (name, ACL_TYPE_ACCESS)
      and           acl_get_file (name, ACL_TYPE_DEFAULT)
      always return NULL / EINVAL.  You have to use
                    acl_get_file (name, ACL_TYPE_EXTENDED)
diff --git a/lib/getgroups.c b/lib/getgroups.c
index b040505..3312843 100644
--- a/lib/getgroups.c
+++ b/lib/getgroups.c
@@ -43,7 +43,7 @@ getgroups (int n _GL_UNUSED, GETGROUPS_T *groups _GL_UNUSED)
 #  define GETGROUPS_ZERO_BUG 0
 # endif
 
-/* On OS X 10.6 and later, use the usual getgroups, not the one
+/* On macOS 10.6 and later, use the usual getgroups, not the one
    supplied when _DARWIN_C_SOURCE is defined.  _DARWIN_C_SOURCE is
    normally defined, since it means "conform to POSIX, but add
    non-POSIX extensions even if that violates the POSIX namespace
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
index 224ca6a..db860a2 100644
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -32,7 +32,7 @@
 
 /* Work around the bug in some systems whereby gettimeofday clobbers
    the static buffer that localtime uses for its return value.  The
-   gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
+   gettimeofday function from macOS 10.0.4 (i.e., Darwin 1.3.7) has
    this problem.  The tzset replacement is necessary for at least
    Solaris 2.5, 2.5.1, and 2.6.  */
 
diff --git a/lib/secure_getenv.c b/lib/secure_getenv.c
index 88a60dc..417d772 100644
--- a/lib/secure_getenv.c
+++ b/lib/secure_getenv.c
@@ -30,7 +30,7 @@ secure_getenv (char const *name)
 {
 #if HAVE___SECURE_GETENV /* glibc */
   return __secure_getenv (name);
-#elif HAVE_ISSETUGID /* OS X, FreeBSD, NetBSD, OpenBSD */
+#elif HAVE_ISSETUGID /* macOS, FreeBSD, NetBSD, OpenBSD */
   if (issetugid ())
     return NULL;
   return getenv (name);
diff --git a/lib/set-permissions.c b/lib/set-permissions.c
index 2c77356..7620960 100644
--- a/lib/set-permissions.c
+++ b/lib/set-permissions.c
@@ -489,7 +489,7 @@ set_acls (struct permission_context *ctx, const char *name, 
int desc,
 
 # if HAVE_ACL_GET_FILE
   /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
-  /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+  /* Linux, FreeBSD, macOS, IRIX, Tru64 */
 #  if !HAVE_ACL_TYPE_EXTENDED
   /* Linux, FreeBSD, IRIX, Tru64 */
 
@@ -552,9 +552,9 @@ set_acls (struct permission_context *ctx, const char *name, 
int desc,
 # endif
 
 #  else /* HAVE_ACL_TYPE_EXTENDED */
-  /* Mac OS X */
+  /* macOS */
 
-  /* On Mac OS X,  acl_get_file (name, ACL_TYPE_ACCESS)
+  /* On macOS,     acl_get_file (name, ACL_TYPE_ACCESS)
      and           acl_get_file (name, ACL_TYPE_DEFAULT)
      always return NULL / EINVAL.  You have to use
                    acl_get_file (name, ACL_TYPE_EXTENDED)
diff --git a/lib/signal.in.h b/lib/signal.in.h
index ab0a049..d797dbe 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -55,7 +55,7 @@
 #ifndef address@hidden@_SIGNAL_H
 #define address@hidden@_SIGNAL_H
 
-/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android
+/* macOS 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android
    declare pthread_sigmask in <pthread.h>, not in <signal.h>.
    But avoid namespace pollution on glibc systems.*/
 #if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
@@ -213,7 +213,7 @@ typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1];
 
 /* Test whether a given signal is contained in a signal set.  */
 # if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on Mac OS X.  */
+/* This function is defined as a macro on macOS.  */
 #  if defined __cplusplus && defined GNULIB_NAMESPACE
 #   undef sigismember
 #  endif
@@ -226,7 +226,7 @@ _GL_CXXALIASWARN (sigismember);
 
 /* Initialize a signal set to the empty set.  */
 # if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on Mac OS X.  */
+/* This function is defined as a macro on macOS.  */
 #  if defined __cplusplus && defined GNULIB_NAMESPACE
 #   undef sigemptyset
 #  endif
@@ -238,7 +238,7 @@ _GL_CXXALIASWARN (sigemptyset);
 
 /* Add a signal to a signal set.  */
 # if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on Mac OS X.  */
+/* This function is defined as a macro on macOS.  */
 #  if defined __cplusplus && defined GNULIB_NAMESPACE
 #   undef sigaddset
 #  endif
@@ -251,7 +251,7 @@ _GL_CXXALIASWARN (sigaddset);
 
 /* Remove a signal from a signal set.  */
 # if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on Mac OS X.  */
+/* This function is defined as a macro on macOS.  */
 #  if defined __cplusplus && defined GNULIB_NAMESPACE
 #   undef sigdelset
 #  endif
@@ -264,7 +264,7 @@ _GL_CXXALIASWARN (sigdelset);
 
 /* Fill a signal set with all possible signals.  */
 # if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on Mac OS X.  */
+/* This function is defined as a macro on macOS.  */
 #  if defined __cplusplus && defined GNULIB_NAMESPACE
 #   undef sigfillset
 #  endif
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index c86ab09..ab8bae4 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -88,7 +88,7 @@
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
    IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
    AIX 5.2 <sys/types.h> isn't needed and causes troubles.
-   Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+   macOS 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
    relies on the system <stdint.h> definitions, so include
    <sys/types.h> after @address@hidden  */
 # if @HAVE_SYS_TYPES_H@ && ! defined _AIX
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index db3253b..c6a2a7e 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -88,8 +88,8 @@ struct random_data
 #endif
 
 #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined 
GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined 
__WIN32__) && ! defined __CYGWIN__)
-/* On Mac OS X 10.3, only <unistd.h> declares mkstemp.  */
-/* On Mac OS X 10.5, only <unistd.h> declares mkstemps.  */
+/* On macOS 10.3, only <unistd.h> declares mkstemp.  */
+/* On macOS 10.5, only <unistd.h> declares mkstemps.  */
 /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt.  */
 /* But avoid namespace pollution on glibc systems and native Windows.  */
 # include <unistd.h>
diff --git a/lib/string.in.h b/lib/string.in.h
index b3213c4..57e7387 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -22,7 +22,7 @@
 
 #if defined _GL_ALREADY_INCLUDING_STRING_H
 /* Special invocation convention:
-   - On OS X/NetBSD we have a sequence of nested includes
+   - On macOS/NetBSD we have a sequence of nested includes
        <string.h> -> <strings.h> -> "string.h"
      In this situation system _chk variants due to -D_FORTIFY_SOURCE
      might be used after any replacements defined here.  */
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index 9a2622f..10bef18 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -79,7 +79,7 @@
 
 /* On OSF/1 4.0, <sys/select.h> provides only a forward declaration
    of 'struct timeval', and no definition of this type.
-   Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
+   Also, macOS, AIX, HP-UX, IRIX, Solaris, Interix declare select()
    in <sys/time.h>.
    But avoid namespace pollution on glibc systems and "unknown type
    name" problems on Cygwin.  */
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index c3af07a..a520873 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -23,7 +23,7 @@
 
 #ifdef _GL_INCLUDING_UNISTD_H
 /* Special invocation convention:
-   - On Mac OS X 10.3.9 we have a sequence of nested includes
+   - On macOS 10.3.9 we have a sequence of nested includes
      <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h>
      In this situation, the functions are not yet declared, therefore we cannot
      provide the C++ aliases.  */
@@ -1355,7 +1355,7 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
 _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
                                     _GL_ARG_NONNULL ((1)));
 # endif
-/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
+/* Need to cast, because on Solaris 11 2011-10, macOS 10.5, IRIX 6.5
    and FreeBSD 6.4 the second parameter is int.  On Solaris 11
    2011-10, the first parameter is not const.  */
 _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
diff --git a/lisp/battery.el b/lisp/battery.el
index 10a3403..24eb8a5 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -22,10 +22,10 @@
 
 ;;; Commentary:
 
-;; There is at present support for GNU/Linux, OS X and Windows.  This
+;; There is at present support for GNU/Linux, macOS and Windows.  This
 ;; library supports both the `/proc/apm' file format of Linux version
 ;; 1.3.58 or newer and the `/proc/acpi/' directory structure of Linux
-;; 2.4.20 and 2.6.  Darwin (OS X) is supported by using the `pmset'
+;; 2.4.20 and 2.6.  Darwin (macOS) is supported by using the `pmset'
 ;; program.  Windows is supported by the GetSystemPowerStatus API call.
 
 ;;; Code:
@@ -604,7 +604,7 @@ battery-bsd-apm
          (cons ?t (or remaining-time "N/A")))))
 
 
-;;; `pmset' interface for Darwin (OS X).
+;;; `pmset' interface for Darwin (macOS).
 
 (defun battery-pmset ()
   "Get battery status information using `pmset'.
diff --git a/lisp/cedet/semantic/bovine/gcc.el 
b/lisp/cedet/semantic/bovine/gcc.el
index ec29239..b56b268 100644
--- a/lisp/cedet/semantic/bovine/gcc.el
+++ b/lisp/cedet/semantic/bovine/gcc.el
@@ -225,7 +225,7 @@ semantic-gcc-setup
         (setq semantic-lex-c-preprocessor-symbol-map nil))
     (dolist (D defines)
       (add-to-list 'semantic-lex-c-preprocessor-symbol-map D))
-    ;; Needed for parsing OS X libc
+    ;; Needed for parsing macOS libc
     (when (eq system-type 'darwin)
       (add-to-list 'semantic-lex-c-preprocessor-symbol-map '("__i386__" . "")))
     (when (featurep 'semantic/bovine/c)
diff --git a/lisp/faces.el b/lisp/faces.el
index 6e3b08c..ed220b9 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -106,9 +106,9 @@ face-font-family-alternatives
 
      ;; This looks good on GNU/Linux.
      "Courier 10 Pitch"
-     ;; This looks good on MS-Windows and OS X.
+     ;; This looks good on MS-Windows and macOS.
      "Consolas"
-     ;; This looks good on OS X.  "Courier" looks good too, but is
+     ;; This looks good on macOS.  "Courier" looks good too, but is
      ;; jagged on GNU/Linux and so is listed later as "courier".
      "Courier Std"
      ;; Although these are anti-aliased, they are a bit faint compared
diff --git a/lisp/files.el b/lisp/files.el
index c50e6aa..5e9d87b 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6411,7 +6411,7 @@ directory-listing-before-filename-regexp
         (western-comma (concat month s "+" dd "," s "+" yyyy))
         ;; Japanese MS-Windows ls-lisp has one-digit months, and
         ;; omits the Kanji characters after month and day-of-month.
-        ;; On Mac OS X 10.3, the date format in East Asian locales is
+        ;; On macOS 10.3, the date format in East Asian locales is
         ;; day-of-month digits followed by month digits.
         (mm "[ 0-1]?[0-9]")
         (east-asian
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 28eec4f..7543d0d 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2723,7 +2723,7 @@ set-locale-environment
       ;; On Darwin, file names are always encoded in utf-8, no matter
       ;; the locale.
       (setq default-file-name-coding-system 'utf-8)
-      ;; Mac OS X's Terminal.app by default uses utf-8 regardless of
+      ;; macOS's Terminal.app by default uses utf-8 regardless of
       ;; the locale.
       (when (and (null window-system)
                 (equal (getenv "TERM_PROGRAM" frame) "Apple_Terminal"))
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 18eaa22..650fbfa 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -72,7 +72,7 @@ report-emacs-bug-send-hook
 (defvar message-strip-special-text-properties)
 
 (defun report-emacs-bug-can-use-osx-open ()
-  "Return non-nil if the OS X \"open\" command is available for mailing."
+  "Return non-nil if the macOS \"open\" command is available for mailing."
   (and (featurep 'ns)
        (equal (executable-find "open") "/usr/bin/open")
        (memq system-type '(darwin))))
@@ -107,7 +107,7 @@ report-emacs-bug-can-use-xdg-email
 
 (defun report-emacs-bug-insert-to-mailer ()
   "Send the message to your preferred mail client.
-This requires either the OS X \"open\" command, or the freedesktop
+This requires either the macOS \"open\" command, or the freedesktop
 \"xdg-email\" command to be available."
   (interactive)
   (save-excursion
diff --git a/lisp/man.el b/lisp/man.el
index 82691f5..a140e03 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -881,7 +881,7 @@ Man-completion-table
           (setq default-directory "/") ;; in case inherited doesn't exist
           ;; Actually for my `man' the arg is a regexp.
           ;; POSIX says it must be ERE and "man-db" seems to agree,
-          ;; whereas under MacOSX it seems to be BRE-style and doesn't
+          ;; whereas under macOS it seems to be BRE-style and doesn't
           ;; accept backslashes at all.  Let's not bother to
           ;; quote anything.
           (let ((process-environment (copy-sequence process-environment)))
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 9f3156d..d21fa2c 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1865,7 +1865,7 @@ menu-bar-help-menu
       '(menu-item "Emacs Tutorial" help-with-tutorial
                   :help "Learn how to use Emacs"))
 
-    ;; In OS X it's in the app menu already.
+    ;; In macOS it's in the app menu already.
     ;; FIXME? There already is an "About Emacs" (sans ...) entry in the Help 
menu.
     (and (featurep 'ns)
          (not (eq system-type 'darwin))
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 9ff9997..07c3daf 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -740,7 +740,7 @@ ange-ftp-fatal-msgs
   :type 'regexp)
 
 (defcustom ange-ftp-potential-error-msgs
-  ;; On Mac OS X we sometimes get things like:
+  ;; On macOS we sometimes get things like:
   ;;
   ;;     ftp> open ftp.nluug.nl
   ;;     Trying 2001:610:1:80aa:192:87:102:36...
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 15f6df7..b2077d7 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -44,7 +44,7 @@
 ;; browse-url-text-*                 Any text browser     0
 ;; browse-url-generic                 arbitrary
 ;; browse-url-default-windows-browser MS-Windows browser
-;; browse-url-default-macosx-browser  Mac OS X browser
+;; browse-url-default-macosx-browser  macOS browser
 ;; browse-url-xdg-open                Free Desktop xdg-open on Gnome, KDE, 
Xfce4, LXDE
 ;; browse-url-kde                     KDE konqueror (kfm)
 ;; browse-url-elinks                  Elinks      Don't know (tried with 
0.12.GIT)
@@ -162,7 +162,7 @@ browse-url-browser-function
                         :value browse-url-generic)
          (function-item :tag "Default Windows browser"
                         :value browse-url-default-windows-browser)
-         (function-item :tag "Default Mac OS X browser"
+         (function-item :tag "Default macOS browser"
                         :value browse-url-default-macosx-browser)
          (function-item :tag "Default browser"
                         :value browse-url-default-browser)
@@ -881,7 +881,7 @@ browse-url-default-windows-browser
        (t (w32-shell-execute "open" url))))
 
 (defun browse-url-default-macosx-browser (url &optional _new-window)
-  "Invoke the MacOS X system's default Web browser.
+  "Invoke the macOS system's default Web browser.
 The optional NEW-WINDOW argument is not used"
   (interactive (browse-url-interactive-arg "URL: "))
   (start-process (concat "open " url) nil "open" url))
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 9496ebf..f44a4d3 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1293,7 +1293,7 @@ tramp-do-file-attributes-with-ls
                 res-uid res-gid res-size res-symlink-target)
     (tramp-message vec 5 "file attributes with ls: %s" localname)
     ;; We cannot send all three commands combined, it could exceed
-    ;; NAME_MAX or PATH_MAX.  Happened on Mac OS X, for example.
+    ;; NAME_MAX or PATH_MAX.  Happened on macOS, for example.
     (when (or (tramp-send-command-and-check
                vec
                (format "%s %s"
@@ -4123,7 +4123,7 @@ tramp-open-connection-setup-interactive-shell
        (goto-char (point-min))
        (when (search-forward "\r" nil t)
          (setq cs-decode (coding-system-change-eol-conversion cs-decode 'dos)))
-       ;; Special setting for Mac OS X.
+       ;; Special setting for macOS.
        (when (and (string-match "^Darwin" uname)
                   (memq 'utf-8-hfs (coding-system-list)))
          (setq cs-decode 'utf-8-hfs
@@ -4178,7 +4178,7 @@ tramp-open-connection-setup-interactive-shell
        (tramp-send-command vec "stty tabs" t)
       (tramp-send-command vec "stty tab0" t))
 
-    ;; Set utf8 encoding.  Needed for Mac OS X, for example.  This is
+    ;; Set utf8 encoding.  Needed for macOS, for example.  This is
     ;; non-POSIX, so we must expect errors on some systems.
     (tramp-send-command vec "stty iutf8 2>/dev/null" t)
 
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e9697ff..60199d2 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -981,7 +981,7 @@ tramp-chunksize
   :require 'tramp)
 
 ;; Logging in to a remote host normally requires obtaining a pty.  But
-;; Emacs on MacOS X has process-connection-type set to nil by default,
+;; Emacs on macOS has process-connection-type set to nil by default,
 ;; so on those systems Tramp doesn't obtain a pty.  Here, we allow
 ;; for an override of the system default.
 (defcustom tramp-process-connection-type t
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 30ef5e8..15f4582 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -1940,7 +1940,7 @@ org-file-apps-defaults-macosx
     ("eps.gz" . "gv %s")
     ("dvi"    . "xdvi %s")
     ("fig"    . "xfig %s"))
-  "Default file applications on a MacOS X system.
+  "Default file applications on a macOS system.
 The system \"open\" is known as a default, but we use X11 applications
 for some files for which the OS does not have a good default.
 See `org-file-apps'.")
@@ -2015,7 +2015,7 @@ org-file-apps
                (\"html\" . default) to the list as well.
  t             Default for files not matched by any of the other options.
  `system'      The system command to open files, like `open' on Windows
-               and Mac OS X, and mailcap under GNU/Linux.  This is the command
+               and macOS, and mailcap under GNU/Linux.  This is the command
                that will be selected if you call `C-c C-o' with a double
                \\[universal-argument] \\[universal-argument] prefix.
 
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index a2d4f14..11cec51 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -69,12 +69,12 @@
 ;;   2) Use MinGW GDB instead.
 ;;   3) Use cygwin-mount.el
 
-;;; Mac OSX:
+;;; macOS:
 
-;; GDB in Emacs on Mac OSX works best with FSF GDB as Apple have made
-;; some changes to the version that they include as part of Mac OSX.
+;; GDB in Emacs on macOS works best with FSF GDB as Apple have made
+;; some changes to the version that they include as part of macOS.
 ;; This requires GDB version 7.0 or later (estimated release date Aug 2009)
-;; as earlier versions do not compile on Mac OSX.
+;; as earlier versions do not compile on macOS.
 
 ;;; Known Bugs:
 
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 9cb2ca7..3bec66c 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -423,8 +423,8 @@ idlwave-library-path
   "Library path for Windows and MacOS (OS9).  Not needed under UNIX.
 When selecting the directories to scan for IDL user catalog routine
 info, IDLWAVE can, under UNIX, query the shell for the exact search
-path \(the value of !PATH).  However, under Windows and MacOS
-\(pre-OSX), the IDLWAVE shell does not work.  In this case, this
+path \(the value of !PATH).  However, under Windows,
+the IDLWAVE shell does not work.  In this case, this
 variable can be set to specify the paths where IDLWAVE can find PRO
 files.  The shell will only be asked for a list of paths when this
 variable is nil.  The value is a list of directories.  A directory
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 9cd9cc8..c5d0a5c 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2436,7 +2436,7 @@ python-shell-accept-process-output
 (defun python-shell-comint-end-of-output-p (output)
   "Return non-nil if OUTPUT is ends with input prompt."
   (string-match
-   ;; XXX: It seems on OSX an extra carriage return is attached
+   ;; XXX: It seems on macOS an extra carriage return is attached
    ;; at the end of output, this handles that too.
    (concat
     "\r?\n?"
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 5080ed0..41f8fff 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -1,4 +1,4 @@
-;;; ns-win.el --- lisp side of interface with NeXT/Open/GNUstep/MacOS X window 
system  -*- lexical-binding: t -*-
+;;; ns-win.el --- lisp side of interface with NeXT/Open/GNUstep/macOS window 
system  -*- lexical-binding: t -*-
 
 ;; Copyright (C) 1993-1994, 2005-2016 Free Software Foundation, Inc.
 
@@ -54,7 +54,7 @@
 (require 'ucs-normalize)
 
 (defgroup ns nil
-  "GNUstep/Mac OS X specific features."
+  "GNUstep/macOS specific features."
   :group 'environment)
 
 ;;;; Command line argument handling.
@@ -338,7 +338,7 @@ ns-delete-working-text
   (setq ns-working-overlay nil))
 
 
-;; OS X file system Unicode UTF-8 NFD (decomposed form) support.
+;; macOS file system Unicode UTF-8 NFD (decomposed form) support.
 (when (eq system-type 'darwin)
   ;; Used prior to Emacs 25.
   (define-coding-system-alias 'utf-8-nfd 'utf-8-hfs)
@@ -641,7 +641,7 @@ ns-respond-to-change-font
   (set-frame-font ns-input-font))
 
 
-;; Default fontset for Mac OS X.  This is mainly here to show how a fontset
+;; Default fontset for macOS.  This is mainly here to show how a fontset
 ;; can be set up manually.  Ordinarily, fontsets are auto-created whenever
 ;; a font is chosen by
 (defvar ns-standard-fontset-spec
@@ -655,7 +655,7 @@ ns-standard-fontset-spec
              ",")
   "String of fontset spec of the standard fontset.
 This defines a fontset consisting of the Courier and other fonts that
-come with OS X.
+come with macOS.
 See the documentation of `create-fontset-from-fontset-spec' for the format.")
 
 (defvar ns-reg-to-script)               ; nsfont.m
@@ -844,7 +844,7 @@ ns-initialized
                     (setq default-process-coding-system
                           '(utf-8-unix . utf-8-unix)))))
 
-  ;; OS X Lion introduces PressAndHold, which is unsupported by this port.
+  ;; macOS Lion introduces PressAndHold, which is unsupported by this port.
   ;; See this thread for more details:
   ;; http://lists.gnu.org/archive/html/emacs-devel/2011-06/msg00505.html
   (ns-set-resource nil "ApplePressAndHoldEnabled" "NO")
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 01c0113..5fc6056 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -784,7 +784,7 @@ terminal-init-xterm
       ;; Try to find out the type of terminal by sending a "Secondary
       ;; Device Attributes (DA)" query.
       (xterm--query "\e[>0c"
-                    ;; Some terminals (like OS X's Terminal.app) respond to
+                    ;; Some terminals (like macOS's Terminal.app) respond to
                     ;; this query as if it were a "Primary Device Attributes"
                     ;; query instead, so we should handle that too.
                     '(("\e[?" . xterm--version-handler)
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 49809fa..e64546c 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -1227,7 +1227,7 @@ rst-mode-map
     ;;
     ;; The adjustment function that adorns or rotates a section title.
     (rst-define-key map [?\C-c ?\C-=] 'rst-adjust [?\C-c ?\C-a t])
-    (rst-define-key map [?\C-=] 'rst-adjust) ; Does not work on the Mac OSX and
+    (rst-define-key map [?\C-=] 'rst-adjust) ; Does not work on the macOS and
                                             ; on consoles.
 
     ;; \C-c \C-a is the keymap for adornments.
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el
index 573feed..b0ad5ea 100644
--- a/lisp/vc/pcvs.el
+++ b/lisp/vc/pcvs.el
@@ -551,7 +551,7 @@ cvs-run-process
               ;; is accessed via SSH, a bad interaction between libc,
               ;; CVS and SSH can lead to garbled output.
               ;; It might be a glibc-specific problem (but it can also happens
-              ;; under Mac OS X, it seems).
+              ;; under macOS, it seems).
               ;; It seems that using a pty can help circumvent the problem,
               ;; but at the cost of screwing up when the process thinks it
               ;; can ask for user input (such as password or host-key
@@ -696,7 +696,7 @@ cvs-parse-process
 OLD-FIS is the list of fileinfos on which the cvs command was applied and
   which should be considered up-to-date if they are missing from the output."
   (when (eq system-type 'darwin)
-    ;; Fixup the ^D^H^H inserted at beginning of buffer sometimes on MacOSX
+    ;; Fixup the ^D^H^H inserted at beginning of buffer sometimes on macOS
     ;; because of the call to `process-send-eof'.
     (save-excursion
       (goto-char (point-min))
diff --git a/m4/acl.m4 b/m4/acl.m4
index ce0fe6b..5036b0f 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -29,7 +29,7 @@ AC_DEFUN
     if test $ac_cv_header_sys_acl_h = yes; then
       ac_save_LIBS=$LIBS
 
-      dnl Test for POSIX-draft-like API (GNU/Linux, FreeBSD, Mac OS X,
+      dnl Test for POSIX-draft-like API (GNU/Linux, FreeBSD, macOS,
       dnl IRIX, Tru64).  -lacl is needed on GNU/Linux, -lpacl on OSF/1.
       if test $use_acl = 0; then
         AC_SEARCH_LIBS([acl_get_file], [acl pacl],
@@ -61,7 +61,7 @@ AC_DEFUN
                AC_DEFINE([HAVE_ACL_FIRST_ENTRY], [1],
                  [Define to 1 if the constant ACL_FIRST_ENTRY exists.])
              fi
-             dnl On Mac OS X, other types of ACLs are supported.
+             dnl On macOS, other types of ACLs are supported.
              AC_CACHE_CHECK([for ACL_TYPE_EXTENDED],
                [gl_cv_acl_ACL_TYPE_EXTENDED],
                [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index 1e578f3..38beff2 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -27,7 +27,7 @@ AC_DEFUN
    may not work since the C standard prohibits extern inline functions
    from calling static functions.  This bug is known to occur on:
 
-     OS X 10.8 and earlier; see:
+     macOS 10.8 and earlier; see:
      http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
 
      DragonFly; see
@@ -36,7 +36,7 @@ AC_DEFUN
      FreeBSD; see:
      http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
 
-   OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
+   macOS 10.9 has a macro __header_inline indicating the bug is fixed for C and
    for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
    Assume DragonFly and FreeBSD will be similar.  */
 #if (((defined __APPLE__ && defined __MACH__) \
diff --git a/m4/fdatasync.m4 b/m4/fdatasync.m4
index 5a32e74..8b81a68 100644
--- a/m4/fdatasync.m4
+++ b/m4/fdatasync.m4
@@ -15,7 +15,7 @@ AC_DEFUN
 
   if test $ac_cv_have_decl_fdatasync = no; then
     HAVE_DECL_FDATASYNC=0
-    dnl Mac OS X 10.7 has fdatasync but does not declare it.
+    dnl macOS 10.7 has fdatasync but does not declare it.
     AC_CHECK_FUNCS([fdatasync])
     if test $ac_cv_func_fdatasync = no; then
       HAVE_FDATASYNC=0
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
index 76547d1..8535c065 100644
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -22,7 +22,7 @@ AC_DEFUN
 
 gl_save_LIBS=$LIBS
 
-# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
+# getloadvg is present in libc on glibc >= 2.2, macOS, FreeBSD >= 2.0,
 # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
 HAVE_GETLOADAVG=1
 AC_CHECK_FUNC([getloadavg], [],
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index ce6ec67..64f88e1 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -159,7 +159,7 @@ AC_DEFUN
               [gl_cv_func_getopt_posix=no])
           fi
           if test $gl_cv_func_getopt_posix = maybe; then
-            dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug.
+            dnl Detect macOS 10.5, AIX 7.1, mingw bug.
             AC_RUN_IFELSE(
               [AC_LANG_SOURCE([[
 #include <unistd.h>
@@ -227,7 +227,7 @@ AC_DEFUN
              nocrash_init();
 
              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
-                and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+                and fails on macOS 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
                 OSF/1 5.1, Solaris 10.  */
              {
                static char conftest[] = "conftest";
@@ -238,7 +238,7 @@ AC_DEFUN
                  result |= 1;
              }
              /* This code succeeds on glibc 2.8, mingw,
-                and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+                and fails on macOS 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
              {
                static char program[] = "program";
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 4ae5d63..c510613 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -75,7 +75,7 @@ AC_DEFUN
 
 
 dnl See if gettimeofday clobbers the static buffer that localtime uses
-dnl for its return value.  The gettimeofday function from Mac OS X 10.0.4
+dnl for its return value.  The gettimeofday function from macOS 10.0.4
 dnl (i.e., Darwin 1.3.7) has this problem.
 dnl
 dnl If it does, then arrange to use gettimeofday and localtime only via
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index f8454c8..47a74af 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -30,7 +30,7 @@ AC_DEFUN
 [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
    the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
    earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
-   __APPLE__ && __MACH__ test for Mac OS X.
+   __APPLE__ && __MACH__ test for macOS.
    __APPLE_CC__ tests for the Apple compiler and its version.
    __STDC_VERSION__ tests for the C99 mode.  */
 #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined 
__cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index 8bbdfaa..4ae9a72 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -6,7 +6,7 @@
 # with or without modifications, as long as this notice is preserved.
 
 # The following implementation works around a problem in autoconf <= 2.69;
-# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
+# AC_SYS_LARGEFILE does not configure for large inodes on macOS 10.5,
 # or configures them incorrectly in some cases.
 m4_version_prereq([2.70], [] ,[
 
@@ -95,7 +95,7 @@ AC_DEFUN
   fi
 
   AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1],
-    [Enable large inode numbers on Mac OS X 10.5.])
+    [Enable large inode numbers on macOS 10.5.])
 fi
 ])# AC_SYS_LARGEFILE
 ])# m4_version_prereq 2.70
@@ -133,7 +133,7 @@ AC_DEFUN
     *)
       dnl Nothing to do on gnulib's side.
       dnl A 64-bit off_t is
-      dnl   - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, IRIX,
+      dnl   - already the default on macOS, FreeBSD, NetBSD, OpenBSD, IRIX,
       dnl     OSF/1, Cygwin,
       dnl   - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on
       dnl     glibc, HP-UX, Solaris,
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index 23cad73..1e71d93 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -33,7 +33,7 @@ AC_DEFUN
   AC_CHECK_FUNCS_ONCE([tzset])
   AC_REQUIRE([gl_MULTIARCH])
   if test $APPLE_UNIVERSAL_BUILD = 1; then
-    # A universal build on Apple Mac OS X platforms.
+    # A universal build on Apple macOS platforms.
     # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
     # But we need a configuration result that is valid in both modes.
     gl_cv_func_working_mktime=no
diff --git a/m4/multiarch.m4 b/m4/multiarch.m4
index 43b5d05..e7c6ae9 100644
--- a/m4/multiarch.m4
+++ b/m4/multiarch.m4
@@ -6,7 +6,7 @@
 
 # Determine whether the compiler is or may be producing universal binaries.
 #
-# On Mac OS X 10.5 and later systems, the user can create libraries and
+# On macOS 10.5 and later systems, the user can create libraries and
 # executables that work on multiple system types--known as "fat" or
 # "universal" binaries--by specifying multiple '-arch' options to the
 # compiler but only a single '-arch' option to the preprocessor.  Like
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index d8dd8f1..d54bff2 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -18,7 +18,7 @@
 AC_DEFUN([GL_NOCRASH],[[
 #include <stdlib.h>
 #if defined __MACH__ && defined __APPLE__
-/* Avoid a crash on Mac OS X.  */
+/* Avoid a crash on macOS.  */
 #include <mach/mach.h>
 #include <mach/mach_error.h>
 #include <mach/thread_status.h>
diff --git a/m4/readlinkat.m4 b/m4/readlinkat.m4
index 428b183..0d5fe3c 100644
--- a/m4/readlinkat.m4
+++ b/m4/readlinkat.m4
@@ -27,7 +27,7 @@ AC_DEFUN
          [gl_cv_decl_readlinkat_works=yes],
          [gl_cv_decl_readlinkat_works=no])])
     # Assume readinkat has the same trailing slash bug as readlink,
-    # as is the case on Mac Os X 10.10
+    # as is the case on macOS 10.10
     case "$gl_cv_func_readlink_works" in
       *yes)
         if test "$gl_cv_decl_readlinkat_works" != yes; then
diff --git a/msdos/autogen/config.in b/msdos/autogen/config.in
index bcd51ce..aa44abd 100644
--- a/msdos/autogen/config.in
+++ b/msdos/autogen/config.in
@@ -127,7 +127,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
    */
 #undef FIRST_PTY_LETTER
 
-/* Without the following workaround, Emacs runs slowly on OS X 10.8.
+/* Without the following workaround, Emacs runs slowly on macOS 10.8.
    The workaround disables some useful run-time checking, so it
    should be conditional to the platforms with the performance bug.
    Perhaps Apple will fix this some day; also see m4/extern-inline.m4.  */
@@ -788,7 +788,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #undef HAVE_NLIST_H
 
 /* Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on
-   Mac OS X. */
+   macOS. */
 #undef HAVE_NS
 
 /* Define to use native MS Windows GUI. */
@@ -1303,7 +1303,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 /* Define to 1 if `NSInteger' is defined. */
 #undef NS_HAVE_NSINTEGER
 
-/* Define to 1 if you are using NS windowing under MacOS X. */
+/* Define to 1 if you are using NS windowing under macOS. */
 #undef NS_IMPL_COCOA
 
 /* Define to 1 if you are using NS windowing under GNUstep. */
@@ -1503,7 +1503,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
-/* Enable general extensions on OS X.  */
+/* Enable general extensions on macOS.  */
 #ifndef _DARWIN_C_SOURCE
 # undef _DARWIN_C_SOURCE
 #endif
@@ -1595,7 +1595,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 /* Define if the system is AIX. */
 #undef _AIX
 
-/* Enable large inode numbers on Mac OS X 10.5. */
+/* Enable large inode numbers on macOS 10.5. */
 #undef _DARWIN_USE_64_BIT_INODE
 
 /* Number of bits in a file offset, on hosts where this is settable. */
@@ -1734,7 +1734,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
    the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
    earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
-   __APPLE__ && __MACH__ test for Mac OS X.
+   __APPLE__ && __MACH__ test for macOS.
    __APPLE_CC__ tests for the Apple compiler and its version.
    __STDC_VERSION__ tests for the C99 mode.  */
 #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined 
__cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
diff --git a/nextstep/INSTALL b/nextstep/INSTALL
index dd690ab..4b0df37 100644
--- a/nextstep/INSTALL
+++ b/nextstep/INSTALL
@@ -4,7 +4,7 @@ See the end of the file for license conditions.
 
 Requirements
 ------------
-Mac OS X 10.6 or later
+macOS 10.6 or later
 
 - or -
 
@@ -19,7 +19,7 @@ In the top-level directory, use:
 
   ./configure --with-ns
 
-(On Mac OS X, --with-ns is enabled by default.)
+(On macOS, --with-ns is enabled by default.)
 
 This will compile all the files, but emacs will not be able to be run except
 in -nw (terminal) mode.
diff --git a/nextstep/Makefile.in b/nextstep/Makefile.in
index 9aa034a..d6e1282 100644
--- a/nextstep/Makefile.in
+++ b/nextstep/Makefile.in
@@ -35,12 +35,12 @@ MKDIR_P =
 
 ## Emacs.app.
 ns_appdir = @ns_appdir@
-## GNUstep: ns_appdir; OS X: ns_appdir/Contents/MacOS
+## GNUstep: ns_appdir; macOS: ns_appdir/Contents/MacOS
 ns_appbindir = @ns_appbindir@
 ## GNUstep/Emacs.base or Cocoa/Emacs.base.
 ns_appsrc = @ns_appsrc@
 ## GNUstep: GNUstep/Emacs.base/Resources/Info-gnustep.plist
-## OS X: Cocoa/Emacs.base/Contents/Info.plist
+## macOS: Cocoa/Emacs.base/Contents/Info.plist
 ns_check_file = @ns_appdir@/@ns_check_file@
 
 .PHONY: all
diff --git a/nextstep/README b/nextstep/README
index 7a1a092..07dd43e 100644
--- a/nextstep/README
+++ b/nextstep/README
@@ -1,8 +1,8 @@
-  NS -- the Cocoa interface for OS X and compatible systems
-  ---------------------------------------------------------
+  NS -- the Cocoa interface for macOS and compatible systems
+  ----------------------------------------------------------
 
 This directory contains files needed to build Emacs on system based on
-NextStep (NS), including OS X (Mac) and GNUstep, using the Cocoa API.
+NextStep (NS), including macOS (Mac) and GNUstep, using the Cocoa API.
 
 
   HISTORY
@@ -10,7 +10,7 @@ NextStep (NS), including OS X (Mac) and GNUstep, using the 
Cocoa API.
 
 The Nextstep (NS) interface of GNU Emacs was originally written in
 1994 for NeXTSTEP systems running Emacs 19 and subsequently ported to
-OpenStep and then Rhapsody, which became Mac OS X.  In 2004 it was
+OpenStep and then Rhapsody, which became macOS.  In 2004 it was
 adapted to GNUstep, a free OpenStep implementation, and in 2008 it was
 merged to the GNU Emacs trunk and released with Emacs 23.  Around the
 same time a separate Mac-only port using the Carbon APIs and
@@ -21,7 +21,7 @@ remains available externally under the name "mac".)
   OVERVIEW OF COCOA AND OBJECTIVE-C
 
 Cocoa is an API for the Objective-C language, an objective oriented
-superset of C.  Anybody with experience with iOS or modern OS X
+superset of C.  Anybody with experience with iOS or modern macOS
 application development should feel at home.
 
 A method call in Objective-C differs from most other languages in the
@@ -58,11 +58,11 @@ Classes are declared like the following:
 * Don't use macros and types intended for the XCode Interface Builder,
   like 'IBAction'.
 
-* The NS interface should work on all version of OS X from 10.6.8
+* The NS interface should work on all version of macOS from 10.6.8
   (Snow Leopard) to the latest official release.
 
-* Under OS X, it is possible to build Emacs using NS, X11, or console
-  only.  A new OS X feature should work in all appropriate builds.
+* Under macOS, it is possible to build Emacs using NS, X11, or console
+  only.  A new macOS feature should work in all appropriate builds.
 
 
   TRACING SUPPORT
@@ -76,7 +76,7 @@ uncomment the lines defining symbols starting with 
'NSTRACE_GROUP'.
 
   GNUSTEP AND OTHER COMPATIBLE SYSTEMS
 
-The NS interface works on system compatible with OS X, for example
+The NS interface works on system compatible with macOS, for example
 GNUstep.  Even though they are less frequently used, this is important
 for a number of reasons:
 
@@ -84,7 +84,7 @@ for a number of reasons:
   look-and-feel as the rest of the system.
 
 * This allows other Emacs developers to test their changes on the NS
-  interface without having access to an OS X machine.
+  interface without having access to an macOS machine.
 
 * If a feature in the NS interface work on free systems like GNUstep,
   this meets the FSF requirement that features in GNU software should
diff --git a/nextstep/templates/Emacs.desktop.in 
b/nextstep/templates/Emacs.desktop.in
index 170f195..4fed1e3 100644
--- a/nextstep/templates/Emacs.desktop.in
+++ b/nextstep/templates/Emacs.desktop.in
@@ -4,7 +4,7 @@ Type=Application
 address@hidden@
 Categories=GNUstep
 Name=Emacs
-Comment=GNU Emacs for NeXT/Open/GNUstep and OS X
+Comment=GNU Emacs for NeXT/Open/GNUstep and macOS
 Icon=emacs.tiff
 Exec=openapp Emacs.app
 #TryExec=Emacs.app
diff --git a/nextstep/templates/Info-gnustep.plist.in 
b/nextstep/templates/Info-gnustep.plist.in
index 679eb4f..1fd3184 100644
--- a/nextstep/templates/Info-gnustep.plist.in
+++ b/nextstep/templates/Info-gnustep.plist.in
@@ -1,11 +1,11 @@
 {
-    ApplicationDescription = "GNU Emacs for GNUstep / OS X";
+    ApplicationDescription = "GNU Emacs for GNUstep / macOS";
     ApplicationIcon = emacs.tiff;
     ApplicationName = Emacs;
     ApplicationRelease = "@version@";
     Authors = (
        "Adrian Robert (GNUstep)",
-       "Christophe de Dinechin (MacOS X)",
+       "Christophe de Dinechin (macOS)",
        "Scott Bender (OpenStep)",
        "Christian Limpach (NeXTstep)",
        "Carl Edman (NeXTstep)",
diff --git a/nextstep/templates/Info.plist.in b/nextstep/templates/Info.plist.in
index dcd2fe3..686b804 100644
--- a/nextstep/templates/Info.plist.in
+++ b/nextstep/templates/Info.plist.in
@@ -504,7 +504,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.
                </dict>
        </array>
 
-       <!-- Export definitions so that OS X understands about the file types 
-->
+       <!-- Export definitions so that macOS understands about the file types 
-->
        <key>UTExportedTypeDeclarations</key>
        <array>
                <dict>
diff --git a/src/conf_post.h b/src/conf_post.h
index 9c544e8..12d28cb 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -102,7 +102,7 @@ typedef bool bool_bf;
 /* The following solves the problem that Emacs hangs when evaluating
    (make-comint "test0" "/nodir/nofile" nil "") when /nodir/nofile
    does not exist.  Also, setsid is not allowed in the vfork child's
-   context as of Darwin 9/Mac OS X 10.5.  */
+   context as of Darwin 9/macOS 10.5.  */
 #undef HAVE_WORKING_VFORK
 #define vfork fork
 #endif  /* DARWIN_OS */
@@ -186,7 +186,7 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
 #endif
 #endif  /* MSDOS */
 
-/* Mac OS X / GNUstep need a bit more pure memory.  Of the existing knobs,
+/* macOS / GNUstep need a bit more pure memory.  Of the existing knobs,
    SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems.  */
 #ifdef HAVE_NS
 #if defined NS_IMPL_GNUSTEP
diff --git a/src/emacs.c b/src/emacs.c
index d86c34f..efd4fa3 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2504,7 +2504,7 @@ Special values:
   `gnu'          compiled for a GNU Hurd system.
   `gnu/linux'    compiled for a GNU/Linux system.
   `gnu/kfreebsd' compiled for a GNU system with a FreeBSD kernel.
-  `darwin'       compiled for Darwin (GNU-Darwin, Mac OS X, ...).
+  `darwin'       compiled for Darwin (GNU-Darwin, macOS, ...).
   `ms-dos'       compiled as an MS-DOS application.
   `windows-nt'   compiled as a native W32 application.
   `cygwin'       compiled using the Cygwin library.
diff --git a/src/fileio.c b/src/fileio.c
index 66a4873..e790930 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2237,12 +2237,12 @@ internal_delete_file (Lisp_Object filename)
 }
 
 /* Filesystems are case-sensitive on all supported systems except
-   MS-Windows, MS-DOS, Cygwin, and Mac OS X.  They are always
+   MS-Windows, MS-DOS, Cygwin, and macOS.  They are always
    case-insensitive on the first two, but they may or may not be
-   case-insensitive on Cygwin and OS X.  The following function
+   case-insensitive on Cygwin and macOS.  The following function
    attempts to provide a runtime test on those two systems.  If the
    test is not conclusive, we assume case-insensitivity on Cygwin and
-   case-sensitivity on Mac OS X.
+   case-sensitivity on macOS.
 
    FIXME: Mounted filesystems on Posix hosts, like Samba shares or
    NFS-mounted Windows volumes, might be case-insensitive.  Can we
@@ -2254,11 +2254,11 @@ file_name_case_insensitive_p (const char *filename)
   /* Use pathconf with _PC_CASE_INSENSITIVE or _PC_CASE_SENSITIVE if
      those flags are available.  As of this writing (2016-11-14),
      Cygwin is the only platform known to support the former (starting
-     with Cygwin-2.6.1), and Mac OS X is the only platform known to
+     with Cygwin-2.6.1), and macOS is the only platform known to
      support the latter.
 
      There have been reports that pathconf with _PC_CASE_SENSITIVE
-     does not work reliably on Mac OS X.  If you have a problem,
+     does not work reliably on macOS.  If you have a problem,
      please recompile Emacs with -DDARWIN_OS_CASE_SENSITIVE_FIXME=1 or
      -DDARWIN_OS_CASE_SENSITIVE_FIXME=2, and file a bug report saying
      whether this fixed your problem.  */
diff --git a/src/frame.c b/src/frame.c
index 3a2d009..b1d89f3 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -5110,7 +5110,7 @@ Setting this variable does not affect existing frames, 
only new ones.  */);
               doc: /* Default position of vertical scroll bars on this 
window-system.  */);
 #ifdef HAVE_WINDOW_SYSTEM
 #if defined (HAVE_NTGUI) || defined (NS_IMPL_COCOA) || (defined (USE_GTK) && 
defined (USE_TOOLKIT_SCROLL_BARS))
-  /* MS-Windows, Mac OS X, and GTK have scroll bars on the right by
+  /* MS-Windows, macOS, and GTK have scroll bars on the right by
      default.  */
   Vdefault_frame_scroll_bars = Qright;
 #else
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 986eca8..cd4572d 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2386,7 +2386,7 @@ make_widget_for_menu_item (const char *utf8_label, const 
char *utf8_key)
    in the group.  On exit, *GROUP contains the radio item group.
 
    Unfortunately, keys don't line up as nicely as in Motif,
-   but the MacOS X version doesn't either, so I guess that is OK.  */
+   but the macOS version doesn't either, so I guess that is OK.  */
 
 static GtkWidget *
 make_menu_item (const char *utf8_label,
diff --git a/src/macfont.h b/src/macfont.h
index 6630fb5..8f73452 100644
--- a/src/macfont.h
+++ b/src/macfont.h
@@ -1,4 +1,4 @@
-/* Interface definition for Mac OSX Core text font backend.
+/* Interface definition for macOS Core text font backend.
    Copyright (C) 2009-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
diff --git a/src/macfont.m b/src/macfont.m
index d9bad03..5ee6e6a 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -1,4 +1,4 @@
-/* Font driver on Mac OSX Core text.
+/* Font driver on macOS Core text.
    Copyright (C) 2009-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -755,7 +755,7 @@ static void mac_font_get_glyphs_for_variants (CFDataRef, 
UTF32Char,
   SInt64 sint64_value;
 
   /* Getting symbolic traits with kCFNumberSInt32Type is lossy on Mac
-     OS X 10.6 when the value is greater than or equal to 1 << 31.  */
+     macOS 10.6 when the value is greater than or equal to 1 << 31.  */
   if (CFNumberGetValue (number, kCFNumberSInt64Type, &sint64_value))
     {
       *sym_traits = (CTFontSymbolicTraits) sint64_value;
@@ -787,7 +787,7 @@ static void mac_font_get_glyphs_for_variants (CFDataRef, 
UTF32Char,
          CFIndex weight = mac_font_get_weight (font);
 
          /* Workaround for crash when displaying Oriya characters
-            with Arial Unicode MS on OS X 10.11.  */
+            with Arial Unicode MS on macOS 10.11.  */
          if (weight == 5)
            val = 0;
          CFRelease (font);
@@ -1005,7 +1005,7 @@ static void mac_font_get_glyphs_for_variants (CFDataRef, 
UTF32Char,
 and those start with ".".  NULL means the cache has been invalidated.
 Otherwise, the value is CFArray of CFStrings and the elements are
 sorted in the canonical order (CTFontManagerCompareFontFamilyNames on
-OS X 10.6 and later).  */
+macOS 10.6 and later).  */
 
 static CFArrayRef macfont_available_families_cache = NULL;
 
@@ -1756,7 +1756,7 @@ static int macfont_variation_glyphs (struct font *, int c,
                                                                  charset);
       CFRelease (charset);
       /* CFCharacterSetCreateWithCharactersInString does not handle
-         surrogate pairs properly as of Mac OS X 10.5.  */
+         surrogate pairs properly as of macOS 10.5.  */
       cf_charset_table[i].cf_charset_string = string;
     }
   return i;
@@ -1977,7 +1977,7 @@ static int macfont_variation_glyphs (struct font *, int c,
               }
           charset = cs;
           /* CFCharacterSetCreateWithCharactersInString does not
-             handle surrogate pairs properly as of Mac OS X 10.5.  */
+             handle surrogate pairs properly as of macOS 10.5.  */
           charset_string = string;
         }
     }
@@ -2314,7 +2314,7 @@ static int macfont_variation_glyphs (struct font *, int c,
       if (! pat_desc)
         goto err;
 
-      /* CTFontDescriptorCreateMatchingFontDescriptors on Mac OS X
+      /* CTFontDescriptorCreateMatchingFontDescriptors on macOS
          10.7 returns NULL if pat_desc represents the LastResort font.
          So we use CTFontDescriptorCreateMatchingFontDescriptor (no
          trailing "s") for such a font.  */
@@ -2409,7 +2409,7 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no
 
           mask_max = (synth_sym_traits & ~sym_traits);
           /* Synthetic bold does not work for bitmap-only fonts on Mac
-             OS X 10.6.  */
+             macOS 10.6.  */
           if ((mask_min ^ mask_max) & kCTFontTraitBold)
             {
               CFNumberRef format =
@@ -3826,7 +3826,7 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no
 }
 
 /* The function below seems to cause a memory leak for the CFString
-   created by CFStringCreateWithCharacters as of Mac OS X 10.5.8 and
+   created by CFStringCreateWithCharacters as of macOS 10.5.8 and
    10.6.3.  For now, we use the NSGlyphInfo version instead.  */
 #if USE_CT_GLYPH_INFO
 static CGGlyph
@@ -4057,7 +4057,7 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no
 void
 syms_of_macfont (void)
 {
-  /* Core Text, for Mac OS X.  */
+  /* Core Text, for macOS.  */
   DEFSYM (Qmac_ct, "mac-ct");
   macfont_driver.type = Qmac_ct;
   register_font_driver (&macfont_driver, NULL);
diff --git a/src/nsfns.m b/src/nsfns.m
index b826460..cfaaf53 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1,4 +1,4 @@
-/* Functions for the NeXT/Open/GNUstep and MacOSX window system.
+/* Functions for the NeXT/Open/GNUstep and macOS window system.
 
 Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2016 Free Software
 Foundation, Inc.
@@ -22,7 +22,7 @@
 Originally by Carl Edman
 Updated by Christian Limpach (address@hidden)
 OpenStep/Rhapsody port by Scott Bender (address@hidden)
-MacOSX/Aqua port by Christophe de Dinechin (address@hidden)
+macOS/Aqua port by Christophe de Dinechin (address@hidden)
 GNUstep port and post-20 update by Adrian Robert (address@hidden)
 */
 
@@ -905,7 +905,7 @@ Turn the input menu (an NSMenu) into a lisp list for 
tracking on lisp side
 x_icon (struct frame *f, Lisp_Object parms)
 /* --------------------------------------------------------------------------
    Strangely-named function to set icon position parameters in frame.
-   This is irrelevant under OS X, but might be needed under GNUstep,
+   This is irrelevant under macOS, but might be needed under GNUstep,
    depending on the window manager used.  Note, this is not a standard
    frame parameter-setter; it is called directly from x-create-frame.
    -------------------------------------------------------------------------- 
*/
@@ -2024,7 +2024,7 @@ and GNUstep implementations ("distributor-specific release
 
   [svcs setAutoenablesItems: NO];
 #ifdef NS_IMPL_COCOA
-  [svcs update]; /* on OS X, converts from '/' structure */
+  [svcs update]; /* on macOS, converts from '/' structure */
 #endif
 
   ret = interpret_services_menu (svcs, Qnil, ret);
diff --git a/src/nsfont.m b/src/nsfont.m
index be7d2ec..389d0ed 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -1,4 +1,4 @@
-/* Font back-end driver for the NeXT/Open/GNUstep and MacOSX window system.
+/* Font back-end driver for the NeXT/Open/GNUstep and macOS window system.
    See font.h
    Copyright (C) 2006-2016 Free Software Foundation, Inc.
 
@@ -497,7 +497,7 @@ but also for ascii (which causes unnecessary font 
substitution). */
                  {
                    NSCharacterSet *fset = [[fontMgr fontWithFamily: family
                         traits: 0 weight: 5 size: 12.0]        
coveredCharacterSet];
-                    /* Some fonts on OS X, maybe many on GNUstep, return nil. 
*/
+                    /* Some fonts on macOS, maybe many on GNUstep, return nil. 
*/
                     if (fset == nil)
                       fset = [NSCharacterSet characterSetWithRange:
                                                NSMakeRange (0, 127)];
diff --git a/src/nsimage.m b/src/nsimage.m
index 6d1b393..32bcea7 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -1,4 +1,4 @@
-/* Image support for the NeXT/Open/GNUstep and MacOSX window system.
+/* Image support for the NeXT/Open/GNUstep and macOS window system.
    Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2016 Free Software
    Foundation, Inc.
 
@@ -21,7 +21,7 @@
 Originally by Carl Edman
 Updated by Christian Limpach (address@hidden)
 OpenStep/Rhapsody port by Scott Bender (address@hidden)
-MacOSX/Aqua port by Christophe de Dinechin (address@hidden)
+macOS/Aqua port by Christophe de Dinechin (address@hidden)
 GNUstep port and post-20 update by Adrian Robert (address@hidden)
 */
 
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 470d6d0..a7a001c 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1,4 +1,4 @@
-/* NeXT/Open/GNUstep and MacOSX Cocoa menu and toolbar module.
+/* NeXT/Open/GNUstep and macOS Cocoa menu and toolbar module.
    Copyright (C) 2007-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -92,7 +92,7 @@
 /* --------------------------------------------------------------------------
     Update menubar.  Three cases:
     1) ! deep_p, submenu = nil: Fresh switch onto a frame -- either set up
-       just top-level menu strings (OS X), or goto case (2) (GNUstep).
+       just top-level menu strings (macOS), or goto case (2) (GNUstep).
     2) deep_p, submenu = nil: Recompute all submenus.
     3) deep_p, submenu = non-nil: Update contents of a single submenu.
    -------------------------------------------------------------------------- 
*/
@@ -577,7 +577,7 @@ - (void)menuNeedsUpdate: (NSMenu *)menu
     return;
 /*fprintf (stderr, "Updating menu '%s'\n", [[self title] UTF8String]); NSLog 
(@"address@hidden", event); */
 #ifdef NS_IMPL_GNUSTEP
-  /* Don't know how to do this for anything other than OSX >= 10.5
+  /* Don't know how to do this for anything other than macOS >= 10.5
      This is wrong, as it might run Lisp code in the event loop.  */
   ns_update_menubar (frame, true, self);
 #endif
@@ -638,7 +638,7 @@ - (NSMenuItem *)addItemWithWidgetValue: (void *)wvptr
 
       keyEq = [self parseKeyEquiv: wv->key];
 #ifdef NS_IMPL_COCOA
-      /* OS X just ignores modifier strings longer than one character */
+      /* macOS just ignores modifier strings longer than one character */
       if (keyEquivModMask == 0)
         title = [title stringByAppendingFormat: @" (%@)", keyEq];
 #endif
@@ -1048,7 +1048,7 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct 
frame *)f
       /* Check if this is a separator.  */
       if (EQ (TOOLPROP (TOOL_BAR_ITEM_TYPE), Qt))
         {
-          /* Skip separators.  Newer OSX don't show them, and on GNUstep they
+          /* Skip separators.  Newer macOS don't show them, and on GNUstep they
              are wide as a button, thus overflowing the toolbar most of
              the time.  */
           continue;
diff --git a/src/nsselect.m b/src/nsselect.m
index eba2393..b7c9148 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -1,4 +1,4 @@
-/* NeXT/Open/GNUstep / MacOSX Cocoa selection processing for emacs.
+/* NeXT/Open/GNUstep / macOS Cocoa selection processing for emacs.
    Copyright (C) 1993-1994, 2005-2006, 2008-2016 Free Software
    Foundation, Inc.
 
@@ -21,7 +21,7 @@
 Originally by Carl Edman
 Updated by Christian Limpach (address@hidden)
 OpenStep/Rhapsody port by Scott Bender (address@hidden)
-MacOSX/Aqua port by Christophe de Dinechin (address@hidden)
+macOS/Aqua port by Christophe de Dinechin (address@hidden)
 GNUstep port and post-20 update by Adrian Robert (address@hidden)
 */
 
diff --git a/src/nsterm.m b/src/nsterm.m
index 1b44a73..7e3a618 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1,4 +1,4 @@
-/* NeXT/Open/GNUstep / MacOSX communication module.      -*- coding: utf-8 -*-
+/* NeXT/Open/GNUstep / macOS communication module.      -*- coding: utf-8 -*-
 
 Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2016 Free Software
 Foundation, Inc.
@@ -22,7 +22,7 @@
 Originally by Carl Edman
 Updated by Christian Limpach (address@hidden)
 OpenStep/Rhapsody port by Scott Bender (address@hidden)
-MacOSX/Aqua port by Christophe de Dinechin (address@hidden)
+macOS/Aqua port by Christophe de Dinechin (address@hidden)
 GNUstep port and post-20 update by Adrian Robert (address@hidden)
 */
 
@@ -251,7 +251,7 @@ - (NSColor *)colorUsingDefaultColorSpace
   0x1B,                                0x1B   /* escape */
 };
 
-/* On OS X picks up the default NSGlobalDomain AppleAntiAliasingThreshold,
+/* On macOS picks up the default NSGlobalDomain AppleAntiAliasingThreshold,
    the maximum font size to NOT antialias.  On GNUstep there is currently
    no way to control this behavior. */
 float ns_antialias_threshold;
@@ -588,7 +588,7 @@ - (NSColor *)colorUsingDefaultColorSpace
 
 void
 ns_init_locale (void)
-/* OS X doesn't set any environment variables for the locale when run
+/* macOS doesn't set any environment variables for the locale when run
    from the GUI. Get the locale from the OS and set LANG. */
 {
   NSLocale *locale = [NSLocale currentLocale];
@@ -597,7 +597,7 @@ - (NSColor *)colorUsingDefaultColorSpace
 
   @try
     {
-      /* It seems OS X should probably use UTF-8 everywhere.
+      /* It seems macOS should probably use UTF-8 everywhere.
          'localeIdentifier' does not specify the encoding, and I can't
          find any way to get the OS to tell us which encoding to use,
          so hard-code '.UTF-8'. */
@@ -719,7 +719,7 @@ Free a pool and temporary objects it refers to (callable 
from C)
 
 
 /* A screen margin between 1 and DOCK_IGNORE_LIMIT (inclusive) is
-   assumed to contain a hidden dock.  OS X currently use 4 pixels for
+   assumed to contain a hidden dock.  macOS currently use 4 pixels for
    this, however, to be future compatible, a larger value is used.  */
 #define DOCK_IGNORE_LIMIT 6
 
@@ -732,7 +732,7 @@ Free a pool and temporary objects it refers to (callable 
from C)
 
   struct EmacsMargins margins = ns_screen_margins(screen);
 
-  /* OS X (currently) reserved 4 pixels along the edge where a hidden
+  /* macOS (currently) reserved 4 pixels along the edge where a hidden
      dock is located.  Unfortunately, it's not possible to find the
      location and information about if the dock is hidden.  Instead,
      it is assumed that if the margin of an edge is less than
@@ -749,7 +749,7 @@ Free a pool and temporary objects it refers to (callable 
from C)
     {
       margins.top = 0;
     }
-  /* Note: This doesn't occur in current versions of OS X, but
+  /* Note: This doesn't occur in current versions of macOS, but
      included for completeness and future compatibility.  */
   if (margins.bottom <= DOCK_IGNORE_LIMIT)
     {
@@ -1028,7 +1028,7 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool 
isFullscreen)
 #ifdef NS_IMPL_COCOA
   if ([view isFullscreen] && [view fsIsNative])
   {
-    // Fix reappearing tool bar in fullscreen for OSX 10.7
+    // Fix reappearing tool bar in fullscreen for macOS 10.7
     BOOL tbar_visible = FRAME_EXTERNAL_TOOL_BAR (f) ? YES : NO;
     NSToolbar *toolbar = [FRAME_NS_VIEW (f) toolbar];
     if (! tbar_visible != ! [toolbar isVisible])
@@ -1940,7 +1940,7 @@ -(void)remove
     }
   else if ([nsname isEqualToString: @"ns_selection_fg_color"])
     {
-      /* NOTE: OSX applications normally don't set foreground selection, but
+      /* NOTE: macOS applications normally don't set foreground selection, but
          text may be unreadable if we don't.
       */
       if ((new = [NSColor selectedTextColor]) != nil)
@@ -3879,7 +3879,7 @@ overwriting cursor (usually when cursor on a tab) */
 #ifdef NS_IMPL_COCOA
   if (! send_appdefined)
     {
-      /* OSX 10.10.1 swallows the AppDefined event we are sending ourselves
+      /* macOS 10.10.1 swallows the AppDefined event we are sending ourselves
          in certain situations (rapid incoming events).
          So check if we have one, if not add one.  */
       NSEvent *appev = [NSApp 
nextEventMatchingMask:NSEventMaskApplicationDefined
@@ -4758,7 +4758,7 @@ static Lisp_Object ns_string_to_lispmod (const char *s)
   [outerpool release];
   outerpool = [[NSAutoreleasePool alloc] init];
 
-  /* count object allocs (About, click icon); on OS X use ObjectAlloc tool */
+  /* count object allocs (About, click icon); on macOS use ObjectAlloc tool */
   /*GSDebugAllocationActive (YES); */
   block_input ();
 
@@ -4887,7 +4887,7 @@ Needs to be here because ns_initialize_display_info () 
uses AppKit classes.
 
   ns_app_name = [[NSProcessInfo processInfo] processName];
 
-  /* Set up OS X app menu */
+  /* Set up macOS app menu */
 
   NSTRACE_MSG ("Menu init");
 
@@ -4959,7 +4959,7 @@ Needs to be here because ns_initialize_display_info () 
uses AppKit classes.
          selector: @selector (trackingNotification:)
              name: NSMenuDidEndTrackingNotification object: mainMenu];
   }
-#endif /* MAC OS X menu setup */
+#endif /* macOS menu setup */
 
   /* Register our external input/output types, used for determining
      applicable services and also drag/drop eligibility. */
@@ -5187,7 +5187,7 @@ - (void)sendEvent: (NSEvent *)theEvent
 
 #ifdef NS_IMPL_COCOA
   /* If no dialog and none of our frames have focus and it is a move, skip it.
-     It is a mouse move in an auxiliary menu, i.e. on the top right on OSX,
+     It is a mouse move in an auxiliary menu, i.e. on the top right on macOS,
      such as Wifi, sound, date or similar.
      This prevents "spooky" highlighting in the frame under the menu.  */
   if (type == NSEventTypeMouseMoved && [NSApp modalWindow] == nil)
@@ -5722,7 +5722,7 @@ - (void)keyDown: (NSEvent *)theEvent
 
   NSTRACE ("[EmacsView keyDown:]");
 
-  /* Rhapsody and OS X give up and down events for the arrow keys */
+  /* Rhapsody and macOS give up and down events for the arrow keys */
   if (ns_fake_keydown == YES)
     ns_fake_keydown = NO;
   else if ([theEvent type] != NSEventTypeKeyDown)
@@ -5956,7 +5956,7 @@ flag set (this is probably a bug in the OS).
 
 
 #ifdef NS_IMPL_COCOA
-/* Needed to pick up Ctrl-tab and possibly other events that OS X has
+/* Needed to pick up Ctrl-tab and possibly other events that macOS has
    decided not to send key-down for.
    See http://osdir.com/ml/editors.vim.mac/2007-10/msg00141.html
    This only applies on Tiger and earlier.
@@ -7121,8 +7121,8 @@ - (void)windowDidEnterFullScreen /* provided for direct 
calls */
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
       unsigned val = (unsigned)[NSApp presentationOptions];
 
-      // OSX 10.7 bug fix, the menu won't appear without this.
-      // val is non-zero on other OSX versions.
+      // macOS 10.7 bug fix, the menu won't appear without this.
+      // val is non-zero on other macOS versions.
       if (val == 0)
         {
           NSApplicationPresentationOptions options
@@ -7546,7 +7546,7 @@ - (void)drawRect: (NSRect)rect
   unblock_input ();
 
   /*
-    drawRect: may be called (at least in OS X 10.5) for invisible
+    drawRect: may be called (at least in macOS 10.5) for invisible
     views as well for some reason.  Thus, do not infer visibility
     here.
 
@@ -8071,7 +8071,7 @@ + (CGFloat) scrollerWidth
   [self setEnabled: YES];
 
   /* Ensure auto resizing of scrollbars occurs within the emacs frame's view
-     locked against the top and bottom edges, and right edge on OS X, where
+     locked against the top and bottom edges, and right edge on macOS, where
      scrollers are on right. */
 #ifdef NS_IMPL_GNUSTEP
   [self setAutoresizingMask: NSViewMaxXMargin | NSViewHeightSizable];
@@ -8732,14 +8732,14 @@ Convert an X font name (XLFD) to an NS font name.
 
   DEFVAR_LISP ("ns-auto-hide-menu-bar", ns_auto_hide_menu_bar,
                doc: /* Non-nil means that the menu bar is hidden, but appears 
when the mouse is near.
-Only works on OSX 10.6 or later.  */);
+Only works on macOS 10.6 or later.  */);
   ns_auto_hide_menu_bar = Qnil;
 
   DEFVAR_BOOL ("ns-use-native-fullscreen", ns_use_native_fullscreen,
-     doc: /*Non-nil means to use native fullscreen on OSX >= 10.7.
+     doc: /* Non-nil means to use native fullscreen on macOS >= 10.7.
 Nil means use fullscreen the old (< 10.7) way.  The old way works better with
-multiple monitors, but lacks tool bar.  This variable is ignored on OSX < 10.7.
-Default is t for OSX >= 10.7, nil otherwise.  */);
+multiple monitors, but lacks tool bar.  This variable is ignored on macOS < 
10.7.
+Default is t for macOS >= 10.7, nil otherwise.  */);
 #ifdef HAVE_NATIVE_FS
   ns_use_native_fullscreen = YES;
 #else
@@ -8754,9 +8754,9 @@ Nil means use fullscreen the old (< 10.7) way.  The old 
way works better with
   ns_use_fullscreen_animation = NO;
 
   DEFVAR_BOOL ("ns-use-srgb-colorspace", ns_use_srgb_colorspace,
-     doc: /*Non-nil means to use sRGB colorspace on OSX >= 10.7.
+     doc: /* Non-nil means to use sRGB colorspace on macOS >= 10.7.
 Note that this does not apply to images.
-This variable is ignored on OSX < 10.7 and GNUstep.  */);
+This variable is ignored on macOS < 10.7 and GNUstep.  */);
   ns_use_srgb_colorspace = YES;
 
   /* TODO: move to common code */
diff --git a/src/sysdep.c b/src/sysdep.c
index 55d29bc..892e976 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2426,7 +2426,7 @@ posix_close (int fd, int flag)
      closed, and retrying the close could inadvertently close a file
      descriptor allocated by some other thread.  In other systems
      (e.g., HP/UX) FD is not closed.  And in still other systems
-     (e.g., OS X, Solaris), maybe FD is closed, maybe not, and in a
+     (e.g., macOS, Solaris), maybe FD is closed, maybe not, and in a
      multithreaded program there can be no way to tell.
 
      So, in this case, pretend that the close succeeded.  This works
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index ea8e884..2423860 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -1,4 +1,4 @@
-/* Dump Emacs in Mach-O format for use on Mac OS X.
+/* Dump Emacs in Mach-O format for use on macOS.
    Copyright (C) 2001-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -24,7 +24,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
    Mach-O format: the file loader.h, man pages for Mach-O and ld, old
    NEXTSTEP documents of the Mach-O format.  The tool otool dumps the
    mach header (-h option) and the load commands (-l option) in a
-   Mach-O file.  The tool nm on Mac OS X displays the symbol table in
+   Mach-O file.  The tool nm on macOS displays the symbol table in
    a Mach-O file.  For examples of unexec for the Mach-O format, see
    the file unexnext.c in the GNU Emacs distribution, the file
    unexdyld.c in the Darwin port of GNU Emacs 20.7, and unexdyld.c in
@@ -33,7 +33,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
    Read that to see what they do.  This file was written completely
    from scratch, making use of information from the above sources.  */
 
-/* The Mac OS X implementation of unexec makes use of Darwin's `zone'
+/* The macOS implementation of unexec makes use of Darwin's `zone'
    memory allocator.  All calls to malloc, realloc, and free in Emacs
    are redirected to unexec_malloc, unexec_realloc, and unexec_free in
    this file.  When temacs is run, all memory requests are handled in
@@ -49,7 +49,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
    block must be obtained by malloc and the old contents copied to
    it.  */
 
-/* Peculiarity of the Mach-O files generated by ld in Mac OS X
+/* Peculiarity of the Mach-O files generated by ld in macOS
    (possible causes of future bugs if changed).
 
    The file offset of the start of the __TEXT segment is zero.  Since
@@ -117,9 +117,9 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 
 #include <assert.h>
 
-/* LC_DATA_IN_CODE is not defined in mach-o/loader.h on OS X 10.7.
+/* LC_DATA_IN_CODE is not defined in mach-o/loader.h on macOS 10.7.
    But it is used if we build with "Command Line Tools for Xcode 4.5
-   (OS X Lion) - September 2012".  */
+   (macOS Lion) - September 2012".  */
 #ifndef LC_DATA_IN_CODE
 #define LC_DATA_IN_CODE 0x29 /* table of non-instructions in __text */
 #endif
@@ -878,7 +878,7 @@ copy_data_segment (struct load_command *lc)
 
          /* Clear uninitialized local variables in statically linked
             libraries.  In particular, function pointers stored by
-            libSystemStub.a, which is introduced in Mac OS X 10.4 for
+            libSystemStub.a, which is introduced in macOS 10.4 for
             binary compatibility with respect to long double, are
             cleared so that they will be reinitialized when the
             dumped binary is executed on other versions of OS.  */
diff --git a/src/xterm.c b/src/xterm.c
index d6e1fe2..4a7ee77 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -12279,11 +12279,11 @@ x_term_init (Lisp_Object display_name, char 
*xrm_option, char *resource_name)
       int screen_number = XScreenNumberOfScreen (dpyinfo->screen);
       double pixels = DisplayHeight (dpyinfo->display, screen_number);
       double mm = DisplayHeightMM (dpyinfo->display, screen_number);
-      /* Mac OS X 10.3's Xserver sometimes reports 0.0mm.  */
+      /* macOS 10.3's Xserver sometimes reports 0.0mm.  */
       dpyinfo->resy = (mm < 1) ? 100 : pixels * 25.4 / mm;
       pixels = DisplayWidth (dpyinfo->display, screen_number);
       mm = DisplayWidthMM (dpyinfo->display, screen_number);
-      /* Mac OS X 10.3's Xserver sometimes reports 0.0mm.  */
+      /* macOS 10.3's Xserver sometimes reports 0.0mm.  */
       dpyinfo->resx = (mm < 1) ? 100 : pixels * 25.4 / mm;
     }
 
-- 
2.10.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]