1diff --git a/src/MacVim/vimrc b/src/MacVim/vimrc
2index af43549..dfb10fe 100644
3--- a/src/MacVim/vimrc
4+++ b/src/MacVim/vimrc
5@@ -14,35 +14,5 @@ set backspace+=indent,eol,start
6 " translated to English).
7 set langmenu=none
8
9-" Python2
10-" MacVim is configured by default to use the pre-installed System python2
11-" version. However, following code tries to find a Homebrew, MacPorts or
12-" an installation from python.org:
13-if exists("&pythondll") && exists("&pythonhome")
14- if filereadable("/usr/local/Frameworks/Python.framework/Versions/2.7/Python")
15- " Homebrew python 2.7
16- set pythondll=/usr/local/Frameworks/Python.framework/Versions/2.7/Python
17- elseif filereadable("/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python")
18- " MacPorts python 2.7
19- set pythondll=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python
20- elseif filereadable("/Library/Frameworks/Python.framework/Versions/2.7/Python")
21- " https://www.python.org/downloads/mac-osx/
22- set pythondll=/Library/Frameworks/Python.framework/Versions/2.7/Python
23- endif
24-endif
25-
26-" Python3
27-" MacVim is configured by default to use Homebrew python3 version
28-" If this cannot be found, following code tries to find a MacPorts
29-" or an installation from python.org:
30-if exists("&pythonthreedll") && exists("&pythonthreehome") &&
31- \ !filereadable(&pythonthreedll)
32- if filereadable("/opt/local/Library/Frameworks/Python.framework/Versions/3.8/Python")
33- " MacPorts python 3.8
34- set pythonthreedll=/opt/local/Library/Frameworks/Python.framework/Versions/3.8/Python
35- elseif filereadable("/Library/Frameworks/Python.framework/Versions/3.8/Python")
36- " https://www.python.org/downloads/mac-osx/
37- set pythonthreedll=/Library/Frameworks/Python.framework/Versions/3.8/Python
38- endif
39-endif
40-
41+" Default cscopeprg to the Nix-installed path
42+set cscopeprg=@CSCOPE@
43diff --git a/src/Makefile b/src/Makefile
44index fd2d5e1..37a6d6a 100644
45--- a/src/Makefile
46+++ b/src/Makefile
47@@ -1397,7 +1397,7 @@ MACVIMGUI_SRC = gui.c gui_beval.c MacVim/gui_macvim.m MacVim/MMBackend.m \
48 MacVim/MacVim.m
49 MACVIMGUI_OBJ = objects/gui.o objects/gui_beval.o \
50 objects/gui_macvim.o objects/MMBackend.o objects/MacVim.o
51-MACVIMGUI_DEFS = -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
52+MACVIMGUI_DEFS = -DMACOS_X_DARWIN -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
53 MACVIMGUI_IPATH =
54 MACVIMGUI_LIBS_DIR =
55 MACVIMGUI_LIBS1 = -framework Cocoa -framework Carbon
56diff --git a/src/auto/configure b/src/auto/configure
57index 06257a5..68437df 100755
58--- a/src/auto/configure
59+++ b/src/auto/configure
60@@ -5872,10 +5872,7 @@ $as_echo "not found" >&6; }
61
62 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
63 if test "X$path" != "X"; then
64- if test "x$MACOS_X" = "xyes"; then
65- MZSCHEME_LIBS="-framework Racket"
66- MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
67- elif test -f "${path}/libmzscheme3m.a"; then
68+ if test -f "${path}/libmzscheme3m.a"; then
69 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
70 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
71 elif test -f "${path}/libracket3m.a"; then
72@@ -6260,23 +6257,6 @@ $as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
73 fi
74
75 if test "x$MACOS_X" = "xyes"; then
76- dir=/System/Library/Perl
77- darwindir=$dir/darwin
78- if test -d $darwindir; then
79- PERL=/usr/bin/perl
80- else
81- dir=/System/Library/Perl/5.8.1
82- darwindir=$dir/darwin-thread-multi-2level
83- if test -d $darwindir; then
84- PERL=/usr/bin/perl
85- fi
86- fi
87- if test -n "$PERL"; then
88- PERL_DIR="$dir"
89- PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
90- PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
91- PERL_LIBS="-L$darwindir/CORE -lperl"
92- fi
93 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
94 PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
95 fi
96@@ -6499,13 +6479,7 @@ __:
97 eof
98 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
99 rm -f -- "${tmp_mkf}"
100- if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
101- "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
102- vi_cv_path_python_plibs="-framework Python"
103- if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
104- vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
105- fi
106- else
107+
108 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
109 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
110 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
111@@ -6520,7 +6494,6 @@ eof
112 fi
113 vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
114 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
115- fi
116
117 fi
118
119@@ -6599,13 +6572,6 @@ rm -f core conftest.err conftest.$ac_objext \
120 $as_echo "no" >&6; }
121 fi
122
123- if test -n "$MACSDK"; then
124- PYTHON_CFLAGS=
125- PYTHON_LIBS=-framework Python
126- PYTHON_CONFDIR=
127- PYTHON_GETPATH_CFLAGS=
128- fi
129-
130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
131 $as_echo_n "checking if compile and link flags for Python are sane... " >&6; }
132 cflags_save=$CFLAGS
133@@ -7499,11 +7465,7 @@ $as_echo "$tclver - OK" >&6; };
134
135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
136 $as_echo_n "checking for location of Tcl include... " >&6; }
137- if test "x$MACOS_X" != "xyes"; then
138 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
139- else
140- tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /System/Library/Frameworks/Tcl.framework/Headers `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework/Versions/Current/Headers"
141- fi
142 TCL_INC=
143 for try in $tclinc; do
144 if test -f "$try/tcl.h"; then
145@@ -7521,13 +7483,8 @@ $as_echo "<not found>" >&6; }
146 if test -z "$SKIP_TCL"; then
147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
148 $as_echo_n "checking for location of tclConfig.sh script... " >&6; }
149- if test "x$MACOS_X" != "xyes"; then
150 tclcnf=`echo $tclinc | sed s/include/lib/g`
151 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
152- else
153- tclcnf=`echo $tclinc | sed s/include/lib/g`
154- tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
155- fi
156 for try in $tclcnf; do
157 if test -f "$try/tclConfig.sh"; then
158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
159@@ -7717,10 +7674,6 @@ $as_echo "$rubyhdrdir" >&6; }
160 if test -f "$rubylibdir/$librubya"; then
161 librubyarg="$librubyarg"
162 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
163- elif test "$vi_cv_path_ruby" = "/usr/bin/ruby" -a -d "/System/Library/Frameworks/Ruby.framework"; then
164- RUBY_LIBS="-framework Ruby"
165- RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
166- librubyarg=
167 fi
168
169 if test "X$librubyarg" != "X"; then
170diff --git a/src/vim.h b/src/vim.h
171index bbc01ee..5a93591 100644
172--- a/src/vim.h
173+++ b/src/vim.h
174@@ -244,17 +244,6 @@
175 # define SUN_SYSTEM
176 #endif
177
178-// If we're compiling in C++ (currently only KVim), the system
179-// headers must have the correct prototypes or nothing will build.
180-// Conversely, our prototypes might clash due to throw() specifiers and
181-// cause compilation failures even though the headers are correct. For
182-// a concrete example, gcc-3.2 enforces exception specifications, and
183-// glibc-2.2.5 has them in their system headers.
184-#if !defined(__cplusplus) && defined(UNIX) \
185- && !defined(MACOS_X) // MACOS_X doesn't yet support osdef.h
186-# include "auto/osdef.h" // bring missing declarations in
187-#endif
188-
189 #ifdef AMIGA
190 # include "os_amiga.h"
191 #endif
192diff --git a/src/vimtutor b/src/vimtutor
193index 1e8769b..47078b0 100755
194--- a/src/vimtutor
195+++ b/src/vimtutor
196@@ -16,7 +16,7 @@ seq="vim vim81 vim80 vim8 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
197 if test "$1" = "-g"; then
198 # Try to use the GUI version of Vim if possible, it will fall back
199 # on Vim if Gvim is not installed.
200- seq="gvim gvim81 gvim80 gvim8 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
201+ seq="mvim gvim gvim81 gvim80 gvim8 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
202 shift
203 fi
204