1. Nic Ferrier
  2. emacs

Commits

Dan Nicolaescu  committed 9592c50

Remove support for Mac Carbon.
* mactoolbox.c:
* macterm.h:
* macterm.c:
* macselect.c:
* macmenu.c:
* macgui.h:
* macfns.c:
* mac.c: Remove file.
* s/darwin.h:
* m/intel386.h:
* xfaces.c:
* xdisp.c:
* window.c:
* tparam.c:
* termhooks.h:
* termcap.c:
* term.c:
* syssignal.h:
* sysselect.h:
* sysdep.c:
* process.c:
* lread.c:
* lisp.h:
* keyboard.c:
* image.c:
* fringe.c:
* frame.h:
* frame.c:
* fontset.c:
* font.h:
* font.c:
* fns.c:
* fileio.c:
* emacs.c:
* dispnew.c:
* dispextern.h:
* config.in:
* atimer.c:
* Makefile.in: Remove code for Carbon

* erc.el: Remove code for Carbon.

Remove support for Mac Carbon.
* term/mac-win.el: Remove file
* international/mule-cmds.el:
* version.el:
* startup.el:
* simple.el:
* mwheel.el:
* mouse.el:
* loadup.el:
* isearch.el:
* info.el:
* frame.el:
* faces.el:
* disp-table.el:
* cus-start.el:
* cus-face.el:
* cus-edit.el:
* Makefile.in: Remove code for Carbon.

Remove support for Mac Carbon.
* makefile.w32-in:
* emacsclient.c: Remove code for Carbon.

* PROBLEMS:
* MACHINES: Remove mentions of Mac Carbon.

* ns-emacs.texi:
* faq.texi: Remove mentions of Mac Carbon.

* os.texi:
* frames.texi:
* display.texi: Remove mentions of Mac Carbon.

* xresources.texi: Remove mentions of Mac Carbon.

* make-tarball.txt:
* admin.el:
* FOR-RELEASE:
* CPP-DEFINES: Remove mentions of Mac Carbon.

Remove support for Mac Carbon.
* mac: Remove directory.
* make-dist:
* configure.in:
* README:
* Makefile.in:
* INSTALL: Remove code for Carbon.
* configure: Regenerate.

  • Participants
  • Parent commits 0ac1996
  • Branches default
  • Tags remove-carbon

Comments (0)

Files changed (100)

File ChangeLog

View file
+2008-07-27  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	Remove support for Mac Carbon.
+	* mac: Remove directory.
+	* make-dist:
+	* configure.in:
+	* README:
+	* Makefile.in:
+	* INSTALL:  Remove code for Carbon.
+	* configure: Regenerate.
+
 2008-07-26  Adrian Robert  <Adrian.B.Robert@gmail.com>
 
 	* Makefile.in (install-arch-dep): Fix typo in NS installation

File INSTALL

View file
 
 (This is for a Unix or Unix-like system.  For MS-DOS and Windows 3.X,
 see below; search for MSDOG.  For Windows 9X, Windows ME, Windows NT,
-and Windows 2000, see the file nt/INSTALL.  For the Mac, see the file
-mac/INSTALL.)
+and Windows 2000, see the file nt/INSTALL.)
 
 1) Make sure your system has enough swapping space allocated to handle
 a program whose pure code is 1.5 MB and whose data area is at

File Makefile.in

View file
 # Where to find the application default.
 x_default_search_path=@x_default_search_path@
 
-# Location to install Emacs.app on Mac OS X
-carbon_appdir=@carbon_appdir@
-
 # Location to install Emacs.app under NeXT/Open/GNUstep / Cocoa
 ns_appdir=@ns_appdir@
 ns_appbindir=@ns_appbindir@
 	    ${INSTALL_DATA} lib-src/$$f $(DESTDIR)${archlibdir}/$$f; \
 	  else true; fi ; \
 	done
-	if test "${carbon_appdir}" != ""; then \
-	  umask 022; mkdir -p $(DESTDIR)${carbon_appdir}/Emacs.app; \
-	  (cd mac/Emacs.app; (tar -chf - . | \
-		(cd $(DESTDIR)${carbon_appdir}/Emacs.app; umask 022; tar -xvf - \
-			&& cat > /dev/null))) || exit 1; \
-	fi
 	if test "${ns_appdir}" != ""; then \
 	  ( cd ${ns_appresdir} ; \
 	    if test -d share/emacs ; then mv -f share/emacs/*/* . ; fi ; \

File README

View file
 `vms'       holds instructions and useful files for running Emacs under VMS.
 `nt'        holds various command files and documentation files that pertain
             to building and running Emacs on Windows 9X/ME/NT/2000/XP.
-`mac'       holds instructions, sources, and other useful files for building
-            and running Emacs on the Mac.
 `test'      holds tests for various aspects of Emacs's functionality.
 
    Building Emacs on non-Posix platforms requires to install tools

File admin/CPP-DEFINES

View file
 
 ** Distinguishing OSes **
 
-MAC_OS8		Compiling for Mac OS Classic (v8 or v9). No longer supported, all code using it can be removed.
-MAC_OSX		Compiling for Mac OS X.  Not bare Darwin.
 CYGWIN		Compiling the Cygwin port.
 __CYGWIN__	Ditto
 MSDOS		Compiling the MS-DOS port.
 ** Distinguishing GUIs **
 
 HAVE_NTGUI	Use the native W32 GUI for windows, frames, menus&scrollbars.
-MAC_OS		Compiling for the `mac' window-system.
-HAVE_CARBON	Compile support for the Carbon GUI.  Requires MAC_OS?
 HAVE_NS	Use the NeXT/OpenStep/Cocoa UI under Mac OS X 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.
 FRAME_TERMCAP_P	A tty (character terminal) frame.
 FRAME_X_P	A frame on X Window system.
 FRAME_MSDOS_P	An MS-DOS frame (used only by the DOS port).
-FRAME_MAC_P	A Mac frame.
 FRAME_W32_P	A frame using native MS-Windows GUI.
 FRAME_WINDOW_P	A GUI frame (like X, w32, etc.)
 

File admin/ChangeLog

View file
+2008-07-27  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* make-tarball.txt:
+	* admin.el:
+	* FOR-RELEASE:
+	* CPP-DEFINES: Remove mentions of Mac Carbon.
+
 2008-07-16  Glenn Morris  <rgm@gnu.org>
 
 	* admin.el (set-version, set-copyright): Add nextstep/ files.

File admin/FOR-RELEASE

View file
 
 * DOCUMENTATION
 
+** Verify if doc/emacs/macos.texi is still useful, remove it if it is not.
+
 ** Document multi-tty features
 http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg01639.html
 http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg01602.html

File admin/admin.el

View file
     (set-version-in-file root "nt/emacs.rc" comma-space-version
 			 (rx (and "\"ProductVersion\"" (0+ space) ?,
 				  (0+ space) ?\" (submatch (1+ (in "0-9, ")))
-				  "\\0\"")))
-    ;; Some files in the "mac" subdirectory also contain the version
-    ;; number.
-    (set-version-in-file
-     root "mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings"
-     version (rx (and "CFBundleShortVersionString" (0+ space) ?= (0+ space) ?\"
-		      (submatch (1+ (in "0-9."))))))
-    (set-version-in-file
-     root "mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings"
-     version (rx (and "CFBundleGetInfoString" (0+ space) ?= (0+ space) ?\"
-		      (submatch (1+ (in "0-9."))))))
-    (set-version-in-file root "mac/src/Emacs.r" (car version-components)
-			 (rx (and "GNU Emacs " (submatch (1+ (in "0-9")))
-				  " for Mac OS")))
-    (set-version-in-file root "mac/src/Emacs.r" (car version-components)
-			 (rx (and (submatch (1+ (in "0-9"))) (0+ space) ?\,
-				  (0+ space) "/* Major revision in BCD */")))
-    (set-version-in-file root "mac/src/Emacs.r" (cadr version-components)
-			 (rx (and (submatch (1+ (in "0-9"))) (0+ space) ?\,
-				  (0+ space) "/* Minor revision in BCD */")))
-    (set-version-in-file root "mac/src/Emacs.r" (cadr (cdr version-components))
-			 (rx (and (submatch (1+ (in "0-9"))) (0+ space) ?\,
-				  (0+ space) "/* Non-final release # */")))
-    (set-version-in-file root "mac/src/Emacs.r" version
-			 (rx (and (submatch (1+ (in "0-9."))) (0+ space) ?\" ?\,
-				  (0+ space) "/* Short version number */")))
-    (set-version-in-file root "mac/src/Emacs.r" version
-			 (rx (and "/* Short version number */" (0+ space) ?\"
-				  (submatch (1+ (in "0-9."))))))
-    (let* ((third-component (string-to-number (cadr (cdr version-components))))
-	   (release (cond ((>= third-component 90) "alpha")
-			  ((>= third-component 50) "development")
-			  (t "final"))))
-      (set-version-in-file
-       root "mac/src/Emacs.r" release
-       (rx (and (submatch (1+ (in "a-z"))) (0+ space) ?\, (0+ space)
-		"/* development, alpha, beta, or final (release) */")))))
+				  "\\0\""))))
   ;; nextstep.
   (set-version-in-file
    root "nextstep/Cocoa/Emacs.base/Contents/Info.plist"
   (set-version-in-file root "lib-src/rcs2log" copyright
 		       (rx (and "Copyright" (0+ space) ?= (0+ space)
 				?\' (submatch (1+ nonl)))))
-  (set-version-in-file
-   root "mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings"
-   copyright (rx (and "CFBundleGetInfoString" (0+ space) ?= (0+ space) ?\"
-                      (1+ anything)
-                      (submatch "Copyright" (1+ (not (in ?\")))))))
   ;; This one is a nuisance, as it needs to be split over two lines.
   (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright)
-  (let ((csign "\\0xa9")
-        (cyear (match-string 1 copyright))  ; "Copyright (C) 2007 "
-        (owner (match-string 2 copyright))) ; "Free Software Foundation, Inc."
-    (set-version-in-file root "mac/src/Emacs.r"
-                         (regexp-quote
-                          (replace-regexp-in-string "(C)"
-                                                    (regexp-quote csign) cyear))
-                         (rx (and
-                              (submatch "Copyright" (0+ space) (eval csign)
-                                        (0+ space) (= 4 num)
-                                        (0+ (not (in ?\")))) ?\")))
-    (set-version-in-file root "mac/src/Emacs.r" owner
-                         (rx (and ?\"
-                              (submatch (1+ (not (in ?\"))))
-                              ?\" (0+ space)
-                              "/* Long version number */"))))
   ;; nextstep.
   (set-version-in-file
    root "nextstep/Cocoa/Emacs.base/Contents/Info.plist"

File admin/make-tarball.txt

View file
 
 6.  Commit configure, README, doc/emacs/emacs.texi,
     doc/lispref/elisp.texi, etc/AUTHORS, lisp/version.el,    
-    mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings,
-    mac/src/Emacs.r, nt/emacs.rc.  Copy lisp/loaddefs.el to
+    nt/emacs.rc.  Copy lisp/loaddefs.el to
     lisp/ldefs-boot.el and commit lisp/ldefs-boot.el.  For a release,
     also commit the ChangeLog files in all directories.
 

File configure

View file
 X_TOOLKIT_TYPE
 machfile
 opsysfile
-carbon_appdir
 ns_appdir
 ns_appbindir
 ns_appresdir
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-carbon-app[=DIR]
-                          specify install directory for Emacs.app on Mac OS X
-                          [DIR=/Application]
   --enable-cocoa-experimental-ctrl-g        enable experimental improved ctrl-g recognition
   --disable-ns-self-contained        disable self contained build under NS
   --enable-asserts        compile code with asserts enabled
                           don't use Motif or Xaw3d scroll bars
   --without-xaw3d         don't use Xaw3d
   --without-xim           don't use X11 XIM
-  --with-carbon           use Carbon GUI on Mac OS X. This is unsupported!
   --with-ns               use nextstep (Cocoa or GNUstep) windowing system
   --without-gpm           don't use -lgpm for mouse support on a GNU/Linux
                           console
 fi
 
 
-# Check whether --with-carbon was given.
-if test "${with_carbon+set}" = set; then
-  withval=$with_carbon;
-else
-      with_carbon=no
-fi
-
-
 # Check whether --with-ns was given.
 if test "${with_ns+set}" = set; then
   withval=$with_ns;
    fi
 fi
 
-# Check whether --enable-carbon-app was given.
-if test "${enable_carbon_app+set}" = set; then
-  enableval=$enable_carbon_app;  carbon_appdir_x=${enableval}
-fi
-
-
 # Check whether --enable-cocoa-experimental-ctrl-g was given.
 if test "${enable_cocoa_experimental_ctrl_g+set}" = set; then
   enableval=$enable_cocoa_experimental_ctrl_g; EN_COCOA_EXPERIMENTAL_CTRL_G=yes
   fi
 fi
 
-HAVE_CARBON=no
-if test "${with_carbon}" != no; then
-  if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
-echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
-echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
-echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <Carbon/Carbon.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
-echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <Carbon/Carbon.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: Carbon/Carbon.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: Carbon/Carbon.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
-echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
-echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
-
-fi
-if test $ac_cv_header_Carbon_Carbon_h = yes; then
-  HAVE_CARBON=yes
-fi
-
-
-  test "${HAVE_CARBON}" = yes && window_system=mac
-fi
-
 HAVE_NS=no
 NS_IMPL_COCOA=no
 NS_IMPL_GNUSTEP=no
 
 fi
 if test "${HAVE_NS}" = yes; then
-  test "${window_system}" = mac && HAVE_CARBON=no
   window_system=nextstep
   with_xft=no
   with_freetype=no
       * ) USE_X_TOOLKIT=maybe ;;
     esac
   ;;
-  nextstep | mac | none )
+  nextstep | none )
     HAVE_X_WINDOWS=no
     HAVE_X11=no
     USE_X_TOOLKIT=none
 
 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
 HAVE_RSVG=no
-if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
+if test "${HAVE_X11}" = "yes"; then
   if test "${with_rsvg}" != "no"; then
     RSVG_REQUIRED=2.0.0
     RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
 _ACEOF
 
     USE_TOOLKIT_SCROLL_BARS=yes
-  elif test "${HAVE_CARBON}" = "yes"; then
-    cat >>confdefs.h <<\_ACEOF
-#define USE_TOOLKIT_SCROLL_BARS 1
-_ACEOF
-
-    USE_TOOLKIT_SCROLL_BARS=yes
   elif test "${HAVE_NS}" = "yes"; then
     cat >>confdefs.h <<\_ACEOF
 #define USE_TOOLKIT_SCROLL_BARS 1
 
 
 
-### Use Mac OS X Carbon API to implement GUI.
-if test "${HAVE_CARBON}" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CARBON 1
-_ACEOF
-
-
-for ac_header in AvailabilityMacros.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-  ## Specify the install directory
-  carbon_appdir=
-  if test "${carbon_appdir_x}" != ""; then
-    case ${carbon_appdir_x} in
-      y | ye | yes)  carbon_appdir=/Applications ;;
-      * ) carbon_appdir=${carbon_appdir_x} ;;
-    esac
-  fi
-  # We also have mouse menus.
-  HAVE_MENUS=yes
-fi
 ### Use NeXTstep API to implement GUI.
 if test "${HAVE_NS}" = "yes"; then
 
 
 
 
-
 cat >>confdefs.h <<_ACEOF
 #define EMACS_CONFIGURATION "${canonical}"
 _ACEOF
   esac
 fi
 
-
-if test "$HAVE_CARBON" = "yes"; then
-   echo
-   echo "Warning: The Mac Carbon port is currently unsupported and has
-known problems.  It is not recommended for use by non-developers.
-The NeXTstep port (--with-ns) is an alternative.
-Read the emacs-devel archives for more information."
-   echo
-fi
-
 if test "$HAVE_NS" = "yes"; then
    echo
    echo "You must run \"make install\" in order to test the built application.
 X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
 machfile!$machfile$ac_delim
 opsysfile!$opsysfile$ac_delim
-carbon_appdir!$carbon_appdir$ac_delim
 ns_appdir!$ns_appdir$ac_delim
 ns_appbindir!$ns_appbindir$ac_delim
 ns_appresdir!$ns_appresdir$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 26; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

File configure.in

View file
 OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars])
 OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
 OPTION_DEFAULT_ON([xim],[don't use X11 XIM])
-OPTION_DEFAULT_OFF([carbon],[use Carbon GUI on Mac OS X.  This is unsupported!])
 OPTION_DEFAULT_OFF([ns],[use nextstep (Cocoa or GNUstep) windowing system])
 
 OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console])
    fi
 fi
 
-AC_ARG_ENABLE(carbon-app,
-[AS_HELP_STRING([--enable-carbon-app@<:@=DIR@:>@],
-                [specify install directory for Emacs.app on Mac OS X
-		 [DIR=/Application]])],
-[ carbon_appdir_x=${enableval}])
-
 AC_ARG_ENABLE(cocoa-experimental-ctrl-g,
 [  --enable-cocoa-experimental-ctrl-g        enable experimental improved ctrl-g recognition],
    EN_COCOA_EXPERIMENTAL_CTRL_G=yes,
   fi
 fi
 
-HAVE_CARBON=no
-if test "${with_carbon}" != no; then
-  AC_CHECK_HEADER(Carbon/Carbon.h, HAVE_CARBON=yes)
-  test "${HAVE_CARBON}" = yes && window_system=mac
-fi
-
 HAVE_NS=no
 NS_IMPL_COCOA=no
 NS_IMPL_GNUSTEP=no
   AC_CHECK_HEADER(AppKit/AppKit.h, HAVE_NS=yes)
 fi
 if test "${HAVE_NS}" = yes; then
-  test "${window_system}" = mac && HAVE_CARBON=no
   window_system=nextstep
   with_xft=no
   with_freetype=no
       * ) USE_X_TOOLKIT=maybe ;;
     esac
   ;;
-  nextstep | mac | none )
+  nextstep | none )
     HAVE_X_WINDOWS=no
     HAVE_X11=no
     USE_X_TOOLKIT=none
 
 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
 HAVE_RSVG=no
-if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
+if test "${HAVE_X11}" = "yes"; then
   if test "${with_rsvg}" != "no"; then
     RSVG_REQUIRED=2.0.0
     RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
   elif test "${HAVE_GTK}" = "yes"; then
     AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
     USE_TOOLKIT_SCROLL_BARS=yes
-  elif test "${HAVE_CARBON}" = "yes"; then
-    AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
-    USE_TOOLKIT_SCROLL_BARS=yes
   elif test "${HAVE_NS}" = "yes"; then
     AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
     USE_TOOLKIT_SCROLL_BARS=yes
 dnl Check for malloc/malloc.h on darwin
 AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])])
 
-### Use Mac OS X Carbon API to implement GUI.
-if test "${HAVE_CARBON}" = "yes"; then
-  AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon API on Mac OS X.])
-  AC_CHECK_HEADERS(AvailabilityMacros.h)
-  ## Specify the install directory
-  carbon_appdir=
-  if test "${carbon_appdir_x}" != ""; then
-    case ${carbon_appdir_x} in
-      y | ye | yes)  carbon_appdir=/Applications ;;
-      * ) carbon_appdir=${carbon_appdir_x} ;;
-    esac
-  fi
-  # We also have mouse menus.
-  HAVE_MENUS=yes
-fi
 ### 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_SUBST(machfile)
 AC_SUBST(opsysfile)
 AC_SUBST(GETLOADAVG_LIBS)
-AC_SUBST(carbon_appdir)
 AC_SUBST(ns_appdir)
 AC_SUBST(ns_appbindir)
 AC_SUBST(ns_appresdir)
 
 AH_BOTTOM([
 /* If we're using X11/Carbon/GNUstep, define some consequences.  */
-#if defined HAVE_X_WINDOWS || defined(HAVE_CARBON) || defined(HAVE_NS)
+#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS)
 #define HAVE_WINDOW_SYSTEM
 #define MULTI_KBOARD
 #define HAVE_MOUSE
 #define CANNOT_DUMP
 #endif
 
-/* TODO: These are used for the Carbon port only. */
-#undef MAC_OS
-#undef MAC_OSX
-
 /* Define AMPERSAND_FULL_NAME if you use the convention
    that & in the full name stands for the login id.  */
 /* Turned on June 1996 supposing nobody will mind it.  */
 
 /* Set up some defines, C and LD flags for NeXTstep interface on GNUstep.
   (There is probably a better place to do this, but right now the Cocoa
-   side does this in s/darwin.h, following the Carbon port, and we cannot
+   side does this in s/darwin.h and we cannot
    parallel this exactly since GNUstep is multi-OS. */
 #ifdef HAVE_NS
 # ifdef C_SWITCH_SYSTEM
   esac
 fi
 
-
-if test "$HAVE_CARBON" = "yes"; then
-   echo
-   echo "Warning: The Mac Carbon port is currently unsupported and has
-known problems.  It is not recommended for use by non-developers.
-The NeXTstep port (--with-ns) is an alternative.
-Read the emacs-devel archives for more information."
-   echo
-fi
-
 if test "$HAVE_NS" = "yes"; then
    echo
    echo "You must run \"make install\" in order to test the built application.

File doc/emacs/ChangeLog

View file
+2008-07-27  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* xresources.texi: Remove mentions of Mac Carbon.
+
 2008-07-19  Andreas Schwab  <schwab@suse.de>
 
 	* ns-emacs.texi: Move to ../misc.

File doc/emacs/xresources.texi

View file
   You can customize some X-related aspects of Emacs behavior using X
 resources, as is usual for programs that use X.  On MS-Windows, you
 can customize some of the same aspects using the system registry.
-@xref{MS-Windows Registry}.  Likewise, Emacs on MacOS Carbon emulates X
-resources using the Preferences system.  @xref{Mac Environment Variables}.
+@xref{MS-Windows Registry}.
 
-  When Emacs is built using an ``X toolkit'', such as Lucid or
+o  When Emacs is built using an ``X toolkit'', such as Lucid or
 LessTif, you need to use X resources to customize the appearance of
 the widgets, including the menu-bar, scroll-bar, and dialog boxes.
 This is because the libraries that implement these don't provide for

File doc/lispref/ChangeLog

View file
+2008-07-27  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* os.texi:
+	* frames.texi:
+	* display.texi: Remove mentions of Mac Carbon.
+
 2008-07-01  Miles Bader  <miles@gnu.org>
 
 	* text.texi (Special Properties):

File doc/lispref/display.texi

View file
 @item type
 The kind of window system the frame uses---either @code{graphic} (any
 graphics-capable display), @code{x}, @code{pc} (for the MS-DOS console),
-@code{w32} (for MS Windows 9X/NT/2K/XP), @code{mac} (for the Macintosh
-display), or @code{tty} (a non-graphics-capable display).
+@code{w32} (for MS Windows 9X/NT/2K/XP), or @code{tty} 
+(a non-graphics-capable display).
 @xref{Window Systems, window-system}.
 
 @item class
 Emacs is displaying using MS-DOS.
 @item w32
 Emacs is displaying using Windows.
-@item mac
-Emacs is displaying using a Macintosh.
 @item nil
 Emacs is using a character-based terminal.
 @end table

File doc/lispref/frames.texi

View file
 The frame is displayed in an X window.
 @item t
 A terminal frame on a character display.
-@item mac
-The frame is displayed on a Macintosh.
 @item w32
 The frame is displayed on MS-Windows 9X/NT.
 @item pc
 only; if the clipboard holds other types of data, Emacs treats the
 clipboard as empty.
 
-@cindex scrap support (for Mac OS)
-On Mac OS, selection-like data transfer between applications is
-performed through a mechanism called @dfn{scraps}.  The clipboard is a
-particular scrap named @code{com.apple.scrap.clipboard}.  Types of scrap
-data are called @dfn{scrap flavor types}, which are identified by
-four-char codes such as @code{TEXT}.  Emacs associates a selection with
-a scrap, and a selection type with a scrap flavor type via
-@code{mac-scrap-name} and @code{mac-ostype} properties, respectively.
-
-@example
-(get 'CLIPBOARD 'mac-scrap-name)
-     @result{} "com.apple.scrap.clipboard"
-(get 'com.apple.traditional-mac-plain-text 'mac-ostype)
-     @result{} "TEXT"
-@end example
-
-Conventionally, selection types for scrap flavor types on Mac OS have
-the form of @acronym{UTI, Uniform Type Identifier} such as
-@code{com.apple.traditional-mac-plain-text},
-@code{public.utf16-plain-text}, and @code{public.file-url}.
-
 @defopt x-select-enable-clipboard
 If this is non-@code{nil}, the Emacs yank functions consult the
 clipboard before the primary selection, and the kill functions store in
 the clipboard as well as the primary selection.  Otherwise they do not
 access the clipboard at all.  The default is @code{nil} on most systems,
-but @code{t} on MS-Windows and Mac.
+but @code{t} on MS-Windows.
 @end defopt
 
 @node Drag and Drop

File doc/lispref/os.texi

View file
 may not have a parent that can resume it again, and in any case you can
 give input to some other job such as a shell merely by moving to a
 different window.  Therefore, suspending is not allowed when Emacs is using
-a window system (X, MS Windows, or Mac).
+a window system (X, MS Windows).
 
 @defun suspend-emacs &optional string
 This function stops Emacs and returns control to the superior process.

File doc/misc/ChangeLog

View file
+2008-07-27  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* ns-emacs.texi:
+	* faq.texi: Remove mentions of Mac Carbon.
+
 2008-07-24  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus.texi (Saving Articles): Describe the 2nd argument of

File doc/misc/faq.texi

View file
 systems.
 
 @item
-The native MS-Windows, Mac OS 9 and Mac OS X builds include full support
+The native MS-Windows, and Mac OS X builds include full support
 for images, toolbar, and tooltips.
 
 @item
 
 In Emacs 21.1 and later, colors and faces are supported in non-windowed mode,
 i.e.@: on Unix and GNU/Linux text-only terminals and consoles, and when
-invoked as @samp{emacs -nw} on X, MS-Windows, and Mac.  (Colors and faces were
+invoked as @samp{emacs -nw} on X, and MS-Windows.  (Colors and faces were
 supported in the MS-DOS port since Emacs 19.29.)  Emacs automatically
 detects color support at startup and uses it if available.  If you think
 that your terminal supports colors, but Emacs won't use them, check the
 @cindex Apple computers, Emacs for
 @cindex Macintosh, Emacs for
 
-Beginning with version 21.1, the Macintosh is supported in the official
-Emacs distribution; see the files @file{mac/README} and
-@file{mac/INSTALL} in the Emacs distribution for build instructions.
-
 Beginning with version 22.1, Emacs supports Mac OS X natively.
 
 @node Emacs for VMS and DECwindows, Modes for various languages, Emacs for Apple computers, Finding Emacs and related packages

File doc/misc/ns-emacs.texi

View file
 <nygard@@telusplanet.net> got emacs to dump under OpenStep.  The font panel
 code was Andrew Athan's <athan@@object.com> work.  Joe Reiss
 <jreiss@@magnus.acs.ohio-state.edu> both created the beautiful icons you see
-and wrote the popup menu and dialog box code as well as much else.  (Actually,
-Joe's icon became the one used for the Mac Carbon port..)
+and wrote the popup menu and dialog box code as well as much else.
 
 Finally, suggestions from Darcy Brockbank, Timothy Bissell, Scott Byer, David
 Griffiths, Scott Hess, Eberhard Mandler, John C. Randolph, and Bradley Taylor

File etc/ChangeLog

View file
+2008-07-27  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* PROBLEMS:
+	* MACHINES: Remove mentions of Mac Carbon.
+
 2008-07-24  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 
 	* NEWS: New function `diff-show-trailing-blanks' in diff-mode.el.

File etc/MACHINES

View file
 
 Apple Macintosh running Mac OS X
 
-  For installation on all versions of the Mac OS platform, see the file
-  mac/INSTALL.
+  For installation instructions see the file nextstep/INSTALL.
 
 Apple PowerPC Macintosh running GNU/Linux
 

File etc/PROBLEMS

View file
 
 Using the old library version is a workaround.
 
-** Mac OS X
-
-*** Mac OS X (Carbon): Environment Variables from dotfiles are ignored.
-
-When starting Emacs from the Dock or the Finder on Mac OS X, the
-environment variables that are set up in dotfiles, such as .cshrc or
-.profile, are ignored.  This is because the Finder and Dock are not
-started from a shell, but instead from the Window Manager itself.
-
-The workaround for this is to create a .MacOSX/environment.plist file to
-setup these environment variables.  These environment variables will
-apply to all processes regardless of where they are started.
-For me information, see http://developer.apple.com/qa/qa2001/qa1067.html.
-
-*** Mac OS X (Carbon): Process output truncated when using ptys.
-
-There appears to be a problem with the implementation of pty's on the
-Mac OS X that causes process output to be truncated.  To avoid this,
-leave process-connection-type set to its default value of nil.
-
-*** Mac OS X 10.3.9 (Carbon): QuickTime updater breaks build.
-
-Some QuickTime updaters such as 7.0.4 and 7.2.0 are known to break
-build at the link stage with the message like "Undefined symbols:
-_HICopyAccessibilityActionDescription referenced from QuickTime
-expected to be defined in Carbon".  A workaround is to use a QuickTime
-reinstaller.  Alternatively, you can link with the frameworks in the
-corresponding SDK by specifying LDFLAGS as
-"-Wl,-F/Developer/SDKs/MacOSX10.3.0.sdk/System/Library/Frameworks".
-
 ** FreeBSD
 
 *** FreeBSD 2.1.5: useless symbolic links remain in /tmp or other

File lib-src/ChangeLog

View file
+2008-07-27  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	Remove support for Mac Carbon.
+	* makefile.w32-in:
+	* emacsclient.c: Remove code for Carbon.
+
 2008-07-21  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* Makefile.in (mac-fix-env): Remove #ifdef around rule.

File lib-src/emacsclient.c

View file
 
   if (!tty && display)
     window_system = 1;
-#if !defined (WINDOWSNT) && !defined (HAVE_CARBON)
+#if !defined (WINDOWSNT)
   else if (!current_frame)
     tty = 1;
 #endif

File lib-src/makefile.w32-in

View file
 #
 obj =   dosfns.o msdos.o \
 	xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
-	mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o \
+	fontset.o \
 	w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
 	w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
 	font.o w32font.o \

File lisp/ChangeLog

View file
+2008-07-27  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	Remove support for Mac Carbon.
+	* term/mac-win.el: Remove file
+	* international/mule-cmds.el:
+	* version.el:
+	* startup.el:
+	* simple.el:
+	* mwheel.el:
+	* mouse.el:
+	* loadup.el:
+	* isearch.el:
+	* info.el:
+	* frame.el:
+	* faces.el:
+	* disp-table.el:
+	* cus-start.el:
+	* cus-face.el:
+	* cus-edit.el:
+	* Makefile.in: Remove code for Carbon.
+
 2008-07-26  Adrian Robert  <Adrian.B.Robert@gmail.com>
 
 	* term/ns-win.el (ns-extended-platform-support-mode): Get rid of

File lisp/Makefile.in

View file
 	$(lisp)/tempo.elc \
 	$(lisp)/term.elc \
 	$(lisp)/term/common-win.elc \
-	$(lisp)/term/mac-win.elc \
 	$(lisp)/term/ns-win.elc \
 	$(lisp)/term/pc-win.elc \
 	$(lisp)/term/rxvt.elc \

File lisp/cus-edit.el

View file
   :link '(custom-manual "(emacs)Windows")
   :group 'environment)
 
-(defgroup mac nil
-  "Mac specific features."
-  :link '(custom-manual "(emacs)Mac OS")
-  :group 'environment
-  :version "22.1"
-  :prefix "mac-")
-
 ;;; Custom mode keymaps
 
 (defvar custom-mode-map
 ;;; The `custom' Widget.
 
 (defface custom-button
-  '((((type x w32 mac ns) (class color))	; Like default modeline
+  '((((type x w32 ns) (class color))	; Like default modeline
      (:box (:line-width 2 :style released-button)
 	   :background "lightgrey" :foreground "black"))
     (t
 (put 'custom-button-face 'face-alias 'custom-button)
 
 (defface custom-button-mouse
-  '((((type x w32 mac ns) (class color))
+  '((((type x w32 ns) (class color))
      (:box (:line-width 2 :style released-button)
 	   :background "grey90" :foreground "black"))
     (t
       (if custom-raised-buttons 'custom-button-mouse 'highlight))
 
 (defface custom-button-pressed
-  '((((type x w32 mac ns) (class color))
+  '((((type x w32 ns) (class color))
      (:box (:line-width 2 :style pressed-button)
 	   :background "lightgrey" :foreground "black"))
     (t
 					   :sibling-args (:help-echo "\
 Windows NT/9X.")
 					   w32)
-				    (const :format "MAC "
-					   :sibling-args (:help-echo "\
-Macintosh OS (Carbon interface).")
-					   mac)
 				    (const :format "NS "
 					   :sibling-args (:help-echo "\
 GNUstep or Macintosh OS Cocoa interface.")

File lisp/cus-face.el

View file
 	  ;; Create frame-local faces
 	  (dolist (frame (frame-list))
 	    (face-spec-set-2 face frame value)
-	    (when (memq (window-system frame) '(x w32 mac ns))
+	    (when (memq (window-system frame) '(x w32 ns))
 	      (setq have-window-system t)))
 	  ;; When making a face after frames already exist
 	  (if have-window-system

File lisp/cus-start.el

View file
 	     (suggest-key-bindings keyboard (choice (const :tag "off" nil)
 						    (integer :tag "time" 2)
 						    (other :tag "on")))
-	     ;; macselect.c
-	     (mac-dnd-known-types mac (repeat string) "22.1")
-	     ;; macterm.c
-	     (mac-control-modifier mac (choice (const :tag "No modifier" nil)
-					       (const control) (const meta)
-					       (const alt) (const hyper)
-					       (const super)) "22.1")
-	     (mac-command-modifier mac (choice (const :tag "No modifier" nil)
-					       (const control) (const meta)
-					       (const alt) (const hyper)
-					       (const super)) "22.1")
-	     (mac-option-modifier mac (choice (const :tag "No modifier (work as option)" nil)
-					      (const control) (const meta)
-					      (const alt) (const hyper)
-					      (const super)) "22.1")
-	     (mac-function-modifier mac
-				    (choice (const :tag "No modifier (work as function)" nil)
-					    (const control) (const meta)
-					    (const alt) (const hyper)
-					    (const super)) "22.1")
-	     (mac-emulate-three-button-mouse mac
-					     (choice (const :tag "No emulation" nil)
-						     (const :tag "Option->2, Command->3" t)
-						     (const :tag "Command->2, Option->3" reverse))
-				    "22.1")
-	     (mac-wheel-button-is-mouse-2 mac boolean "22.1")
-	     (mac-pass-command-to-system mac boolean "22.1")
-	     (mac-pass-control-to-system mac boolean "22.1")
-	     (mac-allow-anti-aliasing mac boolean "22.1")
-	     (mac-ts-script-language-on-focus mac
-					      (choice (const :tag "System default behavior" nil)
-						      (const :tag "Restore to script/language used in the last focus frame" t)
-						      (cons :tag "Specify script/language"
-							    (integer :tag "Script code")
-							    (integer :tag "Language code")))
-					      "22.1")
 
 ;; This is not good news because it will use the wrong
 ;; version-specific directories when you upgrade.  We need
 		       (eq system-type 'ms-dos))
 		      ((string-match "\\`w32-" (symbol-name symbol))
 		       (eq system-type 'windows-nt))
- 		      ((string-match "\\`mac-" (symbol-name symbol))
- 		       (featurep 'mac-carbon))
 		      ((string-match "\\`x-.*gtk" (symbol-name symbol))
 		       (featurep 'gtk))
 		      ((string-match "\\`x-" (symbol-name symbol))

File lisp/disp-table.el

View file
   "Display character C as character SC in the g1 character set.
 This function assumes that your terminal uses the SO/SI characters;
 it is meaningless for an X frame."
-  (if (memq window-system '(x w32 mac ns))
+  (if (memq window-system '(x w32 ns))
       (error "Cannot use string glyphs in a windowing system"))
   (or standard-display-table
       (setq standard-display-table (make-display-table)))
   "Display character C as character GC in graphics character set.
 This function assumes VT100-compatible escapes; it is meaningless for an
 X frame."
-  (if (memq window-system '(x w32 mac ns))
+  (if (memq window-system '(x w32 ns))
       (error "Cannot use string glyphs in a windowing system"))
   (or standard-display-table
       (setq standard-display-table (make-display-table)))
 	       (equal (aref standard-display-table 161) [161])))
       (progn
 	(standard-display-default 160 255)
-	(unless (or (memq window-system '(x w32 mac ns)))
+	(unless (or (memq window-system '(x w32 ns)))
 	  (and (terminal-coding-system)
 	       (set-terminal-coding-system nil))))
 
     ;; unless some other has been specified.
     (if (equal current-language-environment "English")
 	(set-language-environment "latin-1"))
-    (unless (or noninteractive (memq window-system '(x w32 mac ns)))
+    (unless (or noninteractive (memq window-system '(x w32 ns)))
       ;; Send those codes literally to a character-based terminal.
       ;; If we are using single-byte characters,
       ;; it doesn't matter which coding system we use.

File lisp/erc/ChangeLog

View file
+2008-07-27  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* erc.el: Remove code for Carbon.
+
 2008-06-07  Glenn Morris  <rgm@gnu.org>
 
 	* erc/erc-autoaway.el, erc/erc-ibuffer.el, erc/erc-menu.el:

File lisp/erc/erc.el

View file
 				   ((featurep 'gtk)
 				    (concat ", GTK+ Version "
 					    gtk-version-string))
-				   ((featurep 'mac-carbon) ", Mac Carbon")
 				   ((featurep 'x-toolkit) ", X toolkit")
 				   (t ""))
 			     (if (and (boundp 'x-toolkit-scroll-bars)

File lisp/faces.el

View file
 
 (defun set-face-attributes-from-resources (face frame)
   "Set attributes of FACE from X resources for FRAME."
-  (when (memq (framep frame) '(x w32 mac ns))
+  (when (memq (framep frame) '(x w32 ns))
     (dolist (definition face-x-resources)
       (let ((attribute (car definition)))
 	(dolist (entry (cdr definition))
            ((:height)
             'integerp)
            (:stipple
-            (and (memq (window-system frame) '(x w32 mac ns))
+            (and (memq (window-system frame) '(x w32 ns))
                  (mapcar #'list
                          (apply #'nconc
                                 (mapcar (lambda (dir)
 	       ;; explicitly in VALID, using color approximation code
 	       ;; in tty-colors.el.
 	       (when (and (memq attribute '(:foreground :background))
-			  (not (memq (window-system frame) '(x w32 mac ns)))
+			  (not (memq (window-system frame) '(x w32 ns)))
 			  (not (member new-value
 				       '("unspecified"
 					 "unspecified-fg" "unspecified-bg"))))
 The value may be different for frames on different display types.
 If FRAME doesn't support colors, the value is nil.
 If FRAME is nil, that stands for the selected frame."
-  (if (memq (framep (or frame (selected-frame))) '(x w32 mac ns))
+  (if (memq (framep (or frame (selected-frame))) '(x w32 ns))
       (xw-defined-colors frame)
     (mapcar 'car (tty-color-alist frame))))
 (defalias 'x-defined-colors 'defined-colors)
 \"unspecified-fg\" or \"unspecified-bg\", the value is nil."
   (if (member color '(unspecified "unspecified-bg" "unspecified-fg"))
       nil
-    (if (member (framep (or frame (selected-frame))) '(x w32 mac ns))
+    (if (member (framep (or frame (selected-frame))) '(x w32 ns))
 	(xw-color-defined-p color frame)
       (numberp (tty-color-translate color frame)))))
 (defalias 'x-color-defined-p 'color-defined-p)
 \"unspecified-fg\" or \"unspecified-bg\", the value is nil."
   (if (member color '(unspecified "unspecified-fg" "unspecified-bg"))
       nil
-    (if (memq (framep (or frame (selected-frame))) '(x w32 mac ns))
+    (if (memq (framep (or frame (selected-frame))) '(x w32 ns))
 	(xw-color-values color frame)
       (tty-color-values color frame))))
 (defalias 'x-color-values 'color-values)
 The optional argument DISPLAY specifies which display to ask about.
 DISPLAY should be either a frame or a display name (a string).
 If omitted or nil, that stands for the selected frame's display."
-  (if (memq (framep-on-display display) '(x w32 mac ns))
+  (if (memq (framep-on-display display) '(x w32 ns))
       (xw-display-color-p display)
     (tty-display-color-p display)))
 (defalias 'x-display-color-p 'display-color-p)
   "Return non-nil if frames on DISPLAY can display shades of gray."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac ns))
+     ((memq frame-type '(x w32 ns))
       (x-display-grayscale-p display))
      (t
       (> (tty-color-gray-shades display) 2)))))
 	  ;; X resouces for the default face are applied during
 	  ;; x-create-frame.
 	  (and (not (eq face 'default))
-	       (memq (window-system frame) '(x w32 mac)) 	 
+	       (memq (window-system frame) '(x w32)) 	 
 	       (make-face-x-resource-internal face frame))
 	  ;; Apply attributes specified by face-new-frame-defaults
 	  (internal-merge-in-global-face face frame))
   '((default
      :box (:line-width 1 :style released-button)
      :foreground "black")
-    (((type x w32 mac ns) (class color))
+    (((type x w32 ns) (class color))
      :background "grey75")
     (((type x) (class mono))
      :background "grey"))

File lisp/frame.el

View file
     (select-frame frame)
     (raise-frame frame)
     ;; Ensure, if possible, that frame gets input focus.
-    (when (memq (window-system frame) '(x mac w32 ns))
+    (when (memq (window-system frame) '(x w32 ns))
       (x-focus-frame frame))
     (when focus-follows-mouse
       (set-mouse-position (selected-frame) (1- (frame-width)) 0)))
      ((eq system-type 'windows-nt)
       (with-no-warnings
        (> w32-num-mouse-buttons 0)))
-     ((memq frame-type '(x mac ns))
-      t)    ;; We assume X, Mac, NeXTstep *always* have a pointing device
+     ((memq frame-type '(x ns))
+      t)    ;; We assume X and NeXTstep *always* have a pointing device
      (t
       (or (and (featurep 'xt-mouse)
 	       xterm-mouse-mode)
 Support for popup menus requires that the mouse be available."
   (and
    (let ((frame-type (framep-on-display display)))
-     (memq frame-type '(x w32 pc mac ns)))
+     (memq frame-type '(x w32 pc ns)))
    (display-mouse-p display)))
 
 (defun display-graphic-p (&optional display)
 that use a window system such as X, and false for text-only terminals.
 DISPLAY can be a display name, a frame, or nil (meaning the selected
 frame's display)."
-  (not (null (memq (framep-on-display display) '(x w32 mac ns)))))
+  (not (null (memq (framep-on-display display) '(x w32 ns)))))
 
 (defun display-images-p (&optional display)
   "Return non-nil if DISPLAY can display images.
       ;; the Windows' DOS Box.
       (with-no-warnings
        (not (null dos-windows-version))))
-     ((memq frame-type '(x w32 mac ns))
+     ((memq frame-type '(x w32 ns))
       t)    ;; FIXME?
      (t
       nil))))
   "Return the number of screens associated with DISPLAY."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac ns))
+     ((memq frame-type '(x w32 ns))
       (x-display-screens display))
      (t
       1))))
 For character terminals, each character counts as a single pixel."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac ns))
+     ((memq frame-type '(x w32 ns))
       (x-display-pixel-height display))
      (t
       (frame-height (if (framep display) display (selected-frame)))))))
 For character terminals, each character counts as a single pixel."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac ns))
+     ((memq frame-type '(x w32 ns))
       (x-display-pixel-width display))
      (t
       (frame-width (if (framep display) display (selected-frame)))))))
   "Return the height of DISPLAY's screen in millimeters.
 System values can be overridden by `display-mm-dimensions-alist'.
 If the information is unavailable, value is nil."
-  (and (memq (framep-on-display display) '(x w32 mac ns))
+  (and (memq (framep-on-display display) '(x w32 ns))
        (or (cddr (assoc (or display (frame-parameter nil 'display))
 			display-mm-dimensions-alist))
 	   (cddr (assoc t display-mm-dimensions-alist))
   "Return the width of DISPLAY's screen in millimeters.
 System values can be overridden by `display-mm-dimensions-alist'.
 If the information is unavailable, value is nil."
-  (and (memq (framep-on-display display) '(x w32 mac ns))
+  (and (memq (framep-on-display display) '(x w32 ns))
        (or (cadr (assoc (or display (frame-parameter nil 'display))
 			display-mm-dimensions-alist))
 	   (cadr (assoc t display-mm-dimensions-alist))
 the question is inapplicable to a certain kind of display."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac ns))
+     ((memq frame-type '(x w32 ns))
       (x-display-backing-store display))
      (t
       'not-useful))))
   "Return non-nil if DISPLAY's screen supports the SaveUnder feature."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac ns))
+     ((memq frame-type '(x w32 ns))
       (x-display-save-under display))
      (t
       'not-useful))))
   "Return the number of planes supported by DISPLAY."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac ns))
+     ((memq frame-type '(x w32 ns))
       (x-display-planes display))
      ((eq frame-type 'pc)
       4)
   "Return the number of color cells supported by DISPLAY."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac ns))
+     ((memq frame-type '(x w32 ns))
       (x-display-color-cells display))
      ((eq frame-type 'pc)
       16)
 `static-color', `pseudo-color', `true-color', or `direct-color'."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac ns))
+     ((memq frame-type '(x w32 ns))
       (x-display-visual-class display))
      ((and (memq frame-type '(pc t))
 	   (tty-display-color-p display))
   :init-value (not (or noninteractive
 		       no-blinking-cursor
 		       (eq system-type 'ms-dos)
-		       (not (memq window-system '(x w32 mac)))))
+		       (not (memq window-system '(x w32)))))
   :initialize 'custom-initialize-safe-default
   :group 'cursor
   :global t

File lisp/info.el

View file
           ;; This is a serious problem for trying to handle multiple
           ;; frame types at once.  We want this text to be invisible
           ;; on frames that can display the font above.
-          (when (memq (framep (selected-frame)) '(x pc w32 mac ns))
+          (when (memq (framep (selected-frame)) '(x pc w32 ns))
             (add-text-properties (1- (match-beginning 2)) (match-end 2)
                                  '(invisible t front-sticky nil rear-nonsticky t)))))
 

File lisp/international/mule-cmds.el

View file
 (autoload 'widget-value "wid-edit")
 
 (defvar mac-system-coding-system)
-(defvar mac-system-locale)
 
 ;;; MULE related key bindings and menus.
 
   t)
 (define-key-after set-coding-system-map [set-terminal-coding-system]
   '(menu-item "For Terminal" set-terminal-coding-system
-	      :enable (null (memq initial-window-system '(x w32 mac ns)))
+	      :enable (null (memq initial-window-system '(x w32 ns)))
 	      :help "How to encode terminal output")
   t)
 (define-key-after set-coding-system-map [separator-3]
 		    (= 0 (length locale))) ; nil or empty string
 	  (setq locale (getenv (pop vars) frame)))))
 
-    (unless locale
-      ;; The two tests are kept separate so the byte-compiler sees
-      ;; that mac-get-preference is only called after checking its existence.
-      (when (fboundp 'mac-get-preference)
-        (setq locale (mac-get-preference "AppleLocale"))
-        (unless locale
-          (let ((languages (mac-get-preference "AppleLanguages")))
-            (unless (= (length languages) 0) ; nil or empty vector
-              (setq locale (aref languages 0)))))))
-    (unless (or locale (not (boundp 'mac-system-locale)))
-      (setq locale mac-system-locale))
-
     (when locale
       (setq locale (locale-translate locale))
 
 		 (when locale
 		   (if (string-match "\\.\\([^@]+\\)" locale)
 		       (locale-charset-to-coding-system
-			(match-string 1 locale))))
-		 (and (eq system-type 'macos) mac-system-coding-system))))
+			(match-string 1 locale)))))))
 
 	(if (consp language-name)
 	    ;; locale-language-names specify both lang-env and coding.

File lisp/isearch.el

View file
 ;; Scroll-bar functions:
 (if (fboundp 'scroll-bar-toolkit-scroll)
     (put 'scroll-bar-toolkit-scroll 'isearch-scroll t))
-(if (fboundp 'mac-handle-scroll-bar-event)
-    (put 'mac-handle-scroll-bar-event 'isearch-scroll t))
 (if (fboundp 'w32-handle-scroll-bar-event)
     (put 'w32-handle-scroll-bar-event 'isearch-scroll t))
 

File lisp/loadup.el

View file
 (if (eq system-type 'macos)
     (progn
       (load "ls-lisp")))
-(if (featurep 'mac-carbon)
-    (progn
-      (load "term/mac-win")))
 (if (featurep 'ns)
     (progn
       (load "emacs-lisp/easymenu")  ;; for platform-related menu adjustments

File lisp/mouse.el

View file
     ;; If mark is highlighted, no need to bounce the cursor.
     ;; On X, we highlight while dragging, thus once again no need to bounce.
     (or transient-mark-mode
-	(memq (framep (selected-frame)) '(x pc w32 mac ns))
+	(memq (framep (selected-frame)) '(x pc w32 ns))
 	(sit-for 1))
     (push-mark)
     (set-mark (point))

File lisp/mwheel.el

View file
 			"22.1")
 (defcustom mouse-wheel-down-event
   ;; In the latest versions of XEmacs, we could just use mouse-%s as well.
-  (if (memq window-system '(w32 mac ns))
+  (if (memq window-system '(w32 ns))
       'wheel-up
     (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s")
 		    mouse-wheel-down-button)))
 			"22.1")
 (defcustom mouse-wheel-up-event
   ;; In the latest versions of XEmacs, we could just use mouse-%s as well.
-  (if (memq window-system '(w32 mac ns))
+  (if (memq window-system '(w32 ns))
       'wheel-down
     (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s")
 		    mouse-wheel-up-button)))

File lisp/simple.el

View file
        (if (if (eq normal-erase-is-backspace 'maybe)
                (and (not noninteractive)
                     (or (memq system-type '(ms-dos windows-nt))
-                        (eq window-system 'mac)
                         (and (memq window-system '(x))
                              (fboundp 'x-backspace-delete-keys-p)
                              (x-backspace-delete-keys-p))
     (set-terminal-parameter nil 'normal-erase-is-backspace
 			    (if enabled 1 0))
 
-    (cond ((or (memq window-system '(x w32 mac ns pc))
+    (cond ((or (memq window-system '(x w32 ns pc))
 	       (memq system-type '(ms-dos windows-nt)))
 	   (let* ((bindings
 		   `(([C-delete] [C-backspace])

File lisp/startup.el

View file
   ;; only because all other settings of no-blinking-cursor are here.
   (unless (or noninteractive
 	      emacs-basic-display
-	      (and (memq window-system '(x w32 mac ns))
+	      (and (memq window-system '(x w32 ns))
 		   (not (member (x-get-resource "cursorBlink" "CursorBlink")
 				'("off" "false")))))
     (setq no-blinking-cursor t))

File lisp/term/mac-win.el

-;;; mac-win.el --- parse switches controlling interface with Mac window system -*-coding: utf-8-*-
-
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008  Free Software Foundation, Inc.
-
-;; Author: Andrew Choi <akochoi@mac.com>
-;; Keywords: terminals
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; Mac-win.el:  this file is loaded from ../lisp/startup.el when it recognizes
-;; that Mac windows are to be used.  Command line switches are parsed and those
-;; pertaining to Mac are processed and removed from the command line.  The
-;; Mac display is opened and hooks are set for popping up the initial window.
-
-;; startup.el will then examine startup files, and eventually call the hooks
-;; which create the first window(s).
-
-;;; Code:
-
-;; These are the standard X switches from the Xt Initialize.c file of
-;; Release 4.
-
-;; Command line		Resource Manager string
-
-;; +rv			*reverseVideo
-;; +synchronous		*synchronous
-;; -background		*background
-;; -bd			*borderColor
-;; -bg			*background
-;; -bordercolor		*borderColor
-;; -borderwidth		.borderWidth
-;; -bw			.borderWidth
-;; -display		.display
-;; -fg			*foreground
-;; -fn			*font
-;; -font		*font
-;; -foreground		*foreground
-;; -geometry		.geometry
-;; -iconic		.iconic
-;; -name		.name
-;; -reverse		*reverseVideo
-;; -rv			*reverseVideo
-;; -selectionTimeout    .selectionTimeout
-;; -synchronous		*synchronous
-;; -xrm
-
-;; An alist of X options and the function which handles them.  See
-;; ../startup.el.
-
-;; (if (not (eq window-system 'mac))
-;;     (error "%s: Loading mac-win.el but not compiled for Mac" (invocation-name)))
-
-(require 'frame)
-(require 'mouse)
-(require 'scroll-bar)
-(require 'faces)
-(require 'select)
-(require 'menu-bar)
-(require 'fontset)
-(require 'dnd)
-
-(defvar mac-charset-info-alist)
-(defvar mac-service-selection)
-(defvar mac-system-script-code)
-(defvar mac-apple-event-map)
-(defvar mac-font-panel-mode)
-(defvar mac-ts-active-input-overlay)
-(defvar mac-ts-active-input-buf)
-(defvar x-invocation-args)
-(declare-function mac-code-convert-string "mac.c")
-(declare-function mac-coerce-ae-data "mac.c")
-(declare-function mac-resume-apple-event "macselect.c")
-;; Suppress warning when compiling on non-Mac.
-(declare-function mac-font-panel-mode "mac-win.el")
-(declare-function mac-atsu-font-face-attributes "macfns.c")
-(declare-function mac-ae-set-reply-parameter "macselect.c")
-(declare-function mac-clear-font-name-table "macfns.c")
-
-(defvar x-command-line-resources nil)
-
-;; Handler for switches of the form "-switch value" or "-switch".
-(defun x-handle-switch (switch)
-  (let ((aelt (assoc switch command-line-x-option-alist)))
-    (if aelt
-	(let ((param (nth 3 aelt))
-	      (value (nth 4 aelt)))
-	  (if value
-	      (setq default-frame-alist
-		    (cons (cons param value)
-			  default-frame-alist))
-	    (setq default-frame-alist
-		  (cons (cons param
-			      (car x-invocation-args))
-			default-frame-alist)
-		  x-invocation-args (cdr x-invocation-args)))))))
-
-;; Handler for switches of the form "-switch n"
-(defun x-handle-numeric-switch (switch)
-  (let ((aelt (assoc switch command-line-x-option-alist)))
-    (if aelt
-	(let ((param (nth 3 aelt)))
-	  (setq default-frame-alist
-		(cons (cons param
-			    (string-to-number (car x-invocation-args)))
-		      default-frame-alist)
-		x-invocation-args
-		(cdr x-invocation-args))))))
-
-;; Handle options that apply to initial frame only
-(defun x-handle-initial-switch (switch)
-  (let ((aelt (assoc switch command-line-x-option-alist)))
-    (if aelt
-	(let ((param (nth 3 aelt))
-	      (value (nth 4 aelt)))
-	  (if value
-	      (setq initial-frame-alist
-		    (cons (cons param value)
-			  initial-frame-alist))
-	    (setq initial-frame-alist
-		  (cons (cons param
-			      (car x-invocation-args))
-			initial-frame-alist)
-		  x-invocation-args (cdr x-invocation-args)))))))
-
-;; Make -iconic apply only to the initial frame!
-(defun x-handle-iconic (switch)
-  (setq initial-frame-alist
-	(cons '(visibility . icon) initial-frame-alist)))
-
-;; Handle the -xrm option.
-(defun x-handle-xrm-switch (switch)
-  (unless (consp x-invocation-args)
-    (error "%s: missing argument to `%s' option" (invocation-name) switch))
-  (setq x-command-line-resources
-	(if (null x-command-line-resources)
-	    (car x-invocation-args)
-	  (concat x-command-line-resources "\n" (car x-invocation-args))))
-  (setq x-invocation-args (cdr x-invocation-args)))
-
-(declare-function x-parse-geometry "frame.c" (string))
-
-;; Handle the geometry option
-(defun x-handle-geometry (switch)
-  (let* ((geo (x-parse-geometry (car x-invocation-args)))
-	 (left (assq 'left geo))
-	 (top (assq 'top geo))
-	 (height (assq 'height geo))
-	 (width (assq 'width geo)))
-    (if (or height width)
-	(setq default-frame-alist
-	      (append default-frame-alist
-		      '((user-size . t))
-		      (if height (list height))
-		      (if width (list width)))
-	      initial-frame-alist
-	      (append initial-frame-alist
-		      '((user-size . t))
-		      (if height (list height))
-		      (if width (list width)))))
-    (if (or left top)
-	(setq initial-frame-alist
-	      (append initial-frame-alist
-		      '((user-position . t))
-		      (if left (list left))
-		      (if top (list top)))))
-    (setq x-invocation-args (cdr x-invocation-args))))
-
-(defvar x-resource-name)
-
-;; Handle the -name option.  Set the variable x-resource-name
-;; to the option's operand; set the name of
-;; the initial frame, too.
-(defun x-handle-name-switch (switch)
-  (or (consp x-invocation-args)
-      (error "%s: missing argument to `%s' option" (invocation-name) switch))
-  (setq x-resource-name (car x-invocation-args)
-	x-invocation-args (cdr x-invocation-args))
-  (setq initial-frame-alist (cons (cons 'name x-resource-name)
-				  initial-frame-alist)))
-
-(defvar x-display-name nil
-  "The display name specifying server and frame.")
-
-(defun x-handle-display (switch)
-  (setq x-display-name (car x-invocation-args)
-	x-invocation-args (cdr x-invocation-args)))
-
-(defun x-handle-args (args)
-  "Process the X-related command line options in ARGS.
-This is done before the user's startup file is loaded.  They are copied to
-`x-invocation-args', from which the X-related things are extracted, first
-the switch (e.g., \"-fg\") in the following code, and possible values
-\(e.g., \"black\") in the option handler code (e.g., x-handle-switch).
-This function returns ARGS minus the arguments that have been processed."
-  ;; We use ARGS to accumulate the args that we don't handle here, to return.
-  (setq x-invocation-args args
-	args nil)
-  (while (and x-invocation-args
-	      (not (equal (car x-invocation-args) "--")))
-    (let* ((this-switch (car x-invocation-args))
-	   (orig-this-switch this-switch)
-	   completion argval aelt handler)
-      (setq x-invocation-args (cdr x-invocation-args))
-      ;; Check for long options with attached arguments
-      ;; and separate out the attached option argument into argval.
-      (if (string-match "^--[^=]*=" this-switch)
-	  (setq argval (substring this-switch (match-end 0))
-		this-switch (substring this-switch 0 (1- (match-end 0)))))
-      ;; Complete names of long options.
-      (if (string-match "^--" this-switch)
-	  (progn
-	    (setq completion (try-completion this-switch command-line-x-option-alist))
-	    (if (eq completion t)
-		;; Exact match for long option.
-		nil
-	      (if (stringp completion)
-		  (let ((elt (assoc completion command-line-x-option-alist)))
-		    ;; Check for abbreviated long option.
-		    (or elt
-			(error "Option `%s' is ambiguous" this-switch))
-		    (setq this-switch completion))))))
-      (setq aelt (assoc this-switch command-line-x-option-alist))
-      (if aelt (setq handler (nth 2 aelt)))
-      (if handler
-	  (if argval
-	      (let ((x-invocation-args
-		     (cons argval x-invocation-args)))
-		(funcall handler this-switch))
-	    (funcall handler this-switch))
-	(setq args (cons orig-this-switch args)))))
-  (nconc (nreverse args) x-invocation-args))
-
-
-;;
-;; Standard Mac cursor shapes
-;;
-
-(defconst mac-pointer-arrow 0)
-(defconst mac-pointer-copy-arrow 1)
-(defconst mac-pointer-alias-arrow 2)
-(defconst mac-pointer-contextual-menu-arrow 3)
-(defconst mac-pointer-I-beam 4)
-(defconst mac-pointer-cross 5)
-(defconst mac-pointer-plus 6)
-(defconst mac-pointer-watch 7)
-(defconst mac-pointer-closed-hand 8)
-(defconst mac-pointer-open-hand 9)
-(defconst mac-pointer-pointing-hand 10)
-(defconst mac-pointer-counting-up-hand 11)
-(defconst mac-pointer-counting-down-hand 12)
-(defconst mac-pointer-counting-up-and-down-hand 13)
-(defconst mac-pointer-spinning 14)
-(defconst mac-pointer-resize-left 15)
-(defconst mac-pointer-resize-right 16)
-(defconst mac-pointer-resize-left-right 17)
-;; Mac OS X 10.2 and later
-(defconst mac-pointer-not-allowed 18)
-;; Mac OS X 10.3 and later
-(defconst mac-pointer-resize-up 19)
-(defconst mac-pointer-resize-down 20)
-(defconst mac-pointer-resize-up-down 21)
-(defconst mac-pointer-poof 22)
-
-;;
-;; Standard X cursor shapes that have Mac counterparts
-;;
-
-(defconst x-pointer-left-ptr mac-pointer-arrow)
-(defconst x-pointer-xterm mac-pointer-I-beam)
-(defconst x-pointer-crosshair mac-pointer-cross)
-(defconst x-pointer-plus mac-pointer-plus)
-(defconst x-pointer-watch mac-pointer-watch)
-(defconst x-pointer-hand2 mac-pointer-pointing-hand)
-(defconst x-pointer-left-side mac-pointer-resize-left)
-(defconst x-pointer-right-side mac-pointer-resize-right)
-(defconst x-pointer-sb-h-double-arrow mac-pointer-resize-left-right)
-(defconst x-pointer-top-side mac-pointer-resize-up)
-(defconst x-pointer-bottom-side mac-pointer-resize-down)
-(defconst x-pointer-sb-v-double-arrow mac-pointer-resize-up-down)
-
-
-;;
-;; Available colors
-;;
-;; The ordering of the colors is chosen for the user's convenience in
-;; `list-colors-display', which displays the reverse of this list.
-;; Roughly speaking, `list-colors-display' orders by (i) named shades
-;; of grey with hue 0.0, sorted by value (ii) named colors with
-;; saturation 1.0, sorted by hue, (iii) named non-white colors with
-;; saturation less than 1.0, sorted by hue, (iv) other named shades of