aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Choi2002-04-26 23:39:06 +0000
committerAndrew Choi2002-04-26 23:39:06 +0000
commite0f712ba55fa0d073f6ab93606e428f61fc7caf2 (patch)
tree7dc6d3403fafcbee1a83288ac840f7eba1d92b44
parent501d8923ae2cdec4ef50f050bb66d3715ba2a8f6 (diff)
downloademacs-e0f712ba55fa0d073f6ab93606e428f61fc7caf2.tar.gz
emacs-e0f712ba55fa0d073f6ab93606e428f61fc7caf2.zip
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
lisp/ChangeLog, and src/ChangeLog for list of changes.
-rw-r--r--ChangeLog7
-rwxr-xr-xconfigure498
-rw-r--r--configure.in19
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/cus-load.el43
-rw-r--r--lisp/finder-inf.el604
-rw-r--r--lisp/loaddefs.el229
-rw-r--r--lisp/term/mac-win.el14
-rw-r--r--mac/ChangeLog133
-rw-r--r--mac/Emacs.app/Contents/Info.plist18
-rw-r--r--mac/Emacs.app/Contents/PkgInfo1
-rw-r--r--mac/Emacs.app/Contents/Resources/Emacs.rsrcbin0 -> 6058 bytes
-rw-r--r--mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings5
-rw-r--r--mac/INSTALL172
-rw-r--r--mac/README52
-rw-r--r--mac/cw5-mcp.xml2084
-rw-r--r--mac/cw6-mcp.xml156
-rw-r--r--mac/inc/alloca.h2
-rw-r--r--mac/inc/config.h4
-rw-r--r--mac/inc/defs-cw5.h23
-rw-r--r--mac/inc/defs-cw6.h5
-rw-r--r--mac/inc/dirent.h2
-rw-r--r--mac/inc/epaths.h2
-rw-r--r--mac/inc/m-mac.h2
-rw-r--r--mac/inc/pwd.h2
-rw-r--r--mac/inc/s-mac.h2
-rw-r--r--mac/inc/sys/file.h2
-rw-r--r--mac/inc/sys/ioctl.h2
-rw-r--r--mac/inc/sys/param.h2
-rw-r--r--mac/inc/sys/stat.h4
-rw-r--r--mac/inc/sys/time.h2
-rw-r--r--mac/inc/sys/types.h2
-rw-r--r--mac/inc/termio.h2
-rw-r--r--mac/inc/utime.h2
-rw-r--r--mac/inc/utsname.h2
-rwxr-xr-xmac/make-bin-dist117
-rw-r--r--mac/makefile.MPW90
-rwxr-xr-xmac/osx-install97
-rw-r--r--mac/src/Emacs.r6
-rw-r--r--mac/src/EmacsMPW.r2
-rw-r--r--mac/src/chdir.c2
-rwxr-xr-xmake-dist12
-rw-r--r--man/macos.texi65
-rw-r--r--src/ChangeLog33
-rw-r--r--src/Makefile.in54
-rw-r--r--src/alloc.c2
-rw-r--r--src/callproc.c22
-rw-r--r--src/config.in12
-rw-r--r--src/dispextern.h2
-rw-r--r--src/dispnew.c8
-rw-r--r--src/editfns.c6
-rw-r--r--src/emacs.c48
-rw-r--r--src/fontset.c4
-rw-r--r--src/frame.c10
-rw-r--r--src/frame.h10
-rw-r--r--src/keyboard.c12
-rw-r--r--src/m/powermac.h121
-rw-r--r--src/mac.c (renamed from mac/src/mac.c)253
-rw-r--r--src/macfns.c (renamed from mac/src/macfns.c)893
-rw-r--r--src/macgui.h (renamed from mac/inc/macgui.h)24
-rw-r--r--src/macmenu.c (renamed from mac/src/macmenu.c)688
-rw-r--r--src/macterm.c (renamed from mac/src/macterm.c)4109
-rw-r--r--src/macterm.h (renamed from mac/inc/macterm.h)100
-rw-r--r--src/process.c13
-rw-r--r--src/s/darwin.h291
-rw-r--r--src/sysdep.c12
-rw-r--r--src/term.c2
-rw-r--r--src/termcap.c17
-rw-r--r--src/tparam.c4
-rw-r--r--src/unexmacosx.c914
-rw-r--r--src/window.c2
-rw-r--r--src/xdisp.c16
-rw-r--r--src/xfaces.c63
73 files changed, 6708 insertions, 5532 deletions
diff --git a/ChangeLog b/ChangeLog
index e7789d87e1e..3385a59a804 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
12002-04-26 Andrew Choi <akochoi@shaw.ca>
2
3 * configure.in: Add support for powerpc-apple-darwin*.
4 (HAVE_CARBON): Add.
5
6 * make-dist: create directories in mac/Emacs.app.
7
12002-04-25 Pavel Jan,Bm(Bk <Pavel@Janik.cz> 82002-04-25 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
2 9
3 * make-dist: lwlib-Xol* are removed. 10 * make-dist: lwlib-Xol* are removed.
diff --git a/configure b/configure
index ccf29034018..91d1446c38c 100755
--- a/configure
+++ b/configure
@@ -1,19 +1,11 @@
1#! /bin/sh 1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles. 2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.53. 3# Generated by GNU Autoconf 2.53a.
4# 4#
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6# Free Software Foundation, Inc. 6# Free Software Foundation, Inc.
7# This configure script is free software; the Free Software Foundation 7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it. 8# gives unlimited permission to copy, distribute and modify it.
9
10if expr a : '\(a\)' >/dev/null 2>&1; then
11 as_expr=expr
12else
13 as_expr=false
14fi
15
16
17## --------------------- ## 9## --------------------- ##
18## M4sh Initialization. ## 10## M4sh Initialization. ##
19## --------------------- ## 11## --------------------- ##
@@ -22,6 +14,9 @@ fi
22if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 14if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23 emulate sh 15 emulate sh
24 NULLCMD=: 16 NULLCMD=:
17 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
25elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then 20elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26 set -o posix 21 set -o posix
27fi 22fi
@@ -60,8 +55,22 @@ fi
60 { LC_MESSAGES=C; export LC_MESSAGES; } 55 { LC_MESSAGES=C; export LC_MESSAGES; }
61 56
62 57
58# Required to use basename.
59if expr a : '\(a\)' >/dev/null 2>&1; then
60 as_expr=expr
61else
62 as_expr=false
63fi
64
65if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
66 as_basename=basename
67else
68 as_basename=false
69fi
70
71
63# Name of the executable. 72# Name of the executable.
64as_me=`(basename "$0") 2>/dev/null || 73as_me=`$as_basename "$0" ||
65$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 74$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66 X"$0" : 'X\(//\)$' \| \ 75 X"$0" : 'X\(//\)$' \| \
67 X"$0" : 'X\(/\)$' \| \ 76 X"$0" : 'X\(/\)$' \| \
@@ -72,6 +81,7 @@ echo X/"$0" |
72 /^X\/\(\/\).*/{ s//\1/; q; } 81 /^X\/\(\/\).*/{ s//\1/; q; }
73 s/.*/./; q'` 82 s/.*/./; q'`
74 83
84
75# PATH needs CR, and LINENO needs CR and PATH. 85# PATH needs CR, and LINENO needs CR and PATH.
76# Avoid depending upon Character Ranges. 86# Avoid depending upon Character Ranges.
77as_cr_letters='abcdefghijklmnopqrstuvwxyz' 87as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -138,6 +148,8 @@ do
138 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` 148 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
139 test "x$as_lineno_1" != "x$as_lineno_2" && 149 test "x$as_lineno_1" != "x$as_lineno_2" &&
140 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then 150 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
151 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
152 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
141 CONFIG_SHELL=$as_dir/$as_base 153 CONFIG_SHELL=$as_dir/$as_base
142 export CONFIG_SHELL 154 export CONFIG_SHELL
143 exec "$CONFIG_SHELL" "$0" ${1+"$@"} 155 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
@@ -210,6 +222,12 @@ else
210fi 222fi
211rm -f conf$$ conf$$.exe conf$$.file 223rm -f conf$$ conf$$.exe conf$$.file
212 224
225if mkdir -p . 2>/dev/null; then
226 as_mkdir_p=:
227else
228 as_mkdir_p=false
229fi
230
213as_executable_p="test -f" 231as_executable_p="test -f"
214 232
215# Sed expression to map a string onto a valid CPP name. 233# Sed expression to map a string onto a valid CPP name.
@@ -857,6 +875,7 @@ Optional Packages:
857 --without-toolkit-scroll-bars 875 --without-toolkit-scroll-bars
858 don't use Motif or Xaw3d scroll bars 876 don't use Motif or Xaw3d scroll bars
859 --without-xim don't use X11 XIM 877 --without-xim don't use X11 XIM
878 --without-carbon don't use Carbon GUI on Mac OS X
860 --with-x use the X Window System 879 --with-x use the X Window System
861 880
862Some influential environment variables: 881Some influential environment variables:
@@ -947,7 +966,7 @@ This file contains any messages produced by compilers while
947running configure, to aid debugging if configure makes a mistake. 966running configure, to aid debugging if configure makes a mistake.
948 967
949It was created by $as_me, which was 968It was created by $as_me, which was
950generated by GNU Autoconf 2.53. Invocation command line was 969generated by GNU Autoconf 2.53a. Invocation command line was
951 970
952 $ $0 $@ 971 $ $0 $@
953 972
@@ -1216,7 +1235,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
1216 1235
1217 1236
1218 1237
1219ac_config_headers="$ac_config_headers src/config.h:src/config.in" 1238
1239 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
1220 1240
1221 1241
1222test "$program_prefix" != NONE && 1242test "$program_prefix" != NONE &&
@@ -1403,6 +1423,12 @@ if test "${with_xim+set}" = set; then
1403 1423
1404fi; 1424fi;
1405 1425
1426# Check whether --with-carbon or --without-carbon was given.
1427if test "${with_carbon+set}" = set; then
1428 withval="$with_carbon"
1429
1430fi;
1431
1406#### Make srcdir absolute, if it isn't already. It's important to 1432#### Make srcdir absolute, if it isn't already. It's important to
1407#### avoid running the path through pwd unnecessarily, since pwd can 1433#### avoid running the path through pwd unnecessarily, since pwd can
1408#### give you automounter prefixes, which can go away. We do all this 1434#### give you automounter prefixes, which can go away. We do all this
@@ -2459,6 +2485,13 @@ case "${canonical}" in
2459 machine=f301 opsys=uxpv 2485 machine=f301 opsys=uxpv
2460 ;; 2486 ;;
2461 2487
2488 ## Darwin / Mac OS X
2489 powerpc-apple-darwin* )
2490 machine=powermac opsys=darwin
2491 # Define CPP as follows to make autoconf work correctly.
2492 CPP="cc -E -traditional-cpp"
2493 ;;
2494
2462 * ) 2495 * )
2463 unported=yes 2496 unported=yes
2464 ;; 2497 ;;
@@ -2901,7 +2934,7 @@ for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2901 ls a.out conftest 2>/dev/null; 2934 ls a.out conftest 2>/dev/null;
2902 ls a.* conftest.* 2>/dev/null`; do 2935 ls a.* conftest.* 2>/dev/null`; do
2903 case $ac_file in 2936 case $ac_file in
2904 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; 2937 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2905 a.out ) # We found the default executable, but exeext='' is most 2938 a.out ) # We found the default executable, but exeext='' is most
2906 # certainly right. 2939 # certainly right.
2907 break;; 2940 break;;
@@ -2975,7 +3008,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2975# `rm'. 3008# `rm'.
2976for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do 3009for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2977 case $ac_file in 3010 case $ac_file in
2978 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; 3011 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2979 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 3012 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2980 export ac_cv_exeext 3013 export ac_cv_exeext
2981 break;; 3014 break;;
@@ -3026,7 +3059,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3026 (exit $ac_status); }; then 3059 (exit $ac_status); }; then
3027 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do 3060 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3028 case $ac_file in 3061 case $ac_file in
3029 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; 3062 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
3030 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 3063 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3031 break;; 3064 break;;
3032 esac 3065 esac
@@ -3159,6 +3192,103 @@ else
3159 CFLAGS= 3192 CFLAGS=
3160 fi 3193 fi
3161fi 3194fi
3195echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3196echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3197if test "${ac_cv_prog_cc_stdc+set}" = set; then
3198 echo $ECHO_N "(cached) $ECHO_C" >&6
3199else
3200 ac_cv_prog_cc_stdc=no
3201ac_save_CC=$CC
3202cat >conftest.$ac_ext <<_ACEOF
3203#line $LINENO "configure"
3204#include "confdefs.h"
3205#include <stdarg.h>
3206#include <stdio.h>
3207#include <sys/types.h>
3208#include <sys/stat.h>
3209/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3210struct buf { int x; };
3211FILE * (*rcsopen) (struct buf *, struct stat *, int);
3212static char *e (p, i)
3213 char **p;
3214 int i;
3215{
3216 return p[i];
3217}
3218static char *f (char * (*g) (char **, int), char **p, ...)
3219{
3220 char *s;
3221 va_list v;
3222 va_start (v,p);
3223 s = g (p, va_arg (v,int));
3224 va_end (v);
3225 return s;
3226}
3227int test (int i, double x);
3228struct s1 {int (*f) (int a);};
3229struct s2 {int (*f) (double a);};
3230int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3231int argc;
3232char **argv;
3233#ifdef F77_DUMMY_MAIN
3234# ifdef __cplusplus
3235 extern "C"
3236# endif
3237 int F77_DUMMY_MAIN() { return 1; }
3238#endif
3239int
3240main ()
3241{
3242return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3243 ;
3244 return 0;
3245}
3246_ACEOF
3247# Don't try gcc -ansi; that turns off useful extensions and
3248# breaks some systems' header files.
3249# AIX -qlanglvl=ansi
3250# Ultrix and OSF/1 -std1
3251# HP-UX 10.20 and later -Ae
3252# HP-UX older versions -Aa -D_HPUX_SOURCE
3253# SVR4 -Xc -D__EXTENSIONS__
3254for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3255do
3256 CC="$ac_save_CC $ac_arg"
3257 rm -f conftest.$ac_objext
3258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3259 (eval $ac_compile) 2>&5
3260 ac_status=$?
3261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3262 (exit $ac_status); } &&
3263 { ac_try='test -s conftest.$ac_objext'
3264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3265 (eval $ac_try) 2>&5
3266 ac_status=$?
3267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3268 (exit $ac_status); }; }; then
3269 ac_cv_prog_cc_stdc=$ac_arg
3270break
3271else
3272 echo "$as_me: failed program was:" >&5
3273cat conftest.$ac_ext >&5
3274fi
3275rm -f conftest.$ac_objext
3276done
3277rm -f conftest.$ac_ext conftest.$ac_objext
3278CC=$ac_save_CC
3279
3280fi
3281
3282case "x$ac_cv_prog_cc_stdc" in
3283 x|xno)
3284 echo "$as_me:$LINENO: result: none needed" >&5
3285echo "${ECHO_T}none needed" >&6 ;;
3286 *)
3287 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3288echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3289 CC="$CC $ac_cv_prog_cc_stdc" ;;
3290esac
3291
3162# Some people use a C++ compiler to compile C. Since we use `exit', 3292# Some people use a C++ compiler to compile C. Since we use `exit',
3163# in C++ we need to declare it. In case someone uses the same compiler 3293# in C++ we need to declare it. In case someone uses the same compiler
3164# for both compiling C and C++ we need to have the C++ compiler decide 3294# for both compiling C and C++ we need to have the C++ compiler decide
@@ -5594,103 +5724,6 @@ fi
5594 5724
5595 5725
5596 5726
5597echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
5598echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
5599if test "${ac_cv_prog_cc_stdc+set}" = set; then
5600 echo $ECHO_N "(cached) $ECHO_C" >&6
5601else
5602 ac_cv_prog_cc_stdc=no
5603ac_save_CC=$CC
5604cat >conftest.$ac_ext <<_ACEOF
5605#line $LINENO "configure"
5606#include "confdefs.h"
5607#include <stdarg.h>
5608#include <stdio.h>
5609#include <sys/types.h>
5610#include <sys/stat.h>
5611/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5612struct buf { int x; };
5613FILE * (*rcsopen) (struct buf *, struct stat *, int);
5614static char *e (p, i)
5615 char **p;
5616 int i;
5617{
5618 return p[i];
5619}
5620static char *f (char * (*g) (char **, int), char **p, ...)
5621{
5622 char *s;
5623 va_list v;
5624 va_start (v,p);
5625 s = g (p, va_arg (v,int));
5626 va_end (v);
5627 return s;
5628}
5629int test (int i, double x);
5630struct s1 {int (*f) (int a);};
5631struct s2 {int (*f) (double a);};
5632int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5633int argc;
5634char **argv;
5635#ifdef F77_DUMMY_MAIN
5636# ifdef __cplusplus
5637 extern "C"
5638# endif
5639 int F77_DUMMY_MAIN() { return 1; }
5640#endif
5641int
5642main ()
5643{
5644return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5645 ;
5646 return 0;
5647}
5648_ACEOF
5649# Don't try gcc -ansi; that turns off useful extensions and
5650# breaks some systems' header files.
5651# AIX -qlanglvl=ansi
5652# Ultrix and OSF/1 -std1
5653# HP-UX 10.20 and later -Ae
5654# HP-UX older versions -Aa -D_HPUX_SOURCE
5655# SVR4 -Xc -D__EXTENSIONS__
5656for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5657do
5658 CC="$ac_save_CC $ac_arg"
5659 rm -f conftest.$ac_objext
5660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5661 (eval $ac_compile) 2>&5
5662 ac_status=$?
5663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5664 (exit $ac_status); } &&
5665 { ac_try='test -s conftest.$ac_objext'
5666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5667 (eval $ac_try) 2>&5
5668 ac_status=$?
5669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5670 (exit $ac_status); }; }; then
5671 ac_cv_prog_cc_stdc=$ac_arg
5672break
5673else
5674 echo "$as_me: failed program was:" >&5
5675cat conftest.$ac_ext >&5
5676fi
5677rm -f conftest.$ac_objext
5678done
5679rm -f conftest.$ac_ext conftest.$ac_objext
5680CC=$ac_save_CC
5681
5682fi
5683
5684case "x$ac_cv_prog_cc_stdc" in
5685 x|xno)
5686 echo "$as_me:$LINENO: result: none needed" >&5
5687echo "${ECHO_T}none needed" >&6 ;;
5688 *)
5689 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
5690echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
5691 CC="$CC $ac_cv_prog_cc_stdc" ;;
5692esac
5693
5694echo "$as_me:$LINENO: checking for function prototypes" >&5 5727echo "$as_me:$LINENO: checking for function prototypes" >&5
5695echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6 5728echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
5696if test "$ac_cv_prog_cc_stdc" != no; then 5729if test "$ac_cv_prog_cc_stdc" != no; then
@@ -9060,6 +9093,124 @@ _ACEOF
9060 fi 9093 fi
9061fi 9094fi
9062 9095
9096### Use Mac OS X Carbon API to implement GUI.
9097HAVE_CARBON=no
9098if test "${with_carbon}" != "no"; then
9099 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9100 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9101echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
9102if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9103 echo $ECHO_N "(cached) $ECHO_C" >&6
9104fi
9105echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9106echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
9107else
9108 # Is the header compilable?
9109echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9110echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
9111cat >conftest.$ac_ext <<_ACEOF
9112#line $LINENO "configure"
9113#include "confdefs.h"
9114$ac_includes_default
9115#include <Carbon/Carbon.h>
9116_ACEOF
9117rm -f conftest.$ac_objext
9118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9119 (eval $ac_compile) 2>&5
9120 ac_status=$?
9121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9122 (exit $ac_status); } &&
9123 { ac_try='test -s conftest.$ac_objext'
9124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9125 (eval $ac_try) 2>&5
9126 ac_status=$?
9127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9128 (exit $ac_status); }; }; then
9129 ac_header_compiler=yes
9130else
9131 echo "$as_me: failed program was:" >&5
9132cat conftest.$ac_ext >&5
9133ac_header_compiler=no
9134fi
9135rm -f conftest.$ac_objext conftest.$ac_ext
9136echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9137echo "${ECHO_T}$ac_header_compiler" >&6
9138
9139# Is the header present?
9140echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9141echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
9142cat >conftest.$ac_ext <<_ACEOF
9143#line $LINENO "configure"
9144#include "confdefs.h"
9145#include <Carbon/Carbon.h>
9146_ACEOF
9147if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9148 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9149 ac_status=$?
9150 egrep -v '^ *\+' conftest.er1 >conftest.err
9151 rm -f conftest.er1
9152 cat conftest.err >&5
9153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9154 (exit $ac_status); } >/dev/null; then
9155 if test -s conftest.err; then
9156 ac_cpp_err=$ac_c_preproc_warn_flag
9157 else
9158 ac_cpp_err=
9159 fi
9160else
9161 ac_cpp_err=yes
9162fi
9163if test -z "$ac_cpp_err"; then
9164 ac_header_preproc=yes
9165else
9166 echo "$as_me: failed program was:" >&5
9167 cat conftest.$ac_ext >&5
9168 ac_header_preproc=no
9169fi
9170rm -f conftest.err conftest.$ac_ext
9171echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9172echo "${ECHO_T}$ac_header_preproc" >&6
9173
9174# So? What about this header?
9175case $ac_header_compiler:$ac_header_preproc in
9176 yes:no )
9177 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9178echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9179 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9180echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;};;
9181 no:yes )
9182 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9183echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
9184 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9185echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9186 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9187echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;};;
9188esac
9189echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9190echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
9191if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9192 echo $ECHO_N "(cached) $ECHO_C" >&6
9193else
9194 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9195fi
9196echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9197echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
9198
9199fi
9200if test $ac_cv_header_Carbon_Carbon_h = yes; then
9201 HAVE_CARBON=yes
9202fi
9203
9204
9205fi
9206
9207if test "${HAVE_CARBON}" = "yes"; then
9208 cat >>confdefs.h <<\_ACEOF
9209#define HAVE_CARBON 1
9210_ACEOF
9211
9212fi
9213
9063### Use session management (-lSM -lICE) if available 9214### Use session management (-lSM -lICE) if available
9064HAVE_X_SM=no 9215HAVE_X_SM=no
9065if test "${HAVE_X11}" = "yes"; then 9216if test "${HAVE_X11}" = "yes"; then
@@ -16005,8 +16156,8 @@ fi
16005rm -f conftest* 16156rm -f conftest*
16006 16157
16007 16158
16008ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile" 16159 ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile"
16009ac_config_commands="$ac_config_commands default" 16160 ac_config_commands="$ac_config_commands default"
16010cat >confcache <<\_ACEOF 16161cat >confcache <<\_ACEOF
16011# This file is a shell script that caches the results of configure 16162# This file is a shell script that caches the results of configure
16012# tests run on this system so they can be shared between configure 16163# tests run on this system so they can be shared between configure
@@ -16101,7 +16252,6 @@ SHELL=\${CONFIG_SHELL-$SHELL}
16101_ACEOF 16252_ACEOF
16102 16253
16103cat >>$CONFIG_STATUS <<\_ACEOF 16254cat >>$CONFIG_STATUS <<\_ACEOF
16104
16105## --------------------- ## 16255## --------------------- ##
16106## M4sh Initialization. ## 16256## M4sh Initialization. ##
16107## --------------------- ## 16257## --------------------- ##
@@ -16110,6 +16260,9 @@ cat >>$CONFIG_STATUS <<\_ACEOF
16110if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 16260if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16111 emulate sh 16261 emulate sh
16112 NULLCMD=: 16262 NULLCMD=:
16263 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
16264 # is contrary to our usage. Disable this feature.
16265 alias -g '${1+"$@"}'='"$@"'
16113elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then 16266elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16114 set -o posix 16267 set -o posix
16115fi 16268fi
@@ -16148,8 +16301,22 @@ fi
16148 { LC_MESSAGES=C; export LC_MESSAGES; } 16301 { LC_MESSAGES=C; export LC_MESSAGES; }
16149 16302
16150 16303
16304# Required to use basename.
16305if expr a : '\(a\)' >/dev/null 2>&1; then
16306 as_expr=expr
16307else
16308 as_expr=false
16309fi
16310
16311if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
16312 as_basename=basename
16313else
16314 as_basename=false
16315fi
16316
16317
16151# Name of the executable. 16318# Name of the executable.
16152as_me=`(basename "$0") 2>/dev/null || 16319as_me=`$as_basename "$0" ||
16153$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 16320$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16154 X"$0" : 'X\(//\)$' \| \ 16321 X"$0" : 'X\(//\)$' \| \
16155 X"$0" : 'X\(/\)$' \| \ 16322 X"$0" : 'X\(/\)$' \| \
@@ -16160,6 +16327,7 @@ echo X/"$0" |
16160 /^X\/\(\/\).*/{ s//\1/; q; } 16327 /^X\/\(\/\).*/{ s//\1/; q; }
16161 s/.*/./; q'` 16328 s/.*/./; q'`
16162 16329
16330
16163# PATH needs CR, and LINENO needs CR and PATH. 16331# PATH needs CR, and LINENO needs CR and PATH.
16164# Avoid depending upon Character Ranges. 16332# Avoid depending upon Character Ranges.
16165as_cr_letters='abcdefghijklmnopqrstuvwxyz' 16333as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -16227,6 +16395,8 @@ do
16227 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` 16395 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16228 test "x$as_lineno_1" != "x$as_lineno_2" && 16396 test "x$as_lineno_1" != "x$as_lineno_2" &&
16229 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then 16397 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16398 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
16399 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
16230 CONFIG_SHELL=$as_dir/$as_base 16400 CONFIG_SHELL=$as_dir/$as_base
16231 export CONFIG_SHELL 16401 export CONFIG_SHELL
16232 exec "$CONFIG_SHELL" "$0" ${1+"$@"} 16402 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
@@ -16300,6 +16470,12 @@ else
16300fi 16470fi
16301rm -f conf$$ conf$$.exe conf$$.file 16471rm -f conf$$ conf$$.exe conf$$.file
16302 16472
16473if mkdir -p . 2>/dev/null; then
16474 as_mkdir_p=:
16475else
16476 as_mkdir_p=false
16477fi
16478
16303as_executable_p="test -f" 16479as_executable_p="test -f"
16304 16480
16305# Sed expression to map a string onto a valid CPP name. 16481# Sed expression to map a string onto a valid CPP name.
@@ -16333,7 +16509,7 @@ _ASBOX
16333cat >&5 <<_CSEOF 16509cat >&5 <<_CSEOF
16334 16510
16335This file was extended by $as_me, which was 16511This file was extended by $as_me, which was
16336generated by GNU Autoconf 2.53. Invocation command line was 16512generated by GNU Autoconf 2.53a. Invocation command line was
16337 16513
16338 CONFIG_FILES = $CONFIG_FILES 16514 CONFIG_FILES = $CONFIG_FILES
16339 CONFIG_HEADERS = $CONFIG_HEADERS 16515 CONFIG_HEADERS = $CONFIG_HEADERS
@@ -16395,7 +16571,7 @@ _ACEOF
16395cat >>$CONFIG_STATUS <<_ACEOF 16571cat >>$CONFIG_STATUS <<_ACEOF
16396ac_cs_version="\\ 16572ac_cs_version="\\
16397config.status 16573config.status
16398configured by $0, generated by GNU Autoconf 2.53, 16574configured by $0, generated by GNU Autoconf 2.53a,
16399 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" 16575 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16400 16576
16401Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 16577Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -16705,25 +16881,30 @@ echo X"$ac_file" |
16705 /^X\(\/\/\)$/{ s//\1/; q; } 16881 /^X\(\/\/\)$/{ s//\1/; q; }
16706 /^X\(\/\).*/{ s//\1/; q; } 16882 /^X\(\/\).*/{ s//\1/; q; }
16707 s/.*/./; q'` 16883 s/.*/./; q'`
16708 { case "$ac_dir" in 16884 { if $as_mkdir_p; then
16709 [\\/]* | ?:[\\/]* ) as_incr_dir=;; 16885 mkdir -p "$ac_dir"
16710 *) as_incr_dir=.;; 16886 else
16711esac 16887 as_dir="$ac_dir"
16712as_dummy="$ac_dir" 16888 as_dirs=
16713for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do 16889 while test ! -d "$as_dir"; do
16714 case $as_mkdir_dir in 16890 as_dirs="$as_dir $as_dirs"
16715 # Skip DOS drivespec 16891 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16716 ?:) as_incr_dir=$as_mkdir_dir ;; 16892$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16717 *) 16893 X"$as_dir" : 'X\(//\)[^/]' \| \
16718 as_incr_dir=$as_incr_dir/$as_mkdir_dir 16894 X"$as_dir" : 'X\(//\)$' \| \
16719 test -d "$as_incr_dir" || 16895 X"$as_dir" : 'X\(/\)' \| \
16720 mkdir "$as_incr_dir" || 16896 . : '\(.\)' 2>/dev/null ||
16721 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 16897echo X"$as_dir" |
16722echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} 16898 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16723 { (exit 1); exit 1; }; } 16899 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16724 ;; 16900 /^X\(\/\/\)$/{ s//\1/; q; }
16725 esac 16901 /^X\(\/\).*/{ s//\1/; q; }
16726done; } 16902 s/.*/./; q'`
16903 done
16904 test ! -n "$as_dirs" || mkdir $as_dirs
16905 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16906echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16907 { (exit 1); exit 1; }; }; }
16727 16908
16728 ac_builddir=. 16909 ac_builddir=.
16729 16910
@@ -17023,25 +17204,30 @@ echo X"$ac_file" |
17023 /^X\(\/\/\)$/{ s//\1/; q; } 17204 /^X\(\/\/\)$/{ s//\1/; q; }
17024 /^X\(\/\).*/{ s//\1/; q; } 17205 /^X\(\/\).*/{ s//\1/; q; }
17025 s/.*/./; q'` 17206 s/.*/./; q'`
17026 { case "$ac_dir" in 17207 { if $as_mkdir_p; then
17027 [\\/]* | ?:[\\/]* ) as_incr_dir=;; 17208 mkdir -p "$ac_dir"
17028 *) as_incr_dir=.;; 17209 else
17029esac 17210 as_dir="$ac_dir"
17030as_dummy="$ac_dir" 17211 as_dirs=
17031for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do 17212 while test ! -d "$as_dir"; do
17032 case $as_mkdir_dir in 17213 as_dirs="$as_dir $as_dirs"
17033 # Skip DOS drivespec 17214 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17034 ?:) as_incr_dir=$as_mkdir_dir ;; 17215$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17035 *) 17216 X"$as_dir" : 'X\(//\)[^/]' \| \
17036 as_incr_dir=$as_incr_dir/$as_mkdir_dir 17217 X"$as_dir" : 'X\(//\)$' \| \
17037 test -d "$as_incr_dir" || 17218 X"$as_dir" : 'X\(/\)' \| \
17038 mkdir "$as_incr_dir" || 17219 . : '\(.\)' 2>/dev/null ||
17039 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 17220echo X"$as_dir" |
17040echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} 17221 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17041 { (exit 1); exit 1; }; } 17222 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17042 ;; 17223 /^X\(\/\/\)$/{ s//\1/; q; }
17043 esac 17224 /^X\(\/\).*/{ s//\1/; q; }
17044done; } 17225 s/.*/./; q'`
17226 done
17227 test ! -n "$as_dirs" || mkdir $as_dirs
17228 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17229echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17230 { (exit 1); exit 1; }; }; }
17045 17231
17046 rm -f $ac_file 17232 rm -f $ac_file
17047 mv $tmp/config.h $ac_file 17233 mv $tmp/config.h $ac_file
diff --git a/configure.in b/configure.in
index ec584e95756..054a5567221 100644
--- a/configure.in
+++ b/configure.in
@@ -128,6 +128,8 @@ AC_ARG_WITH(toolkit-scroll-bars,
128 don't use Motif or Xaw3d scroll bars]) 128 don't use Motif or Xaw3d scroll bars])
129AC_ARG_WITH(xim, 129AC_ARG_WITH(xim,
130[ --without-xim don't use X11 XIM]) 130[ --without-xim don't use X11 XIM])
131AC_ARG_WITH(carbon,
132[ --without-carbon don't use Carbon GUI on Mac OS X])
131 133
132#### Make srcdir absolute, if it isn't already. It's important to 134#### Make srcdir absolute, if it isn't already. It's important to
133#### avoid running the path through pwd unnecessarily, since pwd can 135#### avoid running the path through pwd unnecessarily, since pwd can
@@ -1104,6 +1106,13 @@ case "${canonical}" in
1104 machine=f301 opsys=uxpv 1106 machine=f301 opsys=uxpv
1105 ;; 1107 ;;
1106 1108
1109 ## Darwin / Mac OS X
1110 powerpc-apple-darwin* )
1111 machine=powermac opsys=darwin
1112 # Define CPP as follows to make autoconf work correctly.
1113 CPP="cc -E -traditional-cpp"
1114 ;;
1115
1107 * ) 1116 * )
1108 unported=yes 1117 unported=yes
1109 ;; 1118 ;;
@@ -1997,6 +2006,16 @@ if test "${HAVE_X11}" = "yes"; then
1997 fi 2006 fi
1998fi 2007fi
1999 2008
2009### Use Mac OS X Carbon API to implement GUI.
2010HAVE_CARBON=no
2011if test "${with_carbon}" != "no"; then
2012 AC_CHECK_HEADER(Carbon/Carbon.h, HAVE_CARBON=yes)
2013fi
2014
2015if test "${HAVE_CARBON}" = "yes"; then
2016 AC_DEFINE(HAVE_CARBON)
2017fi
2018
2000### Use session management (-lSM -lICE) if available 2019### Use session management (-lSM -lICE) if available
2001HAVE_X_SM=no 2020HAVE_X_SM=no
2002if test "${HAVE_X11}" = "yes"; then 2021if test "${HAVE_X11}" = "yes"; then
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 92399745975..17f3060d944 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12002-04-26 Andrew Choi <akochoi@shaw.ca>
2
3 * term/mac-win.el: Don't call ediff-toggle-multiframe. Set
4 default directory. Set process-connection-type to nil.
5
12002-04-26 Richard M. Stallman <rms@gnu.org> 62002-04-26 Richard M. Stallman <rms@gnu.org>
2 7
3 * cus-edit.el (customize-face): Use read-face-name 8 * cus-edit.el (customize-face): Use read-face-name
diff --git a/lisp/cus-load.el b/lisp/cus-load.el
index b386b57a8c1..6d7a97c3afd 100644
--- a/lisp/cus-load.el
+++ b/lisp/cus-load.el
@@ -36,9 +36,9 @@
36(put 'woman-faces 'custom-loads '("woman")) 36(put 'woman-faces 'custom-loads '("woman"))
37(put 'ps-print-vertical 'custom-loads '("ps-print")) 37(put 'ps-print-vertical 'custom-loads '("ps-print"))
38(put 'supercite-hooks 'custom-loads '("supercite")) 38(put 'supercite-hooks 'custom-loads '("supercite"))
39(put 'chinese-calendar 'custom-loads '("cal-china"))
40(put 'vhdl-menu 'custom-loads '("vhdl-mode")) 39(put 'vhdl-menu 'custom-loads '("vhdl-mode"))
41(put 'gnus-newsrc 'custom-loads '("gnus-start")) 40(put 'gnus-newsrc 'custom-loads '("gnus-start"))
41(put 'chinese-calendar 'custom-loads '("cal-china"))
42(put 'expand 'custom-loads '("expand")) 42(put 'expand 'custom-loads '("expand"))
43(put 'bookmark 'custom-loads '("bookmark")) 43(put 'bookmark 'custom-loads '("bookmark"))
44(put 'icon 'custom-loads '("icon")) 44(put 'icon 'custom-loads '("icon"))
@@ -62,7 +62,7 @@
62(put 'dirtrack 'custom-loads '("dirtrack")) 62(put 'dirtrack 'custom-loads '("dirtrack"))
63(put 'ediff-window 'custom-loads '("ediff-help" "ediff-wind")) 63(put 'ediff-window 'custom-loads '("ediff-help" "ediff-wind"))
64(put 'bruce 'custom-loads '("bruce")) 64(put 'bruce 'custom-loads '("bruce"))
65(put 'windows 'custom-loads '("scroll-all" "window" "follow" "windmove")) 65(put 'windows 'custom-loads '("hscroll" "scroll-all" "window" "follow" "windmove"))
66(put 'gnus-exit 'custom-loads '("gnus-group" "gnus")) 66(put 'gnus-exit 'custom-loads '("gnus-group" "gnus"))
67(put 'speedbar 'custom-loads '("speedbar")) 67(put 'speedbar 'custom-loads '("speedbar"))
68(put 'etags 'custom-loads '("etags")) 68(put 'etags 'custom-loads '("etags"))
@@ -112,7 +112,7 @@
112(put 'mh-hook 'custom-loads '("mh-e")) 112(put 'mh-hook 'custom-loads '("mh-e"))
113(put 'yow 'custom-loads '("yow")) 113(put 'yow 'custom-loads '("yow"))
114(put 'reftex-defining-label-environments 'custom-loads '("reftex-vars")) 114(put 'reftex-defining-label-environments 'custom-loads '("reftex-vars"))
115(put 'asm 'custom-loads '("asm-mode" "cc-vars")) 115(put 'asm 'custom-loads '("asm-mode"))
116(put 'gnus-score-files 'custom-loads '("gnus-score" "gnus")) 116(put 'gnus-score-files 'custom-loads '("gnus-score" "gnus"))
117(put 'mail-abbrev 'custom-loads '("mailabbrev")) 117(put 'mail-abbrev 'custom-loads '("mailabbrev"))
118(put 'feedmail 'custom-loads '("feedmail")) 118(put 'feedmail 'custom-loads '("feedmail"))
@@ -130,7 +130,7 @@
130(put 'iso-acc 'custom-loads '("iso-acc")) 130(put 'iso-acc 'custom-loads '("iso-acc"))
131(put 'gnus-summary-pick 'custom-loads '("gnus-salt")) 131(put 'gnus-summary-pick 'custom-loads '("gnus-salt"))
132(put 'gnus-thread 'custom-loads '("gnus-sum")) 132(put 'gnus-thread 'custom-loads '("gnus-sum"))
133(put 'languages 'custom-loads '("cus-edit" "info-look" "ada-mode" "antlr-mode" "asm-mode" "cperl-mode" "dcl-mode" "delphi" "f90" "fortran" "hideshow" "icon" "idlwave" "m4-mode" "meta-mode" "modula2" "octave-mod" "pascal" "perl-mode" "prolog" "ps-mode" "sh-script" "simula" "tcl" "vhdl-mode" "sgml-mode" "xml-lite")) 133(put 'languages 'custom-loads '("cus-edit" "info-look" "ada-mode" "antlr-mode" "asm-mode" "cperl-mode" "dcl-mode" "delphi" "f90" "fortran" "hideshow" "icon" "idlwave" "m4-mode" "meta-mode" "modula2" "octave-mod" "pascal" "perl-mode" "prolog" "ps-mode" "sh-script" "simula" "tcl" "vhdl-mode" "sgml-mode"))
134(put 'reftex-miscellaneous-configurations 'custom-loads '("reftex-vars")) 134(put 'reftex-miscellaneous-configurations 'custom-loads '("reftex-vars"))
135(put 'pong 'custom-loads '("pong")) 135(put 'pong 'custom-loads '("pong"))
136(put 'ediff-ptch 'custom-loads '("ediff-ptch")) 136(put 'ediff-ptch 'custom-loads '("ediff-ptch"))
@@ -145,8 +145,8 @@
145(put 'smiley 'custom-loads '("smiley-ems")) 145(put 'smiley 'custom-loads '("smiley-ems"))
146(put 'extensions 'custom-loads '("generic" "time-stamp" "wid-edit" "cust-print" "eldoc" "page-ext")) 146(put 'extensions 'custom-loads '("generic" "time-stamp" "wid-edit" "cust-print" "eldoc" "page-ext"))
147(put 'tetris 'custom-loads '("tetris")) 147(put 'tetris 'custom-loads '("tetris"))
148(put 'appt 'custom-loads '("appt"))
149(put 'ebnf-displacement 'custom-loads '("ebnf2ps")) 148(put 'ebnf-displacement 'custom-loads '("ebnf2ps"))
149(put 'appt 'custom-loads '("appt"))
150(put 'snmp 'custom-loads '("snmp-mode")) 150(put 'snmp 'custom-loads '("snmp-mode"))
151(put 'speedbar-faces 'custom-loads '("speedbar" "vhdl-mode")) 151(put 'speedbar-faces 'custom-loads '("speedbar" "vhdl-mode"))
152(put 'rmail 'custom-loads '("paths" "rmail" "undigest")) 152(put 'rmail 'custom-loads '("paths" "rmail" "undigest"))
@@ -219,8 +219,8 @@
219(put 'auto-save 'custom-loads '("files" "startup")) 219(put 'auto-save 'custom-loads '("files" "startup"))
220(put 'tpu 'custom-loads '("tpu-edt" "tpu-extras")) 220(put 'tpu 'custom-loads '("tpu-edt" "tpu-extras"))
221(put 'w32 'custom-loads '("w32-vars")) 221(put 'w32 'custom-loads '("w32-vars"))
222(put 'viper-hooks 'custom-loads '("viper-init"))
223(put 'gnus-cite 'custom-loads '("gnus-cite")) 222(put 'gnus-cite 'custom-loads '("gnus-cite"))
223(put 'viper-hooks 'custom-loads '("viper-init"))
224(put 'gnus-demon 'custom-loads '("gnus-demon")) 224(put 'gnus-demon 'custom-loads '("gnus-demon"))
225(put 'reftex-optimizations-for-large-documents 'custom-loads '("reftex-vars")) 225(put 'reftex-optimizations-for-large-documents 'custom-loads '("reftex-vars"))
226(put 'viper-misc 'custom-loads '("viper-cmd" "viper-init" "viper")) 226(put 'viper-misc 'custom-loads '("viper-cmd" "viper-init" "viper"))
@@ -246,7 +246,6 @@
246(put 'cperl-indentation-details 'custom-loads '("cperl-mode")) 246(put 'cperl-indentation-details 'custom-loads '("cperl-mode"))
247(put 'mail-extr 'custom-loads '("mail-extr")) 247(put 'mail-extr 'custom-loads '("mail-extr"))
248(put 'double 'custom-loads '("double")) 248(put 'double 'custom-loads '("double"))
249(put 'xml-lite 'custom-loads '("xml-lite"))
250(put 'imenu 'custom-loads '("imenu")) 249(put 'imenu 'custom-loads '("imenu"))
251(put 'eshell-var 'custom-loads '("esh-var")) 250(put 'eshell-var 'custom-loads '("esh-var"))
252(put 'scribe 'custom-loads '("scribe")) 251(put 'scribe 'custom-loads '("scribe"))
@@ -275,10 +274,10 @@
275(put 'generic-x 'custom-loads '("generic-x")) 274(put 'generic-x 'custom-loads '("generic-x"))
276(put 'partial-completion 'custom-loads '("complete")) 275(put 'partial-completion 'custom-loads '("complete"))
277(put 'whitespace 'custom-loads '("whitespace")) 276(put 'whitespace 'custom-loads '("whitespace"))
278(put 'maint 'custom-loads '("emacsbug" "gulp" "lisp-mnt")) 277(put 'maint 'custom-loads '("gulp" "lisp-mnt" "emacsbug"))
279(put 'pages 'custom-loads '("page-ext")) 278(put 'pages 'custom-loads '("page-ext"))
280(put 'message-interface 'custom-loads '("message")) 279(put 'message-interface 'custom-loads '("message"))
281(put 'diary 'custom-loads '("calendar" "diary-lib")) 280(put 'diary 'custom-loads '("calendar" "diary-lib" "solar"))
282(put 'custom-magic-faces 'custom-loads '("cus-edit")) 281(put 'custom-magic-faces 'custom-loads '("cus-edit"))
283(put 'emacsbug 'custom-loads '("emacsbug")) 282(put 'emacsbug 'custom-loads '("emacsbug"))
284(put 'mh-compose 'custom-loads '("mh-comp")) 283(put 'mh-compose 'custom-loads '("mh-comp"))
@@ -302,7 +301,7 @@
302(put 'apropos 'custom-loads '("apropos")) 301(put 'apropos 'custom-loads '("apropos"))
303(put 'gomoku 'custom-loads '("gomoku")) 302(put 'gomoku 'custom-loads '("gomoku"))
304(put 'eshell-pred 'custom-loads '("em-pred")) 303(put 'eshell-pred 'custom-loads '("em-pred"))
305(put 'tools 'custom-loads '("add-log" "calculator" "compare-w" "diff-mode" "diff" "ediff" "elide-head" "emerge" "gud" "pcvs-defs" "smerge-mode" "speedbar" "tempo" "tooltip" "vc" "which-func" "rcompile" "copyright" "compile" "ebrowse" "etags" "glasses" "make-mode")) 304(put 'tools 'custom-loads '("add-log" "calculator" "compare-w" "diff-mode" "diff" "ediff" "elide-head" "emerge" "gud" "pcvs-defs" "smerge-mode" "speedbar" "tempo" "tooltip" "vc" "which-func" "copyright" "rcompile" "compile" "ebrowse" "etags" "glasses" "make-mode"))
306(put 'gnus-topic 'custom-loads '("gnus-topic")) 305(put 'gnus-topic 'custom-loads '("gnus-topic"))
307(put 'sgml 'custom-loads '("sgml-mode")) 306(put 'sgml 'custom-loads '("sgml-mode"))
308(put 'keyboard 'custom-loads '("mule" "chistory" "type-break")) 307(put 'keyboard 'custom-loads '("mule" "chistory" "type-break"))
@@ -365,15 +364,15 @@
365(put 'nnmail-retrieve 'custom-loads '("nnmail")) 364(put 'nnmail-retrieve 'custom-loads '("nnmail"))
366(put 'gnus-duplicate 'custom-loads '("gnus-dup")) 365(put 'gnus-duplicate 'custom-loads '("gnus-dup"))
367(put 'find-function 'custom-loads '("find-func")) 366(put 'find-function 'custom-loads '("find-func"))
368(put 'menu 'custom-loads '("faces" "tmm" "easymenu")) 367(put 'menu 'custom-loads '("faces" "menu-bar" "tmm" "easymenu"))
369(put 'eshell-test 'custom-loads '("esh-test")) 368(put 'eshell-test 'custom-loads '("esh-test"))
370(put 'vhdl-highlight 'custom-loads '("vhdl-mode")) 369(put 'vhdl-highlight 'custom-loads '("vhdl-mode"))
371(put 'widgets 'custom-loads '("wid-browse" "wid-edit")) 370(put 'widgets 'custom-loads '("wid-browse" "wid-edit"))
372(put 'log-view 'custom-loads '("log-view")) 371(put 'log-view 'custom-loads '("log-view"))
373(put 'PostScript 'custom-loads '("ps-mode")) 372(put 'PostScript 'custom-loads '("ps-mode"))
374(put 'abbrev-mode 'custom-loads '("abbrev" "cus-edit" "mailabbrev")) 373(put 'abbrev-mode 'custom-loads '("abbrev" "cus-edit" "mailabbrev"))
375(put 'eshell-term 'custom-loads '("em-term"))
376(put 'earcon 'custom-loads '("earcon")) 374(put 'earcon 'custom-loads '("earcon"))
375(put 'eshell-term 'custom-loads '("em-term"))
377(put 'feedmail-headers 'custom-loads '("feedmail")) 376(put 'feedmail-headers 'custom-loads '("feedmail"))
378(put 'hypermedia 'custom-loads '("wid-edit" "metamail" "browse-url" "goto-addr")) 377(put 'hypermedia 'custom-loads '("wid-edit" "metamail" "browse-url" "goto-addr"))
379(put 'image 'custom-loads '("image-file")) 378(put 'image 'custom-loads '("image-file"))
@@ -498,7 +497,7 @@
498(put 'reftex-index-support 'custom-loads '("reftex-vars")) 497(put 'reftex-index-support 'custom-loads '("reftex-vars"))
499(put 'pascal 'custom-loads '("pascal")) 498(put 'pascal 'custom-loads '("pascal"))
500(put 'rmail-retrieve 'custom-loads '("rmail" "rmailsum")) 499(put 'rmail-retrieve 'custom-loads '("rmail" "rmailsum"))
501(put 'data 'custom-loads '("text-mode" "arc-mode" "forms" "hexl" "jka-compr" "saveplace" "sort" "tar-mode" "time-stamp" "snmp-mode" "timeclock")) 500(put 'data 'custom-loads '("text-mode" "arc-mode" "forms" "hexl" "jka-compr" "saveplace" "sort" "tar-mode" "time-stamp" "timeclock" "snmp-mode"))
502(put 'mail 'custom-loads '("simple" "startup" "time" "gnus" "mail-utils" "mm-decode" "message" "imap" "starttls" "emacsbug" "feedmail" "mail-extr" "mail-hist" "mailalias" "metamail" "mh-e" "mspools" "rmail" "sendmail" "smtpmail" "supercite" "uce" "eudc-vars" "fortune")) 501(put 'mail 'custom-loads '("simple" "startup" "time" "gnus" "mail-utils" "mm-decode" "message" "imap" "starttls" "emacsbug" "feedmail" "mail-extr" "mail-hist" "mailalias" "metamail" "mh-e" "mspools" "rmail" "sendmail" "smtpmail" "supercite" "uce" "eudc-vars" "fortune"))
503(put 'paren-blinking 'custom-loads '("simple")) 502(put 'paren-blinking 'custom-loads '("simple"))
504(put 'gnus-summary-sort 'custom-loads '("gnus-sum")) 503(put 'gnus-summary-sort 'custom-loads '("gnus-sum"))
@@ -691,7 +690,7 @@
691(custom-put-if-not 'change-log-conditionals-face 'group-documentation nil) 690(custom-put-if-not 'change-log-conditionals-face 'group-documentation nil)
692(custom-put-if-not 'mail-source 'custom-version "21.1") 691(custom-put-if-not 'mail-source 'custom-version "21.1")
693(custom-put-if-not 'mail-source 'group-documentation "The mail-fetching library.") 692(custom-put-if-not 'mail-source 'group-documentation "The mail-fetching library.")
694(custom-put-if-not 'smtpmail-auth-credentials 'custom-version "21.1") 693(custom-put-if-not 'smtpmail-auth-credentials 'custom-version "21.3")
695(custom-put-if-not 'smtpmail-auth-credentials 'standard-value t) 694(custom-put-if-not 'smtpmail-auth-credentials 'standard-value t)
696(custom-put-if-not 'minibuffer-prompt 'custom-version "21.3") 695(custom-put-if-not 'minibuffer-prompt 'custom-version "21.3")
697(custom-put-if-not 'minibuffer-prompt 'group-documentation nil) 696(custom-put-if-not 'minibuffer-prompt 'group-documentation nil)
@@ -777,6 +776,8 @@ the tasks accomplished by such tools.")
777(custom-put-if-not 'tildify 'group-documentation "Adding missing hard spaces or other text fragments into texts.") 776(custom-put-if-not 'tildify 'group-documentation "Adding missing hard spaces or other text fragments into texts.")
778(custom-put-if-not 'normal-erase-is-backspace 'custom-version "21.1") 777(custom-put-if-not 'normal-erase-is-backspace 'custom-version "21.1")
779(custom-put-if-not 'normal-erase-is-backspace 'standard-value t) 778(custom-put-if-not 'normal-erase-is-backspace 'standard-value t)
779(custom-put-if-not 'vc-cvs-global-switches 'custom-version "21.3")
780(custom-put-if-not 'vc-cvs-global-switches 'standard-value t)
780(custom-put-if-not 'gnus-article-banner-alist 'custom-version "21.1") 781(custom-put-if-not 'gnus-article-banner-alist 'custom-version "21.1")
781(custom-put-if-not 'gnus-article-banner-alist 'standard-value t) 782(custom-put-if-not 'gnus-article-banner-alist 'standard-value t)
782(custom-put-if-not 'region 'custom-version "21.1") 783(custom-put-if-not 'region 'custom-version "21.1")
@@ -840,6 +841,8 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
840(custom-put-if-not 'message-buffer-naming-style 'standard-value t) 841(custom-put-if-not 'message-buffer-naming-style 'standard-value t)
841(custom-put-if-not 'ps-footer-font-size 'custom-version "21.1") 842(custom-put-if-not 'ps-footer-font-size 'custom-version "21.1")
842(custom-put-if-not 'ps-footer-font-size 'standard-value t) 843(custom-put-if-not 'ps-footer-font-size 'standard-value t)
844(custom-put-if-not 'hscroll-margin 'custom-version "21.3")
845(custom-put-if-not 'hscroll-margin 'standard-value t)
843(custom-put-if-not 'tags-apropos-additional-actions 'custom-version "21.1") 846(custom-put-if-not 'tags-apropos-additional-actions 'custom-version "21.1")
844(custom-put-if-not 'tags-apropos-additional-actions 'standard-value t) 847(custom-put-if-not 'tags-apropos-additional-actions 'standard-value t)
845(custom-put-if-not 'generic-x 'custom-version "20.3") 848(custom-put-if-not 'generic-x 'custom-version "20.3")
@@ -858,6 +861,8 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
858(custom-put-if-not 'vcursor-interpret-input 'standard-value t) 861(custom-put-if-not 'vcursor-interpret-input 'standard-value t)
859(custom-put-if-not 'gnus-audio 'custom-version "21.1") 862(custom-put-if-not 'gnus-audio 'custom-version "21.1")
860(custom-put-if-not 'gnus-audio 'group-documentation "Playing sound in Gnus.") 863(custom-put-if-not 'gnus-audio 'group-documentation "Playing sound in Gnus.")
864(custom-put-if-not 'diary-sabbath-candles-minutes 'custom-version "21.1")
865(custom-put-if-not 'diary-sabbath-candles-minutes 'standard-value t)
861(custom-put-if-not 'trailing-whitespace 'custom-version "21.1") 866(custom-put-if-not 'trailing-whitespace 'custom-version "21.1")
862(custom-put-if-not 'trailing-whitespace 'group-documentation nil) 867(custom-put-if-not 'trailing-whitespace 'group-documentation nil)
863(custom-put-if-not 'fortran-comment-line-start 'custom-version "21.1") 868(custom-put-if-not 'fortran-comment-line-start 'custom-version "21.1")
@@ -946,6 +951,8 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
946(custom-put-if-not 'change-log-version-number-regexp-list 'standard-value t) 951(custom-put-if-not 'change-log-version-number-regexp-list 'standard-value t)
947(custom-put-if-not 'menu 'custom-version "21.1") 952(custom-put-if-not 'menu 'custom-version "21.1")
948(custom-put-if-not 'menu 'group-documentation "Input from the menus.") 953(custom-put-if-not 'menu 'group-documentation "Input from the menus.")
954(custom-put-if-not 'dired-view-command-alist 'custom-version 21.4)
955(custom-put-if-not 'dired-view-command-alist 'standard-value t)
949(custom-put-if-not 'gnus-nocem-check-from 'custom-version "21.1") 956(custom-put-if-not 'gnus-nocem-check-from 'custom-version "21.1")
950(custom-put-if-not 'gnus-nocem-check-from 'standard-value t) 957(custom-put-if-not 'gnus-nocem-check-from 'standard-value t)
951(custom-put-if-not 'sgml-validate-command 'custom-version "21.1") 958(custom-put-if-not 'sgml-validate-command 'custom-version "21.1")
@@ -988,6 +995,8 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
988(custom-put-if-not 'message-forward-ignored-headers 'standard-value t) 995(custom-put-if-not 'message-forward-ignored-headers 'standard-value t)
989(custom-put-if-not 'eudc 'custom-version "21.1") 996(custom-put-if-not 'eudc 'custom-version "21.1")
990(custom-put-if-not 'eudc 'group-documentation "Emacs Unified Directory Client.") 997(custom-put-if-not 'eudc 'group-documentation "Emacs Unified Directory Client.")
998(custom-put-if-not 'yank-excluded-properties 'custom-version 21.4)
999(custom-put-if-not 'yank-excluded-properties 'standard-value t)
991(custom-put-if-not 'scrolling 'custom-version "21.1") 1000(custom-put-if-not 'scrolling 'custom-version "21.1")
992(custom-put-if-not 'scrolling 'group-documentation "Scrolling windows.") 1001(custom-put-if-not 'scrolling 'group-documentation "Scrolling windows.")
993(custom-put-if-not 'ps-paragraph-regexp 'custom-version "21.1") 1002(custom-put-if-not 'ps-paragraph-regexp 'custom-version "21.1")
@@ -1020,8 +1029,6 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
1020(custom-put-if-not 'custom-comment-face 'group-documentation nil) 1029(custom-put-if-not 'custom-comment-face 'group-documentation nil)
1021(custom-put-if-not 'custom-raised-buttons 'custom-version "21.1") 1030(custom-put-if-not 'custom-raised-buttons 'custom-version "21.1")
1022(custom-put-if-not 'custom-raised-buttons 'standard-value t) 1031(custom-put-if-not 'custom-raised-buttons 'standard-value t)
1023(custom-put-if-not 'gnus-article-x-face-command 'custom-version "21.1")
1024(custom-put-if-not 'gnus-article-x-face-command 'standard-value t)
1025(custom-put-if-not 'gnus-inhibit-user-auto-expire 'custom-version "21.1") 1032(custom-put-if-not 'gnus-inhibit-user-auto-expire 'custom-version "21.1")
1026(custom-put-if-not 'gnus-inhibit-user-auto-expire 'standard-value t) 1033(custom-put-if-not 'gnus-inhibit-user-auto-expire 'standard-value t)
1027(custom-put-if-not 'show-paren-ring-bell-on-mismatch 'custom-version "20.3") 1034(custom-put-if-not 'show-paren-ring-bell-on-mismatch 'custom-version "20.3")
@@ -1034,6 +1041,8 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
1034(custom-put-if-not 'gnus-emphasize-whitespace-regexp 'standard-value t) 1041(custom-put-if-not 'gnus-emphasize-whitespace-regexp 'standard-value t)
1035(custom-put-if-not 'gnus-summary-show-article-charset-alist 'custom-version "21.1") 1042(custom-put-if-not 'gnus-summary-show-article-charset-alist 'custom-version "21.1")
1036(custom-put-if-not 'gnus-summary-show-article-charset-alist 'standard-value t) 1043(custom-put-if-not 'gnus-summary-show-article-charset-alist 'standard-value t)
1044(custom-put-if-not 'mail-use-dsn 'custom-version "21.3")
1045(custom-put-if-not 'mail-use-dsn 'standard-value t)
1037(custom-put-if-not 'xscheme-start-hook 'custom-version 20.3) 1046(custom-put-if-not 'xscheme-start-hook 'custom-version 20.3)
1038(custom-put-if-not 'xscheme-start-hook 'standard-value t) 1047(custom-put-if-not 'xscheme-start-hook 'standard-value t)
1039(custom-put-if-not 'vc-dired-listing-switches 'custom-version "21.1") 1048(custom-put-if-not 'vc-dired-listing-switches 'custom-version "21.1")
@@ -1151,7 +1160,7 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
1151(custom-put-if-not 'eval-expression-print-level 'custom-version "21.1") 1160(custom-put-if-not 'eval-expression-print-level 'custom-version "21.1")
1152(custom-put-if-not 'eval-expression-print-level 'standard-value t) 1161(custom-put-if-not 'eval-expression-print-level 'standard-value t)
1153 1162
1154(defvar custom-versions-load-alist '((20.3 "xscheme") ("20.3.3" "dos-vars") (21.1 "ange-ftp") ("20.4" "files" "help" "sh-script" "compile") ("21.2" "add-log" "sgml-mode") ("21.3" "vc-cvs" "replace" "ange-ftp") (21.3 "ange-ftp") ("20.3" "desktop" "easymenu" "hscroll" "dabbrev" "ffap" "rmail" "paren" "mailabbrev" "frame" "uce" "mouse" "diary-lib" "sendmail" "simple" "debug" "hexl" "vcursor" "vc" "compile" "etags" "help-mode" "browse-url" "add-log" "find-func" "cus-edit" "replace") ("21.1" "server" "debug" "rmailedit" "dabbrev" "isearch" "gnus-start" "mule" "hideshow" "sendmail" "paths" "sgml-mode" "net-utils" "cperl-mode" "rmail" "font-lock" "gnus-nocem" "vc-hooks" "paren" "faces" "vc-rcs" "fortran" "vc" "etags" "cus-edit" "vc-sccs" "gnus-group" "gnus-sum" "add-log" "find-func" "frame" "wid-edit" "smtpmail" "files" "nnmail" "message" "ps-print" "vc-cvs" "simple" "gnus-agent" "flyspell" "gnus-art" "browse-url" "speedbar") ("20.8" "sql")) 1163(defvar custom-versions-load-alist '((20.3 "xscheme") (21.4 "simple" "dired") ("20.3.3" "dos-vars") (21.1 "ange-ftp") ("20.4" "files" "help" "sh-script" "compile") ("21.2" "add-log" "sgml-mode") (21.3 "ange-ftp") ("21.3" "sendmail" "replace" "hscroll" "vc-cvs" "ange-ftp" "smtpmail") ("20.3" "desktop" "easymenu" "hscroll" "dabbrev" "ffap" "rmail" "paren" "mailabbrev" "frame" "uce" "mouse" "diary-lib" "sendmail" "simple" "debug" "hexl" "vcursor" "vc" "compile" "etags" "help-mode" "browse-url" "add-log" "find-func" "cus-edit" "replace") ("21.1" "server" "debug" "rmailedit" "dabbrev" "isearch" "gnus-start" "mule" "hideshow" "sendmail" "paths" "sgml-mode" "net-utils" "cperl-mode" "rmail" "font-lock" "gnus-nocem" "vc-hooks" "paren" "faces" "vc-rcs" "fortran" "solar" "vc" "etags" "cus-edit" "vc-sccs" "gnus-group" "gnus-sum" "smtpmail" "add-log" "find-func" "frame" "wid-edit" "files" "nnmail" "message" "ps-print" "vc-cvs" "simple" "gnus-agent" "flyspell" "gnus-art" "browse-url" "speedbar") ("20.8" "sql"))
1155 "For internal use by custom.") 1164 "For internal use by custom.")
1156 1165
1157(provide 'cus-load) 1166(provide 'cus-load)
diff --git a/lisp/finder-inf.el b/lisp/finder-inf.el
index 7172fea3c2f..ac6e7d55558 100644
--- a/lisp/finder-inf.el
+++ b/lisp/finder-inf.el
@@ -335,7 +335,7 @@
335 "highlight the current line" 335 "highlight the current line"
336 (faces frames emulation)) 336 (faces frames emulation))
337 ("ibuf-ext.el" 337 ("ibuf-ext.el"
338 "extensions for ibuffer" 338 "extensions for ibuffer "
339 (buffer convenience)) 339 (buffer convenience))
340 ("ibuf-macs.el" 340 ("ibuf-macs.el"
341 "macros for ibuffer" 341 "macros for ibuffer"
@@ -868,303 +868,6 @@
868 ("calcsel2.el" 868 ("calcsel2.el"
869 "selection functions for Calc" 869 "selection functions for Calc"
870 nil) 870 nil)
871 ("binhex.el"
872 "elisp native binhex decode"
873 (binhex news))
874 ("earcon.el"
875 "sound effects for messages"
876 nil)
877 ("flow-fill.el"
878 "interprete RFC2646 \"flowed\" text"
879 (mail))
880 ("format-spec.el"
881 "functions for formatting arbitrary formatting strings"
882 (tools))
883 ("gnus-agent.el"
884 "unplugged support for Gnus"
885 nil)
886 ("gnus-art.el"
887 "article mode commands for Gnus"
888 (news))
889 ("gnus-async.el"
890 "asynchronous support for Gnus"
891 (news))
892 ("gnus-audio.el"
893 "sound effects for Gnus"
894 (news mail multimedia))
895 ("gnus-bcklg.el"
896 "backlog functions for Gnus"
897 (news))
898 ("gnus-cache.el"
899 "cache interface for Gnus"
900 (news))
901 ("gnus-cite.el"
902 "parse citations in articles for Gnus"
903 nil)
904 ("gnus-cus.el"
905 "customization commands for Gnus"
906 (news))
907 ("gnus-demon.el"
908 "daemonic Gnus behaviour"
909 (news))
910 ("gnus-draft.el"
911 "draft message support for Gnus"
912 (news))
913 ("gnus-dup.el"
914 "suppression of duplicate articles in Gnus"
915 (news))
916 ("gnus-eform.el"
917 "a mode for editing forms for Gnus"
918 (news))
919 ("gnus-ems.el"
920 "functions for making Gnus work under different Emacsen"
921 (news))
922 ("gnus-gl.el"
923 "an interface to GroupLens for Gnus"
924 (news score))
925 ("gnus-group.el"
926 "group mode commands for Gnus"
927 (news))
928 ("gnus-int.el"
929 "backend interface functions for Gnus"
930 (news))
931 ("gnus-kill.el"
932 "kill commands for Gnus"
933 (news))
934 ("gnus-logic.el"
935 "advanced scoring code for Gnus"
936 (news))
937 ("gnus-mh.el"
938 "mh-e interface for Gnus"
939 (news))
940 ("gnus-ml.el"
941 "mailing list minor mode for Gnus"
942 (news))
943 ("gnus-mlspl.el"
944 "a group params-based mail splitting mechanism"
945 (news mail))
946 ("gnus-move.el"
947 "commands for moving Gnus from one server to another"
948 (news))
949 ("gnus-msg.el"
950 "mail and post interface for Gnus"
951 (news))
952 ("gnus-mule.el"
953 "provide backward compatibility function to GNUS"
954 (news i18n))
955 ("gnus-nocem.el"
956 "NoCeM pseudo-cancellation treatment"
957 (news))
958 ("gnus-range.el"
959 "range and sequence functions for Gnus"
960 (news))
961 ("gnus-salt.el"
962 "alternate summary mode interfaces for Gnus"
963 (news))
964 ("gnus-score.el"
965 "scoring code for Gnus"
966 (news))
967 ("gnus-setup.el"
968 "initialization & setup for Gnus 5"
969 (news))
970 ("gnus-soup.el"
971 "SOUP packet writing support for Gnus"
972 (news mail))
973 ("gnus-spec.el"
974 "format spec functions for Gnus"
975 (news))
976 ("gnus-srvr.el"
977 "virtual server support for Gnus"
978 (news))
979 ("gnus-start.el"
980 "startup functions for Gnus"
981 (news))
982 ("gnus-sum.el"
983 "summary mode commands for Gnus"
984 (news))
985 ("gnus-topic.el"
986 "a folding minor mode for Gnus group buffers"
987 (news))
988 ("gnus-undo.el"
989 "minor mode for undoing in Gnus"
990 (news))
991 ("gnus-util.el"
992 "utility functions for Gnus"
993 (news))
994 ("gnus-uu.el"
995 "extract (uu)encoded files in Gnus"
996 nil)
997 ("gnus-vm.el"
998 "vm interface for Gnus"
999 (news mail))
1000 ("gnus-win.el"
1001 "window configuration functions for Gnus"
1002 (news))
1003 ("gnus.el"
1004 "a newsreader for GNU Emacs"
1005 (news mail))
1006 ("ietf-drums.el"
1007 "functions for parsing RFC822bis headers"
1008 nil)
1009 ("imap.el"
1010 "imap library"
1011 (mail))
1012 ("mail-parse.el"
1013 "interface functions for parsing mail"
1014 nil)
1015 ("mail-prsvr.el"
1016 "interface variables for parsing mail"
1017 nil)
1018 ("mail-source.el"
1019 "functions for fetching mail"
1020 (news mail))
1021 ("mailcap.el"
1022 "MIME media types configuration"
1023 (news mail multimedia))
1024 ("message.el"
1025 "composing mail and news messages"
1026 (mail news))
1027 ("messcompat.el"
1028 "making message mode compatible with mail mode"
1029 (mail news))
1030 ("mm-bodies.el"
1031 "functions for decoding MIME things"
1032 nil)
1033 ("mm-decode.el"
1034 "functions for decoding MIME things"
1035 nil)
1036 ("mm-encode.el"
1037 "functions for encoding MIME things "
1038 nil)
1039 ("mm-partial.el"
1040 "showing message/partial"
1041 (message partial))
1042 ("mm-util.el"
1043 "Utility functions for Mule and low level things"
1044 nil)
1045 ("mm-uu.el"
1046 "return uu stuff as mm handles"
1047 (postscript uudecode binhex shar forward news))
1048 ("mm-view.el"
1049 "functions for viewing MIME objects"
1050 nil)
1051 ("mml.el"
1052 "package for parsing and validating MML documents"
1053 nil)
1054 ("nnagent.el"
1055 "offline backend for Gnus"
1056 (news mail))
1057 ("nnbabyl.el"
1058 "rmail mbox access for Gnus"
1059 (news mail))
1060 ("nndir.el"
1061 "single directory newsgroup access for Gnus"
1062 (news))
1063 ("nndoc.el"
1064 "single file access for Gnus"
1065 (news))
1066 ("nndraft.el"
1067 "draft article access for Gnus"
1068 (news))
1069 ("nneething.el"
1070 "arbitrary file access for Gnus"
1071 (news mail))
1072 ("nnfolder.el"
1073 "mail folder access for Gnus"
1074 (mail))
1075 ("nngateway.el"
1076 "posting news via mail gateways"
1077 (news mail))
1078 ("nnheader.el"
1079 "header access macros for Gnus and its backends"
1080 (news))
1081 ("nnimap.el"
1082 "imap backend for Gnus"
1083 (mail))
1084 ("nnkiboze.el"
1085 "select virtual news access for Gnus"
1086 (news))
1087 ("nnlistserv.el"
1088 "retrieving articles via web mailing list archives"
1089 (news mail))
1090 ("nnmail.el"
1091 "mail support functions for the Gnus mail backends"
1092 (news mail))
1093 ("nnmbox.el"
1094 "mail mbox access for Gnus"
1095 (news mail))
1096 ("nnmh.el"
1097 "mhspool access for Gnus"
1098 (news mail))
1099 ("nnml.el"
1100 "mail spool access for Gnus"
1101 (news mail))
1102 ("nnoo.el"
1103 "OO Gnus Backends"
1104 (news))
1105 ("nnslashdot.el"
1106 "interfacing with Slashdot"
1107 (news))
1108 ("nnsoup.el"
1109 "SOUP access for Gnus"
1110 (news mail))
1111 ("nnspool.el"
1112 "spool access for GNU Emacs"
1113 (news))
1114 ("nntp.el"
1115 "nntp access for Gnus"
1116 (news))
1117 ("nnultimate.el"
1118 "interfacing with the Ultimate Bulletin Board system"
1119 (news))
1120 ("nnvirtual.el"
1121 "virtual newsgroups access for Gnus"
1122 (news))
1123 ("nnwarchive.el"
1124 "interfacing with web archives"
1125 (news egroups mail-archive))
1126 ("nnweb.el"
1127 "retrieving articles via web search engines"
1128 (news))
1129 ("pop3.el"
1130 "Post Office Protocol (RFC 1460) interface"
1131 (mail))
1132 ("qp.el"
1133 "Quoted-Printable functions"
1134 (mail extensions))
1135 ("rfc1843.el"
1136 "HZ (rfc1843) decoding"
1137 (news hz hz+ mail i18n))
1138 ("rfc2045.el"
1139 "functions for decoding rfc2045 headers"
1140 nil)
1141 ("rfc2047.el"
1142 "functions for encoding and decoding rfc2047 messages"
1143 nil)
1144 ("rfc2104.el"
1145 "RFC2104 Hashed Message Authentication Codes"
1146 (mail))
1147 ("rfc2231.el"
1148 "functions for decoding rfc2231 headers"
1149 nil)
1150 ("score-mode.el"
1151 "mode for editing Gnus score files"
1152 (news mail))
1153 ("smiley-ems.el"
1154 "displaying smiley faces"
1155 (news mail multimedia))
1156 ("starttls.el"
1157 "STARTTLS functions"
1158 (tls ssl openssl mail news))
1159 ("utf7.el"
1160 "UTF-7 encoding/decoding for Emacs"
1161 (mail))
1162 ("uudecode.el"
1163 "elisp native uudecode"
1164 (uudecode news))
1165 ("webmail.el"
1166 "interface of web mail"
1167 (hotmail netaddress my-deja netscape))
1168 ("appt.el" 871 ("appt.el"
1169 "appointment notification functions" 872 "appointment notification functions"
1170 (calendar)) 873 (calendar))
@@ -1540,6 +1243,303 @@
1540 ("eshell.el" 1243 ("eshell.el"
1541 "the Emacs command shell" 1244 "the Emacs command shell"
1542 (processes)) 1245 (processes))
1246 ("binhex.el"
1247 "elisp native binhex decode"
1248 (binhex news))
1249 ("earcon.el"
1250 "sound effects for messages"
1251 nil)
1252 ("flow-fill.el"
1253 "interprete RFC2646 \"flowed\" text"
1254 (mail))
1255 ("format-spec.el"
1256 "functions for formatting arbitrary formatting strings"
1257 (tools))
1258 ("gnus-agent.el"
1259 "unplugged support for Gnus"
1260 nil)
1261 ("gnus-art.el"
1262 "article mode commands for Gnus"
1263 (news))
1264 ("gnus-async.el"
1265 "asynchronous support for Gnus"
1266 (news))
1267 ("gnus-audio.el"
1268 "sound effects for Gnus"
1269 (news mail multimedia))
1270 ("gnus-bcklg.el"
1271 "backlog functions for Gnus"
1272 (news))
1273 ("gnus-cache.el"
1274 "cache interface for Gnus"
1275 (news))
1276 ("gnus-cite.el"
1277 "parse citations in articles for Gnus"
1278 nil)
1279 ("gnus-cus.el"
1280 "customization commands for Gnus"
1281 (news))
1282 ("gnus-demon.el"
1283 "daemonic Gnus behaviour"
1284 (news))
1285 ("gnus-draft.el"
1286 "draft message support for Gnus"
1287 (news))
1288 ("gnus-dup.el"
1289 "suppression of duplicate articles in Gnus"
1290 (news))
1291 ("gnus-eform.el"
1292 "a mode for editing forms for Gnus"
1293 (news))
1294 ("gnus-ems.el"
1295 "functions for making Gnus work under different Emacsen"
1296 (news))
1297 ("gnus-gl.el"
1298 "an interface to GroupLens for Gnus"
1299 (news score))
1300 ("gnus-group.el"
1301 "group mode commands for Gnus"
1302 (news))
1303 ("gnus-int.el"
1304 "backend interface functions for Gnus"
1305 (news))
1306 ("gnus-kill.el"
1307 "kill commands for Gnus"
1308 (news))
1309 ("gnus-logic.el"
1310 "advanced scoring code for Gnus"
1311 (news))
1312 ("gnus-mh.el"
1313 "mh-e interface for Gnus"
1314 (news))
1315 ("gnus-ml.el"
1316 "mailing list minor mode for Gnus"
1317 (news))
1318 ("gnus-mlspl.el"
1319 "a group params-based mail splitting mechanism"
1320 (news mail))
1321 ("gnus-move.el"
1322 "commands for moving Gnus from one server to another"
1323 (news))
1324 ("gnus-msg.el"
1325 "mail and post interface for Gnus"
1326 (news))
1327 ("gnus-mule.el"
1328 "provide backward compatibility function to GNUS"
1329 (news i18n))
1330 ("gnus-nocem.el"
1331 "NoCeM pseudo-cancellation treatment"
1332 (news))
1333 ("gnus-range.el"
1334 "range and sequence functions for Gnus"
1335 (news))
1336 ("gnus-salt.el"
1337 "alternate summary mode interfaces for Gnus"
1338 (news))
1339 ("gnus-score.el"
1340 "scoring code for Gnus"
1341 (news))
1342 ("gnus-setup.el"
1343 "initialization & setup for Gnus 5"
1344 (news))
1345 ("gnus-soup.el"
1346 "SOUP packet writing support for Gnus"
1347 (news mail))
1348 ("gnus-spec.el"
1349 "format spec functions for Gnus"
1350 (news))
1351 ("gnus-srvr.el"
1352 "virtual server support for Gnus"
1353 (news))
1354 ("gnus-start.el"
1355 "startup functions for Gnus"
1356 (news))
1357 ("gnus-sum.el"
1358 "summary mode commands for Gnus"
1359 (news))
1360 ("gnus-topic.el"
1361 "a folding minor mode for Gnus group buffers"
1362 (news))
1363 ("gnus-undo.el"
1364 "minor mode for undoing in Gnus"
1365 (news))
1366 ("gnus-util.el"
1367 "utility functions for Gnus"
1368 (news))
1369 ("gnus-uu.el"
1370 "extract (uu)encoded files in Gnus"
1371 nil)
1372 ("gnus-vm.el"
1373 "vm interface for Gnus"
1374 (news mail))
1375 ("gnus-win.el"
1376 "window configuration functions for Gnus"
1377 (news))
1378 ("gnus.el"
1379 "a newsreader for GNU Emacs"
1380 (news mail))
1381 ("ietf-drums.el"
1382 "functions for parsing RFC822bis headers"
1383 nil)
1384 ("imap.el"
1385 "imap library"
1386 (mail))
1387 ("mail-parse.el"
1388 "interface functions for parsing mail"
1389 nil)
1390 ("mail-prsvr.el"
1391 "interface variables for parsing mail"
1392 nil)
1393 ("mail-source.el"
1394 "functions for fetching mail"
1395 (news mail))
1396 ("mailcap.el"
1397 "MIME media types configuration"
1398 (news mail multimedia))
1399 ("message.el"
1400 "composing mail and news messages"
1401 (mail news))
1402 ("messcompat.el"
1403 "making message mode compatible with mail mode"
1404 (mail news))
1405 ("mm-bodies.el"
1406 "functions for decoding MIME things"
1407 nil)
1408 ("mm-decode.el"
1409 "functions for decoding MIME things"
1410 nil)
1411 ("mm-encode.el"
1412 "functions for encoding MIME things "
1413 nil)
1414 ("mm-partial.el"
1415 "showing message/partial"
1416 (message partial))
1417 ("mm-util.el"
1418 "Utility functions for Mule and low level things"
1419 nil)
1420 ("mm-uu.el"
1421 "return uu stuff as mm handles"
1422 (postscript uudecode binhex shar forward news))
1423 ("mm-view.el"
1424 "functions for viewing MIME objects"
1425 nil)
1426 ("mml.el"
1427 "package for parsing and validating MML documents"
1428 nil)
1429 ("nnagent.el"
1430 "offline backend for Gnus"
1431 (news mail))
1432 ("nnbabyl.el"
1433 "rmail mbox access for Gnus"
1434 (news mail))
1435 ("nndir.el"
1436 "single directory newsgroup access for Gnus"
1437 (news))
1438 ("nndoc.el"
1439 "single file access for Gnus"
1440 (news))
1441 ("nndraft.el"
1442 "draft article access for Gnus"
1443 (news))
1444 ("nneething.el"
1445 "arbitrary file access for Gnus"
1446 (news mail))
1447 ("nnfolder.el"
1448 "mail folder access for Gnus"
1449 (mail))
1450 ("nngateway.el"
1451 "posting news via mail gateways"
1452 (news mail))
1453 ("nnheader.el"
1454 "header access macros for Gnus and its backends"
1455 (news))
1456 ("nnimap.el"
1457 "imap backend for Gnus"
1458 (mail))
1459 ("nnkiboze.el"
1460 "select virtual news access for Gnus"
1461 (news))
1462 ("nnlistserv.el"
1463 "retrieving articles via web mailing list archives"
1464 (news mail))
1465 ("nnmail.el"
1466 "mail support functions for the Gnus mail backends"
1467 (news mail))
1468 ("nnmbox.el"
1469 "mail mbox access for Gnus"
1470 (news mail))
1471 ("nnmh.el"
1472 "mhspool access for Gnus"
1473 (news mail))
1474 ("nnml.el"
1475 "mail spool access for Gnus"
1476 (news mail))
1477 ("nnoo.el"
1478 "OO Gnus Backends"
1479 (news))
1480 ("nnslashdot.el"
1481 "interfacing with Slashdot"
1482 (news))
1483 ("nnsoup.el"
1484 "SOUP access for Gnus"
1485 (news mail))
1486 ("nnspool.el"
1487 "spool access for GNU Emacs"
1488 (news))
1489 ("nntp.el"
1490 "nntp access for Gnus"
1491 (news))
1492 ("nnultimate.el"
1493 "interfacing with the Ultimate Bulletin Board system"
1494 (news))
1495 ("nnvirtual.el"
1496 "virtual newsgroups access for Gnus"
1497 (news))
1498 ("nnwarchive.el"
1499 "interfacing with web archives"
1500 (news egroups mail-archive))
1501 ("nnweb.el"
1502 "retrieving articles via web search engines"
1503 (news))
1504 ("pop3.el"
1505 "Post Office Protocol (RFC 1460) interface"
1506 (mail))
1507 ("qp.el"
1508 "Quoted-Printable functions"
1509 (mail extensions))
1510 ("rfc1843.el"
1511 "HZ (rfc1843) decoding"
1512 (news hz hz+ mail i18n))
1513 ("rfc2045.el"
1514 "functions for decoding rfc2045 headers"
1515 nil)
1516 ("rfc2047.el"
1517 "functions for encoding and decoding rfc2047 messages"
1518 nil)
1519 ("rfc2104.el"
1520 "RFC2104 Hashed Message Authentication Codes"
1521 (mail))
1522 ("rfc2231.el"
1523 "functions for decoding rfc2231 headers"
1524 nil)
1525 ("score-mode.el"
1526 "mode for editing Gnus score files"
1527 (news mail))
1528 ("smiley-ems.el"
1529 "displaying smiley faces"
1530 (news mail multimedia))
1531 ("starttls.el"
1532 "STARTTLS functions"
1533 (tls ssl openssl mail news))
1534 ("utf7.el"
1535 "UTF-7 encoding/decoding for Emacs"
1536 (mail))
1537 ("uudecode.el"
1538 "elisp native uudecode"
1539 (uudecode news))
1540 ("webmail.el"
1541 "interface of web mail"
1542 (hotmail netaddress my-deja netscape))
1543 ("ccl.el" 1543 ("ccl.el"
1544 "CCL (Code Conversion Language) compiler" 1544 "CCL (Code Conversion Language) compiler"
1545 (ccl mule multilingual character set coding-system)) 1545 (ccl mule multilingual character set coding-system))
@@ -1649,7 +1649,7 @@
1649 "translation of untranslatable utf-8 to CJK" 1649 "translation of untranslatable utf-8 to CJK"
1650 (i18n)) 1650 (i18n))
1651 ("utf-8.el" 1651 ("utf-8.el"
1652 "Limited UTF-8 decoding/encoding support" 1652 "limited UTF-8 decoding/encoding support"
1653 (multilingual unicode utf-8 i18n)) 1653 (multilingual unicode utf-8 i18n))
1654 ("china-util.el" 1654 ("china-util.el"
1655 "utilities for Chinese" 1655 "utilities for Chinese"
@@ -1897,6 +1897,9 @@
1897 ("net-utils.el" 1897 ("net-utils.el"
1898 "network functions" 1898 "network functions"
1899 (network comm)) 1899 (network comm))
1900 ("netrc.el"
1901 ".netrc parsing functionality"
1902 (news))
1900 ("quickurl.el" 1903 ("quickurl.el"
1901 "insert an URL based on text at point in buffer" 1904 "insert an URL based on text at point in buffer"
1902 (hypermedia)) 1905 (hypermedia))
@@ -2308,9 +2311,6 @@
2308 ("underline.el" 2311 ("underline.el"
2309 "insert/remove underlining (done by overstriking) in Emacs" 2312 "insert/remove underlining (done by overstriking) in Emacs"
2310 (wp)) 2313 (wp))
2311 ("xml-lite.el"
2312 "an indentation-engine for XML"
2313 (xml))
2314 ("tool-bar.el" 2314 ("tool-bar.el"
2315 "setting up the tool bar" 2315 "setting up the tool bar"
2316 (mouse frames)) 2316 (mouse frames))
diff --git a/lisp/loaddefs.el b/lisp/loaddefs.el
index c210a63218f..e5da51eb19e 100644
--- a/lisp/loaddefs.el
+++ b/lisp/loaddefs.el
@@ -2705,7 +2705,7 @@ See the documentation of that function for more information." t nil)
2705 2705
2706;;;*** 2706;;;***
2707 2707
2708;;;### (autoloads nil "cc-langs" "progmodes/cc-langs.el" (15556 56060)) 2708;;;### (autoloads nil "cc-langs" "progmodes/cc-langs.el" (15557 64404))
2709;;; Generated autoloads from progmodes/cc-langs.el 2709;;; Generated autoloads from progmodes/cc-langs.el
2710 2710
2711(defvar c-mode-syntax-table nil "\ 2711(defvar c-mode-syntax-table nil "\
@@ -2730,7 +2730,7 @@ Syntax table used in pike-mode buffers.")
2730 2730
2731;;;### (autoloads (pike-mode idl-mode java-mode objc-mode c++-mode 2731;;;### (autoloads (pike-mode idl-mode java-mode objc-mode c++-mode
2732;;;;;; c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el" 2732;;;;;; c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el"
2733;;;;;; (15556 56060)) 2733;;;;;; (15557 64405))
2734;;; Generated autoloads from progmodes/cc-mode.el 2734;;; Generated autoloads from progmodes/cc-mode.el
2735 2735
2736(autoload (quote c-initialize-cc-mode) "cc-mode" nil nil nil) 2736(autoload (quote c-initialize-cc-mode) "cc-mode" nil nil nil)
@@ -2841,7 +2841,7 @@ Key bindings:
2841;;;*** 2841;;;***
2842 2842
2843;;;### (autoloads (c-set-offset c-add-style c-set-style) "cc-styles" 2843;;;### (autoloads (c-set-offset c-add-style c-set-style) "cc-styles"
2844;;;;;; "progmodes/cc-styles.el" (15556 56060)) 2844;;;;;; "progmodes/cc-styles.el" (15557 64405))
2845;;; Generated autoloads from progmodes/cc-styles.el 2845;;; Generated autoloads from progmodes/cc-styles.el
2846 2846
2847(autoload (quote c-set-style) "cc-styles" "\ 2847(autoload (quote c-set-style) "cc-styles" "\
@@ -2882,7 +2882,7 @@ and exists only for compatibility reasons." t nil)
2882 2882
2883;;;*** 2883;;;***
2884 2884
2885;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (15556 56060)) 2885;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (15557 64405))
2886;;; Generated autoloads from progmodes/cc-vars.el 2886;;; Generated autoloads from progmodes/cc-vars.el
2887 2887
2888(defconst c-emacs-features (let ((infodock-p (boundp (quote infodock-version))) (comments (let ((table (copy-syntax-table)) entry) (modify-syntax-entry 97 ". 12345678" table) (cond ((arrayp table) (setq entry (aref table 97)) (if (consp entry) (setq entry (car entry)))) ((fboundp (quote get-char-table)) (setq entry (get-char-table 97 table))) ((and (fboundp (quote char-table-p)) (char-table-p table)) (setq entry (car (char-table-range table [97])))) (t (error "CC Mode is incompatible with this version of Emacs"))) (if (= (logand (lsh entry -16) 255) 255) (quote 8-bit) (quote 1-bit))))) (if infodock-p (list comments (quote infodock)) (list comments))) "\ 2888(defconst c-emacs-features (let ((infodock-p (boundp (quote infodock-version))) (comments (let ((table (copy-syntax-table)) entry) (modify-syntax-entry 97 ". 12345678" table) (cond ((arrayp table) (setq entry (aref table 97)) (if (consp entry) (setq entry (car entry)))) ((fboundp (quote get-char-table)) (setq entry (get-char-table 97 table))) ((and (fboundp (quote char-table-p)) (char-table-p table)) (setq entry (car (char-table-range table [97])))) (t (error "CC Mode is incompatible with this version of Emacs"))) (if (= (logand (lsh entry -16) 255) 255) (quote 8-bit) (quote 1-bit))))) (if infodock-p (list comments (quote infodock)) (list comments))) "\
@@ -4198,7 +4198,7 @@ INHERIT-INPUT-METHOD." nil nil)
4198;;;;;; customize-face customize-option-other-window customize-changed-options 4198;;;;;; customize-face customize-option-other-window customize-changed-options
4199;;;;;; customize-option customize-group-other-window customize-group 4199;;;;;; customize-option customize-group-other-window customize-group
4200;;;;;; customize customize-save-variable customize-set-variable 4200;;;;;; customize customize-save-variable customize-set-variable
4201;;;;;; customize-set-value) "cus-edit" "cus-edit.el" (15552 23095)) 4201;;;;;; customize-set-value) "cus-edit" "cus-edit.el" (15561 31158))
4202;;; Generated autoloads from cus-edit.el 4202;;; Generated autoloads from cus-edit.el
4203 (add-hook 'same-window-regexps "\\`\\*Customiz.*\\*\\'") 4203 (add-hook 'same-window-regexps "\\`\\*Customiz.*\\*\\'")
4204 4204
@@ -4284,10 +4284,16 @@ Show the buffer in another window, but don't select it." t nil)
4284 4284
4285(autoload (quote customize-face) "cus-edit" "\ 4285(autoload (quote customize-face) "cus-edit" "\
4286Customize SYMBOL, which should be a face name or nil. 4286Customize SYMBOL, which should be a face name or nil.
4287If SYMBOL is nil, customize all faces." t nil) 4287If SYMBOL is nil, customize all faces.
4288
4289Interactively, when point is on text which has a face specified,
4290suggest to customized that face, if it's customizable." t nil)
4288 4291
4289(autoload (quote customize-face-other-window) "cus-edit" "\ 4292(autoload (quote customize-face-other-window) "cus-edit" "\
4290Show customization buffer for face SYMBOL in other window." t nil) 4293Show customization buffer for face SYMBOL in other window.
4294
4295Interactively, when point is on text which has a face specified,
4296suggest to customized that face, if it's customizable." t nil)
4291 4297
4292(autoload (quote customize-customized) "cus-edit" "\ 4298(autoload (quote customize-customized) "cus-edit" "\
4293Customize all user options set since the last save in this session." t nil) 4299Customize all user options set since the last save in this session." t nil)
@@ -4840,7 +4846,7 @@ to provide correct modes for autoloaded files." nil nil)
4840;;;*** 4846;;;***
4841 4847
4842;;;### (autoloads (diary-mail-entries diary) "diary-lib" "calendar/diary-lib.el" 4848;;;### (autoloads (diary-mail-entries diary) "diary-lib" "calendar/diary-lib.el"
4843;;;;;; (15556 56042)) 4849;;;;;; (15557 64393))
4844;;; Generated autoloads from calendar/diary-lib.el 4850;;; Generated autoloads from calendar/diary-lib.el
4845 4851
4846(autoload (quote diary) "diary-lib" "\ 4852(autoload (quote diary) "diary-lib" "\
@@ -4918,7 +4924,7 @@ Minor mode for viewing/editing context diffs.
4918;;;;;; dired dired-copy-preserve-time dired-dwim-target dired-keep-marker-symlink 4924;;;;;; dired dired-copy-preserve-time dired-dwim-target dired-keep-marker-symlink
4919;;;;;; dired-keep-marker-hardlink dired-keep-marker-copy dired-keep-marker-rename 4925;;;;;; dired-keep-marker-hardlink dired-keep-marker-copy dired-keep-marker-rename
4920;;;;;; dired-trivial-filenames dired-ls-F-marks-symlinks dired-listing-switches) 4926;;;;;; dired-trivial-filenames dired-ls-F-marks-symlinks dired-listing-switches)
4921;;;;;; "dired" "dired.el" (15556 56031)) 4927;;;;;; "dired" "dired.el" (15557 64385))
4922;;; Generated autoloads from dired.el 4928;;; Generated autoloads from dired.el
4923 4929
4924(defvar dired-listing-switches "-al" "\ 4930(defvar dired-listing-switches "-al" "\
@@ -5505,8 +5511,8 @@ CSS contains a list of syntax specifications of the form (CHAR . SYNTAX)." nil (
5505;;;*** 5511;;;***
5506 5512
5507;;;### (autoloads (easy-menu-change easy-menu-create-menu easy-menu-do-define 5513;;;### (autoloads (easy-menu-change easy-menu-create-menu easy-menu-do-define
5508;;;;;; easy-menu-define) "easymenu" "emacs-lisp/easymenu.el" (15400 5514;;;;;; easy-menu-define) "easymenu" "emacs-lisp/easymenu.el" (15561
5509;;;;;; 1475)) 5515;;;;;; 31234))
5510;;; Generated autoloads from emacs-lisp/easymenu.el 5516;;; Generated autoloads from emacs-lisp/easymenu.el
5511 5517
5512(put (quote easy-menu-define) (quote lisp-indent-function) (quote defun)) 5518(put (quote easy-menu-define) (quote lisp-indent-function) (quote defun))
@@ -6073,6 +6079,20 @@ With optional NODE, goes to that node." t nil)
6073 6079
6074;;;*** 6080;;;***
6075 6081
6082;;;### (autoloads (ediff-cond-compile-for-xemacs-or-emacs) "ediff-hook"
6083;;;;;; "ediff-hook.el" (15561 31164))
6084;;; Generated autoloads from ediff-hook.el
6085
6086(defvar ediff-window-setup-function)
6087
6088(autoload (quote ediff-cond-compile-for-xemacs-or-emacs) "ediff-hook" nil nil (quote macro))
6089
6090(ediff-cond-compile-for-xemacs-or-emacs (defun ediff-xemacs-init-menus nil (if (featurep (quote menubar)) (progn (add-submenu (quote ("Tools")) ediff-menu "OO-Browser...") (add-submenu (quote ("Tools")) ediff-merge-menu "OO-Browser...") (add-submenu (quote ("Tools")) epatch-menu "OO-Browser...") (add-submenu (quote ("Tools")) ediff-misc-menu "OO-Browser...") (add-menu-button (quote ("Tools")) "-------" "OO-Browser...")))) nil)
6091
6092(ediff-cond-compile-for-xemacs-or-emacs (progn (defvar ediff-menu (quote ("Compare" ["Two Files..." ediff-files t] ["Two Buffers..." ediff-buffers t] ["Three Files..." ediff-files3 t] ["Three Buffers..." ediff-buffers3 t] "---" ["Two Directories..." ediff-directories t] ["Three Directories..." ediff-directories3 t] "---" ["File with Revision..." ediff-revision t] ["Directory Revisions..." ediff-directory-revisions t] "---" ["Windows Word-by-word..." ediff-windows-wordwise t] ["Windows Line-by-line..." ediff-windows-linewise t] "---" ["Regions Word-by-word..." ediff-regions-wordwise t] ["Regions Line-by-line..." ediff-regions-linewise t]))) (defvar ediff-merge-menu (quote ("Merge" ["Files..." ediff-merge-files t] ["Files with Ancestor..." ediff-merge-files-with-ancestor t] ["Buffers..." ediff-merge-buffers t] ["Buffers with Ancestor..." ediff-merge-buffers-with-ancestor t] "---" ["Directories..." ediff-merge-directories t] ["Directories with Ancestor..." ediff-merge-directories-with-ancestor t] "---" ["Revisions..." ediff-merge-revisions t] ["Revisions with Ancestor..." ediff-merge-revisions-with-ancestor t] ["Directory Revisions..." ediff-merge-directory-revisions t] ["Directory Revisions with Ancestor..." ediff-merge-directory-revisions-with-ancestor t]))) (defvar epatch-menu (quote ("Apply Patch" ["To a file..." ediff-patch-file t] ["To a buffer..." ediff-patch-buffer t]))) (defvar ediff-misc-menu (quote ("Ediff Miscellanea" ["Ediff Manual..." ediff-documentation t] ["Customize Ediff..." ediff-customize t] ["List Ediff Sessions..." ediff-show-registry t] ["Use separate frame for Ediff control buffer..." ediff-toggle-multiframe :style toggle :selected (if (and (featurep (quote ediff-util)) (boundp (quote ediff-window-setup-function))) (eq ediff-window-setup-function (quote ediff-setup-windows-multiframe)))] ["Use a toolbar with Ediff control buffer" ediff-toggle-use-toolbar :style toggle :selected (if (featurep (quote ediff-tbar)) (ediff-use-toolbar-p))]))) (if (and (featurep (quote menubar)) (not (featurep (quote infodock))) (not (featurep (quote ediff-hook)))) (ediff-xemacs-init-menus))) (if (featurep (quote menu-bar)) (progn (defvar menu-bar-ediff-misc-menu (make-sparse-keymap "Ediff Miscellanea")) (fset (quote menu-bar-ediff-misc-menu) (symbol-value (quote menu-bar-ediff-misc-menu))) (defvar menu-bar-epatch-menu (make-sparse-keymap "Apply Patch")) (fset (quote menu-bar-epatch-menu) (symbol-value (quote menu-bar-epatch-menu))) (defvar menu-bar-ediff-merge-menu (make-sparse-keymap "Merge")) (fset (quote menu-bar-ediff-merge-menu) (symbol-value (quote menu-bar-ediff-merge-menu))) (defvar menu-bar-ediff-menu (make-sparse-keymap "Compare")) (fset (quote menu-bar-ediff-menu) (symbol-value (quote menu-bar-ediff-menu))) (define-key menu-bar-ediff-menu [window] (quote ("This Window and Next Window" . compare-windows))) (define-key menu-bar-ediff-menu [ediff-windows-linewise] (quote ("Windows Line-by-line..." . ediff-windows-linewise))) (define-key menu-bar-ediff-menu [ediff-windows-wordwise] (quote ("Windows Word-by-word..." . ediff-windows-wordwise))) (define-key menu-bar-ediff-menu [separator-ediff-windows] (quote ("--"))) (define-key menu-bar-ediff-menu [ediff-regions-linewise] (quote ("Regions Line-by-line..." . ediff-regions-linewise))) (define-key menu-bar-ediff-menu [ediff-regions-wordwise] (quote ("Regions Word-by-word..." . ediff-regions-wordwise))) (define-key menu-bar-ediff-menu [separator-ediff-regions] (quote ("--"))) (define-key menu-bar-ediff-menu [ediff-dir-revision] (quote ("Directory Revisions..." . ediff-directory-revisions))) (define-key menu-bar-ediff-menu [ediff-revision] (quote ("File with Revision..." . ediff-revision))) (define-key menu-bar-ediff-menu [separator-ediff-directories] (quote ("--"))) (define-key menu-bar-ediff-menu [ediff-directories3] (quote ("Three Directories..." . ediff-directories3))) (define-key menu-bar-ediff-menu [ediff-directories] (quote ("Two Directories..." . ediff-directories))) (define-key menu-bar-ediff-menu [separator-ediff-files] (quote ("--"))) (define-key menu-bar-ediff-menu [ediff-buffers3] (quote ("Three Buffers..." . ediff-buffers3))) (define-key menu-bar-ediff-menu [ediff-files3] (quote ("Three Files..." . ediff-files3))) (define-key menu-bar-ediff-menu [ediff-buffers] (quote ("Two Buffers..." . ediff-buffers))) (define-key menu-bar-ediff-menu [ediff-files] (quote ("Two Files..." . ediff-files))) (define-key menu-bar-ediff-merge-menu [ediff-merge-dir-revisions-with-ancestor] (quote ("Directory Revisions with Ancestor..." . ediff-merge-directory-revisions-with-ancestor))) (define-key menu-bar-ediff-merge-menu [ediff-merge-dir-revisions] (quote ("Directory Revisions..." . ediff-merge-directory-revisions))) (define-key menu-bar-ediff-merge-menu [ediff-merge-revisions-with-ancestor] (quote ("Revisions with Ancestor..." . ediff-merge-revisions-with-ancestor))) (define-key menu-bar-ediff-merge-menu [ediff-merge-revisions] (quote ("Revisions..." . ediff-merge-revisions))) (define-key menu-bar-ediff-merge-menu [separator-ediff-merge] (quote ("--"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-directories-with-ancestor] (quote ("Directories with Ancestor..." . ediff-merge-directories-with-ancestor))) (define-key menu-bar-ediff-merge-menu [ediff-merge-directories] (quote ("Directories..." . ediff-merge-directories))) (define-key menu-bar-ediff-merge-menu [separator-ediff-merge-dirs] (quote ("--"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-buffers-with-ancestor] (quote ("Buffers with Ancestor..." . ediff-merge-buffers-with-ancestor))) (define-key menu-bar-ediff-merge-menu [ediff-merge-buffers] (quote ("Buffers..." . ediff-merge-buffers))) (define-key menu-bar-ediff-merge-menu [ediff-merge-files-with-ancestor] (quote ("Files with Ancestor..." . ediff-merge-files-with-ancestor))) (define-key menu-bar-ediff-merge-menu [ediff-merge-files] (quote ("Files..." . ediff-merge-files))) (define-key menu-bar-epatch-menu [ediff-patch-buffer] (quote ("To a Buffer..." . ediff-patch-buffer))) (define-key menu-bar-epatch-menu [ediff-patch-file] (quote ("To a File..." . ediff-patch-file))) (define-key menu-bar-ediff-misc-menu [emultiframe] (quote ("Toggle use of separate control buffer frame..." . ediff-toggle-multiframe))) (define-key menu-bar-ediff-misc-menu [eregistry] (quote ("List Ediff Sessions..." . ediff-show-registry))) (define-key menu-bar-ediff-misc-menu [ediff-cust] (quote ("Customize Ediff..." . ediff-customize))) (define-key menu-bar-ediff-misc-menu [ediff-doc] (quote ("Ediff Manual..." . ediff-documentation))))))
6093
6094;;;***
6095
6076;;;### (autoloads (ediff-show-registry) "ediff-mult" "ediff-mult.el" 6096;;;### (autoloads (ediff-show-registry) "ediff-mult" "ediff-mult.el"
6077;;;;;; (15517 64421)) 6097;;;;;; (15517 64421))
6078;;; Generated autoloads from ediff-mult.el 6098;;; Generated autoloads from ediff-mult.el
@@ -6988,15 +7008,15 @@ This is used only in conjunction with `expand-add-abbrevs'." t nil)
6988 7008
6989;;;*** 7009;;;***
6990 7010
6991;;;### (autoloads (f90-mode) "f90" "progmodes/f90.el" (15552 23097)) 7011;;;### (autoloads (f90-mode) "f90" "progmodes/f90.el" (15561 31347))
6992;;; Generated autoloads from progmodes/f90.el 7012;;; Generated autoloads from progmodes/f90.el
6993 7013
6994(autoload (quote f90-mode) "f90" "\ 7014(autoload (quote f90-mode) "f90" "\
6995Major mode for editing Fortran 90 code in free format. 7015Major mode for editing Fortran 90,95 code in free format.
6996 7016
6997\\[f90-indent-new-line] corrects current indentation and creates new indented line. 7017\\[f90-indent-new-line] corrects current indentation and creates new indented line.
6998\\[f90-indent-line] indents the current line correctly. 7018\\[f90-indent-line] indents the current line correctly.
6999\\[f90-indent-subprogram] indents the current subprogram. 7019\\[f90-indent-subprogram] indents the current subprogram.
7000 7020
7001Type `? or `\\[help-command] to display a list of built-in abbrevs for F90 keywords. 7021Type `? or `\\[help-command] to display a list of built-in abbrevs for F90 keywords.
7002 7022
@@ -7005,46 +7025,44 @@ Key definitions:
7005 7025
7006Variables controlling indentation style and extra features: 7026Variables controlling indentation style and extra features:
7007 7027
7008 f90-do-indent 7028 `f90-do-indent'
7009 Extra indentation within do blocks. (default 3) 7029 Extra indentation within do blocks. (default 3)
7010 f90-if-indent 7030 `f90-if-indent'
7011 Extra indentation within if/select case/where/forall blocks. (default 3) 7031 Extra indentation within if/select case/where/forall blocks. (default 3)
7012 f90-type-indent 7032 `f90-type-indent'
7013 Extra indentation within type/interface/block-data blocks. (default 3) 7033 Extra indentation within type/interface/block-data blocks. (default 3)
7014 f90-program-indent 7034 `f90-program-indent'
7015 Extra indentation within program/module/subroutine/function blocks. 7035 Extra indentation within program/module/subroutine/function blocks.
7016 (default 2) 7036 (default 2)
7017 f90-continuation-indent 7037 `f90-continuation-indent'
7018 Extra indentation applied to continuation lines. (default 5) 7038 Extra indentation applied to continuation lines. (default 5)
7019 f90-comment-region 7039 `f90-comment-region'
7020 String inserted by \\[f90-comment-region] at start of each line in 7040 String inserted by \\[f90-comment-region] at start of each line in
7021 region. (default \"!!!$\") 7041 region. (default \"!!!$\")
7022 f90-indented-comment-re 7042 `f90-indented-comment-re'
7023 Regexp determining the type of comment to be intended like code. 7043 Regexp determining the type of comment to be intended like code.
7024 (default \"!\") 7044 (default \"!\")
7025 f90-directive-comment-re 7045 `f90-directive-comment-re'
7026 Regexp of comment-like directive like \"!HPF\\\\$\", not to be indented. 7046 Regexp of comment-like directive like \"!HPF\\\\$\", not to be indented.
7027 (default \"!hpf\\\\$\") 7047 (default \"!hpf\\\\$\")
7028 f90-break-delimiters 7048 `f90-break-delimiters'
7029 Regexp holding list of delimiters at which lines may be broken. 7049 Regexp holding list of delimiters at which lines may be broken.
7030 (default \"[-+*/><=,% \\t]\") 7050 (default \"[-+*/><=,% \\t]\")
7031 f90-break-before-delimiters 7051 `f90-break-before-delimiters'
7032 Non-nil causes `f90-do-auto-fill' to break lines before delimiters. 7052 Non-nil causes `f90-do-auto-fill' to break lines before delimiters.
7033 (default t) 7053 (default t)
7034 f90-beginning-ampersand 7054 `f90-beginning-ampersand'
7035 Automatic insertion of & at beginning of continuation lines. (default t) 7055 Automatic insertion of & at beginning of continuation lines. (default t)
7036 f90-smart-end 7056 `f90-smart-end'
7037 From an END statement, check and fill the end using matching block start. 7057 From an END statement, check and fill the end using matching block start.
7038 Allowed values are 'blink, 'no-blink, and nil, which determine 7058 Allowed values are 'blink, 'no-blink, and nil, which determine
7039 whether to blink the matching beginning.) (default 'blink) 7059 whether to blink the matching beginning. (default 'blink)
7040 f90-auto-keyword-case 7060 `f90-auto-keyword-case'
7041 Automatic change of case of keywords. (default nil) 7061 Automatic change of case of keywords. (default nil)
7042 The possibilities are 'downcase-word, 'upcase-word, 'capitalize-word. 7062 The possibilities are 'downcase-word, 'upcase-word, 'capitalize-word.
7043 f90-leave-line-no 7063 `f90-leave-line-no'
7044 Do not left-justify line numbers. (default nil) 7064 Do not left-justify line numbers. (default nil)
7045 f90-startup-message 7065 `f90-keywords-re'
7046 Set to nil to inhibit message first time F90 mode is used. (default t)
7047 f90-keywords-re
7048 List of keywords used for highlighting/upcase-keywords etc. 7066 List of keywords used for highlighting/upcase-keywords etc.
7049 7067
7050Turning on F90 mode calls the value of the variable `f90-mode-hook' 7068Turning on F90 mode calls the value of the variable `f90-mode-hook'
@@ -7056,7 +7074,7 @@ with no args, if that value is non-nil." t nil)
7056;;;;;; facemenu-remove-special facemenu-remove-all facemenu-remove-face-props 7074;;;;;; facemenu-remove-special facemenu-remove-all facemenu-remove-face-props
7057;;;;;; facemenu-set-read-only facemenu-set-intangible facemenu-set-invisible 7075;;;;;; facemenu-set-read-only facemenu-set-intangible facemenu-set-invisible
7058;;;;;; facemenu-set-face-from-menu facemenu-set-background facemenu-set-foreground 7076;;;;;; facemenu-set-face-from-menu facemenu-set-background facemenu-set-foreground
7059;;;;;; facemenu-set-face) "facemenu" "facemenu.el" (15552 23095)) 7077;;;;;; facemenu-set-face) "facemenu" "facemenu.el" (15557 64385))
7060;;; Generated autoloads from facemenu.el 7078;;; Generated autoloads from facemenu.el
7061 (define-key global-map "\M-g" 'facemenu-keymap) 7079 (define-key global-map "\M-g" 'facemenu-keymap)
7062 (autoload 'facemenu-keymap "facemenu" "Keymap for face-changing commands." t 'keymap) 7080 (autoload 'facemenu-keymap "facemenu" "Keymap for face-changing commands." t 'keymap)
@@ -7338,7 +7356,7 @@ the name is considered already unique; only the second substitution
7338;;;*** 7356;;;***
7339 7357
7340;;;### (autoloads (find-grep-dired find-name-dired find-dired find-grep-options 7358;;;### (autoloads (find-grep-dired find-name-dired find-dired find-grep-options
7341;;;;;; find-ls-option) "find-dired" "find-dired.el" (15505 59086)) 7359;;;;;; find-ls-option) "find-dired" "find-dired.el" (15561 31174))
7342;;; Generated autoloads from find-dired.el 7360;;; Generated autoloads from find-dired.el
7343 7361
7344(defvar find-ls-option (if (eq system-type (quote berkeley-unix)) (quote ("-ls" . "-gilsb")) (quote ("-exec ls -ld {} \\;" . "-ld"))) "\ 7362(defvar find-ls-option (if (eq system-type (quote berkeley-unix)) (quote ("-ls" . "-gilsb")) (quote ("-exec ls -ld {} \\;" . "-ld"))) "\
@@ -7381,7 +7399,7 @@ Thus ARG can also contain additional grep options." t nil)
7381 7399
7382;;;### (autoloads (ff-mouse-find-other-file-other-window ff-mouse-find-other-file 7400;;;### (autoloads (ff-mouse-find-other-file-other-window ff-mouse-find-other-file
7383;;;;;; ff-find-other-file ff-get-other-file) "find-file" "find-file.el" 7401;;;;;; ff-find-other-file ff-get-other-file) "find-file" "find-file.el"
7384;;;;;; (15400 1472)) 7402;;;;;; (15561 31174))
7385;;; Generated autoloads from find-file.el 7403;;; Generated autoloads from find-file.el
7386 7404
7387(autoload (quote ff-get-other-file) "find-file" "\ 7405(autoload (quote ff-get-other-file) "find-file" "\
@@ -7913,7 +7931,7 @@ Visit a file in Forms mode in other window." t nil)
7913;;;*** 7931;;;***
7914 7932
7915;;;### (autoloads (fortran-mode fortran-tab-mode-default) "fortran" 7933;;;### (autoloads (fortran-mode fortran-tab-mode-default) "fortran"
7916;;;;;; "progmodes/fortran.el" (15555 1627)) 7934;;;;;; "progmodes/fortran.el" (15557 64405))
7917;;; Generated autoloads from progmodes/fortran.el 7935;;; Generated autoloads from progmodes/fortran.el
7918 7936
7919(defvar fortran-tab-mode-default nil "\ 7937(defvar fortran-tab-mode-default nil "\
@@ -8999,7 +9017,7 @@ Key bindings:
8999;;;### (autoloads (global-highlight-changes highlight-compare-with-file 9017;;;### (autoloads (global-highlight-changes highlight-compare-with-file
9000;;;;;; highlight-changes-rotate-faces highlight-changes-previous-change 9018;;;;;; highlight-changes-rotate-faces highlight-changes-previous-change
9001;;;;;; highlight-changes-next-change highlight-changes-mode highlight-changes-remove-highlight) 9019;;;;;; highlight-changes-next-change highlight-changes-mode highlight-changes-remove-highlight)
9002;;;;;; "hilit-chg" "hilit-chg.el" (15556 56033)) 9020;;;;;; "hilit-chg" "hilit-chg.el" (15557 64386))
9003;;; Generated autoloads from hilit-chg.el 9021;;; Generated autoloads from hilit-chg.el
9004 9022
9005(defvar highlight-changes-mode nil) 9023(defvar highlight-changes-mode nil)
@@ -9236,12 +9254,15 @@ Also see `automatic-hscrolling'." t nil)
9236;;;;;; ibuffer-add-saved-filters ibuffer-delete-saved-filters ibuffer-save-filters 9254;;;;;; ibuffer-add-saved-filters ibuffer-delete-saved-filters ibuffer-save-filters
9237;;;;;; ibuffer-or-filter ibuffer-negate-filter ibuffer-exchange-filters 9255;;;;;; ibuffer-or-filter ibuffer-negate-filter ibuffer-exchange-filters
9238;;;;;; ibuffer-decompose-filter ibuffer-pop-filter ibuffer-filter-disable 9256;;;;;; ibuffer-decompose-filter ibuffer-pop-filter ibuffer-filter-disable
9239;;;;;; ibuffer-jump-to-filter-group ibuffer-pop-filter-group ibuffer-filters-to-filter-group 9257;;;;;; ibuffer-switch-to-saved-filter-groups ibuffer-delete-saved-filter-groups
9240;;;;;; ibuffer-included-in-filters-p ibuffer-backward-filter-group 9258;;;;;; ibuffer-save-filter-groups ibuffer-yank ibuffer-kill-line
9241;;;;;; ibuffer-forward-filter-group ibuffer-toggle-filter-group 9259;;;;;; ibuffer-kill-filter-group ibuffer-jump-to-filter-group ibuffer-clear-filter-groups
9242;;;;;; ibuffer-mouse-toggle-filter-group ibuffer-interactive-filter-by-mode 9260;;;;;; ibuffer-pop-filter-group ibuffer-set-filter-groups-by-mode
9243;;;;;; ibuffer-mouse-filter-by-mode ibuffer-auto-mode) "ibuf-ext" 9261;;;;;; ibuffer-filters-to-filter-group ibuffer-included-in-filters-p
9244;;;;;; "ibuf-ext.el" (15559 5574)) 9262;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group
9263;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group
9264;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode
9265;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" (15561 31179))
9245;;; Generated autoloads from ibuf-ext.el 9266;;; Generated autoloads from ibuf-ext.el
9246 9267
9247(autoload (quote ibuffer-auto-mode) "ibuf-ext" "\ 9268(autoload (quote ibuffer-auto-mode) "ibuf-ext" "\
@@ -9282,12 +9303,40 @@ Move point backwards by COUNT filtering groups." t nil)
9282(autoload (quote ibuffer-filters-to-filter-group) "ibuf-ext" "\ 9303(autoload (quote ibuffer-filters-to-filter-group) "ibuf-ext" "\
9283Make the current filters into a filtering group." t nil) 9304Make the current filters into a filtering group." t nil)
9284 9305
9306(autoload (quote ibuffer-set-filter-groups-by-mode) "ibuf-ext" "\
9307Set the current filter groups to filter by mode." t nil)
9308
9285(autoload (quote ibuffer-pop-filter-group) "ibuf-ext" "\ 9309(autoload (quote ibuffer-pop-filter-group) "ibuf-ext" "\
9286Remove the first filtering group." t nil) 9310Remove the first filtering group." t nil)
9287 9311
9312(autoload (quote ibuffer-clear-filter-groups) "ibuf-ext" "\
9313Remove all filtering groups." t nil)
9314
9288(autoload (quote ibuffer-jump-to-filter-group) "ibuf-ext" "\ 9315(autoload (quote ibuffer-jump-to-filter-group) "ibuf-ext" "\
9289Move point to the filter group whose name is NAME." t nil) 9316Move point to the filter group whose name is NAME." t nil)
9290 9317
9318(autoload (quote ibuffer-kill-filter-group) "ibuf-ext" "\
9319Delete the filtering group named NAME." t nil)
9320
9321(autoload (quote ibuffer-kill-line) "ibuf-ext" nil t nil)
9322
9323(autoload (quote ibuffer-yank) "ibuf-ext" nil t nil)
9324
9325(autoload (quote ibuffer-save-filter-groups) "ibuf-ext" "\
9326Save all active filter groups GROUPS as NAME.
9327They are added to `ibuffer-saved-filter-groups'. Interactively,
9328prompt for NAME, and use the current filters." t nil)
9329
9330(autoload (quote ibuffer-delete-saved-filter-groups) "ibuf-ext" "\
9331Delete saved filter groups with NAME.
9332They are removed from `ibuffer-saved-filter-groups'." t nil)
9333
9334(autoload (quote ibuffer-switch-to-saved-filter-groups) "ibuf-ext" "\
9335Set this buffer's filter groups to saved version with NAME.
9336The value from `ibuffer-saved-filters' is used.
9337If prefix argument ADD is non-nil, then add the saved filters instead
9338of replacing the current filters." t nil)
9339
9291(autoload (quote ibuffer-filter-disable) "ibuf-ext" "\ 9340(autoload (quote ibuffer-filter-disable) "ibuf-ext" "\
9292Disable all filters currently in effect in this buffer." t nil) 9341Disable all filters currently in effect in this buffer." t nil)
9293 9342
@@ -9442,8 +9491,8 @@ defaults to one." t nil)
9442;;;*** 9491;;;***
9443 9492
9444;;;### (autoloads (define-ibuffer-filter define-ibuffer-op define-ibuffer-sorter 9493;;;### (autoloads (define-ibuffer-filter define-ibuffer-op define-ibuffer-sorter
9445;;;;;; define-ibuffer-column) "ibuf-macs" "ibuf-macs.el" (15559 9494;;;;;; define-ibuffer-column) "ibuf-macs" "ibuf-macs.el" (15561
9446;;;;;; 4758)) 9495;;;;;; 31179))
9447;;; Generated autoloads from ibuf-macs.el 9496;;; Generated autoloads from ibuf-macs.el
9448 9497
9449(autoload (quote define-ibuffer-column) "ibuf-macs" "\ 9498(autoload (quote define-ibuffer-column) "ibuf-macs" "\
@@ -9519,7 +9568,7 @@ bound to the current value of the filter." nil (quote macro))
9519;;;*** 9568;;;***
9520 9569
9521;;;### (autoloads (ibuffer ibuffer-other-window ibuffer-list-buffers) 9570;;;### (autoloads (ibuffer ibuffer-other-window ibuffer-list-buffers)
9522;;;;;; "ibuffer" "ibuffer.el" (15559 12617)) 9571;;;;;; "ibuffer" "ibuffer.el" (15561 31180))
9523;;; Generated autoloads from ibuffer.el 9572;;; Generated autoloads from ibuffer.el
9524 9573
9525(autoload (quote ibuffer-list-buffers) "ibuffer" "\ 9574(autoload (quote ibuffer-list-buffers) "ibuffer" "\
@@ -9545,7 +9594,7 @@ Optional argument NOSELECT means don't select the Ibuffer buffer.
9545Optional argument SHRINK means shrink the buffer to minimal size. The 9594Optional argument SHRINK means shrink the buffer to minimal size. The
9546special value `onewindow' means always use another window. 9595special value `onewindow' means always use another window.
9547Optional argument FILTER-GROUPS is an initial set of filtering 9596Optional argument FILTER-GROUPS is an initial set of filtering
9548groups to use; see `ibuffer-filtering-groups'." t nil) 9597groups to use; see `ibuffer-filter-groups'." t nil)
9549 9598
9550;;;*** 9599;;;***
9551 9600
@@ -11371,7 +11420,7 @@ If 4th arg LIST is non-nil, return a list of all such fields." nil nil)
11371;;;*** 11420;;;***
11372 11421
11373;;;### (autoloads (define-mail-abbrev build-mail-abbrevs mail-abbrevs-setup) 11422;;;### (autoloads (define-mail-abbrev build-mail-abbrevs mail-abbrevs-setup)
11374;;;;;; "mailabbrev" "mail/mailabbrev.el" (15552 23097)) 11423;;;;;; "mailabbrev" "mail/mailabbrev.el" (15557 64401))
11375;;; Generated autoloads from mail/mailabbrev.el 11424;;; Generated autoloads from mail/mailabbrev.el
11376 11425
11377(autoload (quote mail-abbrevs-setup) "mailabbrev" "\ 11426(autoload (quote mail-abbrevs-setup) "mailabbrev" "\
@@ -12077,7 +12126,7 @@ different buffer menu using the function `msb'." t nil)
12077;;;;;; describe-current-coding-system describe-current-coding-system-briefly 12126;;;;;; describe-current-coding-system describe-current-coding-system-briefly
12078;;;;;; describe-coding-system describe-char-after describe-character-set 12127;;;;;; describe-coding-system describe-char-after describe-character-set
12079;;;;;; list-charset-chars read-charset list-character-sets) "mule-diag" 12128;;;;;; list-charset-chars read-charset list-character-sets) "mule-diag"
12080;;;;;; "international/mule-diag.el" (15556 56053)) 12129;;;;;; "international/mule-diag.el" (15557 64400))
12081;;; Generated autoloads from international/mule-diag.el 12130;;; Generated autoloads from international/mule-diag.el
12082 12131
12083(autoload (quote list-character-sets) "mule-diag" "\ 12132(autoload (quote list-character-sets) "mule-diag" "\
@@ -13950,8 +13999,8 @@ were operated on recently." t nil)
13950;;;### (autoloads (clear-rectangle string-insert-rectangle string-rectangle 13999;;;### (autoloads (clear-rectangle string-insert-rectangle string-rectangle
13951;;;;;; delete-whitespace-rectangle open-rectangle insert-rectangle 14000;;;;;; delete-whitespace-rectangle open-rectangle insert-rectangle
13952;;;;;; yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle 14001;;;;;; yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle
13953;;;;;; delete-rectangle move-to-column-force) "rect" "rect.el" (15552 14002;;;;;; delete-rectangle move-to-column-force) "rect" "rect.el" (15557
13954;;;;;; 23097)) 14003;;;;;; 64391))
13955;;; Generated autoloads from rect.el 14004;;; Generated autoloads from rect.el
13956 14005
13957(autoload (quote move-to-column-force) "rect" "\ 14006(autoload (quote move-to-column-force) "rect" "\
@@ -15233,7 +15282,7 @@ Interesting variables:
15233;;;*** 15282;;;***
15234 15283
15235;;;### (autoloads (scroll-all-mode scroll-all-mode) "scroll-all" 15284;;;### (autoloads (scroll-all-mode scroll-all-mode) "scroll-all"
15236;;;;;; "scroll-all.el" (15559 7260)) 15285;;;;;; "scroll-all.el" (15561 31204))
15237;;; Generated autoloads from scroll-all.el 15286;;; Generated autoloads from scroll-all.el
15238 15287
15239(defvar scroll-all-mode nil "\ 15288(defvar scroll-all-mode nil "\
@@ -15256,7 +15305,7 @@ Toggle Scroll-All minor mode." t nil)
15256;;;;;; mail-archive-file-name mail-header-separator send-mail-function 15305;;;;;; mail-archive-file-name mail-header-separator send-mail-function
15257;;;;;; mail-yank-ignored-headers mail-interactive mail-self-blind 15306;;;;;; mail-yank-ignored-headers mail-interactive mail-self-blind
15258;;;;;; mail-specify-envelope-from mail-from-style) "sendmail" "mail/sendmail.el" 15307;;;;;; mail-specify-envelope-from mail-from-style) "sendmail" "mail/sendmail.el"
15259;;;;;; (15505 59088)) 15308;;;;;; (15561 31320))
15260;;; Generated autoloads from mail/sendmail.el 15309;;; Generated autoloads from mail/sendmail.el
15261 15310
15262(defvar mail-from-style (quote angles) "\ 15311(defvar mail-from-style (quote angles) "\
@@ -15871,7 +15920,7 @@ which smileys to operate on and which images to use for them." t nil)
15871;;;*** 15920;;;***
15872 15921
15873;;;### (autoloads (smtpmail-send-it) "smtpmail" "mail/smtpmail.el" 15922;;;### (autoloads (smtpmail-send-it) "smtpmail" "mail/smtpmail.el"
15874;;;;;; (15417 7425)) 15923;;;;;; (15561 31320))
15875;;; Generated autoloads from mail/smtpmail.el 15924;;; Generated autoloads from mail/smtpmail.el
15876 15925
15877(autoload (quote smtpmail-send-it) "smtpmail" nil nil nil) 15926(autoload (quote smtpmail-send-it) "smtpmail" nil nil nil)
@@ -17695,7 +17744,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." nil
17695;;;*** 17744;;;***
17696 17745
17697;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm" 17746;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm"
17698;;;;;; "tmm.el" (15556 56039)) 17747;;;;;; "tmm.el" (15557 64393))
17699;;; Generated autoloads from tmm.el 17748;;; Generated autoloads from tmm.el
17700 (define-key global-map "\M-`" 'tmm-menubar) 17749 (define-key global-map "\M-`" 'tmm-menubar)
17701 (define-key global-map [f10] 'tmm-menubar) 17750 (define-key global-map [f10] 'tmm-menubar)
@@ -17775,7 +17824,7 @@ Show TODO list." t nil)
17775 17824
17776;;;### (autoloads (tool-bar-local-item-from-menu tool-bar-add-item-from-menu 17825;;;### (autoloads (tool-bar-local-item-from-menu tool-bar-add-item-from-menu
17777;;;;;; tool-bar-local-item tool-bar-add-item tool-bar-mode) "tool-bar" 17826;;;;;; tool-bar-local-item tool-bar-add-item tool-bar-mode) "tool-bar"
17778;;;;;; "toolbar/tool-bar.el" (15552 23097)) 17827;;;;;; "toolbar/tool-bar.el" (15557 64408))
17779;;; Generated autoloads from toolbar/tool-bar.el 17828;;; Generated autoloads from toolbar/tool-bar.el
17780 17829
17781(defvar tool-bar-mode nil "\ 17830(defvar tool-bar-mode nil "\
@@ -19532,7 +19581,8 @@ Zone-mode does two things:
19532 19581
19533;;;*** 19582;;;***
19534 19583
19535;;;### (autoloads nil nil ("international/mule-cmds.el" "eshell/esh-ext.el" 19584;;;### (autoloads nil nil ("term/x-win.el" "progmodes/cc-cmds.el"
19585;;;;;; "replace.el" "menu-bar.el" "international/mule-cmds.el" "eshell/esh-ext.el"
19536;;;;;; "emulation/viper-ex.el" "calc/calc-bin.el" "loadup.el" "frame.el" 19586;;;;;; "emulation/viper-ex.el" "calc/calc-bin.el" "loadup.el" "frame.el"
19537;;;;;; "faces.el" "ediff-init.el" "bindings.el" "international/mule-conf.el" 19587;;;;;; "faces.el" "ediff-init.el" "bindings.el" "international/mule-conf.el"
19538;;;;;; "calendar/cal-french.el" "textmodes/texnfo-upd.el" "language/slovak.el" 19588;;;;;; "calendar/cal-french.el" "textmodes/texnfo-upd.el" "language/slovak.el"
@@ -19545,21 +19595,21 @@ Zone-mode does two things:
19545;;;;;; "eshell/em-glob.el" "eshell/em-dirs.el" "eshell/em-cmpl.el" 19595;;;;;; "eshell/em-glob.el" "eshell/em-dirs.el" "eshell/em-cmpl.el"
19546;;;;;; "eshell/em-alias.el" "emacs-lisp/lisp.el" "mail/uce.el" "gnus/mm-encode.el" 19596;;;;;; "eshell/em-alias.el" "emacs-lisp/lisp.el" "mail/uce.el" "gnus/mm-encode.el"
19547;;;;;; "tempo.el" "emulation/viper-util.el" "gnus/mml.el" "gnus/mm-view.el" 19597;;;;;; "tempo.el" "emulation/viper-util.el" "gnus/mml.el" "gnus/mm-view.el"
19548;;;;;; "calendar/cal-menu.el" "indent.el" "ediff-wind.el" "ediff-hook.el" 19598;;;;;; "calendar/cal-menu.el" "indent.el" "ediff-wind.el" "term/sun-mouse.el"
19549;;;;;; "term/sun-mouse.el" "emacs-lisp/lisp-mode.el" "progmodes/mantemp.el" 19599;;;;;; "emacs-lisp/lisp-mode.el" "progmodes/mantemp.el" "progmodes/idlw-toolbar.el"
19550;;;;;; "progmodes/idlw-toolbar.el" "progmodes/ebnf-yac.el" "progmodes/ebnf-otz.el" 19600;;;;;; "progmodes/ebnf-yac.el" "progmodes/ebnf-otz.el" "progmodes/ebnf-iso.el"
19551;;;;;; "progmodes/ebnf-iso.el" "progmodes/ebnf-bnf.el" "play/meese.el" 19601;;;;;; "progmodes/ebnf-bnf.el" "play/meese.el" "play/gametree.el"
19552;;;;;; "play/gametree.el" "obsolete/x-menu.el" "obsolete/x-apollo.el" 19602;;;;;; "obsolete/x-menu.el" "obsolete/x-apollo.el" "obsolete/uncompress.el"
19553;;;;;; "obsolete/uncompress.el" "obsolete/sun-fns.el" "obsolete/sun-curs.el" 19603;;;;;; "obsolete/sun-fns.el" "obsolete/sun-curs.el" "obsolete/sc.el"
19554;;;;;; "obsolete/sc.el" "obsolete/rnews.el" "obsolete/profile.el" 19604;;;;;; "obsolete/rnews.el" "obsolete/profile.el" "obsolete/ooutline.el"
19555;;;;;; "obsolete/ooutline.el" "obsolete/c-mode.el" "mail/vms-pmail.el" 19605;;;;;; "obsolete/c-mode.el" "mail/vms-pmail.el" "mail/rfc822.el"
19556;;;;;; "mail/rfc822.el" "mail/rfc2368.el" "mail/mspools.el" "mail/mh-seq.el" 19606;;;;;; "mail/rfc2368.el" "mail/mspools.el" "mail/mh-seq.el" "mail/mh-funcs.el"
19557;;;;;; "mail/mh-funcs.el" "mail/mailpost.el" "mail/mailheader.el" 19607;;;;;; "mail/mailpost.el" "mail/mailheader.el" "mail/blessmail.el"
19558;;;;;; "mail/blessmail.el" "language/romanian.el" "language/misc-lang.el" 19608;;;;;; "language/romanian.el" "language/misc-lang.el" "language/ethiopic.el"
19559;;;;;; "language/ethiopic.el" "language/english.el" "language/devanagari.el" 19609;;;;;; "language/english.el" "language/devanagari.el" "international/swedish.el"
19560;;;;;; "international/swedish.el" "international/latin-9.el" "international/latin-8.el" 19610;;;;;; "international/latin-9.el" "international/latin-8.el" "international/latin-5.el"
19561;;;;;; "international/latin-5.el" "international/latin-4.el" "international/latin-3.el" 19611;;;;;; "international/latin-4.el" "international/latin-3.el" "international/latin-2.el"
19562;;;;;; "international/latin-2.el" "international/latin-1.el" "international/ja-dic-utl.el" 19612;;;;;; "international/latin-1.el" "international/ja-dic-utl.el"
19563;;;;;; "international/ja-dic-cnv.el" "international/iso-swed.el" 19613;;;;;; "international/ja-dic-cnv.el" "international/iso-swed.el"
19564;;;;;; "international/iso-ascii.el" "calc/calcsel2.el" "calc/calccomp.el" 19614;;;;;; "international/iso-ascii.el" "calc/calcsel2.el" "calc/calccomp.el"
19565;;;;;; "calc/calc-yank.el" "calc/calc-vec.el" "calc/calc-units.el" 19615;;;;;; "calc/calc-yank.el" "calc/calc-vec.el" "calc/calc-units.el"
@@ -19639,19 +19689,18 @@ Zone-mode does two things:
19639;;;;;; "calc/calc-graph.el" "ediff-diff.el" "ediff-ptch.el" "pcvs-parse.el" 19689;;;;;; "calc/calc-graph.el" "ediff-diff.el" "ediff-ptch.el" "pcvs-parse.el"
19640;;;;;; "gnus/mail-source.el" "gnus/mm-decode.el" "gnus/mm-util.el" 19690;;;;;; "gnus/mail-source.el" "gnus/mm-decode.el" "gnus/mm-util.el"
19641;;;;;; "gnus/nneething.el" "international/ucs-tables.el" "allout.el" 19691;;;;;; "gnus/nneething.el" "international/ucs-tables.el" "allout.el"
19642;;;;;; "cus-load.el" "cus-start.el" "finder-inf.el" "format.el" 19692;;;;;; "cus-start.el" "format.el" "help.el" "isearch.el" "mouse.el"
19643;;;;;; "help.el" "isearch.el" "mouse.el" "pcvs-info.el" "window.el" 19693;;;;;; "pcvs-info.el" "window.el" "calc/calc-misc.el" "gnus/gnus-ems.el"
19644;;;;;; "calc/calc-misc.el" "gnus/gnus-ems.el" "gnus/gnus-sum.el" 19694;;;;;; "gnus/gnus-sum.el" "gnus/gnus-uu.el" "gnus/nnimap.el" "gnus/nnmbox.el"
19645;;;;;; "gnus/gnus-uu.el" "gnus/nnimap.el" "gnus/nnmbox.el" "gnus/nnwarchive.el" 19695;;;;;; "gnus/nnwarchive.el" "gnus/pop3.el" "calendar/cal-tex.el"
19646;;;;;; "gnus/pop3.el" "calendar/cal-tex.el" "emacs-lisp/byte-opt.el" 19696;;;;;; "emacs-lisp/byte-opt.el" "emacs-lisp/lucid.el" "international/utf-8.el"
19647;;;;;; "emacs-lisp/lucid.el" "international/utf-8.el" "progmodes/ada-prj.el" 19697;;;;;; "progmodes/ada-prj.el" "progmodes/idlw-rinfo.el" "textmodes/fill.el"
19648;;;;;; "progmodes/idlw-rinfo.el" "textmodes/fill.el" "custom.el" 19698;;;;;; "custom.el" "files.el" "register.el" "simple.el" "startup.el"
19649;;;;;; "files.el" "menu-bar.el" "register.el" "replace.el" "simple.el" 19699;;;;;; "subr.el" "net/netrc.el" "play/gamegrid.el" "progmodes/cc-align.el"
19650;;;;;; "startup.el" "subr.el" "net/netrc.el" "play/gamegrid.el" 19700;;;;;; "progmodes/cc-bytecomp.el" "progmodes/cc-compat.el" "progmodes/cc-defs.el"
19651;;;;;; "progmodes/cc-align.el" "progmodes/cc-bytecomp.el" "progmodes/cc-cmds.el" 19701;;;;;; "progmodes/cc-engine.el" "progmodes/cc-menus.el" "cus-load.el"
19652;;;;;; "progmodes/cc-compat.el" "progmodes/cc-defs.el" "progmodes/cc-engine.el" 19702;;;;;; "finder-inf.el" "subdirs.el" "eshell/esh-groups.el") (15561
19653;;;;;; "progmodes/cc-menus.el" "term/x-win.el" "subdirs.el" "eshell/esh-groups.el") 19703;;;;;; 41889 615042))
19654;;;;;; (15559 13260 596690))
19655 19704
19656;;;*** 19705;;;***
19657 19706
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 48c210d51e2..53f6cde1d79 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -2,7 +2,7 @@
2 2
3;; Copyright (C) 1999, 2000 Free Software Foundation, Inc. 3;; Copyright (C) 1999, 2000 Free Software Foundation, Inc.
4 4
5;; Author: Andrew Choi <akochoi@i-cable.com> 5;; Author: Andrew Choi <akochoi@mac.com>
6 6
7;; This file is part of GNU Emacs. 7;; This file is part of GNU Emacs.
8 8
@@ -120,7 +120,7 @@
120;; X Window emulation in macterm.c is not complete enough to start a 120;; X Window emulation in macterm.c is not complete enough to start a
121;; frame without a minibuffer properly. Call this to tell ediff 121;; frame without a minibuffer properly. Call this to tell ediff
122;; library to use a single frame. 122;; library to use a single frame.
123(ediff-toggle-multiframe) 123; (ediff-toggle-multiframe)
124 124
125;; Setup to use the Mac clipboard. The functions mac-cut-function and 125;; Setup to use the Mac clipboard. The functions mac-cut-function and
126;; mac-paste-function are defined in mac.c. 126;; mac-paste-function are defined in mac.c.
@@ -215,6 +215,16 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
215;; big5 or sjis 215;; big5 or sjis
216(setq file-name-coding-system 'mac-roman) 216(setq file-name-coding-system 'mac-roman)
217 217
218;; If Emacs is started from the Finder, change the default directory
219;; to the user's home directory.
220(if (string= default-directory "/")
221 (cd "~"))
222
223;; Tell Emacs to use pipes instead of pty's for processes because the
224;; latter sometimes lose characters. Pty support is compiled in since
225;; ange-ftp will not work without it.
226(setq process-connection-type nil)
227
218;; (prefer-coding-system 'mac-roman) 228;; (prefer-coding-system 'mac-roman)
219 229
220;; 230;;
diff --git a/mac/ChangeLog b/mac/ChangeLog
index bcae17602c0..186a8564289 100644
--- a/mac/ChangeLog
+++ b/mac/ChangeLog
@@ -1,3 +1,136 @@
12002-04-13 Andrew Choi <akochoi@shaw.ca>
2
3 * Emacs.app/Contents/Info.plist: New file.
4
5 * Emacs.app/Contents/PkgInfo: New file.
6
7 * Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings:
8 New file.
9
10 * cw5-mcp.xml: Remove file.
11
12 * inc/defs-cw5.h: Remove file.
13
14 * cw6-mcp.xml: Update with new version.
15
16 * mac/inc/defs-cw6.h: New constant MAC_OS8. Remove definition
17 of constant CODEWARRIOR_VERSION_6.
18
19 * mac/src/mac.c:
20 * mac/src/macmenu.c:
21 * mac/src/macterm.c:
22 Test constant __MSL__ instead of CODEWARRIOR_VERSION_6.
23
24 * src/Carbon.r: New File.
25
26 * makefile.MPW: Define MAC_OS and MAC_OS8. Update with change of
27 locations for mac.c, macfns.c, macgui.h, macmenu.c, macterm.c, and
28 macterm.h. Generate DOC from .el instead of .elc versions of
29 files listed in DONTCOMPILE in lisp/Makefile.in.
30
31 * INSTALL: Add installation instructions for Mac OS X.
32
33 * README: Add information for Mac OS X.
34
35 * src/mac.c, inc/macgui.h, src/macfns.c, src/macmenu.c,
36 src/macterm.c, inc/macterm.h: Remove from here and move to src.
37
382002-04-12 Andrew Choi <akochoi@shaw.ca>
39
40 * src/mac.c (select): Under Carbon, always return true so
41 XTread_socket is called to poll input.
42 (run_mac_command): Not implemented under Carbon.
43 (get_wd): Call PBHGetVolSync and path_from_vol_dir_name to
44 establish pathname.
45 (do_applescript): Use Carbon routines AEGetDescDatASize and
46 AEGetDescData.
47 (Fmac_paste_function): Use Carbon routines GetCurrentScrap,
48 GetScrapFlavorFlags, GetScrapFlavorSize, and GetScrapFlavorData.
49 (Fmac_cut_function): Use Carbon routines ClearCurrentScrap,
50 GetCurrentScrap, and PutScrapFlavor.
51 (Fx_selection_exists_p): Use Carbon routines GetCurrentScrap and
52 GetScrapFlavorFlags.
53
54 * src/macfns.c: Synchronize with changes in w32fns.c.
55 [MAC_OSX]: Include Carbon headers.
56 (x_real_positions): Use Carbon routine GetWindowPortBounds.
57 (x_set_scroll_bar_width): Set width of scroll bar to 16.
58 (x_make_gc): Remove static qualifier.
59
60 * src/macmenu.c: Synchronize with changes in w32menu.c.
61 [MAC_OSX]: Include Carbon headers.
62 (set_frame_menubar): Check equality of vector representation of
63 scroll bars using Fequal instead of EQ.
64 (mac_menu_show): Use Carbon routine GetWindowPort.
65 (mac_dialog): Likewise.
66 (add_menu_item): Use Carbon routines CountMenuItems,
67 EnableMenuItem, and DisableMenuItem.
68
69 * src/macterm.c: Synchronize with changes in w32term.c.
70 [MAC_OSX]: Include Carbon headers.
71 (XDrawLine): Use Carbon routine GetWindowPort.
72 (XClearArea): Likewise.
73 (XClearWindow): Use Carbon routines GetWindowPort and
74 GetWindowPortBounds.
75 (mac_draw_bitmap): Use Carbon routines GetWindowPort and
76 GetPortPixMap.
77 (mac_set_clip_rectangle): Use Carbon routine GetWindowPort.
78 (mac_reset_clipping): Use Carbon routine GetWindowPort.
79 (XFillRectangle): Likewise.
80 (mac_draw_rectangle): Likewise.
81 (mac_draw_rectangle_to_pixmap): Likewise.
82 (mac_draw_string_common): Likewise.
83 (mac_copy_area): Use Carbon routines GetWindowPort and
84 GetPortPixMap.
85 (mac_scroll_area): Use Carbon routines GetWindowPort and
86 GetQDGlobalsScreenBits.
87 (x_flush): Call Carbon routine QDFlushPortBuffer.
88 (x_update_end): Use Carbon routine GetWindowPort; call x_flush.
89 (x_draw_fringe_bitmap): Call mac_reset_clipping before returning.
90 (x_draw_image_glyph_string): Likewise.
91 (x_draw_stretch_glyph_string): Likewise.
92 (construct_mouse_click): Call Carbon routine GetWindowPort.
93 (note_mouse_movement): Call Carbon routine GetWindowPortBounds.
94 (XTmouse_position): Call Carbon routine GetWindowPort.
95 (x_scroll_bar_create): Create scroll bar with proc
96 kControlScrollBarProc.
97 (XTset_vertical_scroll_bar) [MAC_OSX]: Set width to 16.
98 (activate_scroll_bar): Call ActivateControl instead of
99 SetControlMaximum.
100 (deactivate_scroll_bar): Call DeactivateControl instead of
101 SetControlMaximum.
102 (x_scroll_bar_handle_click): Use default case for scroll
103 indicator.
104 (x_scroll_bar_report_motion): Call Carbon routine GetWindowPort.
105 (x_calc_absolute_position): Call Carbon routines GetWindowPort and
106 GetWindowPortBounds.
107 (init_font_name_table): Call Carbon Font Manager routines to
108 iterate through all fonts.
109 (XLoadQueryFont): Call Carbon routines GetPortTextFont,
110 GetPortTextSize, and GetPortTextFace.
111 (do_init_managers): Do not initialize Mac Toolbox under Carbon.
112 (is_emacs_window): New function to filter out non-Emacs windows
113 passed back by WaitNextEvent.
114 (do_mouse_moved): Call Carbon routine GetWindowPort.
115 (do_apple_menu): No apple menu handler under Carbon.
116 (do_zoom_window): Call Carbon routines GetWindowPort,
117 GetQDGlobalsScreenBits, SetWindowStandardState, and
118 GetWindowPortBounds.
119 (init_required_apple_events): Use UPP procedure type converter.
120 (main): Don't define for Carbon version.
121 (XTread_socket): Don't check interrupt_input_blocked. Don't call
122 check_alarm. Call Carbon routines GetWindowPort,
123 GetQDGlobalScreenBits, GetWindowPortBounds, and InvalWindowRect.
124 (NewMacWindow): Set making_terminal_window to 0. Call Carbon
125 routine GetWindowPort.
126 (mac_initialize): Rename from x_initialize. Use new Doc string
127 format.
128
129 * inc/macterm.h: Synchronize with changes in w32term.h.
130
131 * inc/macgui.h [MAC_OSX]: Use OpaqueWindowPtr* instead of
132 WindowPtr.
133
12002-01-28 Kim F. Storm <storm@cua.dk> 1342002-01-28 Kim F. Storm <storm@cua.dk>
2 135
3 * src/macterm.c (x_erase_phys_cursor): Don't erase cursor if 136 * src/macterm.c (x_erase_phys_cursor): Don't erase cursor if
diff --git a/mac/Emacs.app/Contents/Info.plist b/mac/Emacs.app/Contents/Info.plist
new file mode 100644
index 00000000000..4d51100f66b
--- /dev/null
+++ b/mac/Emacs.app/Contents/Info.plist
@@ -0,0 +1,18 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
3<plist version="0.9">
4<dict>
5 <key>CFBundleDevelopmentRegion</key>
6 <string>English</string>
7 <key>CFBundleExecutable</key>
8 <string>Emacs</string>
9 <key>CFBundleInfoDictionaryVersion</key>
10 <string>6.0</string>
11 <key>CFBundlePackageType</key>
12 <string>APPL</string>
13 <key>CFBundleSignature</key>
14 <string>????</string>
15 <key>CFBundleVersion</key>
16 <string>0.1</string>
17</dict>
18</plist>
diff --git a/mac/Emacs.app/Contents/PkgInfo b/mac/Emacs.app/Contents/PkgInfo
new file mode 100644
index 00000000000..bd04210fb49
--- /dev/null
+++ b/mac/Emacs.app/Contents/PkgInfo
@@ -0,0 +1 @@
APPL???? \ No newline at end of file
diff --git a/mac/Emacs.app/Contents/Resources/Emacs.rsrc b/mac/Emacs.app/Contents/Resources/Emacs.rsrc
new file mode 100644
index 00000000000..1a017ac4fe4
--- /dev/null
+++ b/mac/Emacs.app/Contents/Resources/Emacs.rsrc
Binary files differ
diff --git a/mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings b/mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings
new file mode 100644
index 00000000000..b111726765b
--- /dev/null
+++ b/mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings
@@ -0,0 +1,5 @@
1/* Localized versions of Info.plist keys */
2
3CFBundleName = "Emacs";
4CFBundleShortVersionString = "Emacs version 21";
5CFBundleGetInfoString = "Emacs version 21, Copyright 2002 FSF.";
diff --git a/mac/INSTALL b/mac/INSTALL
index ae2916b862d..13c127ccc7f 100644
--- a/mac/INSTALL
+++ b/mac/INSTALL
@@ -1,6 +1,6 @@
1* BUILDING EMACS ON THE MAC OS -*- outline -*- 1* BUILDING EMACS ON MAC OS 8/9 AND MAC OS X -*- outline -*-
2 2
3Copyright (c) 2001 Free Software Foundation, Inc. 3Copyright (c) 2001, 2002 Free Software Foundation, Inc.
4 4
5 Permission is granted to anyone to make or distribute verbatim 5 Permission is granted to anyone to make or distribute verbatim
6 copies of this document as received, in any medium, provided that 6 copies of this document as received, in any medium, provided that
@@ -13,37 +13,123 @@ Copyright (c) 2001 Free Software Foundation, Inc.
13 provided also that they carry prominent notices stating who last 13 provided also that they carry prominent notices stating who last
14 changed them. 14 changed them.
15 15
16You can use either Metrowerks CodeWarrior Pro 5 or 6 or MPW-GM 16* BUILDING EMACS ON MAC OS X
17(Aug. 2000) to build Emacs.
18 17
19You will need MPW-GM to build the make-docfile utility and to generate 18You should be able to build Emacs on Mac OS X by typing the following
20the doc string file DOC. 19commands at the top-level directory after the source distribution is
20un-tarred.
21 21
22To decompress files, you can use MacGzip from 22 ./configure
23 make
24 make install
23 25
24 http://persephone.cps.unizar.es/~spd/gzip 26The last step must be performed as root.
25 27
26and to untar them, you can use tar 4.0 from 28If you have X Window installed, you need to type `./configure
29--without-x' instead of `./configure'.
27 30
28 http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/tar-40b.hqx 31You can type `make bootstrap' instead of `make' to rebuild everything,
32including byte-compiling the Lisp files.
29 33
30(Optional) If you wish to fetch files from the Emacs CVS repository 34If you have not installed the GNU texinfo package on your system, the
31directly to your Mac, you can use the CVS client MacCVS, which can be 35build will complain that makeinfo cannot be found. Instructions for
32downloaded from 36installing the GNU texinfo package are given below. Alternatively,
37you can type `make -k' instead of `make' and safely ignore the error
38messages and use the existing info files.
33 39
34 http://www.wincvs.org/ 40After Emacs is installed, you can run it by typing `emacs -nw' from a
41terminal (make sure your path contains /usr/local/bin) or by
42double-clicking on mac/Emacs.app in the Finder. At present,
43command-line options cannot be passed to Emacs running under the Aqua
44GUI. This should soon be fixed.
35 45
36(Optional) A subset of the fonts from the GNU intlfonts-1.2 46To use colors in a terminal, put the following lines in the file
37distribution converted to NFNT format can be obtained from 47~/.termcap and log in again.
38 48
39 ftp://mac-emacs.sourceforge.net/pub/mac-emacs/GNU-fonts.smi.bin 49-----
50# added ANSI color
51vt100|vt100-am|vt100am|dec vt100:\
52 :pa#64:Co#8:Sf=\E[3%dm:Sb=\E[4%dm:op=\E[m:AF=\E[3%dm:AB=\E[4%dm:\
53 :do=^J:co#80:li#24:cl=\E[;H\E[2J:sf=2*\ED:\
54 :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\
55 :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\
56 :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:\
57 :rf=/usr/share/tabset/vt100:\
58 :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[;r\E[0m\E(B\E)B\E[2J:\
59 :ks=\E[?1h\E=:ke=\E[?1l\E>:\
60 :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
61 :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=2*\EM:vt#3:xn:\
62 :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:
63-----
64
65To build a binary distribution of Emacs for Mac OS X, run the shell
66script make-bin-dist in the `mac' directory. This will create a file
67emacs-21.xx.yy-mac-bin.tar.gz.
68
69To install the binary distribution, untar the file and run the shell
70script osx-install in its top-level directory.
71
72To build the `info' files, you need to install the texinfo software.
73
74To install from source, obtain texinfo-4.2.tar.gz from ftp.gnu.org or
75a mirror. Un-tar it, enter its directory and type
76
77 ./configure
78 make
79 make install
80
81The last step needs to be performed as root.
82
83You may also like to install ispell, which will allow you to use
84ispell and flyspell-mode. To install ispell from source, you first
85need to install GNU textutils.
86
87To do so, download textutils-2.0.tar.gz from ftp.gnu.org or a mirror.
88Un-tar it, enter its directory, type
89
90 ./configure --host=powerpc-apple-bsd
91 make
92 make install
93
94Again, the last step needs to be performed as root. Note that if you
95run `make check', the test for `pr' will fail.
96
97Get and un-tar ispell-3.2.06.tar.gz. Look for it here:
98
99 http://fmg-www.cs.ucla.edu/geoff/ispell.html
100
101Go into its directory, type
40 102
41### IMPORTANT ### If you use StuffIf Expander to decompress and untar 103 cp local.h.samp local.h
42the distribution, you *must* set the radio button in the 104
105Add a line `#define TERMLIB ""' to the end of local.h.
106
107Set the environment variable TMPDIR to an existing directory. For
108example since `/tmp' exists on my machine and I am using `bash', I
109typed
110
111 export TMPDIR=/tmp
112
113Run `make' and `make install', the latter as root.
114
115
116* BUILDING EMACS ON MAC OS 8/9
117
118You can use either Metrowerks CodeWarrior Pro 6 or MPW-GM (Aug. 2001)
119to build Emacs. MPW-GM can be downloaded free of charge from Apple.
120
121In either case, you will need MPW-GM to build the make-docfile utility
122and to generate the doc string file DOC.
123
124### IMPORTANT ### You can use StuffIf Expander to decompress and untar
125the distribution. However, you *must* set the radio button in the
43Preferences->Cross Platform->Convert text files to Macintosh format to 126Preferences->Cross Platform->Convert text files to Macintosh format to
44"Never". Otherwise the compiled Lisp files will be corrupted. 127"Never". Otherwise the compiled Lisp files will be corrupted.
45 128
46* BUILDING EMACS 129(Optional) A subset of the fonts from the GNU intlfonts-1.2
130distribution converted to NFNT format can be obtained from
131
132 ftp://mac-emacs.sourceforge.net/pub/mac-emacs/GNU-fonts.smi.bin
47 133
48To build Emacs in the MPW Shell, simply set the directory to 134To build Emacs in the MPW Shell, simply set the directory to
49...:emacs:mac: and build the target Emacs of the make file 135...:emacs:mac: and build the target Emacs of the make file
@@ -53,13 +139,11 @@ makefile.mpw. I.e., execute the commands
53 Emacs.MakeScript 139 Emacs.MakeScript
54 140
55To build Emacs using CodeWarrior, start up the CodeWarrior IDE, choose 141To build Emacs using CodeWarrior, start up the CodeWarrior IDE, choose
56File->Import Project... and select the file cw5-mcp.xml or 142File->Import Project... and select the file cw6-mcp.xml. When
57cw6-mcp.xml, depending on which verison of CodeWarrior used. When
58prompted to save the project, navigate to same directory as the file 143prompted to save the project, navigate to same directory as the file
59cw[56]-mcp.xml, name it emacs-cw5.mcp or emacs-cw6.mcp, and save it 144cw6-mcp.xml, name the project emacs-cw6.mcp, and save it there. Then
60there. Then choose Project->Make. Note that this does not build the 145choose Project->Make. Note that this does not build the DOC file. To
61DOC file. To do so, use MPW and build the target "Doc" in 146do so, use MPW and build the target "Doc" in makefile.MPW.
62makefile.MPW.
63 147
64Once built, the Emacs application (Emacs CW or Emacs MPW) can be 148Once built, the Emacs application (Emacs CW or Emacs MPW) can be
65launched where it is created. 149launched where it is created.
@@ -70,35 +154,29 @@ dialog. To build a version for profiling, check the Profiler
70Information box in the Emacs Settings->Code Generation->PPC Processor 154Information box in the Emacs Settings->Code Generation->PPC Processor
71dialog and include the Profiler PPC.Lib library. 155dialog and include the Profiler PPC.Lib library.
72 156
73To build optimized or debugging version of Emacs in MPW, follow the
74comment in makefile.MPW to enable the -opt speed or -sym on option
75(see note below).
76
77* NOTES 157* NOTES
78 158
79Emacs should build and run on a PowerMac running Mac OS 8.1 - 9.0. 159Emacs should build and run on a PowerMac running Mac OS 8.6 - 10.1.
80 160
81You will need around 100 MB of disk space for the source files and 161You will need around 100 MB of disk space for the source files and
82intermediate files. 162intermediate files.
83 163
84It will not run on machines with more than 256 MB of physical or 164It will not run on machines running Mac OS 8/9 with more than 256 MB
85virtual memory. 165of physical or virtual memory. It does not have this restriction when
86 166it is run under Mac OS X. But the usual 128MB buffer limit of a
87Currently there is no support for building the LEIM directory on the 16732-bit Emacs still exists.
88Mac. However, it can be built on another platform and transferred to
89the Mac.
90 168
91When Emacs is built with "-opt speed" enabled in makefile.MPW, 169Under Mac OS 8/9, there is no support for building the LEIM directory.
92optimization causes the functions reset_buffer_local_variables in 170However, it can be built on Mac OS X or another platform and
93buffer.c, syms_of_lread in lread.c, and x_draw_hollow_cursor in 171transferred to the Mac.
94macterm.c to crash. Avoid this by enclosing them in the following
95pragmas.
96 172
97 #pragma options opt off 173On Mac OS 8/9, to use the same icon as when Emacs is built on Windows
174NT, define GNU_ICON in mac/src/Emacs.r. Currently Emacs uses a
175generic application icon on the Mac OS X. A better looking one is
176coming soon.
98 177
99 <function definition...>
100 178
101 #pragma options opt reset 179Enjoy!
102 180
103To use the same icon as when Emacs is built on Windows NT, define 181Andrew.
104GNU_ICON in mac/src/Emacs.r. 182<akochoi@mac.com>
diff --git a/mac/README b/mac/README
index a1c51f92543..8d1a26439f4 100644
--- a/mac/README
+++ b/mac/README
@@ -1,6 +1,6 @@
1GNU Emacs for Mac OS 1Emacs for Mac OS 8/9 and Mac OS X
2 2
3Copyright (c) 2001 Free Software Foundation, Inc. 3Copyright (c) 2001, 2002 Free Software Foundation, Inc.
4 4
5 Permission is granted to anyone to make or distribute verbatim 5 Permission is granted to anyone to make or distribute verbatim
6 copies of this document as received, in any medium, provided that 6 copies of this document as received, in any medium, provided that
@@ -13,8 +13,8 @@ Copyright (c) 2001 Free Software Foundation, Inc.
13 provided also that they carry prominent notices stating who last 13 provided also that they carry prominent notices stating who last
14 changed them. 14 changed them.
15 15
16This directory contains the files needed to build GNU Emacs on the Mac 16This directory contains the files needed to build Emacs on the Mac OS
17OS (8.1-9.0). Many of the major features of the Unix version are 178/9 and Mac OS X. Many of the major features of the Unix version are
18supported: multiple frames, colors, scroll bars, menu bars, use of the 18supported: multiple frames, colors, scroll bars, menu bars, use of the
19mouse, fontsets, international characters, input methods, and coding 19mouse, fontsets, international characters, input methods, and coding
20systems. 20systems.
@@ -23,24 +23,42 @@ Mac OS specific support includes document drag-and-drop in the Finder,
23transfer of text to and from other applications via the clipboard, and 23transfer of text to and from other applications via the clipboard, and
24sending AppleScript commands to other applications from Emacs. 24sending AppleScript commands to other applications from Emacs.
25 25
26The following are not yet supported: unexec (dump-emacs), asynchronous 26The following are not supported on Mac OS 8/9 : unexec (dump-emacs),
27subprocesses (start-process), and networking 27asynchronous subprocesses (start-process), and networking
28(open-network-stream). 28(open-network-stream). These features work fine on Mac OS X.
29 29
30There is basic support for synchronous subprocesses (call-process) 30There is basic support for synchronous subprocesses (call-process) on
31although Unix commands that are used will need to be ported to the 31Mac OS 8/9 although Unix commands that are used will need to be
32Mac. 32ported.
33 33
34Metrowerks CodeWarrior Pro 5 or Pro 6 or MPW-GM (August 2000) can be 34Metrowerks CodeWarrior Pro 6 or MPW-GM (August 2001) can be used to
35used to build Emacs on the Mac OS. See the INSTALL file in this 35build Emacs on the Mac OS 8/9. On Mac OS X, Emacs can be built using
36directory for instructions on building Emacs. 36the Developer Tools. See the INSTALL file in this directory for
37instructions on building Emacs.
37 38
38Binary distributions are available in 39Binary distributions will be available in
39 40
40 ftp://ftp.gnu.org/gnu/mac/emacs/ 41 ftp://ftp.gnu.org/gnu/mac/emacs/
41 42
42At this site you can also find an FAQ related to running GNU Emacs on 43Read the Mac OS section of the on-line help to find out about how to
43Mac OS. 44use Emacs on the Mac.
45
46A number of things do not work yet:
47
48+ On Mac OS X, environment variables are not set up correctly when
49 Emacs is started from the Finder.
50
51+ Emacs does not respond correctly to C-g when it is not reading
52 input.
53
54+ No image support yet.
55
56+ There is no mouse-2 and mouse-3 emulation yet.
57
58If your Mac is connected to the Internet, report bugs by typing `M-x
59report-emacs-bug' or by choosing the entry `Send Bug Report...' in
60the `Help' menu. This will send the bug report to the address
61emacs-pretest-bug@gnu.org.
44 62
45Andrew. 63Andrew.
46<akochoi@i-cable.com> 64<akochoi@mac.com>
diff --git a/mac/cw5-mcp.xml b/mac/cw5-mcp.xml
deleted file mode 100644
index 42cb8746778..00000000000
--- a/mac/cw5-mcp.xml
+++ /dev/null
@@ -1,2084 +0,0 @@
1<!--
2Copyright (C) 2001 Free Software Foundation, Inc.
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software; you can redistribute it and/or modify it
7under the terms of the GNU General Public License as published by the
8Free Software Foundation; either version 2, or (at your option) any
9later version.
10
11GNU Emacs is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to the Free
18Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1902111-1307, USA.
20
21
22Contributed by Andrew Choi (akochoi@i-cable.com).
23
24Exported from the emacs-cw5.mcp project in Metrowerks CodeWarrior Pro
255 for distribution. This copyright notice was then added by hand.
26Choose the command File->Import Project... to recreate the
27emacs-cw5.mcp project.
28
29-->
30
31<?xml version="1.0"?>
32<?codewarrior exportversion="1.0" ideversion="4.0"?>
33<!DOCTYPE PROJECT [
34
35<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>
36<!ELEMENT TARGETLIST (TARGET+)>
37<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?)>
38<!ELEMENT NAME (#PCDATA)>
39<!ELEMENT USERSOURCETREETYPE (#PCDATA)>
40<!ELEMENT PATH (#PCDATA)>
41<!ELEMENT FILELIST (FILE*)>
42<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>
43<!ELEMENT PATHTYPE (#PCDATA)>
44<!ELEMENT PATHROOT (#PCDATA)>
45<!ELEMENT ACCESSPATH (#PCDATA)>
46<!ELEMENT PATHFORMAT (#PCDATA)>
47<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>
48<!ELEMENT FILEKIND (#PCDATA)>
49<!ELEMENT FILEFLAGS (#PCDATA)>
50<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>
51<!ELEMENT TARGETNAME (#PCDATA)>
52<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>
53<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>
54<!ELEMENT PANELDATA (NAME, VALUE)>
55<!ELEMENT VALUE (#PCDATA)>
56<!ELEMENT LINKORDER (FILEREF*)>
57<!ELEMENT SEGMENTLIST (SEGMENT+)>
58<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>
59<!ELEMENT ATTRIBUTES (#PCDATA)>
60<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>
61<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>
62<!ELEMENT BASEADDRESS (#PCDATA)>
63<!ELEMENT OVERLAY (NAME, FILEREF*)>
64<!ELEMENT SUBTARGETLIST (SUBTARGET+)>
65<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?)>
66<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>
67<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>
68<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>
69<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?)>
70<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>
71<!ELEMENT ORDEREDTARGET (NAME)>
72<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>
73<!ELEMENT GROUPLIST (GROUP|FILEREF)*>
74<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>
75<!ELEMENT DESIGNLIST (DESIGN+)>
76<!ELEMENT DESIGN (NAME, DESIGNDATA)>
77<!ELEMENT DESIGNDATA (#PCDATA)>
78]>
79<PROJECT>
80 <TARGETLIST>
81 <TARGET>
82 <NAME>Emacs</NAME>
83 <SETTINGLIST>
84
85 <!-- Settings for "Source Trees" panel -->
86 <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>
87
88 <!-- Settings for "Custom Keywords" panel -->
89 <SETTING><NAME>CustomColor1</NAME>
90 <SETTING><NAME>Red</NAME><VALUE>6168</VALUE></SETTING>
91 <SETTING><NAME>Green</NAME><VALUE>24672</VALUE></SETTING>
92 <SETTING><NAME>Blue</NAME><VALUE>23130</VALUE></SETTING>
93 </SETTING>
94 <SETTING><NAME>CustomColor2</NAME>
95 <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>
96 <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>
97 <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>
98 </SETTING>
99 <SETTING><NAME>CustomColor3</NAME>
100 <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>
101 <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>
102 <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>
103 </SETTING>
104 <SETTING><NAME>CustomColor4</NAME>
105 <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>
106 <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>
107 <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>
108 </SETTING>
109 <SETTING><NAME>CustomKeywordList1</NAME><VALUE>DEFUN</VALUE></SETTING>
110
111 <!-- Settings for "Access Paths" panel -->
112 <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>true</VALUE></SETTING>
113 <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>true</VALUE></SETTING>
114 <SETTING><NAME>UserSearchPaths</NAME>
115 <SETTING>
116 <SETTING><NAME>SearchPath</NAME>
117 <SETTING><NAME>Path</NAME><VALUE>:inc:</VALUE></SETTING>
118 <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
119 <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
120 </SETTING>
121 <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
122 <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
123 </SETTING>
124 <SETTING>
125 <SETTING><NAME>SearchPath</NAME>
126 <SETTING><NAME>Path</NAME><VALUE>:src:</VALUE></SETTING>
127 <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
128 <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
129 </SETTING>
130 <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
131 <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
132 </SETTING>
133 <SETTING>
134 <SETTING><NAME>SearchPath</NAME>
135 <SETTING><NAME>Path</NAME><VALUE>::src:</VALUE></SETTING>
136 <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
137 <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
138 </SETTING>
139 <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
140 <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
141 </SETTING>
142 </SETTING>
143 <SETTING><NAME>SystemSearchPaths</NAME>
144 <SETTING>
145 <SETTING><NAME>SearchPath</NAME>
146 <SETTING><NAME>Path</NAME><VALUE>:inc:</VALUE></SETTING>
147 <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
148 <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
149 </SETTING>
150 <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
151 <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
152 </SETTING>
153 <SETTING>
154 <SETTING><NAME>SearchPath</NAME>
155 <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
156 <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
157 <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>
158 </SETTING>
159 <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
160 <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
161 </SETTING>
162 </SETTING>
163
164 <!-- Settings for "Target Settings" panel -->
165 <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>
166 <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>
167 <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>
168 <SETTING><NAME>Targetname</NAME><VALUE>Emacs</VALUE></SETTING>
169 <SETTING><NAME>OutputDirectory</NAME>
170 <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
171 <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
172 <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
173 </SETTING>
174 <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>
175
176 <!-- Settings for "File Mappings" panel -->
177 <SETTING><NAME>FileMappings</NAME>
178 <SETTING>
179 <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>
180 <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
181 <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
182 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
183 <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
184 <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
185 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
186 </SETTING>
187 <SETTING>
188 <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>
189 <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
190 <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
191 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
192 <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
193 <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
194 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
195 </SETTING>
196 <SETTING>
197 <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>
198 <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
199 <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>
200 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
201 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
202 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
203 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
204 </SETTING>
205 <SETTING>
206 <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>
207 <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
208 <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>
209 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
210 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
211 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
212 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
213 </SETTING>
214 <SETTING>
215 <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>
216 <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
217 <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
218 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
219 <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
220 <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
221 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
222 </SETTING>
223 <SETTING>
224 <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>
225 <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
226 <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
227 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
228 <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
229 <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
230 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
231 </SETTING>
232 <SETTING>
233 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
234 <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>
235 <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>
236 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
237 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
238 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
239 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
240 </SETTING>
241 <SETTING>
242 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
243 <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>
244 <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
245 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
246 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
247 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
248 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
249 </SETTING>
250 <SETTING>
251 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
252 <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>
253 <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
254 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
255 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
256 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
257 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
258 </SETTING>
259 <SETTING>
260 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
261 <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>
262 <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
263 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
264 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
265 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
266 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
267 </SETTING>
268 <SETTING>
269 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
270 <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>
271 <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
272 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
273 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
274 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
275 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
276 </SETTING>
277 <SETTING>
278 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
279 <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>
280 <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
281 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
282 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
283 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
284 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
285 </SETTING>
286 <SETTING>
287 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
288 <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>
289 <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
290 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
291 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
292 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
293 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
294 </SETTING>
295 <SETTING>
296 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
297 <SETTING><NAME>FileExtension</NAME><VALUE>.gc</VALUE></SETTING>
298 <SETTING><NAME>Compiler</NAME><VALUE>GameCode Converter</VALUE></SETTING>
299 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
300 <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
301 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
302 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
303 </SETTING>
304 <SETTING>
305 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
306 <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>
307 <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
308 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
309 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
310 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
311 <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>
312 </SETTING>
313 <SETTING>
314 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
315 <SETTING><NAME>FileExtension</NAME><VALUE>.l</VALUE></SETTING>
316 <SETTING><NAME>Compiler</NAME><VALUE>Flex Preprocessor</VALUE></SETTING>
317 <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>
318 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
319 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
320 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
321 </SETTING>
322 <SETTING>
323 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
324 <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>
325 <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>
326 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
327 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
328 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
329 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
330 </SETTING>
331 <SETTING>
332 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
333 <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>
334 <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>
335 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
336 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
337 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
338 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
339 </SETTING>
340 <SETTING>
341 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
342 <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>
343 <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
344 <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>
345 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
346 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
347 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
348 </SETTING>
349 <SETTING>
350 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
351 <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>
352 <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
353 <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>
354 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
355 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
356 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
357 </SETTING>
358 <SETTING>
359 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
360 <SETTING><NAME>FileExtension</NAME><VALUE>.ppu</VALUE></SETTING>
361 <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>
362 <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>
363 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
364 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
365 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
366 </SETTING>
367 <SETTING>
368 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
369 <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>
370 <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>
371 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
372 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
373 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
374 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
375 </SETTING>
376 <SETTING>
377 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
378 <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>
379 <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>
380 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
381 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
382 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
383 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
384 </SETTING>
385 <SETTING>
386 <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
387 <SETTING><NAME>FileExtension</NAME><VALUE>.y</VALUE></SETTING>
388 <SETTING><NAME>Compiler</NAME><VALUE>Bison Preprocessor</VALUE></SETTING>
389 <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>
390 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
391 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
392 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
393 </SETTING>
394 <SETTING>
395 <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>
396 <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
397 <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>
398 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
399 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
400 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
401 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
402 </SETTING>
403 <SETTING>
404 <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>
405 <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
406 <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
407 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
408 <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
409 <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
410 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
411 </SETTING>
412 <SETTING>
413 <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>
414 <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
415 <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
416 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
417 <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
418 <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
419 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
420 </SETTING>
421 <SETTING>
422 <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>
423 <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
424 <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>
425 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
426 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
427 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
428 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
429 </SETTING>
430 <SETTING>
431 <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>
432 <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
433 <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>
434 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
435 <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
436 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
437 <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
438 </SETTING>
439 <SETTING>
440 <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>
441 <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
442 <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
443 <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
444 <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
445 <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>
446 </SETTING>
447 </SETTING>
448
449 <!-- Settings for "Build Extras" panel -->
450 <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>
451 <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING>
452 <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>
453 <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>
454 <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>
455 <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>
456 <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>
457 0002000000000000000000000000000000000000000000000000000000000000
458 0000000000000000000000000000000000000000000000000000000000000000
459 0000000000000000000000000000000000000000000000000000000000000000
460 0000000000000000000000000000000000000000000000000000000000000000
461 0000000000000000000000000000000000000000000000000000000000000000
462 0000000000000000000000000000000000000000000000000000000000000000
463 0000000000000000000000000000000000000000000000000000000000000000
464 0000000000000000000000000000000000000000000000000000000000000000
465 0000000000000000000000000000000000000000000000000000000000000000
466 0000000000000000000000000000000000000000000000000000000000000000
467 0000000000000000000000000000000000000000000000000000000000000000
468 0000000000000000000000000000000000000000000000000000000000000000
469 0000000000000000000000000000000000000000000000000000000000000000
470 0000000000000000000000000000000000000000000000000000000000000000
471 0000000000000000000000000000000000000000000000000000000000000000
472 0000000000000000000000000000000000000000000000000000000000000000
473 0000000000000000000000000000000000000000000000000000000000000000
474 0000000000000000000000000000000000000000000000000000000000000000
475 0000000000000000000000000000000000000000000000000000000000000000
476 0000000000000000000000000000000000000000000000000000000000000000
477 0000000000000000000000000000000000000000000000000000000000000000
478 0000000000000000000000000000000000000000000000000000000000000000
479 0000000000000000000000000000000000000000000000000000000000000000
480 0000000000000000000000000000000000000000000000000000000000000000
481 0000000000000000000000000000000000000000000000000000000000000000
482 0000000000000000000000000000000000000000000000000000000000000000
483 0000000000000000000000000000000000000000000000000000000000000000
484 0000000000000000000000000000000000000000000000000000000000000000
485 0000000000000000000000000000000000000000000000000000000000000000
486 0000000000000000000000000000000000000000000000000000000000000000
487 0000000000000000000000000000000000000000000000000000000000000000
488 0000000000000000000000000000000000000000000000000000000000000000
489 0000000000000000000000000000000006315C40000000000000010006316550
490 000200000000000000000000063153E000000000000000000000000000000000
491 0000000000000000000000000000000000000000000000000000000000000000
492 0000000000000000000000000000000000000000000000000000000000000000
493 0000000000000000000000000000000000000000000000000000000000000000
494 0000000000000000000000000000000000000000000000000000000000000000
495 0000000000000000000000000000000000000000000000000000000000000000
496 0000000000000000000000000000000000000000000000000000000000000000
497 00000000000000000000000000000000
498 </VALUE></PANELDATA>
499
500 <!-- Settings for "Debugger Target" panel -->
501 <SETTING><NAME>LogSystemMessages</NAME><VALUE>false</VALUE></SETTING>
502 <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>
503 <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>
504 <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>
505 <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>
506 <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>
507 <SETTING><NAME>AltExePath</NAME>
508 <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>
509 <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>
510 <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>
511 </SETTING>
512 <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>
513 <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>
514 <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>
515 <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>
516
517 <!-- Settings for "68K CodeGen" panel -->
518 <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>
519 <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>
520 <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>
521 <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>
522 <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>
523 <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>
524 <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>1</VALUE></SETTING>
525 <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>1</VALUE></SETTING>
526 <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>1</VALUE></SETTING>
527 <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>1</VALUE></SETTING>
528 <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>1</VALUE></SETTING>
529 <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>
530 <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>
531 <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>
532
533 <!-- Settings for "68K Disassembler" panel -->
534 <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>
535 <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>
536 <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>
537 <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>
538 <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>
539 <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>
540 <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>
541
542 <!-- Settings for "68K Global Optimizer" panel -->
543 <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>
544 <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>
545
546 <!-- Settings for "68K Linker" panel -->
547 <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>
548 <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>
549 <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>
550 <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>
551 <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>
552 <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>
553 <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>
554 <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>
555
556 <!-- Settings for "68K Project" panel -->
557 <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>
558 <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>MacOS Toolbox DEBUG 68K</VALUE></SETTING>
559 <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>
560 <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>
561 <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>
562 <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>
563 <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22720</VALUE></SETTING>
564 <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>
565 <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>
566 <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>
567 <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>
568 <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>
569 <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>
570 <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>
571 <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>
572 <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>
573 <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>
574 <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>
575 <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>
576 <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>
577 <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>
578 <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>
579 <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>
580 <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>
581 <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>
582
583 <!-- Settings for "C/C++ Compiler" panel -->
584 <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>
585 <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING>
586 <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>
587 <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>
588 <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>
589 <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>
590 <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>1</VALUE></SETTING>
591 <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>defs-cw5.h</VALUE></SETTING>
592 <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>
593 <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>
594 <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>0</VALUE></SETTING>
595 <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>
596 <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>
597 <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>
598 <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>
599 <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>
600 <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>
601 <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>
602 <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>
603 <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>
604 <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>
605 <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>
606 <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>
607 <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>
608 <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>
609 <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>
610 <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>
611
612 <!-- Settings for "C/C++ Warnings" panel -->
613 <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>
614 <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>
615 <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>
616 <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>0</VALUE></SETTING>
617 <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>
618 <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>
619 <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING>
620 <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>
621 <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING>
622 <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>
623 <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>
624 <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>
625
626 <!-- Settings for "CFM68K" panel -->
627 <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>
628 <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>
629 <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>
630 <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>
631 <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>
632 <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>
633 <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>
634 <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>
635 <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>
636 <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>
637 <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>
638 <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>
639
640 <!-- Settings for "MacOS Merge Panel" panel -->
641 <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>
642 <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>
643 <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>
644 <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>
645 <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>
646 <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>
647 <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>
648 <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>
649 <SETTING><VALUE></VALUE></SETTING>
650 <SETTING><VALUE>ªZƒ</VALUE></SETTING>
651 <SETTING><VALUE>~—¯</VALUE></SETTING>
652 <SETTING><VALUE>
653|0</VALUE></SETTING>
654 </SETTING>
655
656 <!-- Settings for "PPC CodeGen" panel -->
657 <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>
658 <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>Inline</VALUE></SETTING>
659 <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING>
660 <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>
661 <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>
662 <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>
663 <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>
664 <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING>
665 <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING>
666 <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING>
667 <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>
668 <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>0</VALUE></SETTING>
669 <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>0</VALUE></SETTING>
670
671 <!-- Settings for "PPC Disassembler" panel -->
672 <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>
673 <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>
674 <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>
675 <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>
676 <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>
677 <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>
678 <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>
679 <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>
680
681 <!-- Settings for "PPC Global Optimizer" panel -->
682 <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>
683 <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>
684
685 <!-- Settings for "PPC Linker" panel -->
686 <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>
687 <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>
688 <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>1</VALUE></SETTING>
689 <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>
690 <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>
691 <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>
692 <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING>
693 <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>
694 <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE>__start</VALUE></SETTING>
695 <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>
696
697 <!-- Settings for "PPC PEF" panel -->
698 <SETTING><NAME>MWPEF_exports</NAME><VALUE>None</VALUE></SETTING>
699 <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>
700 <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>
701 <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>
702 <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>
703 <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>
704 <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>
705 <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>
706 <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>
707 <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING>
708
709 <!-- Settings for "PPC Project" panel -->
710 <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Application</VALUE></SETTING>
711 <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>Emacs CW</VALUE></SETTING>
712 <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1162690936</VALUE></SETTING>
713 <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1095782476</VALUE></SETTING>
714 <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>16384</VALUE></SETTING>
715 <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>16384</VALUE></SETTING>
716 <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>512</VALUE></SETTING>
717 <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>22752</VALUE></SETTING>
718 <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>
719 <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>
720 <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>
721 <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>
722 <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>
723 <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>
724 <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>
725 <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>
726
727 <!-- Settings for "PPCAsm Panel" panel -->
728 <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>
729 <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>
730 <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>
731 <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>
732 <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>
733 <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>
734 <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>
735
736 <!-- Settings for "Rez Compiler" panel -->
737 <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>
738 <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>
739 <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>
740 <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>
741 <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>
742 <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>
743 <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>
744 <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>
745 </SETTINGLIST>
746 <FILELIST>
747 <FILE>
748 <PATHTYPE>Name</PATHTYPE>
749 <PATH>InterfaceLib</PATH>
750 <PATHFORMAT>MacOS</PATHFORMAT>
751 <FILEKIND>Library</FILEKIND>
752 <FILEFLAGS></FILEFLAGS>
753 </FILE>
754 <FILE>
755 <PATHTYPE>Name</PATHTYPE>
756 <PATH>MathLib</PATH>
757 <PATHFORMAT>MacOS</PATHFORMAT>
758 <FILEKIND>Library</FILEKIND>
759 <FILEFLAGS></FILEFLAGS>
760 </FILE>
761 <FILE>
762 <PATHTYPE>Name</PATHTYPE>
763 <PATH>MSL RuntimePPC.Lib</PATH>
764 <PATHFORMAT>MacOS</PATHFORMAT>
765 <FILEKIND>Library</FILEKIND>
766 <FILEFLAGS></FILEFLAGS>
767 </FILE>
768 <FILE>
769 <PATHTYPE>Name</PATHTYPE>
770 <PATH>emacs.c</PATH>
771 <PATHFORMAT>MacOS</PATHFORMAT>
772 <FILEKIND>Text</FILEKIND>
773 <FILEFLAGS>Debug</FILEFLAGS>
774 </FILE>
775 <FILE>
776 <PATHTYPE>Name</PATHTYPE>
777 <PATH>process.c</PATH>
778 <PATHFORMAT>MacOS</PATHFORMAT>
779 <FILEKIND>Text</FILEKIND>
780 <FILEFLAGS>Debug</FILEFLAGS>
781 </FILE>
782 <FILE>
783 <PATHTYPE>Name</PATHTYPE>
784 <PATH>floatfns.c</PATH>
785 <PATHFORMAT>MacOS</PATHFORMAT>
786 <FILEKIND>Text</FILEKIND>
787 <FILEFLAGS>Debug</FILEFLAGS>
788 </FILE>
789 <FILE>
790 <PATHTYPE>Name</PATHTYPE>
791 <PATH>editfns.c</PATH>
792 <PATHFORMAT>MacOS</PATHFORMAT>
793 <FILEKIND>Text</FILEKIND>
794 <FILEFLAGS>Debug</FILEFLAGS>
795 </FILE>
796 <FILE>
797 <PATHTYPE>Name</PATHTYPE>
798 <PATH>macros.c</PATH>
799 <PATHFORMAT>MacOS</PATHFORMAT>
800 <FILEKIND>Text</FILEKIND>
801 <FILEFLAGS>Debug</FILEFLAGS>
802 </FILE>
803 <FILE>
804 <PATHTYPE>Name</PATHTYPE>
805 <PATH>xdisp.c</PATH>
806 <PATHFORMAT>MacOS</PATHFORMAT>
807 <FILEKIND>Text</FILEKIND>
808 <FILEFLAGS>Debug</FILEFLAGS>
809 </FILE>
810 <FILE>
811 <PATHTYPE>Name</PATHTYPE>
812 <PATH>window.c</PATH>
813 <PATHFORMAT>MacOS</PATHFORMAT>
814 <FILEKIND>Text</FILEKIND>
815 <FILEFLAGS>Debug</FILEFLAGS>
816 </FILE>
817 <FILE>
818 <PATHTYPE>Name</PATHTYPE>
819 <PATH>minibuf.c</PATH>
820 <PATHFORMAT>MacOS</PATHFORMAT>
821 <FILEKIND>Text</FILEKIND>
822 <FILEFLAGS>Debug</FILEFLAGS>
823 </FILE>
824 <FILE>
825 <PATHTYPE>Name</PATHTYPE>
826 <PATH>keymap.c</PATH>
827 <PATHFORMAT>MacOS</PATHFORMAT>
828 <FILEKIND>Text</FILEKIND>
829 <FILEFLAGS>Debug</FILEFLAGS>
830 </FILE>
831 <FILE>
832 <PATHTYPE>Name</PATHTYPE>
833 <PATH>buffer.c</PATH>
834 <PATHFORMAT>MacOS</PATHFORMAT>
835 <FILEKIND>Text</FILEKIND>
836 <FILEFLAGS>Debug</FILEFLAGS>
837 </FILE>
838 <FILE>
839 <PATHTYPE>Name</PATHTYPE>
840 <PATH>cmds.c</PATH>
841 <PATHFORMAT>MacOS</PATHFORMAT>
842 <FILEKIND>Text</FILEKIND>
843 <FILEFLAGS>Debug</FILEFLAGS>
844 </FILE>
845 <FILE>
846 <PATHTYPE>Name</PATHTYPE>
847 <PATH>casefiddle.c</PATH>
848 <PATHFORMAT>MacOS</PATHFORMAT>
849 <FILEKIND>Text</FILEKIND>
850 <FILEFLAGS>Debug</FILEFLAGS>
851 </FILE>
852 <FILE>
853 <PATHTYPE>Name</PATHTYPE>
854 <PATH>textprop.c</PATH>
855 <PATHFORMAT>MacOS</PATHFORMAT>
856 <FILEKIND>Text</FILEKIND>
857 <FILEFLAGS>Debug</FILEFLAGS>
858 </FILE>
859 <FILE>
860 <PATHTYPE>Name</PATHTYPE>
861 <PATH>undo.c</PATH>
862 <PATHFORMAT>MacOS</PATHFORMAT>
863 <FILEKIND>Text</FILEKIND>
864 <FILEFLAGS>Debug</FILEFLAGS>
865 </FILE>
866 <FILE>
867 <PATHTYPE>Name</PATHTYPE>
868 <PATH>syntax.c</PATH>
869 <PATHFORMAT>MacOS</PATHFORMAT>
870 <FILEKIND>Text</FILEKIND>
871 <FILEFLAGS>Debug</FILEFLAGS>
872 </FILE>
873 <FILE>
874 <PATHTYPE>Name</PATHTYPE>
875 <PATH>search.c</PATH>
876 <PATHFORMAT>MacOS</PATHFORMAT>
877 <FILEKIND>Text</FILEKIND>
878 <FILEFLAGS>Debug</FILEFLAGS>
879 </FILE>
880 <FILE>
881 <PATHTYPE>Name</PATHTYPE>
882 <PATH>marker.c</PATH>
883 <PATHFORMAT>MacOS</PATHFORMAT>
884 <FILEKIND>Text</FILEKIND>
885 <FILEFLAGS>Debug</FILEFLAGS>
886 </FILE>
887 <FILE>
888 <PATHTYPE>Name</PATHTYPE>
889 <PATH>insdel.c</PATH>
890 <PATHFORMAT>MacOS</PATHFORMAT>
891 <FILEKIND>Text</FILEKIND>
892 <FILEFLAGS>Debug</FILEFLAGS>
893 </FILE>
894 <FILE>
895 <PATHTYPE>Name</PATHTYPE>
896 <PATH>indent.c</PATH>
897 <PATHFORMAT>MacOS</PATHFORMAT>
898 <FILEKIND>Text</FILEKIND>
899 <FILEFLAGS>Debug</FILEFLAGS>
900 </FILE>
901 <FILE>
902 <PATHTYPE>Name</PATHTYPE>
903 <PATH>coding.c</PATH>
904 <PATHFORMAT>MacOS</PATHFORMAT>
905 <FILEKIND>Text</FILEKIND>
906 <FILEFLAGS>Debug</FILEFLAGS>
907 </FILE>
908 <FILE>
909 <PATHTYPE>Name</PATHTYPE>
910 <PATH>fileio.c</PATH>
911 <PATHFORMAT>MacOS</PATHFORMAT>
912 <FILEKIND>Text</FILEKIND>
913 <FILEFLAGS>Debug</FILEFLAGS>
914 </FILE>
915 <FILE>
916 <PATHTYPE>Name</PATHTYPE>
917 <PATH>alloc.c</PATH>
918 <PATHFORMAT>MacOS</PATHFORMAT>
919 <FILEKIND>Text</FILEKIND>
920 <FILEFLAGS>Debug</FILEFLAGS>
921 </FILE>
922 <FILE>
923 <PATHTYPE>Name</PATHTYPE>
924 <PATH>fns.c</PATH>
925 <PATHFORMAT>MacOS</PATHFORMAT>
926 <FILEKIND>Text</FILEKIND>
927 <FILEFLAGS>Debug</FILEFLAGS>
928 </FILE>
929 <FILE>
930 <PATHTYPE>Name</PATHTYPE>
931 <PATH>eval.c</PATH>
932 <PATHFORMAT>MacOS</PATHFORMAT>
933 <FILEKIND>Text</FILEKIND>
934 <FILEFLAGS>Debug</FILEFLAGS>
935 </FILE>
936 <FILE>
937 <PATHTYPE>Name</PATHTYPE>
938 <PATH>doc.c</PATH>
939 <PATHFORMAT>MacOS</PATHFORMAT>
940 <FILEKIND>Text</FILEKIND>
941 <FILEFLAGS>Debug</FILEFLAGS>
942 </FILE>
943 <FILE>
944 <PATHTYPE>Name</PATHTYPE>
945 <PATH>dired.c</PATH>
946 <PATHFORMAT>MacOS</PATHFORMAT>
947 <FILEKIND>Text</FILEKIND>
948 <FILEFLAGS>Debug</FILEFLAGS>
949 </FILE>
950 <FILE>
951 <PATHTYPE>Name</PATHTYPE>
952 <PATH>charset.c</PATH>
953 <PATHFORMAT>MacOS</PATHFORMAT>
954 <FILEKIND>Text</FILEKIND>
955 <FILEFLAGS>Debug</FILEFLAGS>
956 </FILE>
957 <FILE>
958 <PATHTYPE>Name</PATHTYPE>
959 <PATH>ccl.c</PATH>
960 <PATHFORMAT>MacOS</PATHFORMAT>
961 <FILEKIND>Text</FILEKIND>
962 <FILEFLAGS>Debug</FILEFLAGS>
963 </FILE>
964 <FILE>
965 <PATHTYPE>Name</PATHTYPE>
966 <PATH>category.c</PATH>
967 <PATHFORMAT>MacOS</PATHFORMAT>
968 <FILEKIND>Text</FILEKIND>
969 <FILEFLAGS>Debug</FILEFLAGS>
970 </FILE>
971 <FILE>
972 <PATHTYPE>Name</PATHTYPE>
973 <PATH>callproc.c</PATH>
974 <PATHFORMAT>MacOS</PATHFORMAT>
975 <FILEKIND>Text</FILEKIND>
976 <FILEFLAGS>Debug</FILEFLAGS>
977 </FILE>
978 <FILE>
979 <PATHTYPE>Name</PATHTYPE>
980 <PATH>casetab.c</PATH>
981 <PATHFORMAT>MacOS</PATHFORMAT>
982 <FILEKIND>Text</FILEKIND>
983 <FILEFLAGS>Debug</FILEFLAGS>
984 </FILE>
985 <FILE>
986 <PATHTYPE>Name</PATHTYPE>
987 <PATH>callint.c</PATH>
988 <PATHFORMAT>MacOS</PATHFORMAT>
989 <FILEKIND>Text</FILEKIND>
990 <FILEFLAGS>Debug</FILEFLAGS>
991 </FILE>
992 <FILE>
993 <PATHTYPE>Name</PATHTYPE>
994 <PATH>bytecode.c</PATH>
995 <PATHFORMAT>MacOS</PATHFORMAT>
996 <FILEKIND>Text</FILEKIND>
997 <FILEFLAGS>Debug</FILEFLAGS>
998 </FILE>
999 <FILE>
1000 <PATHTYPE>Name</PATHTYPE>
1001 <PATH>abbrev.c</PATH>
1002 <PATHFORMAT>MacOS</PATHFORMAT>
1003 <FILEKIND>Text</FILEKIND>
1004 <FILEFLAGS>Debug</FILEFLAGS>
1005 </FILE>
1006 <FILE>
1007 <PATHTYPE>Name</PATHTYPE>
1008 <PATH>print.c</PATH>
1009 <PATHFORMAT>MacOS</PATHFORMAT>
1010 <FILEKIND>Text</FILEKIND>
1011 <FILEFLAGS>Debug</FILEFLAGS>
1012 </FILE>
1013 <FILE>
1014 <PATHTYPE>Name</PATHTYPE>
1015 <PATH>data.c</PATH>
1016 <PATHFORMAT>MacOS</PATHFORMAT>
1017 <FILEKIND>Text</FILEKIND>
1018 <FILEFLAGS>Debug</FILEFLAGS>
1019 </FILE>
1020 <FILE>
1021 <PATHTYPE>Name</PATHTYPE>
1022 <PATH>intervals.c</PATH>
1023 <PATHFORMAT>MacOS</PATHFORMAT>
1024 <FILEKIND>Text</FILEKIND>
1025 <FILEFLAGS>Debug</FILEFLAGS>
1026 </FILE>
1027 <FILE>
1028 <PATHTYPE>Name</PATHTYPE>
1029 <PATH>regex.c</PATH>
1030 <PATHFORMAT>MacOS</PATHFORMAT>
1031 <FILEKIND>Text</FILEKIND>
1032 <FILEFLAGS>Debug</FILEFLAGS>
1033 </FILE>
1034 <FILE>
1035 <PATHTYPE>Name</PATHTYPE>
1036 <PATH>mktime.c</PATH>
1037 <PATHFORMAT>MacOS</PATHFORMAT>
1038 <FILEKIND>Text</FILEKIND>
1039 <FILEFLAGS>Debug</FILEFLAGS>
1040 </FILE>
1041 <FILE>
1042 <PATHTYPE>Name</PATHTYPE>
1043 <PATH>filemode.c</PATH>
1044 <PATHFORMAT>MacOS</PATHFORMAT>
1045 <FILEKIND>Text</FILEKIND>
1046 <FILEFLAGS>Debug</FILEFLAGS>
1047 </FILE>
1048 <FILE>
1049 <PATHTYPE>Name</PATHTYPE>
1050 <PATH>getloadavg.c</PATH>
1051 <PATHFORMAT>MacOS</PATHFORMAT>
1052 <FILEKIND>Text</FILEKIND>
1053 <FILEFLAGS>Debug</FILEFLAGS>
1054 </FILE>
1055 <FILE>
1056 <PATHTYPE>Name</PATHTYPE>
1057 <PATH>scroll.c</PATH>
1058 <PATHFORMAT>MacOS</PATHFORMAT>
1059 <FILEKIND>Text</FILEKIND>
1060 <FILEFLAGS>Debug</FILEFLAGS>
1061 </FILE>
1062 <FILE>
1063 <PATHTYPE>Name</PATHTYPE>
1064 <PATH>region-cache.c</PATH>
1065 <PATHFORMAT>MacOS</PATHFORMAT>
1066 <FILEKIND>Text</FILEKIND>
1067 <FILEFLAGS>Debug</FILEFLAGS>
1068 </FILE>
1069 <FILE>
1070 <PATHTYPE>Name</PATHTYPE>
1071 <PATH>doprnt.c</PATH>
1072 <PATHFORMAT>MacOS</PATHFORMAT>
1073 <FILEKIND>Text</FILEKIND>
1074 <FILEFLAGS>Debug</FILEFLAGS>
1075 </FILE>
1076 <FILE>
1077 <PATHTYPE>Name</PATHTYPE>
1078 <PATH>cm.c</PATH>
1079 <PATHFORMAT>MacOS</PATHFORMAT>
1080 <FILEKIND>Text</FILEKIND>
1081 <FILEFLAGS>Debug</FILEFLAGS>
1082 </FILE>
1083 <FILE>
1084 <PATHTYPE>Name</PATHTYPE>
1085 <PATH>termcap.c</PATH>
1086 <PATHFORMAT>MacOS</PATHFORMAT>
1087 <FILEKIND>Text</FILEKIND>
1088 <FILEFLAGS>Debug</FILEFLAGS>
1089 </FILE>
1090 <FILE>
1091 <PATHTYPE>Name</PATHTYPE>
1092 <PATH>tparam.c</PATH>
1093 <PATHFORMAT>MacOS</PATHFORMAT>
1094 <FILEKIND>Text</FILEKIND>
1095 <FILEFLAGS>Debug</FILEFLAGS>
1096 </FILE>
1097 <FILE>
1098 <PATHTYPE>Name</PATHTYPE>
1099 <PATH>sysdep.c</PATH>
1100 <PATHFORMAT>MacOS</PATHFORMAT>
1101 <FILEKIND>Text</FILEKIND>
1102 <FILEFLAGS>Debug</FILEFLAGS>
1103 </FILE>
1104 <FILE>
1105 <PATHTYPE>Name</PATHTYPE>
1106 <PATH>lread.c</PATH>
1107 <PATHFORMAT>MacOS</PATHFORMAT>
1108 <FILEKIND>Text</FILEKIND>
1109 <FILEFLAGS>Debug</FILEFLAGS>
1110 </FILE>
1111 <FILE>
1112 <PATHTYPE>Name</PATHTYPE>
1113 <PATH>frame.c</PATH>
1114 <PATHFORMAT>MacOS</PATHFORMAT>
1115 <FILEKIND>Text</FILEKIND>
1116 <FILEFLAGS>Debug</FILEFLAGS>
1117 </FILE>
1118 <FILE>
1119 <PATHTYPE>Name</PATHTYPE>
1120 <PATH>term.c</PATH>
1121 <PATHFORMAT>MacOS</PATHFORMAT>
1122 <FILEKIND>Text</FILEKIND>
1123 <FILEFLAGS>Debug</FILEFLAGS>
1124 </FILE>
1125 <FILE>
1126 <PATHTYPE>Name</PATHTYPE>
1127 <PATH>keyboard.c</PATH>
1128 <PATHFORMAT>MacOS</PATHFORMAT>
1129 <FILEKIND>Text</FILEKIND>
1130 <FILEFLAGS>Debug</FILEFLAGS>
1131 </FILE>
1132 <FILE>
1133 <PATHTYPE>Name</PATHTYPE>
1134 <PATH>fontset.c</PATH>
1135 <PATHFORMAT>MacOS</PATHFORMAT>
1136 <FILEKIND>Text</FILEKIND>
1137 <FILEFLAGS>Debug</FILEFLAGS>
1138 </FILE>
1139 <FILE>
1140 <PATHTYPE>Name</PATHTYPE>
1141 <PATH>dispnew.c</PATH>
1142 <PATHFORMAT>MacOS</PATHFORMAT>
1143 <FILEKIND>Text</FILEKIND>
1144 <FILEFLAGS>Debug</FILEFLAGS>
1145 </FILE>
1146 <FILE>
1147 <PATHTYPE>Name</PATHTYPE>
1148 <PATH>Emacs.r</PATH>
1149 <PATHFORMAT>MacOS</PATHFORMAT>
1150 <FILEKIND>Text</FILEKIND>
1151 <FILEFLAGS>Debug</FILEFLAGS>
1152 </FILE>
1153 <FILE>
1154 <PATHTYPE>Name</PATHTYPE>
1155 <PATH>AppleScriptLib</PATH>
1156 <PATHFORMAT>MacOS</PATHFORMAT>
1157 <FILEKIND>Library</FILEKIND>
1158 <FILEFLAGS>Debug</FILEFLAGS>
1159 </FILE>
1160 <FILE>
1161 <PATHTYPE>Name</PATHTYPE>
1162 <PATH>strftime.c</PATH>
1163 <PATHFORMAT>MacOS</PATHFORMAT>
1164 <FILEKIND>Text</FILEKIND>
1165 <FILEFLAGS>Debug</FILEFLAGS>
1166 </FILE>
1167 <FILE>
1168 <PATHTYPE>Name</PATHTYPE>
1169 <PATH>TextEncodingConverter</PATH>
1170 <PATHFORMAT>MacOS</PATHFORMAT>
1171 <FILEKIND>Library</FILEKIND>
1172 <FILEFLAGS>Debug</FILEFLAGS>
1173 </FILE>
1174 <FILE>
1175 <PATHTYPE>Name</PATHTYPE>
1176 <PATH>xfaces.c</PATH>
1177 <PATHFORMAT>MacOS</PATHFORMAT>
1178 <FILEKIND>Text</FILEKIND>
1179 <FILEFLAGS>Debug</FILEFLAGS>
1180 </FILE>
1181 <FILE>
1182 <PATHTYPE>Name</PATHTYPE>
1183 <PATH>macfns.c</PATH>
1184 <PATHFORMAT>MacOS</PATHFORMAT>
1185 <FILEKIND>Text</FILEKIND>
1186 <FILEFLAGS>Debug</FILEFLAGS>
1187 </FILE>
1188 <FILE>
1189 <PATHTYPE>Name</PATHTYPE>
1190 <PATH>macterm.c</PATH>
1191 <PATHFORMAT>MacOS</PATHFORMAT>
1192 <FILEKIND>Text</FILEKIND>
1193 <FILEFLAGS>Debug</FILEFLAGS>
1194 </FILE>
1195 <FILE>
1196 <PATHTYPE>Name</PATHTYPE>
1197 <PATH>composite.c</PATH>
1198 <PATHFORMAT>MacOS</PATHFORMAT>
1199 <FILEKIND>Text</FILEKIND>
1200 <FILEFLAGS>Debug</FILEFLAGS>
1201 </FILE>
1202 <FILE>
1203 <PATHTYPE>Name</PATHTYPE>
1204 <PATH>atimer.c</PATH>
1205 <PATHFORMAT>MacOS</PATHFORMAT>
1206 <FILEKIND>Text</FILEKIND>
1207 <FILEFLAGS>Debug</FILEFLAGS>
1208 </FILE>
1209 <FILE>
1210 <PATHTYPE>Name</PATHTYPE>
1211 <PATH>mac.c</PATH>
1212 <PATHFORMAT>MacOS</PATHFORMAT>
1213 <FILEKIND>Text</FILEKIND>
1214 <FILEFLAGS>Debug</FILEFLAGS>
1215 </FILE>
1216 <FILE>
1217 <PATHTYPE>Name</PATHTYPE>
1218 <PATH>alloca.c</PATH>
1219 <PATHFORMAT>MacOS</PATHFORMAT>
1220 <FILEKIND>Text</FILEKIND>
1221 <FILEFLAGS>Debug</FILEFLAGS>
1222 </FILE>
1223 <FILE>
1224 <PATHTYPE>Name</PATHTYPE>
1225 <PATH>MSL C.PPC.Lib</PATH>
1226 <PATHFORMAT>MacOS</PATHFORMAT>
1227 <FILEKIND>Library</FILEKIND>
1228 <FILEFLAGS>Debug</FILEFLAGS>
1229 </FILE>
1230 <FILE>
1231 <PATHTYPE>Name</PATHTYPE>
1232 <PATH>MSL SIOUX.PPC.Lib</PATH>
1233 <PATHFORMAT>MacOS</PATHFORMAT>
1234 <FILEKIND>Library</FILEKIND>
1235 <FILEFLAGS>Debug</FILEFLAGS>
1236 </FILE>
1237 <FILE>
1238 <PATHTYPE>Name</PATHTYPE>
1239 <PATH>macmenu.c</PATH>
1240 <PATHFORMAT>MacOS</PATHFORMAT>
1241 <FILEKIND>Text</FILEKIND>
1242 <FILEFLAGS>Debug</FILEFLAGS>
1243 </FILE>
1244 <FILE>
1245 <PATHTYPE>Name</PATHTYPE>
1246 <PATH>AppearanceLib</PATH>
1247 <PATHFORMAT>MacOS</PATHFORMAT>
1248 <FILEKIND>Library</FILEKIND>
1249 <FILEFLAGS>Debug</FILEFLAGS>
1250 </FILE>
1251 <FILE>
1252 <PATHTYPE>Name</PATHTYPE>
1253 <PATH>md5.c</PATH>
1254 <PATHFORMAT>MacOS</PATHFORMAT>
1255 <FILEKIND>Text</FILEKIND>
1256 <FILEFLAGS>Debug</FILEFLAGS>
1257 </FILE>
1258 </FILELIST>
1259 <LINKORDER>
1260 <FILEREF>
1261 <PATHTYPE>Name</PATHTYPE>
1262 <PATH>abbrev.c</PATH>
1263 <PATHFORMAT>MacOS</PATHFORMAT>
1264 </FILEREF>
1265 <FILEREF>
1266 <PATHTYPE>Name</PATHTYPE>
1267 <PATH>alloc.c</PATH>
1268 <PATHFORMAT>MacOS</PATHFORMAT>
1269 </FILEREF>
1270 <FILEREF>
1271 <PATHTYPE>Name</PATHTYPE>
1272 <PATH>alloca.c</PATH>
1273 <PATHFORMAT>MacOS</PATHFORMAT>
1274 </FILEREF>
1275 <FILEREF>
1276 <PATHTYPE>Name</PATHTYPE>
1277 <PATH>atimer.c</PATH>
1278 <PATHFORMAT>MacOS</PATHFORMAT>
1279 </FILEREF>
1280 <FILEREF>
1281 <PATHTYPE>Name</PATHTYPE>
1282 <PATH>buffer.c</PATH>
1283 <PATHFORMAT>MacOS</PATHFORMAT>
1284 </FILEREF>
1285 <FILEREF>
1286 <PATHTYPE>Name</PATHTYPE>
1287 <PATH>bytecode.c</PATH>
1288 <PATHFORMAT>MacOS</PATHFORMAT>
1289 </FILEREF>
1290 <FILEREF>
1291 <PATHTYPE>Name</PATHTYPE>
1292 <PATH>callint.c</PATH>
1293 <PATHFORMAT>MacOS</PATHFORMAT>
1294 </FILEREF>
1295 <FILEREF>
1296 <PATHTYPE>Name</PATHTYPE>
1297 <PATH>callproc.c</PATH>
1298 <PATHFORMAT>MacOS</PATHFORMAT>
1299 </FILEREF>
1300 <FILEREF>
1301 <PATHTYPE>Name</PATHTYPE>
1302 <PATH>casefiddle.c</PATH>
1303 <PATHFORMAT>MacOS</PATHFORMAT>
1304 </FILEREF>
1305 <FILEREF>
1306 <PATHTYPE>Name</PATHTYPE>
1307 <PATH>casetab.c</PATH>
1308 <PATHFORMAT>MacOS</PATHFORMAT>
1309 </FILEREF>
1310 <FILEREF>
1311 <PATHTYPE>Name</PATHTYPE>
1312 <PATH>category.c</PATH>
1313 <PATHFORMAT>MacOS</PATHFORMAT>
1314 </FILEREF>
1315 <FILEREF>
1316 <PATHTYPE>Name</PATHTYPE>
1317 <PATH>ccl.c</PATH>
1318 <PATHFORMAT>MacOS</PATHFORMAT>
1319 </FILEREF>
1320 <FILEREF>
1321 <PATHTYPE>Name</PATHTYPE>
1322 <PATH>charset.c</PATH>
1323 <PATHFORMAT>MacOS</PATHFORMAT>
1324 </FILEREF>
1325 <FILEREF>
1326 <PATHTYPE>Name</PATHTYPE>
1327 <PATH>cm.c</PATH>
1328 <PATHFORMAT>MacOS</PATHFORMAT>
1329 </FILEREF>
1330 <FILEREF>
1331 <PATHTYPE>Name</PATHTYPE>
1332 <PATH>cmds.c</PATH>
1333 <PATHFORMAT>MacOS</PATHFORMAT>
1334 </FILEREF>
1335 <FILEREF>
1336 <PATHTYPE>Name</PATHTYPE>
1337 <PATH>coding.c</PATH>
1338 <PATHFORMAT>MacOS</PATHFORMAT>
1339 </FILEREF>
1340 <FILEREF>
1341 <PATHTYPE>Name</PATHTYPE>
1342 <PATH>composite.c</PATH>
1343 <PATHFORMAT>MacOS</PATHFORMAT>
1344 </FILEREF>
1345 <FILEREF>
1346 <PATHTYPE>Name</PATHTYPE>
1347 <PATH>data.c</PATH>
1348 <PATHFORMAT>MacOS</PATHFORMAT>
1349 </FILEREF>
1350 <FILEREF>
1351 <PATHTYPE>Name</PATHTYPE>
1352 <PATH>dired.c</PATH>
1353 <PATHFORMAT>MacOS</PATHFORMAT>
1354 </FILEREF>
1355 <FILEREF>
1356 <PATHTYPE>Name</PATHTYPE>
1357 <PATH>dispnew.c</PATH>
1358 <PATHFORMAT>MacOS</PATHFORMAT>
1359 </FILEREF>
1360 <FILEREF>
1361 <PATHTYPE>Name</PATHTYPE>
1362 <PATH>doc.c</PATH>
1363 <PATHFORMAT>MacOS</PATHFORMAT>
1364 </FILEREF>
1365 <FILEREF>
1366 <PATHTYPE>Name</PATHTYPE>
1367 <PATH>doprnt.c</PATH>
1368 <PATHFORMAT>MacOS</PATHFORMAT>
1369 </FILEREF>
1370 <FILEREF>
1371 <PATHTYPE>Name</PATHTYPE>
1372 <PATH>editfns.c</PATH>
1373 <PATHFORMAT>MacOS</PATHFORMAT>
1374 </FILEREF>
1375 <FILEREF>
1376 <PATHTYPE>Name</PATHTYPE>
1377 <PATH>emacs.c</PATH>
1378 <PATHFORMAT>MacOS</PATHFORMAT>
1379 </FILEREF>
1380 <FILEREF>
1381 <PATHTYPE>Name</PATHTYPE>
1382 <PATH>eval.c</PATH>
1383 <PATHFORMAT>MacOS</PATHFORMAT>
1384 </FILEREF>
1385 <FILEREF>
1386 <PATHTYPE>Name</PATHTYPE>
1387 <PATH>fileio.c</PATH>
1388 <PATHFORMAT>MacOS</PATHFORMAT>
1389 </FILEREF>
1390 <FILEREF>
1391 <PATHTYPE>Name</PATHTYPE>
1392 <PATH>filemode.c</PATH>
1393 <PATHFORMAT>MacOS</PATHFORMAT>
1394 </FILEREF>
1395 <FILEREF>
1396 <PATHTYPE>Name</PATHTYPE>
1397 <PATH>floatfns.c</PATH>
1398 <PATHFORMAT>MacOS</PATHFORMAT>
1399 </FILEREF>
1400 <FILEREF>
1401 <PATHTYPE>Name</PATHTYPE>
1402 <PATH>fns.c</PATH>
1403 <PATHFORMAT>MacOS</PATHFORMAT>
1404 </FILEREF>
1405 <FILEREF>
1406 <PATHTYPE>Name</PATHTYPE>
1407 <PATH>fontset.c</PATH>
1408 <PATHFORMAT>MacOS</PATHFORMAT>
1409 </FILEREF>
1410 <FILEREF>
1411 <PATHTYPE>Name</PATHTYPE>
1412 <PATH>frame.c</PATH>
1413 <PATHFORMAT>MacOS</PATHFORMAT>
1414 </FILEREF>
1415 <FILEREF>
1416 <PATHTYPE>Name</PATHTYPE>
1417 <PATH>getloadavg.c</PATH>
1418 <PATHFORMAT>MacOS</PATHFORMAT>
1419 </FILEREF>
1420 <FILEREF>
1421 <PATHTYPE>Name</PATHTYPE>
1422 <PATH>indent.c</PATH>
1423 <PATHFORMAT>MacOS</PATHFORMAT>
1424 </FILEREF>
1425 <FILEREF>
1426 <PATHTYPE>Name</PATHTYPE>
1427 <PATH>insdel.c</PATH>
1428 <PATHFORMAT>MacOS</PATHFORMAT>
1429 </FILEREF>
1430 <FILEREF>
1431 <PATHTYPE>Name</PATHTYPE>
1432 <PATH>intervals.c</PATH>
1433 <PATHFORMAT>MacOS</PATHFORMAT>
1434 </FILEREF>
1435 <FILEREF>
1436 <PATHTYPE>Name</PATHTYPE>
1437 <PATH>keyboard.c</PATH>
1438 <PATHFORMAT>MacOS</PATHFORMAT>
1439 </FILEREF>
1440 <FILEREF>
1441 <PATHTYPE>Name</PATHTYPE>
1442 <PATH>keymap.c</PATH>
1443 <PATHFORMAT>MacOS</PATHFORMAT>
1444 </FILEREF>
1445 <FILEREF>
1446 <PATHTYPE>Name</PATHTYPE>
1447 <PATH>lread.c</PATH>
1448 <PATHFORMAT>MacOS</PATHFORMAT>
1449 </FILEREF>
1450 <FILEREF>
1451 <PATHTYPE>Name</PATHTYPE>
1452 <PATH>macros.c</PATH>
1453 <PATHFORMAT>MacOS</PATHFORMAT>
1454 </FILEREF>
1455 <FILEREF>
1456 <PATHTYPE>Name</PATHTYPE>
1457 <PATH>marker.c</PATH>
1458 <PATHFORMAT>MacOS</PATHFORMAT>
1459 </FILEREF>
1460 <FILEREF>
1461 <PATHTYPE>Name</PATHTYPE>
1462 <PATH>md5.c</PATH>
1463 <PATHFORMAT>MacOS</PATHFORMAT>
1464 </FILEREF>
1465 <FILEREF>
1466 <PATHTYPE>Name</PATHTYPE>
1467 <PATH>minibuf.c</PATH>
1468 <PATHFORMAT>MacOS</PATHFORMAT>
1469 </FILEREF>
1470 <FILEREF>
1471 <PATHTYPE>Name</PATHTYPE>
1472 <PATH>mktime.c</PATH>
1473 <PATHFORMAT>MacOS</PATHFORMAT>
1474 </FILEREF>
1475 <FILEREF>
1476 <PATHTYPE>Name</PATHTYPE>
1477 <PATH>print.c</PATH>
1478 <PATHFORMAT>MacOS</PATHFORMAT>
1479 </FILEREF>
1480 <FILEREF>
1481 <PATHTYPE>Name</PATHTYPE>
1482 <PATH>process.c</PATH>
1483 <PATHFORMAT>MacOS</PATHFORMAT>
1484 </FILEREF>
1485 <FILEREF>
1486 <PATHTYPE>Name</PATHTYPE>
1487 <PATH>regex.c</PATH>
1488 <PATHFORMAT>MacOS</PATHFORMAT>
1489 </FILEREF>
1490 <FILEREF>
1491 <PATHTYPE>Name</PATHTYPE>
1492 <PATH>region-cache.c</PATH>
1493 <PATHFORMAT>MacOS</PATHFORMAT>
1494 </FILEREF>
1495 <FILEREF>
1496 <PATHTYPE>Name</PATHTYPE>
1497 <PATH>scroll.c</PATH>
1498 <PATHFORMAT>MacOS</PATHFORMAT>
1499 </FILEREF>
1500 <FILEREF>
1501 <PATHTYPE>Name</PATHTYPE>
1502 <PATH>search.c</PATH>
1503 <PATHFORMAT>MacOS</PATHFORMAT>
1504 </FILEREF>
1505 <FILEREF>
1506 <PATHTYPE>Name</PATHTYPE>
1507 <PATH>strftime.c</PATH>
1508 <PATHFORMAT>MacOS</PATHFORMAT>
1509 </FILEREF>
1510 <FILEREF>
1511 <PATHTYPE>Name</PATHTYPE>
1512 <PATH>syntax.c</PATH>
1513 <PATHFORMAT>MacOS</PATHFORMAT>
1514 </FILEREF>
1515 <FILEREF>
1516 <PATHTYPE>Name</PATHTYPE>
1517 <PATH>term.c</PATH>
1518 <PATHFORMAT>MacOS</PATHFORMAT>
1519 </FILEREF>
1520 <FILEREF>
1521 <PATHTYPE>Name</PATHTYPE>
1522 <PATH>termcap.c</PATH>
1523 <PATHFORMAT>MacOS</PATHFORMAT>
1524 </FILEREF>
1525 <FILEREF>
1526 <PATHTYPE>Name</PATHTYPE>
1527 <PATH>textprop.c</PATH>
1528 <PATHFORMAT>MacOS</PATHFORMAT>
1529 </FILEREF>
1530 <FILEREF>
1531 <PATHTYPE>Name</PATHTYPE>
1532 <PATH>tparam.c</PATH>
1533 <PATHFORMAT>MacOS</PATHFORMAT>
1534 </FILEREF>
1535 <FILEREF>
1536 <PATHTYPE>Name</PATHTYPE>
1537 <PATH>undo.c</PATH>
1538 <PATHFORMAT>MacOS</PATHFORMAT>
1539 </FILEREF>
1540 <FILEREF>
1541 <PATHTYPE>Name</PATHTYPE>
1542 <PATH>window.c</PATH>
1543 <PATHFORMAT>MacOS</PATHFORMAT>
1544 </FILEREF>
1545 <FILEREF>
1546 <PATHTYPE>Name</PATHTYPE>
1547 <PATH>xdisp.c</PATH>
1548 <PATHFORMAT>MacOS</PATHFORMAT>
1549 </FILEREF>
1550 <FILEREF>
1551 <PATHTYPE>Name</PATHTYPE>
1552 <PATH>sysdep.c</PATH>
1553 <PATHFORMAT>MacOS</PATHFORMAT>
1554 </FILEREF>
1555 <FILEREF>
1556 <PATHTYPE>Name</PATHTYPE>
1557 <PATH>xfaces.c</PATH>
1558 <PATHFORMAT>MacOS</PATHFORMAT>
1559 </FILEREF>
1560 <FILEREF>
1561 <PATHTYPE>Name</PATHTYPE>
1562 <PATH>mac.c</PATH>
1563 <PATHFORMAT>MacOS</PATHFORMAT>
1564 </FILEREF>
1565 <FILEREF>
1566 <PATHTYPE>Name</PATHTYPE>
1567 <PATH>macfns.c</PATH>
1568 <PATHFORMAT>MacOS</PATHFORMAT>
1569 </FILEREF>
1570 <FILEREF>
1571 <PATHTYPE>Name</PATHTYPE>
1572 <PATH>macmenu.c</PATH>
1573 <PATHFORMAT>MacOS</PATHFORMAT>
1574 </FILEREF>
1575 <FILEREF>
1576 <PATHTYPE>Name</PATHTYPE>
1577 <PATH>macterm.c</PATH>
1578 <PATHFORMAT>MacOS</PATHFORMAT>
1579 </FILEREF>
1580 <FILEREF>
1581 <PATHTYPE>Name</PATHTYPE>
1582 <PATH>MSL RuntimePPC.Lib</PATH>
1583 <PATHFORMAT>MacOS</PATHFORMAT>
1584 </FILEREF>
1585 <FILEREF>
1586 <PATHTYPE>Name</PATHTYPE>
1587 <PATH>InterfaceLib</PATH>
1588 <PATHFORMAT>MacOS</PATHFORMAT>
1589 </FILEREF>
1590 <FILEREF>
1591 <PATHTYPE>Name</PATHTYPE>
1592 <PATH>MathLib</PATH>
1593 <PATHFORMAT>MacOS</PATHFORMAT>
1594 </FILEREF>
1595 <FILEREF>
1596 <PATHTYPE>Name</PATHTYPE>
1597 <PATH>AppleScriptLib</PATH>
1598 <PATHFORMAT>MacOS</PATHFORMAT>
1599 </FILEREF>
1600 <FILEREF>
1601 <PATHTYPE>Name</PATHTYPE>
1602 <PATH>TextEncodingConverter</PATH>
1603 <PATHFORMAT>MacOS</PATHFORMAT>
1604 </FILEREF>
1605 <FILEREF>
1606 <PATHTYPE>Name</PATHTYPE>
1607 <PATH>MSL C.PPC.Lib</PATH>
1608 <PATHFORMAT>MacOS</PATHFORMAT>
1609 </FILEREF>
1610 <FILEREF>
1611 <PATHTYPE>Name</PATHTYPE>
1612 <PATH>MSL SIOUX.PPC.Lib</PATH>
1613 <PATHFORMAT>MacOS</PATHFORMAT>
1614 </FILEREF>
1615 <FILEREF>
1616 <PATHTYPE>Name</PATHTYPE>
1617 <PATH>AppearanceLib</PATH>
1618 <PATHFORMAT>MacOS</PATHFORMAT>
1619 </FILEREF>
1620 <FILEREF>
1621 <PATHTYPE>Name</PATHTYPE>
1622 <PATH>Emacs.r</PATH>
1623 <PATHFORMAT>MacOS</PATHFORMAT>
1624 </FILEREF>
1625 </LINKORDER>
1626 </TARGET>
1627 </TARGETLIST>
1628
1629 <TARGETORDER>
1630 <ORDEREDTARGET><NAME>Emacs</NAME></ORDEREDTARGET>
1631 </TARGETORDER>
1632
1633 <GROUPLIST>
1634 <GROUP><NAME>Emacs Source</NAME>
1635 <FILEREF>
1636 <TARGETNAME>Emacs</TARGETNAME>
1637 <PATHTYPE>Name</PATHTYPE>
1638 <PATH>abbrev.c</PATH>
1639 <PATHFORMAT>MacOS</PATHFORMAT>
1640 </FILEREF>
1641 <FILEREF>
1642 <TARGETNAME>Emacs</TARGETNAME>
1643 <PATHTYPE>Name</PATHTYPE>
1644 <PATH>alloc.c</PATH>
1645 <PATHFORMAT>MacOS</PATHFORMAT>
1646 </FILEREF>
1647 <FILEREF>
1648 <TARGETNAME>Emacs</TARGETNAME>
1649 <PATHTYPE>Name</PATHTYPE>
1650 <PATH>alloca.c</PATH>
1651 <PATHFORMAT>MacOS</PATHFORMAT>
1652 </FILEREF>
1653 <FILEREF>
1654 <TARGETNAME>Emacs</TARGETNAME>
1655 <PATHTYPE>Name</PATHTYPE>
1656 <PATH>atimer.c</PATH>
1657 <PATHFORMAT>MacOS</PATHFORMAT>
1658 </FILEREF>
1659 <FILEREF>
1660 <TARGETNAME>Emacs</TARGETNAME>
1661 <PATHTYPE>Name</PATHTYPE>
1662 <PATH>buffer.c</PATH>
1663 <PATHFORMAT>MacOS</PATHFORMAT>
1664 </FILEREF>
1665 <FILEREF>
1666 <TARGETNAME>Emacs</TARGETNAME>
1667 <PATHTYPE>Name</PATHTYPE>
1668 <PATH>bytecode.c</PATH>
1669 <PATHFORMAT>MacOS</PATHFORMAT>
1670 </FILEREF>
1671 <FILEREF>
1672 <TARGETNAME>Emacs</TARGETNAME>
1673 <PATHTYPE>Name</PATHTYPE>
1674 <PATH>callint.c</PATH>
1675 <PATHFORMAT>MacOS</PATHFORMAT>
1676 </FILEREF>
1677 <FILEREF>
1678 <TARGETNAME>Emacs</TARGETNAME>
1679 <PATHTYPE>Name</PATHTYPE>
1680 <PATH>callproc.c</PATH>
1681 <PATHFORMAT>MacOS</PATHFORMAT>
1682 </FILEREF>
1683 <FILEREF>
1684 <TARGETNAME>Emacs</TARGETNAME>
1685 <PATHTYPE>Name</PATHTYPE>
1686 <PATH>casefiddle.c</PATH>
1687 <PATHFORMAT>MacOS</PATHFORMAT>
1688 </FILEREF>
1689 <FILEREF>
1690 <TARGETNAME>Emacs</TARGETNAME>
1691 <PATHTYPE>Name</PATHTYPE>
1692 <PATH>casetab.c</PATH>
1693 <PATHFORMAT>MacOS</PATHFORMAT>
1694 </FILEREF>
1695 <FILEREF>
1696 <TARGETNAME>Emacs</TARGETNAME>
1697 <PATHTYPE>Name</PATHTYPE>
1698 <PATH>category.c</PATH>
1699 <PATHFORMAT>MacOS</PATHFORMAT>
1700 </FILEREF>
1701 <FILEREF>
1702 <TARGETNAME>Emacs</TARGETNAME>
1703 <PATHTYPE>Name</PATHTYPE>
1704 <PATH>ccl.c</PATH>
1705 <PATHFORMAT>MacOS</PATHFORMAT>
1706 </FILEREF>
1707 <FILEREF>
1708 <TARGETNAME>Emacs</TARGETNAME>
1709 <PATHTYPE>Name</PATHTYPE>
1710 <PATH>charset.c</PATH>
1711 <PATHFORMAT>MacOS</PATHFORMAT>
1712 </FILEREF>
1713 <FILEREF>
1714 <TARGETNAME>Emacs</TARGETNAME>
1715 <PATHTYPE>Name</PATHTYPE>
1716 <PATH>cm.c</PATH>
1717 <PATHFORMAT>MacOS</PATHFORMAT>
1718 </FILEREF>
1719 <FILEREF>
1720 <TARGETNAME>Emacs</TARGETNAME>
1721 <PATHTYPE>Name</PATHTYPE>
1722 <PATH>cmds.c</PATH>
1723 <PATHFORMAT>MacOS</PATHFORMAT>
1724 </FILEREF>
1725 <FILEREF>
1726 <TARGETNAME>Emacs</TARGETNAME>
1727 <PATHTYPE>Name</PATHTYPE>
1728 <PATH>coding.c</PATH>
1729 <PATHFORMAT>MacOS</PATHFORMAT>
1730 </FILEREF>
1731 <FILEREF>
1732 <TARGETNAME>Emacs</TARGETNAME>
1733 <PATHTYPE>Name</PATHTYPE>
1734 <PATH>composite.c</PATH>
1735 <PATHFORMAT>MacOS</PATHFORMAT>
1736 </FILEREF>
1737 <FILEREF>
1738 <TARGETNAME>Emacs</TARGETNAME>
1739 <PATHTYPE>Name</PATHTYPE>
1740 <PATH>data.c</PATH>
1741 <PATHFORMAT>MacOS</PATHFORMAT>
1742 </FILEREF>
1743 <FILEREF>
1744 <TARGETNAME>Emacs</TARGETNAME>
1745 <PATHTYPE>Name</PATHTYPE>
1746 <PATH>dired.c</PATH>
1747 <PATHFORMAT>MacOS</PATHFORMAT>
1748 </FILEREF>
1749 <FILEREF>
1750 <TARGETNAME>Emacs</TARGETNAME>
1751 <PATHTYPE>Name</PATHTYPE>
1752 <PATH>dispnew.c</PATH>
1753 <PATHFORMAT>MacOS</PATHFORMAT>
1754 </FILEREF>
1755 <FILEREF>
1756 <TARGETNAME>Emacs</TARGETNAME>
1757 <PATHTYPE>Name</PATHTYPE>
1758 <PATH>doc.c</PATH>
1759 <PATHFORMAT>MacOS</PATHFORMAT>
1760 </FILEREF>
1761 <FILEREF>
1762 <TARGETNAME>Emacs</TARGETNAME>
1763 <PATHTYPE>Name</PATHTYPE>
1764 <PATH>doprnt.c</PATH>
1765 <PATHFORMAT>MacOS</PATHFORMAT>
1766 </FILEREF>
1767 <FILEREF>
1768 <TARGETNAME>Emacs</TARGETNAME>
1769 <PATHTYPE>Name</PATHTYPE>
1770 <PATH>editfns.c</PATH>
1771 <PATHFORMAT>MacOS</PATHFORMAT>
1772 </FILEREF>
1773 <FILEREF>
1774 <TARGETNAME>Emacs</TARGETNAME>
1775 <PATHTYPE>Name</PATHTYPE>
1776 <PATH>emacs.c</PATH>
1777 <PATHFORMAT>MacOS</PATHFORMAT>
1778 </FILEREF>
1779 <FILEREF>
1780 <TARGETNAME>Emacs</TARGETNAME>
1781 <PATHTYPE>Name</PATHTYPE>
1782 <PATH>eval.c</PATH>
1783 <PATHFORMAT>MacOS</PATHFORMAT>
1784 </FILEREF>
1785 <FILEREF>
1786 <TARGETNAME>Emacs</TARGETNAME>
1787 <PATHTYPE>Name</PATHTYPE>
1788 <PATH>fileio.c</PATH>
1789 <PATHFORMAT>MacOS</PATHFORMAT>
1790 </FILEREF>
1791 <FILEREF>
1792 <TARGETNAME>Emacs</TARGETNAME>
1793 <PATHTYPE>Name</PATHTYPE>
1794 <PATH>filemode.c</PATH>
1795 <PATHFORMAT>MacOS</PATHFORMAT>
1796 </FILEREF>
1797 <FILEREF>
1798 <TARGETNAME>Emacs</TARGETNAME>
1799 <PATHTYPE>Name</PATHTYPE>
1800 <PATH>floatfns.c</PATH>
1801 <PATHFORMAT>MacOS</PATHFORMAT>
1802 </FILEREF>
1803 <FILEREF>
1804 <TARGETNAME>Emacs</TARGETNAME>
1805 <PATHTYPE>Name</PATHTYPE>
1806 <PATH>fns.c</PATH>
1807 <PATHFORMAT>MacOS</PATHFORMAT>
1808 </FILEREF>
1809 <FILEREF>
1810 <TARGETNAME>Emacs</TARGETNAME>
1811 <PATHTYPE>Name</PATHTYPE>
1812 <PATH>fontset.c</PATH>
1813 <PATHFORMAT>MacOS</PATHFORMAT>
1814 </FILEREF>
1815 <FILEREF>
1816 <TARGETNAME>Emacs</TARGETNAME>
1817 <PATHTYPE>Name</PATHTYPE>
1818 <PATH>frame.c</PATH>
1819 <PATHFORMAT>MacOS</PATHFORMAT>
1820 </FILEREF>
1821 <FILEREF>
1822 <TARGETNAME>Emacs</TARGETNAME>
1823 <PATHTYPE>Name</PATHTYPE>
1824 <PATH>getloadavg.c</PATH>
1825 <PATHFORMAT>MacOS</PATHFORMAT>
1826 </FILEREF>
1827 <FILEREF>
1828 <TARGETNAME>Emacs</TARGETNAME>
1829 <PATHTYPE>Name</PATHTYPE>
1830 <PATH>indent.c</PATH>
1831 <PATHFORMAT>MacOS</PATHFORMAT>
1832 </FILEREF>
1833 <FILEREF>
1834 <TARGETNAME>Emacs</TARGETNAME>
1835 <PATHTYPE>Name</PATHTYPE>
1836 <PATH>insdel.c</PATH>
1837 <PATHFORMAT>MacOS</PATHFORMAT>
1838 </FILEREF>
1839 <FILEREF>
1840 <TARGETNAME>Emacs</TARGETNAME>
1841 <PATHTYPE>Name</PATHTYPE>
1842 <PATH>intervals.c</PATH>
1843 <PATHFORMAT>MacOS</PATHFORMAT>
1844 </FILEREF>
1845 <FILEREF>
1846 <TARGETNAME>Emacs</TARGETNAME>
1847 <PATHTYPE>Name</PATHTYPE>
1848 <PATH>keyboard.c</PATH>
1849 <PATHFORMAT>MacOS</PATHFORMAT>
1850 </FILEREF>
1851 <FILEREF>
1852 <TARGETNAME>Emacs</TARGETNAME>
1853 <PATHTYPE>Name</PATHTYPE>
1854 <PATH>keymap.c</PATH>
1855 <PATHFORMAT>MacOS</PATHFORMAT>
1856 </FILEREF>
1857 <FILEREF>
1858 <TARGETNAME>Emacs</TARGETNAME>
1859 <PATHTYPE>Name</PATHTYPE>
1860 <PATH>lread.c</PATH>
1861 <PATHFORMAT>MacOS</PATHFORMAT>
1862 </FILEREF>
1863 <FILEREF>
1864 <TARGETNAME>Emacs</TARGETNAME>
1865 <PATHTYPE>Name</PATHTYPE>
1866 <PATH>macros.c</PATH>
1867 <PATHFORMAT>MacOS</PATHFORMAT>
1868 </FILEREF>
1869 <FILEREF>
1870 <TARGETNAME>Emacs</TARGETNAME>
1871 <PATHTYPE>Name</PATHTYPE>
1872 <PATH>marker.c</PATH>
1873 <PATHFORMAT>MacOS</PATHFORMAT>
1874 </FILEREF>
1875 <FILEREF>
1876 <TARGETNAME>Emacs</TARGETNAME>
1877 <PATHTYPE>Name</PATHTYPE>
1878 <PATH>md5.c</PATH>
1879 <PATHFORMAT>MacOS</PATHFORMAT>
1880 </FILEREF>
1881 <FILEREF>
1882 <TARGETNAME>Emacs</TARGETNAME>
1883 <PATHTYPE>Name</PATHTYPE>
1884 <PATH>minibuf.c</PATH>
1885 <PATHFORMAT>MacOS</PATHFORMAT>
1886 </FILEREF>
1887 <FILEREF>
1888 <TARGETNAME>Emacs</TARGETNAME>
1889 <PATHTYPE>Name</PATHTYPE>
1890 <PATH>mktime.c</PATH>
1891 <PATHFORMAT>MacOS</PATHFORMAT>
1892 </FILEREF>
1893 <FILEREF>
1894 <TARGETNAME>Emacs</TARGETNAME>
1895 <PATHTYPE>Name</PATHTYPE>
1896 <PATH>print.c</PATH>
1897 <PATHFORMAT>MacOS</PATHFORMAT>
1898 </FILEREF>
1899 <FILEREF>
1900 <TARGETNAME>Emacs</TARGETNAME>
1901 <PATHTYPE>Name</PATHTYPE>
1902 <PATH>process.c</PATH>
1903 <PATHFORMAT>MacOS</PATHFORMAT>
1904 </FILEREF>
1905 <FILEREF>
1906 <TARGETNAME>Emacs</TARGETNAME>
1907 <PATHTYPE>Name</PATHTYPE>
1908 <PATH>regex.c</PATH>
1909 <PATHFORMAT>MacOS</PATHFORMAT>
1910 </FILEREF>
1911 <FILEREF>
1912 <TARGETNAME>Emacs</TARGETNAME>
1913 <PATHTYPE>Name</PATHTYPE>
1914 <PATH>region-cache.c</PATH>
1915 <PATHFORMAT>MacOS</PATHFORMAT>
1916 </FILEREF>
1917 <FILEREF>
1918 <TARGETNAME>Emacs</TARGETNAME>
1919 <PATHTYPE>Name</PATHTYPE>
1920 <PATH>scroll.c</PATH>
1921 <PATHFORMAT>MacOS</PATHFORMAT>
1922 </FILEREF>
1923 <FILEREF>
1924 <TARGETNAME>Emacs</TARGETNAME>
1925 <PATHTYPE>Name</PATHTYPE>
1926 <PATH>search.c</PATH>
1927 <PATHFORMAT>MacOS</PATHFORMAT>
1928 </FILEREF>
1929 <FILEREF>
1930 <TARGETNAME>Emacs</TARGETNAME>
1931 <PATHTYPE>Name</PATHTYPE>
1932 <PATH>strftime.c</PATH>
1933 <PATHFORMAT>MacOS</PATHFORMAT>
1934 </FILEREF>
1935 <FILEREF>
1936 <TARGETNAME>Emacs</TARGETNAME>
1937 <PATHTYPE>Name</PATHTYPE>
1938 <PATH>syntax.c</PATH>
1939 <PATHFORMAT>MacOS</PATHFORMAT>
1940 </FILEREF>
1941 <FILEREF>
1942 <TARGETNAME>Emacs</TARGETNAME>
1943 <PATHTYPE>Name</PATHTYPE>
1944 <PATH>sysdep.c</PATH>
1945 <PATHFORMAT>MacOS</PATHFORMAT>
1946 </FILEREF>
1947 <FILEREF>
1948 <TARGETNAME>Emacs</TARGETNAME>
1949 <PATHTYPE>Name</PATHTYPE>
1950 <PATH>term.c</PATH>
1951 <PATHFORMAT>MacOS</PATHFORMAT>
1952 </FILEREF>
1953 <FILEREF>
1954 <TARGETNAME>Emacs</TARGETNAME>
1955 <PATHTYPE>Name</PATHTYPE>
1956 <PATH>termcap.c</PATH>
1957 <PATHFORMAT>MacOS</PATHFORMAT>
1958 </FILEREF>
1959 <FILEREF>
1960 <TARGETNAME>Emacs</TARGETNAME>
1961 <PATHTYPE>Name</PATHTYPE>
1962 <PATH>textprop.c</PATH>
1963 <PATHFORMAT>MacOS</PATHFORMAT>
1964 </FILEREF>
1965 <FILEREF>
1966 <TARGETNAME>Emacs</TARGETNAME>
1967 <PATHTYPE>Name</PATHTYPE>
1968 <PATH>tparam.c</PATH>
1969 <PATHFORMAT>MacOS</PATHFORMAT>
1970 </FILEREF>
1971 <FILEREF>
1972 <TARGETNAME>Emacs</TARGETNAME>
1973 <PATHTYPE>Name</PATHTYPE>
1974 <PATH>undo.c</PATH>
1975 <PATHFORMAT>MacOS</PATHFORMAT>
1976 </FILEREF>
1977 <FILEREF>
1978 <TARGETNAME>Emacs</TARGETNAME>
1979 <PATHTYPE>Name</PATHTYPE>
1980 <PATH>window.c</PATH>
1981 <PATHFORMAT>MacOS</PATHFORMAT>
1982 </FILEREF>
1983 <FILEREF>
1984 <TARGETNAME>Emacs</TARGETNAME>
1985 <PATHTYPE>Name</PATHTYPE>
1986 <PATH>xdisp.c</PATH>
1987 <PATHFORMAT>MacOS</PATHFORMAT>
1988 </FILEREF>
1989 <FILEREF>
1990 <TARGETNAME>Emacs</TARGETNAME>
1991 <PATHTYPE>Name</PATHTYPE>
1992 <PATH>xfaces.c</PATH>
1993 <PATHFORMAT>MacOS</PATHFORMAT>
1994 </FILEREF>
1995 </GROUP>
1996 <GROUP><NAME>Mac Source</NAME>
1997 <FILEREF>
1998 <TARGETNAME>Emacs</TARGETNAME>
1999 <PATHTYPE>Name</PATHTYPE>
2000 <PATH>mac.c</PATH>
2001 <PATHFORMAT>MacOS</PATHFORMAT>
2002 </FILEREF>
2003 <FILEREF>
2004 <TARGETNAME>Emacs</TARGETNAME>
2005 <PATHTYPE>Name</PATHTYPE>
2006 <PATH>macfns.c</PATH>
2007 <PATHFORMAT>MacOS</PATHFORMAT>
2008 </FILEREF>
2009 <FILEREF>
2010 <TARGETNAME>Emacs</TARGETNAME>
2011 <PATHTYPE>Name</PATHTYPE>
2012 <PATH>macmenu.c</PATH>
2013 <PATHFORMAT>MacOS</PATHFORMAT>
2014 </FILEREF>
2015 <FILEREF>
2016 <TARGETNAME>Emacs</TARGETNAME>
2017 <PATHTYPE>Name</PATHTYPE>
2018 <PATH>macterm.c</PATH>
2019 <PATHFORMAT>MacOS</PATHFORMAT>
2020 </FILEREF>
2021 </GROUP>
2022 <GROUP><NAME>Resources</NAME>
2023 <FILEREF>
2024 <TARGETNAME>Emacs</TARGETNAME>
2025 <PATHTYPE>Name</PATHTYPE>
2026 <PATH>Emacs.r</PATH>
2027 <PATHFORMAT>MacOS</PATHFORMAT>
2028 </FILEREF>
2029 </GROUP>
2030 <GROUP><NAME>Mac Libraries</NAME>
2031 <FILEREF>
2032 <TARGETNAME>Emacs</TARGETNAME>
2033 <PATHTYPE>Name</PATHTYPE>
2034 <PATH>MSL RuntimePPC.Lib</PATH>
2035 <PATHFORMAT>MacOS</PATHFORMAT>
2036 </FILEREF>
2037 <FILEREF>
2038 <TARGETNAME>Emacs</TARGETNAME>
2039 <PATHTYPE>Name</PATHTYPE>
2040 <PATH>InterfaceLib</PATH>
2041 <PATHFORMAT>MacOS</PATHFORMAT>
2042 </FILEREF>
2043 <FILEREF>
2044 <TARGETNAME>Emacs</TARGETNAME>
2045 <PATHTYPE>Name</PATHTYPE>
2046 <PATH>MathLib</PATH>
2047 <PATHFORMAT>MacOS</PATHFORMAT>
2048 </FILEREF>
2049 <FILEREF>
2050 <TARGETNAME>Emacs</TARGETNAME>
2051 <PATHTYPE>Name</PATHTYPE>
2052 <PATH>AppleScriptLib</PATH>
2053 <PATHFORMAT>MacOS</PATHFORMAT>
2054 </FILEREF>
2055 <FILEREF>
2056 <TARGETNAME>Emacs</TARGETNAME>
2057 <PATHTYPE>Name</PATHTYPE>
2058 <PATH>TextEncodingConverter</PATH>
2059 <PATHFORMAT>MacOS</PATHFORMAT>
2060 </FILEREF>
2061 <FILEREF>
2062 <TARGETNAME>Emacs</TARGETNAME>
2063 <PATHTYPE>Name</PATHTYPE>
2064 <PATH>AppearanceLib</PATH>
2065 <PATHFORMAT>MacOS</PATHFORMAT>
2066 </FILEREF>
2067 </GROUP>
2068 <GROUP><NAME>ANSI Libraries</NAME>
2069 <FILEREF>
2070 <TARGETNAME>Emacs</TARGETNAME>
2071 <PATHTYPE>Name</PATHTYPE>
2072 <PATH>MSL C.PPC.Lib</PATH>
2073 <PATHFORMAT>MacOS</PATHFORMAT>
2074 </FILEREF>
2075 <FILEREF>
2076 <TARGETNAME>Emacs</TARGETNAME>
2077 <PATHTYPE>Name</PATHTYPE>
2078 <PATH>MSL SIOUX.PPC.Lib</PATH>
2079 <PATHFORMAT>MacOS</PATHFORMAT>
2080 </FILEREF>
2081 </GROUP>
2082 </GROUPLIST>
2083
2084</PROJECT>
diff --git a/mac/cw6-mcp.xml b/mac/cw6-mcp.xml
index 454b947b78b..c5224970dfe 100644
--- a/mac/cw6-mcp.xml
+++ b/mac/cw6-mcp.xml
@@ -19,7 +19,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1902111-1307, USA. 1902111-1307, USA.
20 20
21 21
22Contributed by Andrew Choi (akochoi@i-cable.com). 22Contributed by Andrew Choi (akochoi@mac.com).
23 23
24Exported from the emacs-cw6.mcp project in Metrowerks CodeWarrior Pro 24Exported from the emacs-cw6.mcp project in Metrowerks CodeWarrior Pro
256 for distribution. This copyright notice was then added by hand. 256 for distribution. This copyright notice was then added by hand.
@@ -80,7 +80,7 @@ emacs-cw6.mcp project.
80<PROJECT> 80<PROJECT>
81 <TARGETLIST> 81 <TARGETLIST>
82 <TARGET> 82 <TARGET>
83 <NAME>Emacs</NAME> 83 <NAME>Emacs CW</NAME>
84 <SETTINGLIST> 84 <SETTINGLIST>
85 85
86 <!-- Settings for "Source Trees" panel --> 86 <!-- Settings for "Source Trees" panel -->
@@ -153,7 +153,7 @@ emacs-cw6.mcp project.
153 <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING> 153 <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>
154 <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING> 154 <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>
155 <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> 155 <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>
156 <SETTING><NAME>Targetname</NAME><VALUE>Emacs</VALUE></SETTING> 156 <SETTING><NAME>Targetname</NAME><VALUE>Emacs CW</VALUE></SETTING>
157 <SETTING><NAME>OutputDirectory</NAME> 157 <SETTING><NAME>OutputDirectory</NAME>
158 <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> 158 <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
159 <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> 159 <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
@@ -637,7 +637,7 @@ emacs-cw6.mcp project.
637 <!-- Settings for "FTP Panel" panel --> 637 <!-- Settings for "FTP Panel" panel -->
638 <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING> 638 <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
639 <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING> 639 <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
640 <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>3654kr6a654npes6544xbe*&#154;A&#145;&#224;"</VALUE></SETTING> 640 <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>35kmm835kpjgj5k5td7&#224;</VALUE></SETTING>
641 <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING> 641 <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
642 <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>0</VALUE></SETTING> 642 <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>0</VALUE></SETTING>
643 <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING> 643 <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
@@ -1882,367 +1882,367 @@ emacs-cw6.mcp project.
1882 </TARGETLIST> 1882 </TARGETLIST>
1883 1883
1884 <TARGETORDER> 1884 <TARGETORDER>
1885 <ORDEREDTARGET><NAME>Emacs</NAME></ORDEREDTARGET> 1885 <ORDEREDTARGET><NAME>Emacs CW</NAME></ORDEREDTARGET>
1886 </TARGETORDER> 1886 </TARGETORDER>
1887 1887
1888 <GROUPLIST> 1888 <GROUPLIST>
1889 <GROUP><NAME>Emacs Source</NAME> 1889 <GROUP><NAME>Emacs Source</NAME>
1890 <FILEREF> 1890 <FILEREF>
1891 <TARGETNAME>Emacs</TARGETNAME> 1891 <TARGETNAME>Emacs CW</TARGETNAME>
1892 <PATHTYPE>Name</PATHTYPE> 1892 <PATHTYPE>Name</PATHTYPE>
1893 <PATH>abbrev.c</PATH> 1893 <PATH>abbrev.c</PATH>
1894 <PATHFORMAT>MacOS</PATHFORMAT> 1894 <PATHFORMAT>MacOS</PATHFORMAT>
1895 </FILEREF> 1895 </FILEREF>
1896 <FILEREF> 1896 <FILEREF>
1897 <TARGETNAME>Emacs</TARGETNAME> 1897 <TARGETNAME>Emacs CW</TARGETNAME>
1898 <PATHTYPE>Name</PATHTYPE> 1898 <PATHTYPE>Name</PATHTYPE>
1899 <PATH>alloc.c</PATH> 1899 <PATH>alloc.c</PATH>
1900 <PATHFORMAT>MacOS</PATHFORMAT> 1900 <PATHFORMAT>MacOS</PATHFORMAT>
1901 </FILEREF> 1901 </FILEREF>
1902 <FILEREF> 1902 <FILEREF>
1903 <TARGETNAME>Emacs</TARGETNAME> 1903 <TARGETNAME>Emacs CW</TARGETNAME>
1904 <PATHTYPE>Name</PATHTYPE> 1904 <PATHTYPE>Name</PATHTYPE>
1905 <PATH>alloca.c</PATH> 1905 <PATH>alloca.c</PATH>
1906 <PATHFORMAT>MacOS</PATHFORMAT> 1906 <PATHFORMAT>MacOS</PATHFORMAT>
1907 </FILEREF> 1907 </FILEREF>
1908 <FILEREF> 1908 <FILEREF>
1909 <TARGETNAME>Emacs</TARGETNAME> 1909 <TARGETNAME>Emacs CW</TARGETNAME>
1910 <PATHTYPE>Name</PATHTYPE> 1910 <PATHTYPE>Name</PATHTYPE>
1911 <PATH>atimer.c</PATH> 1911 <PATH>atimer.c</PATH>
1912 <PATHFORMAT>MacOS</PATHFORMAT> 1912 <PATHFORMAT>MacOS</PATHFORMAT>
1913 </FILEREF> 1913 </FILEREF>
1914 <FILEREF> 1914 <FILEREF>
1915 <TARGETNAME>Emacs</TARGETNAME> 1915 <TARGETNAME>Emacs CW</TARGETNAME>
1916 <PATHTYPE>Name</PATHTYPE> 1916 <PATHTYPE>Name</PATHTYPE>
1917 <PATH>buffer.c</PATH> 1917 <PATH>buffer.c</PATH>
1918 <PATHFORMAT>MacOS</PATHFORMAT> 1918 <PATHFORMAT>MacOS</PATHFORMAT>
1919 </FILEREF> 1919 </FILEREF>
1920 <FILEREF> 1920 <FILEREF>
1921 <TARGETNAME>Emacs</TARGETNAME> 1921 <TARGETNAME>Emacs CW</TARGETNAME>
1922 <PATHTYPE>Name</PATHTYPE> 1922 <PATHTYPE>Name</PATHTYPE>
1923 <PATH>bytecode.c</PATH> 1923 <PATH>bytecode.c</PATH>
1924 <PATHFORMAT>MacOS</PATHFORMAT> 1924 <PATHFORMAT>MacOS</PATHFORMAT>
1925 </FILEREF> 1925 </FILEREF>
1926 <FILEREF> 1926 <FILEREF>
1927 <TARGETNAME>Emacs</TARGETNAME> 1927 <TARGETNAME>Emacs CW</TARGETNAME>
1928 <PATHTYPE>Name</PATHTYPE> 1928 <PATHTYPE>Name</PATHTYPE>
1929 <PATH>callint.c</PATH> 1929 <PATH>callint.c</PATH>
1930 <PATHFORMAT>MacOS</PATHFORMAT> 1930 <PATHFORMAT>MacOS</PATHFORMAT>
1931 </FILEREF> 1931 </FILEREF>
1932 <FILEREF> 1932 <FILEREF>
1933 <TARGETNAME>Emacs</TARGETNAME> 1933 <TARGETNAME>Emacs CW</TARGETNAME>
1934 <PATHTYPE>Name</PATHTYPE> 1934 <PATHTYPE>Name</PATHTYPE>
1935 <PATH>callproc.c</PATH> 1935 <PATH>callproc.c</PATH>
1936 <PATHFORMAT>MacOS</PATHFORMAT> 1936 <PATHFORMAT>MacOS</PATHFORMAT>
1937 </FILEREF> 1937 </FILEREF>
1938 <FILEREF> 1938 <FILEREF>
1939 <TARGETNAME>Emacs</TARGETNAME> 1939 <TARGETNAME>Emacs CW</TARGETNAME>
1940 <PATHTYPE>Name</PATHTYPE> 1940 <PATHTYPE>Name</PATHTYPE>
1941 <PATH>casefiddle.c</PATH> 1941 <PATH>casefiddle.c</PATH>
1942 <PATHFORMAT>MacOS</PATHFORMAT> 1942 <PATHFORMAT>MacOS</PATHFORMAT>
1943 </FILEREF> 1943 </FILEREF>
1944 <FILEREF> 1944 <FILEREF>
1945 <TARGETNAME>Emacs</TARGETNAME> 1945 <TARGETNAME>Emacs CW</TARGETNAME>
1946 <PATHTYPE>Name</PATHTYPE> 1946 <PATHTYPE>Name</PATHTYPE>
1947 <PATH>casetab.c</PATH> 1947 <PATH>casetab.c</PATH>
1948 <PATHFORMAT>MacOS</PATHFORMAT> 1948 <PATHFORMAT>MacOS</PATHFORMAT>
1949 </FILEREF> 1949 </FILEREF>
1950 <FILEREF> 1950 <FILEREF>
1951 <TARGETNAME>Emacs</TARGETNAME> 1951 <TARGETNAME>Emacs CW</TARGETNAME>
1952 <PATHTYPE>Name</PATHTYPE> 1952 <PATHTYPE>Name</PATHTYPE>
1953 <PATH>category.c</PATH> 1953 <PATH>category.c</PATH>
1954 <PATHFORMAT>MacOS</PATHFORMAT> 1954 <PATHFORMAT>MacOS</PATHFORMAT>
1955 </FILEREF> 1955 </FILEREF>
1956 <FILEREF> 1956 <FILEREF>
1957 <TARGETNAME>Emacs</TARGETNAME> 1957 <TARGETNAME>Emacs CW</TARGETNAME>
1958 <PATHTYPE>Name</PATHTYPE> 1958 <PATHTYPE>Name</PATHTYPE>
1959 <PATH>ccl.c</PATH> 1959 <PATH>ccl.c</PATH>
1960 <PATHFORMAT>MacOS</PATHFORMAT> 1960 <PATHFORMAT>MacOS</PATHFORMAT>
1961 </FILEREF> 1961 </FILEREF>
1962 <FILEREF> 1962 <FILEREF>
1963 <TARGETNAME>Emacs</TARGETNAME> 1963 <TARGETNAME>Emacs CW</TARGETNAME>
1964 <PATHTYPE>Name</PATHTYPE> 1964 <PATHTYPE>Name</PATHTYPE>
1965 <PATH>charset.c</PATH> 1965 <PATH>charset.c</PATH>
1966 <PATHFORMAT>MacOS</PATHFORMAT> 1966 <PATHFORMAT>MacOS</PATHFORMAT>
1967 </FILEREF> 1967 </FILEREF>
1968 <FILEREF> 1968 <FILEREF>
1969 <TARGETNAME>Emacs</TARGETNAME> 1969 <TARGETNAME>Emacs CW</TARGETNAME>
1970 <PATHTYPE>Name</PATHTYPE> 1970 <PATHTYPE>Name</PATHTYPE>
1971 <PATH>cm.c</PATH> 1971 <PATH>cm.c</PATH>
1972 <PATHFORMAT>MacOS</PATHFORMAT> 1972 <PATHFORMAT>MacOS</PATHFORMAT>
1973 </FILEREF> 1973 </FILEREF>
1974 <FILEREF> 1974 <FILEREF>
1975 <TARGETNAME>Emacs</TARGETNAME> 1975 <TARGETNAME>Emacs CW</TARGETNAME>
1976 <PATHTYPE>Name</PATHTYPE> 1976 <PATHTYPE>Name</PATHTYPE>
1977 <PATH>cmds.c</PATH> 1977 <PATH>cmds.c</PATH>
1978 <PATHFORMAT>MacOS</PATHFORMAT> 1978 <PATHFORMAT>MacOS</PATHFORMAT>
1979 </FILEREF> 1979 </FILEREF>
1980 <FILEREF> 1980 <FILEREF>
1981 <TARGETNAME>Emacs</TARGETNAME> 1981 <TARGETNAME>Emacs CW</TARGETNAME>
1982 <PATHTYPE>Name</PATHTYPE> 1982 <PATHTYPE>Name</PATHTYPE>
1983 <PATH>coding.c</PATH> 1983 <PATH>coding.c</PATH>
1984 <PATHFORMAT>MacOS</PATHFORMAT> 1984 <PATHFORMAT>MacOS</PATHFORMAT>
1985 </FILEREF> 1985 </FILEREF>
1986 <FILEREF> 1986 <FILEREF>
1987 <TARGETNAME>Emacs</TARGETNAME> 1987 <TARGETNAME>Emacs CW</TARGETNAME>
1988 <PATHTYPE>Name</PATHTYPE> 1988 <PATHTYPE>Name</PATHTYPE>
1989 <PATH>composite.c</PATH> 1989 <PATH>composite.c</PATH>
1990 <PATHFORMAT>MacOS</PATHFORMAT> 1990 <PATHFORMAT>MacOS</PATHFORMAT>
1991 </FILEREF> 1991 </FILEREF>
1992 <FILEREF> 1992 <FILEREF>
1993 <TARGETNAME>Emacs</TARGETNAME> 1993 <TARGETNAME>Emacs CW</TARGETNAME>
1994 <PATHTYPE>Name</PATHTYPE> 1994 <PATHTYPE>Name</PATHTYPE>
1995 <PATH>data.c</PATH> 1995 <PATH>data.c</PATH>
1996 <PATHFORMAT>MacOS</PATHFORMAT> 1996 <PATHFORMAT>MacOS</PATHFORMAT>
1997 </FILEREF> 1997 </FILEREF>
1998 <FILEREF> 1998 <FILEREF>
1999 <TARGETNAME>Emacs</TARGETNAME> 1999 <TARGETNAME>Emacs CW</TARGETNAME>
2000 <PATHTYPE>Name</PATHTYPE> 2000 <PATHTYPE>Name</PATHTYPE>
2001 <PATH>dired.c</PATH> 2001 <PATH>dired.c</PATH>
2002 <PATHFORMAT>MacOS</PATHFORMAT> 2002 <PATHFORMAT>MacOS</PATHFORMAT>
2003 </FILEREF> 2003 </FILEREF>
2004 <FILEREF> 2004 <FILEREF>
2005 <TARGETNAME>Emacs</TARGETNAME> 2005 <TARGETNAME>Emacs CW</TARGETNAME>
2006 <PATHTYPE>Name</PATHTYPE> 2006 <PATHTYPE>Name</PATHTYPE>
2007 <PATH>dispnew.c</PATH> 2007 <PATH>dispnew.c</PATH>
2008 <PATHFORMAT>MacOS</PATHFORMAT> 2008 <PATHFORMAT>MacOS</PATHFORMAT>
2009 </FILEREF> 2009 </FILEREF>
2010 <FILEREF> 2010 <FILEREF>
2011 <TARGETNAME>Emacs</TARGETNAME> 2011 <TARGETNAME>Emacs CW</TARGETNAME>
2012 <PATHTYPE>Name</PATHTYPE> 2012 <PATHTYPE>Name</PATHTYPE>
2013 <PATH>doc.c</PATH> 2013 <PATH>doc.c</PATH>
2014 <PATHFORMAT>MacOS</PATHFORMAT> 2014 <PATHFORMAT>MacOS</PATHFORMAT>
2015 </FILEREF> 2015 </FILEREF>
2016 <FILEREF> 2016 <FILEREF>
2017 <TARGETNAME>Emacs</TARGETNAME> 2017 <TARGETNAME>Emacs CW</TARGETNAME>
2018 <PATHTYPE>Name</PATHTYPE> 2018 <PATHTYPE>Name</PATHTYPE>
2019 <PATH>doprnt.c</PATH> 2019 <PATH>doprnt.c</PATH>
2020 <PATHFORMAT>MacOS</PATHFORMAT> 2020 <PATHFORMAT>MacOS</PATHFORMAT>
2021 </FILEREF> 2021 </FILEREF>
2022 <FILEREF> 2022 <FILEREF>
2023 <TARGETNAME>Emacs</TARGETNAME> 2023 <TARGETNAME>Emacs CW</TARGETNAME>
2024 <PATHTYPE>Name</PATHTYPE> 2024 <PATHTYPE>Name</PATHTYPE>
2025 <PATH>editfns.c</PATH> 2025 <PATH>editfns.c</PATH>
2026 <PATHFORMAT>MacOS</PATHFORMAT> 2026 <PATHFORMAT>MacOS</PATHFORMAT>
2027 </FILEREF> 2027 </FILEREF>
2028 <FILEREF> 2028 <FILEREF>
2029 <TARGETNAME>Emacs</TARGETNAME> 2029 <TARGETNAME>Emacs CW</TARGETNAME>
2030 <PATHTYPE>Name</PATHTYPE> 2030 <PATHTYPE>Name</PATHTYPE>
2031 <PATH>emacs.c</PATH> 2031 <PATH>emacs.c</PATH>
2032 <PATHFORMAT>MacOS</PATHFORMAT> 2032 <PATHFORMAT>MacOS</PATHFORMAT>
2033 </FILEREF> 2033 </FILEREF>
2034 <FILEREF> 2034 <FILEREF>
2035 <TARGETNAME>Emacs</TARGETNAME> 2035 <TARGETNAME>Emacs CW</TARGETNAME>
2036 <PATHTYPE>Name</PATHTYPE> 2036 <PATHTYPE>Name</PATHTYPE>
2037 <PATH>eval.c</PATH> 2037 <PATH>eval.c</PATH>
2038 <PATHFORMAT>MacOS</PATHFORMAT> 2038 <PATHFORMAT>MacOS</PATHFORMAT>
2039 </FILEREF> 2039 </FILEREF>
2040 <FILEREF> 2040 <FILEREF>
2041 <TARGETNAME>Emacs</TARGETNAME> 2041 <TARGETNAME>Emacs CW</TARGETNAME>
2042 <PATHTYPE>Name</PATHTYPE> 2042 <PATHTYPE>Name</PATHTYPE>
2043 <PATH>fileio.c</PATH> 2043 <PATH>fileio.c</PATH>
2044 <PATHFORMAT>MacOS</PATHFORMAT> 2044 <PATHFORMAT>MacOS</PATHFORMAT>
2045 </FILEREF> 2045 </FILEREF>
2046 <FILEREF> 2046 <FILEREF>
2047 <TARGETNAME>Emacs</TARGETNAME> 2047 <TARGETNAME>Emacs CW</TARGETNAME>
2048 <PATHTYPE>Name</PATHTYPE> 2048 <PATHTYPE>Name</PATHTYPE>
2049 <PATH>filemode.c</PATH> 2049 <PATH>filemode.c</PATH>
2050 <PATHFORMAT>MacOS</PATHFORMAT> 2050 <PATHFORMAT>MacOS</PATHFORMAT>
2051 </FILEREF> 2051 </FILEREF>
2052 <FILEREF> 2052 <FILEREF>
2053 <TARGETNAME>Emacs</TARGETNAME> 2053 <TARGETNAME>Emacs CW</TARGETNAME>
2054 <PATHTYPE>Name</PATHTYPE> 2054 <PATHTYPE>Name</PATHTYPE>
2055 <PATH>floatfns.c</PATH> 2055 <PATH>floatfns.c</PATH>
2056 <PATHFORMAT>MacOS</PATHFORMAT> 2056 <PATHFORMAT>MacOS</PATHFORMAT>
2057 </FILEREF> 2057 </FILEREF>
2058 <FILEREF> 2058 <FILEREF>
2059 <TARGETNAME>Emacs</TARGETNAME> 2059 <TARGETNAME>Emacs CW</TARGETNAME>
2060 <PATHTYPE>Name</PATHTYPE> 2060 <PATHTYPE>Name</PATHTYPE>
2061 <PATH>fns.c</PATH> 2061 <PATH>fns.c</PATH>
2062 <PATHFORMAT>MacOS</PATHFORMAT> 2062 <PATHFORMAT>MacOS</PATHFORMAT>
2063 </FILEREF> 2063 </FILEREF>
2064 <FILEREF> 2064 <FILEREF>
2065 <TARGETNAME>Emacs</TARGETNAME> 2065 <TARGETNAME>Emacs CW</TARGETNAME>
2066 <PATHTYPE>Name</PATHTYPE> 2066 <PATHTYPE>Name</PATHTYPE>
2067 <PATH>fontset.c</PATH> 2067 <PATH>fontset.c</PATH>
2068 <PATHFORMAT>MacOS</PATHFORMAT> 2068 <PATHFORMAT>MacOS</PATHFORMAT>
2069 </FILEREF> 2069 </FILEREF>
2070 <FILEREF> 2070 <FILEREF>
2071 <TARGETNAME>Emacs</TARGETNAME> 2071 <TARGETNAME>Emacs CW</TARGETNAME>
2072 <PATHTYPE>Name</PATHTYPE> 2072 <PATHTYPE>Name</PATHTYPE>
2073 <PATH>frame.c</PATH> 2073 <PATH>frame.c</PATH>
2074 <PATHFORMAT>MacOS</PATHFORMAT> 2074 <PATHFORMAT>MacOS</PATHFORMAT>
2075 </FILEREF> 2075 </FILEREF>
2076 <FILEREF> 2076 <FILEREF>
2077 <TARGETNAME>Emacs</TARGETNAME> 2077 <TARGETNAME>Emacs CW</TARGETNAME>
2078 <PATHTYPE>Name</PATHTYPE> 2078 <PATHTYPE>Name</PATHTYPE>
2079 <PATH>getloadavg.c</PATH> 2079 <PATH>getloadavg.c</PATH>
2080 <PATHFORMAT>MacOS</PATHFORMAT> 2080 <PATHFORMAT>MacOS</PATHFORMAT>
2081 </FILEREF> 2081 </FILEREF>
2082 <FILEREF> 2082 <FILEREF>
2083 <TARGETNAME>Emacs</TARGETNAME> 2083 <TARGETNAME>Emacs CW</TARGETNAME>
2084 <PATHTYPE>Name</PATHTYPE> 2084 <PATHTYPE>Name</PATHTYPE>
2085 <PATH>indent.c</PATH> 2085 <PATH>indent.c</PATH>
2086 <PATHFORMAT>MacOS</PATHFORMAT> 2086 <PATHFORMAT>MacOS</PATHFORMAT>
2087 </FILEREF> 2087 </FILEREF>
2088 <FILEREF> 2088 <FILEREF>
2089 <TARGETNAME>Emacs</TARGETNAME> 2089 <TARGETNAME>Emacs CW</TARGETNAME>
2090 <PATHTYPE>Name</PATHTYPE> 2090 <PATHTYPE>Name</PATHTYPE>
2091 <PATH>insdel.c</PATH> 2091 <PATH>insdel.c</PATH>
2092 <PATHFORMAT>MacOS</PATHFORMAT> 2092 <PATHFORMAT>MacOS</PATHFORMAT>
2093 </FILEREF> 2093 </FILEREF>
2094 <FILEREF> 2094 <FILEREF>
2095 <TARGETNAME>Emacs</TARGETNAME> 2095 <TARGETNAME>Emacs CW</TARGETNAME>
2096 <PATHTYPE>Name</PATHTYPE> 2096 <PATHTYPE>Name</PATHTYPE>
2097 <PATH>intervals.c</PATH> 2097 <PATH>intervals.c</PATH>
2098 <PATHFORMAT>MacOS</PATHFORMAT> 2098 <PATHFORMAT>MacOS</PATHFORMAT>
2099 </FILEREF> 2099 </FILEREF>
2100 <FILEREF> 2100 <FILEREF>
2101 <TARGETNAME>Emacs</TARGETNAME> 2101 <TARGETNAME>Emacs CW</TARGETNAME>
2102 <PATHTYPE>Name</PATHTYPE> 2102 <PATHTYPE>Name</PATHTYPE>
2103 <PATH>keyboard.c</PATH> 2103 <PATH>keyboard.c</PATH>
2104 <PATHFORMAT>MacOS</PATHFORMAT> 2104 <PATHFORMAT>MacOS</PATHFORMAT>
2105 </FILEREF> 2105 </FILEREF>
2106 <FILEREF> 2106 <FILEREF>
2107 <TARGETNAME>Emacs</TARGETNAME> 2107 <TARGETNAME>Emacs CW</TARGETNAME>
2108 <PATHTYPE>Name</PATHTYPE> 2108 <PATHTYPE>Name</PATHTYPE>
2109 <PATH>keymap.c</PATH> 2109 <PATH>keymap.c</PATH>
2110 <PATHFORMAT>MacOS</PATHFORMAT> 2110 <PATHFORMAT>MacOS</PATHFORMAT>
2111 </FILEREF> 2111 </FILEREF>
2112 <FILEREF> 2112 <FILEREF>
2113 <TARGETNAME>Emacs</TARGETNAME> 2113 <TARGETNAME>Emacs CW</TARGETNAME>
2114 <PATHTYPE>Name</PATHTYPE> 2114 <PATHTYPE>Name</PATHTYPE>
2115 <PATH>lread.c</PATH> 2115 <PATH>lread.c</PATH>
2116 <PATHFORMAT>MacOS</PATHFORMAT> 2116 <PATHFORMAT>MacOS</PATHFORMAT>
2117 </FILEREF> 2117 </FILEREF>
2118 <FILEREF> 2118 <FILEREF>
2119 <TARGETNAME>Emacs</TARGETNAME> 2119 <TARGETNAME>Emacs CW</TARGETNAME>
2120 <PATHTYPE>Name</PATHTYPE> 2120 <PATHTYPE>Name</PATHTYPE>
2121 <PATH>macros.c</PATH> 2121 <PATH>macros.c</PATH>
2122 <PATHFORMAT>MacOS</PATHFORMAT> 2122 <PATHFORMAT>MacOS</PATHFORMAT>
2123 </FILEREF> 2123 </FILEREF>
2124 <FILEREF> 2124 <FILEREF>
2125 <TARGETNAME>Emacs</TARGETNAME> 2125 <TARGETNAME>Emacs CW</TARGETNAME>
2126 <PATHTYPE>Name</PATHTYPE> 2126 <PATHTYPE>Name</PATHTYPE>
2127 <PATH>marker.c</PATH> 2127 <PATH>marker.c</PATH>
2128 <PATHFORMAT>MacOS</PATHFORMAT> 2128 <PATHFORMAT>MacOS</PATHFORMAT>
2129 </FILEREF> 2129 </FILEREF>
2130 <FILEREF> 2130 <FILEREF>
2131 <TARGETNAME>Emacs</TARGETNAME> 2131 <TARGETNAME>Emacs CW</TARGETNAME>
2132 <PATHTYPE>Name</PATHTYPE> 2132 <PATHTYPE>Name</PATHTYPE>
2133 <PATH>md5.c</PATH> 2133 <PATH>md5.c</PATH>
2134 <PATHFORMAT>MacOS</PATHFORMAT> 2134 <PATHFORMAT>MacOS</PATHFORMAT>
2135 </FILEREF> 2135 </FILEREF>
2136 <FILEREF> 2136 <FILEREF>
2137 <TARGETNAME>Emacs</TARGETNAME> 2137 <TARGETNAME>Emacs CW</TARGETNAME>
2138 <PATHTYPE>Name</PATHTYPE> 2138 <PATHTYPE>Name</PATHTYPE>
2139 <PATH>minibuf.c</PATH> 2139 <PATH>minibuf.c</PATH>
2140 <PATHFORMAT>MacOS</PATHFORMAT> 2140 <PATHFORMAT>MacOS</PATHFORMAT>
2141 </FILEREF> 2141 </FILEREF>
2142 <FILEREF> 2142 <FILEREF>
2143 <TARGETNAME>Emacs</TARGETNAME> 2143 <TARGETNAME>Emacs CW</TARGETNAME>
2144 <PATHTYPE>Name</PATHTYPE> 2144 <PATHTYPE>Name</PATHTYPE>
2145 <PATH>mktime.c</PATH> 2145 <PATH>mktime.c</PATH>
2146 <PATHFORMAT>MacOS</PATHFORMAT> 2146 <PATHFORMAT>MacOS</PATHFORMAT>
2147 </FILEREF> 2147 </FILEREF>
2148 <FILEREF> 2148 <FILEREF>
2149 <TARGETNAME>Emacs</TARGETNAME> 2149 <TARGETNAME>Emacs CW</TARGETNAME>
2150 <PATHTYPE>Name</PATHTYPE> 2150 <PATHTYPE>Name</PATHTYPE>
2151 <PATH>print.c</PATH> 2151 <PATH>print.c</PATH>
2152 <PATHFORMAT>MacOS</PATHFORMAT> 2152 <PATHFORMAT>MacOS</PATHFORMAT>
2153 </FILEREF> 2153 </FILEREF>
2154 <FILEREF> 2154 <FILEREF>
2155 <TARGETNAME>Emacs</TARGETNAME> 2155 <TARGETNAME>Emacs CW</TARGETNAME>
2156 <PATHTYPE>Name</PATHTYPE> 2156 <PATHTYPE>Name</PATHTYPE>
2157 <PATH>process.c</PATH> 2157 <PATH>process.c</PATH>
2158 <PATHFORMAT>MacOS</PATHFORMAT> 2158 <PATHFORMAT>MacOS</PATHFORMAT>
2159 </FILEREF> 2159 </FILEREF>
2160 <FILEREF> 2160 <FILEREF>
2161 <TARGETNAME>Emacs</TARGETNAME> 2161 <TARGETNAME>Emacs CW</TARGETNAME>
2162 <PATHTYPE>Name</PATHTYPE> 2162 <PATHTYPE>Name</PATHTYPE>
2163 <PATH>regex.c</PATH> 2163 <PATH>regex.c</PATH>
2164 <PATHFORMAT>MacOS</PATHFORMAT> 2164 <PATHFORMAT>MacOS</PATHFORMAT>
2165 </FILEREF> 2165 </FILEREF>
2166 <FILEREF> 2166 <FILEREF>
2167 <TARGETNAME>Emacs</TARGETNAME> 2167 <TARGETNAME>Emacs CW</TARGETNAME>
2168 <PATHTYPE>Name</PATHTYPE> 2168 <PATHTYPE>Name</PATHTYPE>
2169 <PATH>region-cache.c</PATH> 2169 <PATH>region-cache.c</PATH>
2170 <PATHFORMAT>MacOS</PATHFORMAT> 2170 <PATHFORMAT>MacOS</PATHFORMAT>
2171 </FILEREF> 2171 </FILEREF>
2172 <FILEREF> 2172 <FILEREF>
2173 <TARGETNAME>Emacs</TARGETNAME> 2173 <TARGETNAME>Emacs CW</TARGETNAME>
2174 <PATHTYPE>Name</PATHTYPE> 2174 <PATHTYPE>Name</PATHTYPE>
2175 <PATH>scroll.c</PATH> 2175 <PATH>scroll.c</PATH>
2176 <PATHFORMAT>MacOS</PATHFORMAT> 2176 <PATHFORMAT>MacOS</PATHFORMAT>
2177 </FILEREF> 2177 </FILEREF>
2178 <FILEREF> 2178 <FILEREF>
2179 <TARGETNAME>Emacs</TARGETNAME> 2179 <TARGETNAME>Emacs CW</TARGETNAME>
2180 <PATHTYPE>Name</PATHTYPE> 2180 <PATHTYPE>Name</PATHTYPE>
2181 <PATH>search.c</PATH> 2181 <PATH>search.c</PATH>
2182 <PATHFORMAT>MacOS</PATHFORMAT> 2182 <PATHFORMAT>MacOS</PATHFORMAT>
2183 </FILEREF> 2183 </FILEREF>
2184 <FILEREF> 2184 <FILEREF>
2185 <TARGETNAME>Emacs</TARGETNAME> 2185 <TARGETNAME>Emacs CW</TARGETNAME>
2186 <PATHTYPE>Name</PATHTYPE> 2186 <PATHTYPE>Name</PATHTYPE>
2187 <PATH>strftime.c</PATH> 2187 <PATH>strftime.c</PATH>
2188 <PATHFORMAT>MacOS</PATHFORMAT> 2188 <PATHFORMAT>MacOS</PATHFORMAT>
2189 </FILEREF> 2189 </FILEREF>
2190 <FILEREF> 2190 <FILEREF>
2191 <TARGETNAME>Emacs</TARGETNAME> 2191 <TARGETNAME>Emacs CW</TARGETNAME>
2192 <PATHTYPE>Name</PATHTYPE> 2192 <PATHTYPE>Name</PATHTYPE>
2193 <PATH>syntax.c</PATH> 2193 <PATH>syntax.c</PATH>
2194 <PATHFORMAT>MacOS</PATHFORMAT> 2194 <PATHFORMAT>MacOS</PATHFORMAT>
2195 </FILEREF> 2195 </FILEREF>
2196 <FILEREF> 2196 <FILEREF>
2197 <TARGETNAME>Emacs</TARGETNAME> 2197 <TARGETNAME>Emacs CW</TARGETNAME>
2198 <PATHTYPE>Name</PATHTYPE> 2198 <PATHTYPE>Name</PATHTYPE>
2199 <PATH>sysdep.c</PATH> 2199 <PATH>sysdep.c</PATH>
2200 <PATHFORMAT>MacOS</PATHFORMAT> 2200 <PATHFORMAT>MacOS</PATHFORMAT>
2201 </FILEREF> 2201 </FILEREF>
2202 <FILEREF> 2202 <FILEREF>
2203 <TARGETNAME>Emacs</TARGETNAME> 2203 <TARGETNAME>Emacs CW</TARGETNAME>
2204 <PATHTYPE>Name</PATHTYPE> 2204 <PATHTYPE>Name</PATHTYPE>
2205 <PATH>term.c</PATH> 2205 <PATH>term.c</PATH>
2206 <PATHFORMAT>MacOS</PATHFORMAT> 2206 <PATHFORMAT>MacOS</PATHFORMAT>
2207 </FILEREF> 2207 </FILEREF>
2208 <FILEREF> 2208 <FILEREF>
2209 <TARGETNAME>Emacs</TARGETNAME> 2209 <TARGETNAME>Emacs CW</TARGETNAME>
2210 <PATHTYPE>Name</PATHTYPE> 2210 <PATHTYPE>Name</PATHTYPE>
2211 <PATH>termcap.c</PATH> 2211 <PATH>termcap.c</PATH>
2212 <PATHFORMAT>MacOS</PATHFORMAT> 2212 <PATHFORMAT>MacOS</PATHFORMAT>
2213 </FILEREF> 2213 </FILEREF>
2214 <FILEREF> 2214 <FILEREF>
2215 <TARGETNAME>Emacs</TARGETNAME> 2215 <TARGETNAME>Emacs CW</TARGETNAME>
2216 <PATHTYPE>Name</PATHTYPE> 2216 <PATHTYPE>Name</PATHTYPE>
2217 <PATH>textprop.c</PATH> 2217 <PATH>textprop.c</PATH>
2218 <PATHFORMAT>MacOS</PATHFORMAT> 2218 <PATHFORMAT>MacOS</PATHFORMAT>
2219 </FILEREF> 2219 </FILEREF>
2220 <FILEREF> 2220 <FILEREF>
2221 <TARGETNAME>Emacs</TARGETNAME> 2221 <TARGETNAME>Emacs CW</TARGETNAME>
2222 <PATHTYPE>Name</PATHTYPE> 2222 <PATHTYPE>Name</PATHTYPE>
2223 <PATH>tparam.c</PATH> 2223 <PATH>tparam.c</PATH>
2224 <PATHFORMAT>MacOS</PATHFORMAT> 2224 <PATHFORMAT>MacOS</PATHFORMAT>
2225 </FILEREF> 2225 </FILEREF>
2226 <FILEREF> 2226 <FILEREF>
2227 <TARGETNAME>Emacs</TARGETNAME> 2227 <TARGETNAME>Emacs CW</TARGETNAME>
2228 <PATHTYPE>Name</PATHTYPE> 2228 <PATHTYPE>Name</PATHTYPE>
2229 <PATH>undo.c</PATH> 2229 <PATH>undo.c</PATH>
2230 <PATHFORMAT>MacOS</PATHFORMAT> 2230 <PATHFORMAT>MacOS</PATHFORMAT>
2231 </FILEREF> 2231 </FILEREF>
2232 <FILEREF> 2232 <FILEREF>
2233 <TARGETNAME>Emacs</TARGETNAME> 2233 <TARGETNAME>Emacs CW</TARGETNAME>
2234 <PATHTYPE>Name</PATHTYPE> 2234 <PATHTYPE>Name</PATHTYPE>
2235 <PATH>window.c</PATH> 2235 <PATH>window.c</PATH>
2236 <PATHFORMAT>MacOS</PATHFORMAT> 2236 <PATHFORMAT>MacOS</PATHFORMAT>
2237 </FILEREF> 2237 </FILEREF>
2238 <FILEREF> 2238 <FILEREF>
2239 <TARGETNAME>Emacs</TARGETNAME> 2239 <TARGETNAME>Emacs CW</TARGETNAME>
2240 <PATHTYPE>Name</PATHTYPE> 2240 <PATHTYPE>Name</PATHTYPE>
2241 <PATH>xdisp.c</PATH> 2241 <PATH>xdisp.c</PATH>
2242 <PATHFORMAT>MacOS</PATHFORMAT> 2242 <PATHFORMAT>MacOS</PATHFORMAT>
2243 </FILEREF> 2243 </FILEREF>
2244 <FILEREF> 2244 <FILEREF>
2245 <TARGETNAME>Emacs</TARGETNAME> 2245 <TARGETNAME>Emacs CW</TARGETNAME>
2246 <PATHTYPE>Name</PATHTYPE> 2246 <PATHTYPE>Name</PATHTYPE>
2247 <PATH>xfaces.c</PATH> 2247 <PATH>xfaces.c</PATH>
2248 <PATHFORMAT>MacOS</PATHFORMAT> 2248 <PATHFORMAT>MacOS</PATHFORMAT>
@@ -2250,25 +2250,25 @@ emacs-cw6.mcp project.
2250 </GROUP> 2250 </GROUP>
2251 <GROUP><NAME>Mac Source</NAME> 2251 <GROUP><NAME>Mac Source</NAME>
2252 <FILEREF> 2252 <FILEREF>
2253 <TARGETNAME>Emacs</TARGETNAME> 2253 <TARGETNAME>Emacs CW</TARGETNAME>
2254 <PATHTYPE>Name</PATHTYPE> 2254 <PATHTYPE>Name</PATHTYPE>
2255 <PATH>mac.c</PATH> 2255 <PATH>mac.c</PATH>
2256 <PATHFORMAT>MacOS</PATHFORMAT> 2256 <PATHFORMAT>MacOS</PATHFORMAT>
2257 </FILEREF> 2257 </FILEREF>
2258 <FILEREF> 2258 <FILEREF>
2259 <TARGETNAME>Emacs</TARGETNAME> 2259 <TARGETNAME>Emacs CW</TARGETNAME>
2260 <PATHTYPE>Name</PATHTYPE> 2260 <PATHTYPE>Name</PATHTYPE>
2261 <PATH>macfns.c</PATH> 2261 <PATH>macfns.c</PATH>
2262 <PATHFORMAT>MacOS</PATHFORMAT> 2262 <PATHFORMAT>MacOS</PATHFORMAT>
2263 </FILEREF> 2263 </FILEREF>
2264 <FILEREF> 2264 <FILEREF>
2265 <TARGETNAME>Emacs</TARGETNAME> 2265 <TARGETNAME>Emacs CW</TARGETNAME>
2266 <PATHTYPE>Name</PATHTYPE> 2266 <PATHTYPE>Name</PATHTYPE>
2267 <PATH>macmenu.c</PATH> 2267 <PATH>macmenu.c</PATH>
2268 <PATHFORMAT>MacOS</PATHFORMAT> 2268 <PATHFORMAT>MacOS</PATHFORMAT>
2269 </FILEREF> 2269 </FILEREF>
2270 <FILEREF> 2270 <FILEREF>
2271 <TARGETNAME>Emacs</TARGETNAME> 2271 <TARGETNAME>Emacs CW</TARGETNAME>
2272 <PATHTYPE>Name</PATHTYPE> 2272 <PATHTYPE>Name</PATHTYPE>
2273 <PATH>macterm.c</PATH> 2273 <PATH>macterm.c</PATH>
2274 <PATHFORMAT>MacOS</PATHFORMAT> 2274 <PATHFORMAT>MacOS</PATHFORMAT>
@@ -2276,7 +2276,7 @@ emacs-cw6.mcp project.
2276 </GROUP> 2276 </GROUP>
2277 <GROUP><NAME>Resources</NAME> 2277 <GROUP><NAME>Resources</NAME>
2278 <FILEREF> 2278 <FILEREF>
2279 <TARGETNAME>Emacs</TARGETNAME> 2279 <TARGETNAME>Emacs CW</TARGETNAME>
2280 <PATHTYPE>Name</PATHTYPE> 2280 <PATHTYPE>Name</PATHTYPE>
2281 <PATH>Emacs.r</PATH> 2281 <PATH>Emacs.r</PATH>
2282 <PATHFORMAT>MacOS</PATHFORMAT> 2282 <PATHFORMAT>MacOS</PATHFORMAT>
@@ -2284,31 +2284,31 @@ emacs-cw6.mcp project.
2284 </GROUP> 2284 </GROUP>
2285 <GROUP><NAME>Mac Libraries</NAME> 2285 <GROUP><NAME>Mac Libraries</NAME>
2286 <FILEREF> 2286 <FILEREF>
2287 <TARGETNAME>Emacs</TARGETNAME> 2287 <TARGETNAME>Emacs CW</TARGETNAME>
2288 <PATHTYPE>Name</PATHTYPE> 2288 <PATHTYPE>Name</PATHTYPE>
2289 <PATH>InterfaceLib</PATH> 2289 <PATH>InterfaceLib</PATH>
2290 <PATHFORMAT>MacOS</PATHFORMAT> 2290 <PATHFORMAT>MacOS</PATHFORMAT>
2291 </FILEREF> 2291 </FILEREF>
2292 <FILEREF> 2292 <FILEREF>
2293 <TARGETNAME>Emacs</TARGETNAME> 2293 <TARGETNAME>Emacs CW</TARGETNAME>
2294 <PATHTYPE>Name</PATHTYPE> 2294 <PATHTYPE>Name</PATHTYPE>
2295 <PATH>MathLib</PATH> 2295 <PATH>MathLib</PATH>
2296 <PATHFORMAT>MacOS</PATHFORMAT> 2296 <PATHFORMAT>MacOS</PATHFORMAT>
2297 </FILEREF> 2297 </FILEREF>
2298 <FILEREF> 2298 <FILEREF>
2299 <TARGETNAME>Emacs</TARGETNAME> 2299 <TARGETNAME>Emacs CW</TARGETNAME>
2300 <PATHTYPE>Name</PATHTYPE> 2300 <PATHTYPE>Name</PATHTYPE>
2301 <PATH>AppleScriptLib</PATH> 2301 <PATH>AppleScriptLib</PATH>
2302 <PATHFORMAT>MacOS</PATHFORMAT> 2302 <PATHFORMAT>MacOS</PATHFORMAT>
2303 </FILEREF> 2303 </FILEREF>
2304 <FILEREF> 2304 <FILEREF>
2305 <TARGETNAME>Emacs</TARGETNAME> 2305 <TARGETNAME>Emacs CW</TARGETNAME>
2306 <PATHTYPE>Name</PATHTYPE> 2306 <PATHTYPE>Name</PATHTYPE>
2307 <PATH>TextEncodingConverter</PATH> 2307 <PATH>TextEncodingConverter</PATH>
2308 <PATHFORMAT>MacOS</PATHFORMAT> 2308 <PATHFORMAT>MacOS</PATHFORMAT>
2309 </FILEREF> 2309 </FILEREF>
2310 <FILEREF> 2310 <FILEREF>
2311 <TARGETNAME>Emacs</TARGETNAME> 2311 <TARGETNAME>Emacs CW</TARGETNAME>
2312 <PATHTYPE>Name</PATHTYPE> 2312 <PATHTYPE>Name</PATHTYPE>
2313 <PATH>AppearanceLib</PATH> 2313 <PATH>AppearanceLib</PATH>
2314 <PATHFORMAT>MacOS</PATHFORMAT> 2314 <PATHFORMAT>MacOS</PATHFORMAT>
@@ -2316,19 +2316,19 @@ emacs-cw6.mcp project.
2316 </GROUP> 2316 </GROUP>
2317 <GROUP><NAME>ANSI Libraries</NAME> 2317 <GROUP><NAME>ANSI Libraries</NAME>
2318 <FILEREF> 2318 <FILEREF>
2319 <TARGETNAME>Emacs</TARGETNAME> 2319 <TARGETNAME>Emacs CW</TARGETNAME>
2320 <PATHTYPE>Name</PATHTYPE> 2320 <PATHTYPE>Name</PATHTYPE>
2321 <PATH>MSL C.PPC.Lib</PATH> 2321 <PATH>MSL C.PPC.Lib</PATH>
2322 <PATHFORMAT>MacOS</PATHFORMAT> 2322 <PATHFORMAT>MacOS</PATHFORMAT>
2323 </FILEREF> 2323 </FILEREF>
2324 <FILEREF> 2324 <FILEREF>
2325 <TARGETNAME>Emacs</TARGETNAME> 2325 <TARGETNAME>Emacs CW</TARGETNAME>
2326 <PATHTYPE>Name</PATHTYPE> 2326 <PATHTYPE>Name</PATHTYPE>
2327 <PATH>MSL SIOUX.PPC.Lib</PATH> 2327 <PATH>MSL SIOUX.PPC.Lib</PATH>
2328 <PATHFORMAT>MacOS</PATHFORMAT> 2328 <PATHFORMAT>MacOS</PATHFORMAT>
2329 </FILEREF> 2329 </FILEREF>
2330 <FILEREF> 2330 <FILEREF>
2331 <TARGETNAME>Emacs</TARGETNAME> 2331 <TARGETNAME>Emacs CW</TARGETNAME>
2332 <PATHTYPE>Name</PATHTYPE> 2332 <PATHTYPE>Name</PATHTYPE>
2333 <PATH>MSL RuntimePPC.Lib</PATH> 2333 <PATH>MSL RuntimePPC.Lib</PATH>
2334 <PATHFORMAT>MacOS</PATHFORMAT> 2334 <PATHFORMAT>MacOS</PATHFORMAT>
diff --git a/mac/inc/alloca.h b/mac/inc/alloca.h
index 6d29a0e7617..f0b1e76fbf3 100644
--- a/mac/inc/alloca.h
+++ b/mac/inc/alloca.h
@@ -17,7 +17,7 @@ along with GNU Emacs; see the file COPYING. If not, write to the Free
17Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1802111-1307, USA. */ 1802111-1307, USA. */
19 19
20/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 20/* Contributed by Andrew Choi (akochoi@mac.com). */
21 21
22#ifndef _ALLOCA_H_ 22#ifndef _ALLOCA_H_
23#define _ALLOCA_H_ 23#define _ALLOCA_H_
diff --git a/mac/inc/config.h b/mac/inc/config.h
index aeb4a8aaad7..a536ee9e877 100644
--- a/mac/inc/config.h
+++ b/mac/inc/config.h
@@ -20,6 +20,8 @@ along with GNU Emacs; see the file COPYING. If not, write to the
20Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA. */ 21Boston, MA 02111-1307, USA. */
22 22
23/* Contributed by Andrew Choi (akochoi@mac.com). */
24
23 25
24/* No code in Emacs #includes config.h twice, but some of the code 26/* No code in Emacs #includes config.h twice, but some of the code
25 intended to work with other packages as well (like gmalloc.c) 27 intended to work with other packages as well (like gmalloc.c)
@@ -567,4 +569,4 @@ extern char *getenv ();
567 569
568/* #define GLYPH_DEBUG 1 */ 570/* #define GLYPH_DEBUG 1 */
569 571
570#define NO_RETURN /* nothing */ \ No newline at end of file 572#define NO_RETURN /* nothing */
diff --git a/mac/inc/defs-cw5.h b/mac/inc/defs-cw5.h
deleted file mode 100644
index ffc00d0f7da..00000000000
--- a/mac/inc/defs-cw5.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/* Copyright (C) 2001 Free Software Foundation, Inc.
2
3This file is part of GNU Emacs.
4
5GNU Emacs is free software; you can redistribute it and/or modify it
6under the terms of the GNU General Public License as published by the
7Free Software Foundation; either version 2, or (at your option) any
8later version.
9
10GNU Emacs is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with GNU Emacs; see the file COPYING. If not, write to the Free
17Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1802111-1307, USA. */
19
20/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
21
22#define emacs 1
23#define HAVE_CONFIG_H
diff --git a/mac/inc/defs-cw6.h b/mac/inc/defs-cw6.h
index 6b386ba723d..e8d8abb8750 100644
--- a/mac/inc/defs-cw6.h
+++ b/mac/inc/defs-cw6.h
@@ -17,9 +17,10 @@ along with GNU Emacs; see the file COPYING. If not, write to the Free
17Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1802111-1307, USA. */ 1802111-1307, USA. */
19 19
20/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 20/* Contributed by Andrew Choi (akochoi@mac.com). */
21 21
22#define emacs 1 22#define emacs 1
23#define HAVE_CONFIG_H 23#define HAVE_CONFIG_H
24 24
25#define CODEWARRIOR_VERSION_6 25#define MAC_OS8 1
26#define MAC_OS 1
diff --git a/mac/inc/dirent.h b/mac/inc/dirent.h
index 8513acb2bee..59b0c44cc41 100644
--- a/mac/inc/dirent.h
+++ b/mac/inc/dirent.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef _DIRENT_H 23#ifndef _DIRENT_H
24#define _DIRENT_H 24#define _DIRENT_H
diff --git a/mac/inc/epaths.h b/mac/inc/epaths.h
index 7dad4582efa..0ec9da70a2b 100644
--- a/mac/inc/epaths.h
+++ b/mac/inc/epaths.h
@@ -20,7 +20,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
20the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA. */ 21Boston, MA 02111-1307, USA. */
22 22
23/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 23/* Contributed by Andrew Choi (akochoi@mac.com). */
24 24
25/* The default search path for Lisp function "load". 25/* The default search path for Lisp function "load".
26 This sets load-path. */ 26 This sets load-path. */
diff --git a/mac/inc/m-mac.h b/mac/inc/m-mac.h
index 6378c614e93..69f33a36131 100644
--- a/mac/inc/m-mac.h
+++ b/mac/inc/m-mac.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23/* The following line tells the configuration script what sort of 23/* The following line tells the configuration script what sort of
24 operating system this machine is likely to run. 24 operating system this machine is likely to run.
diff --git a/mac/inc/pwd.h b/mac/inc/pwd.h
index 8e6a5dece34..dedc8091c45 100644
--- a/mac/inc/pwd.h
+++ b/mac/inc/pwd.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef _PWD_H 23#ifndef _PWD_H
24#define _PWD_H 24#define _PWD_H
diff --git a/mac/inc/s-mac.h b/mac/inc/s-mac.h
index 3780664f74e..35143ddf267 100644
--- a/mac/inc/s-mac.h
+++ b/mac/inc/s-mac.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23/* 23/*
24 * Define symbols to identify the version of Unix this is. 24 * Define symbols to identify the version of Unix this is.
diff --git a/mac/inc/sys/file.h b/mac/inc/sys/file.h
index c37d7006d48..b33f8aaa9cc 100644
--- a/mac/inc/sys/file.h
+++ b/mac/inc/sys/file.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef _SYS_FILE_H 23#ifndef _SYS_FILE_H
24#define _SYS_FILE_H 24#define _SYS_FILE_H
diff --git a/mac/inc/sys/ioctl.h b/mac/inc/sys/ioctl.h
index 116e7bf5b06..ae1a76b7a0f 100644
--- a/mac/inc/sys/ioctl.h
+++ b/mac/inc/sys/ioctl.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef _SYS_IOCTL_H 23#ifndef _SYS_IOCTL_H
24#define _SYS_IOCTL_H 24#define _SYS_IOCTL_H
diff --git a/mac/inc/sys/param.h b/mac/inc/sys/param.h
index 7a39b149366..247f3971a4c 100644
--- a/mac/inc/sys/param.h
+++ b/mac/inc/sys/param.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef _SYS_PARAM_H 23#ifndef _SYS_PARAM_H
24#define _SYS_PARAM_H 24#define _SYS_PARAM_H
diff --git a/mac/inc/sys/stat.h b/mac/inc/sys/stat.h
index fe3dc5df669..0f9ee79dab1 100644
--- a/mac/inc/sys/stat.h
+++ b/mac/inc/sys/stat.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef _SYS_STAT_H 23#ifndef _SYS_STAT_H
24#define _SYS_STAT_H 24#define _SYS_STAT_H
@@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */
26#ifdef __MWERKS__ 26#ifdef __MWERKS__
27#include <stat.mac.h> 27#include <stat.mac.h>
28 28
29#ifdef CODEWARRIOR_VERSION_6 29#if __MSL__ >= 0x6000
30#define fstat _fstat 30#define fstat _fstat
31#endif 31#endif
32 32
diff --git a/mac/inc/sys/time.h b/mac/inc/sys/time.h
index 5c55c09b5cd..b9936e92075 100644
--- a/mac/inc/sys/time.h
+++ b/mac/inc/sys/time.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef _SYS_TIME_H 23#ifndef _SYS_TIME_H
24#define _SYS_TIME_H 24#define _SYS_TIME_H
diff --git a/mac/inc/sys/types.h b/mac/inc/sys/types.h
index 71eb976f3b2..9f358b2a4e8 100644
--- a/mac/inc/sys/types.h
+++ b/mac/inc/sys/types.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef _SYS_TYPES_H 23#ifndef _SYS_TYPES_H
24#define _SYS_TYPES_H 24#define _SYS_TYPES_H
diff --git a/mac/inc/termio.h b/mac/inc/termio.h
index 3f194e59af4..7d423630c93 100644
--- a/mac/inc/termio.h
+++ b/mac/inc/termio.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef _SYS_TERMIO_H 23#ifndef _SYS_TERMIO_H
24#define _SYS_TERMIO_H 24#define _SYS_TERMIO_H
diff --git a/mac/inc/utime.h b/mac/inc/utime.h
index 8cb65ec5f80..1a7f9253296 100644
--- a/mac/inc/utime.h
+++ b/mac/inc/utime.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef _UTIME_H_ 23#ifndef _UTIME_H_
24#define _UTIME_H_ 24#define _UTIME_H_
diff --git a/mac/inc/utsname.h b/mac/inc/utsname.h
index fec32be7421..0469fcf9eab 100644
--- a/mac/inc/utsname.h
+++ b/mac/inc/utsname.h
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef _UTSNAME_H 23#ifndef _UTSNAME_H
24#define _UTSNAME_H 24#define _UTSNAME_H
diff --git a/mac/make-bin-dist b/mac/make-bin-dist
new file mode 100755
index 00000000000..793f15581f7
--- /dev/null
+++ b/mac/make-bin-dist
@@ -0,0 +1,117 @@
1#!/bin/sh
2
3#### make-bin-dist: create a binary Emacs distribution tar file for
4#### Mac OS X. This basically runs a `configure' and `make install'
5#### into a temporary directory and archives that directory. It also
6#### places the Emacs application bundle and a installer script in the
7#### tar file. The installer script is run to set up the XML file for
8#### setting the environment variables used by Emacs when it is
9#### started from the Finder.
10
11# Copyright (C) 2002 Free Software Foundation, Inc.
12#
13# This file is part of GNU Emacs.
14#
15# GNU Emacs is free software; you can redistribute it and/or modify
16# it under the terms of the GNU General Public License as published by
17# the Free Software Foundation; either version 2, or (at your option)
18# any later version.
19#
20# GNU Emacs is distributed in the hope that it will be useful,
21# but WITHOUT ANY WARRANTY; without even the implied warranty of
22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23# GNU General Public License for more details.
24#
25# You should have received a copy of the GNU General Public License
26# along with GNU Emacs; see the file COPYING. If not, write to the
27# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
28# Boston, MA 02111-1307, USA.
29
30progname="$0"
31
32### Exit if a command fails.
33#set -e
34
35### Print out each line we read, for debugging's sake.
36set -v
37
38LANGUAGE=C
39LC_ALL=C
40LC_MESSAGES=
41LANG=
42export LANGUAGE LC_ALL LC_MESSAGES LANG
43
44## Don't restrict access to any files.
45umask 0
46
47### Make sure we're running in the right place.
48if [ ! -f Emacs.app/Contents/PkgInfo ]; then
49 echo "${progname}: Can't find \`Emacs.app/Contents/PkgInfo'" >&2
50 echo "${progname} must be run in the \`mac' directory of the Emacs" >&2
51 echo "distribution tree. cd to that directory and try again." >&2
52 exit 1
53fi
54
55### Check whether file ../lisp/version.el exists.
56if [ ! -f ../lisp/version.el ]; then
57 echo "${progname}: Can't find \`../lisp/version.el'" >&2
58 exit 1
59fi
60
61### Find out which version of Emacs this is.
62shortversion=`grep 'defconst[ ]*emacs-version' ../lisp/version.el \
63 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
64version=`grep 'defconst[ ]*emacs-version' ../lisp/version.el \
65 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
66if [ ! "${version}" ]; then
67 echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2
68 exit 1
69fi
70
71echo Version numbers are $version and $shortversion
72
73### Make sure we don't already have a directory emacs-${version}.
74
75emacsname="emacs-${version}${new_extension}"
76
77if [ -d ${emacsname} ]
78then
79 echo Directory "${emacsname}" already exists >&2
80 exit 1
81fi
82
83### Make sure the subdirectory is available.
84tempparent="make-bin-dist.tmp.$$"
85if [ -d ${tempparent} ]; then
86 echo "${progname}: staging directory \`${tempparent}' already exists.
87Perhaps a previous invocation of \`${progname}' failed to clean up after
88itself. Check that directories whose names are of the form
89\`make-dist.tmp.NNNNN' don't contain any important information, remove
90them, and try again." >&2
91 exit 1
92fi
93
94tempparentfull="`pwd`/${tempparent}"
95
96echo Installing into directory ${tempparentfull} >&2
97
98(cd ..; ./configure --prefix=${tempparentfull}; make install)
99
100### This trap ensures that the staging directory will be cleaned up even
101### when the script is interrupted in mid-career.
102trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; exit 1" 1 2 15
103
104cp -r Emacs.app ${tempparent}
105
106cp osx-install ${tempparent}
107
108echo "Creating tar file"
109
110mv ${tempparent} ${emacsname}
111
112tar cvf - ${emacsname} | gzip > ${emacsname}-mac-bin.tar.gz
113
114echo "Cleaning up the staging directory"
115rm -rf ${emacsname}
116
117### make-bin-dist ends here
diff --git a/mac/makefile.MPW b/mac/makefile.MPW
index 66ad1c73f9b..4ad27efb460 100644
--- a/mac/makefile.MPW
+++ b/mac/makefile.MPW
@@ -47,13 +47,13 @@ OptOption = # -opt speed # alternatively set to -opt off or -opt size
47PPCCOptions = {SymOption} {OptOption} -noMapCR -enum int ¶ 47PPCCOptions = {SymOption} {OptOption} -noMapCR -enum int ¶
48 -typecheck relaxed -w off ¶ 48 -typecheck relaxed -w off ¶
49 -includes unix -i {Includes},{Src} ¶ 49 -includes unix -i {Includes},{Src} ¶
50 -d emacs=1 -d HAVE_CONFIG_H 50 -d emacs=1 -d HAVE_CONFIG_H -d MAC_OS -d MAC_OS8
51 51
52LinkOptions = {SymOption} -d 52LinkOptions = {SymOption} -d
53 53
54CONFIG_H_GROUP = "{Includes}config.h" "{Includes}s-mac.h" "{Includes}utsname.h" "{Includes}m-mac.h" 54CONFIG_H_GROUP = "{Includes}config.h" "{Includes}s-mac.h" "{Includes}utsname.h" "{Includes}m-mac.h"
55DISPEXTERN_H_GROUP = "{Src}dispextern.h" "{Includes}macgui.h" 55DISPEXTERN_H_GROUP = "{Src}dispextern.h" "{Src}macgui.h"
56INTERVALS_H_GROUP = "{Src}intervals.h" "{Src}dispextern.h" "{Includes}macgui.h" 56INTERVALS_H_GROUP = "{Src}intervals.h" "{Src}dispextern.h" "{Src}macgui.h"
57WINDOW_H_GROUP = "{Src}window.h" {DISPEXTERN_H_GROUP} 57WINDOW_H_GROUP = "{Src}window.h" {DISPEXTERN_H_GROUP}
58BLOCKINPUT_H_GROUP = "{Src}blockinput.h" "{Src}atimer.h" "{Src}systime.h" ¶ 58BLOCKINPUT_H_GROUP = "{Src}blockinput.h" "{Src}atimer.h" "{Src}systime.h" ¶
59 "{Includes}sys:time.h" "{Includes}sys:time.h" 59 "{Includes}sys:time.h" "{Includes}sys:time.h"
@@ -125,10 +125,10 @@ EmacsObjects = ¶
125# The list of object files generated from new source files of the Macintosh port. 125# The list of object files generated from new source files of the Macintosh port.
126 126
127MacObjects = ¶ 127MacObjects = ¶
128 "{Source}mac.c.x" ¶ 128 "{Src}mac.c.x" ¶
129 "{Source}macfns.c.x" ¶ 129 "{Src}macfns.c.x" ¶
130 "{Source}macmenu.c.x" ¶ 130 "{Src}macmenu.c.x" ¶
131 "{Source}macterm.c.x" 131 "{Src}macterm.c.x"
132 132
133# The next two are the dependency rules for building Emacs. 133# The next two are the dependency rules for building Emacs.
134 134
@@ -369,8 +369,8 @@ Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
369 "{Src}process.h" ¶ 369 "{Src}process.h" ¶
370 "{Src}keyboard.h" ¶ 370 "{Src}keyboard.h" ¶
371 "{Src}syssignal.h" ¶ 371 "{Src}syssignal.h" ¶
372 "{Includes}macterm.h" ¶ 372 "{Src}macterm.h" ¶
373 "{Includes}macgui.h" ¶ 373 "{Src}macgui.h" ¶
374 "{Src}frame.h" ¶ 374 "{Src}frame.h" ¶
375 "{Src}systime.h" 375 "{Src}systime.h"
376 376
@@ -482,8 +482,8 @@ Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
482 "{Src}lisp.h" ¶ 482 "{Src}lisp.h" ¶
483 "{Src}charset.h" ¶ 483 "{Src}charset.h" ¶
484 "{Src}fontset.h" ¶ 484 "{Src}fontset.h" ¶
485 "{Includes}macterm.h" ¶ 485 "{Src}macterm.h" ¶
486 "{Includes}macgui.h" ¶ 486 "{Src}macgui.h" ¶
487 "{Src}frame.h" ¶ 487 "{Src}frame.h" ¶
488 "{Src}frame.h" ¶ 488 "{Src}frame.h" ¶
489 "{Src}fontset.h" ¶ 489 "{Src}fontset.h" ¶
@@ -556,8 +556,8 @@ Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
556 "{Src}systty.h" ¶ 556 "{Src}systty.h" ¶
557 "{Includes}termio.h" ¶ 557 "{Includes}termio.h" ¶
558 "{Includes}sys:types.h" ¶ 558 "{Includes}sys:types.h" ¶
559 "{Includes}macterm.h" ¶ 559 "{Src}macterm.h" ¶
560 "{Includes}macgui.h" ¶ 560 "{Src}macgui.h" ¶
561 "{Src}frame.h" ¶ 561 "{Src}frame.h" ¶
562 "{Src}systime.h" 562 "{Src}systime.h"
563 563
@@ -734,8 +734,8 @@ Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
734 {DISPEXTERN_H_GROUP} ¶ 734 {DISPEXTERN_H_GROUP} ¶
735 {WINDOW_H_GROUP} ¶ 735 {WINDOW_H_GROUP} ¶
736 "{Src}cm.h" ¶ 736 "{Src}cm.h" ¶
737 "{Includes}macterm.h" ¶ 737 "{Src}macterm.h" ¶
738 "{Includes}macgui.h" ¶ 738 "{Src}macgui.h" ¶
739 "{Src}frame.h" 739 "{Src}frame.h"
740 740
741{Src}termcap.c.x Ä ¶ 741{Src}termcap.c.x Ä ¶
@@ -774,8 +774,8 @@ Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
774 {DISPEXTERN_H_GROUP} ¶ 774 {DISPEXTERN_H_GROUP} ¶
775 {BLOCKINPUT_H_GROUP} ¶ 775 {BLOCKINPUT_H_GROUP} ¶
776 {INTERVALS_H_GROUP} ¶ 776 {INTERVALS_H_GROUP} ¶
777 "{Includes}macterm.h" ¶ 777 "{Src}macterm.h" ¶
778 "{Includes}macgui.h" ¶ 778 "{Src}macgui.h" ¶
779 "{Src}frame.h" 779 "{Src}frame.h"
780 780
781{Src}xdisp.c.x Ä ¶ 781{Src}xdisp.c.x Ä ¶
@@ -799,8 +799,8 @@ Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
799 "{Src}process.h" ¶ 799 "{Src}process.h" ¶
800 "{Src}region-cache.h" ¶ 800 "{Src}region-cache.h" ¶
801 "{Src}fontset.h" ¶ 801 "{Src}fontset.h" ¶
802 "{Includes}macterm.h" ¶ 802 "{Src}macterm.h" ¶
803 "{Includes}macgui.h" ¶ 803 "{Src}macgui.h" ¶
804 "{Src}frame.h" 804 "{Src}frame.h"
805 805
806{Src}xfaces.c.x Ä ¶ 806{Src}xfaces.c.x Ä ¶
@@ -811,8 +811,8 @@ Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
811 "{Src}charset.h" ¶ 811 "{Src}charset.h" ¶
812 "{Src}frame.h" ¶ 812 "{Src}frame.h" ¶
813 "{Src}fontset.h" ¶ 813 "{Src}fontset.h" ¶
814 "{Includes}macterm.h" ¶ 814 "{Src}macterm.h" ¶
815 "{Includes}macgui.h" ¶ 815 "{Src}macgui.h" ¶
816 "{Src}frame.h" ¶ 816 "{Src}frame.h" ¶
817 "{Src}buffer.h" ¶ 817 "{Src}buffer.h" ¶
818 {DISPEXTERN_H_GROUP} ¶ 818 {DISPEXTERN_H_GROUP} ¶
@@ -833,7 +833,7 @@ Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
833 "{Includes}sys:types.h" ¶ 833 "{Includes}sys:types.h" ¶
834 {DISPEXTERN_H_GROUP} 834 {DISPEXTERN_H_GROUP}
835 835
836{Source}mac.c Ä ¶ 836{Src}mac.c Ä ¶
837 {CONFIG_H_GROUP} ¶ 837 {CONFIG_H_GROUP} ¶
838 "{Includes}utime.h" ¶ 838 "{Includes}utime.h" ¶
839 "{Includes}dirent.h" ¶ 839 "{Includes}dirent.h" ¶
@@ -849,12 +849,12 @@ Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
849 "{Includes}sys:time.h" ¶ 849 "{Includes}sys:time.h" ¶
850 "{Includes}utsname.h" 850 "{Includes}utsname.h"
851 851
852{Source}macfns.c Ä ¶ 852{Src}macfns.c Ä ¶
853 {CONFIG_H_GROUP} ¶ 853 {CONFIG_H_GROUP} ¶
854 "{Src}lisp.h" ¶ 854 "{Src}lisp.h" ¶
855 "{Src}charset.h" ¶ 855 "{Src}charset.h" ¶
856 "{Includes}macterm.h" ¶ 856 "{Src}macterm.h" ¶
857 "{Includes}macgui.h" ¶ 857 "{Src}macgui.h" ¶
858 "{Src}frame.h" ¶ 858 "{Src}frame.h" ¶
859 "{Src}frame.h" ¶ 859 "{Src}frame.h" ¶
860 {WINDOW_H_GROUP} ¶ 860 {WINDOW_H_GROUP} ¶
@@ -871,13 +871,13 @@ Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
871 "{Src}systime.h" ¶ 871 "{Src}systime.h" ¶
872 "{Src}bitmaps:gray.xbm" 872 "{Src}bitmaps:gray.xbm"
873 873
874{Source}macterm.c Ä ¶ 874{Src}macterm.c Ä ¶
875 {CONFIG_H_GROUP} ¶ 875 {CONFIG_H_GROUP} ¶
876 "{Src}lisp.h" ¶ 876 "{Src}lisp.h" ¶
877 {BLOCKINPUT_H_GROUP} ¶ 877 {BLOCKINPUT_H_GROUP} ¶
878 "{Src}syssignal.h" ¶ 878 "{Src}syssignal.h" ¶
879 "{Includes}macterm.h" ¶ 879 "{Src}macterm.h" ¶
880 "{Includes}macgui.h" ¶ 880 "{Src}macgui.h" ¶
881 "{Src}frame.h" ¶ 881 "{Src}frame.h" ¶
882 "{Includes}alloca.h" ¶ 882 "{Includes}alloca.h" ¶
883 "{Includes}sys:types.h" ¶ 883 "{Includes}sys:types.h" ¶
@@ -992,9 +992,9 @@ EmacsSource = ¶
992 "{Src}xmenu.c" 992 "{Src}xmenu.c"
993 993
994MacSource = ¶ 994MacSource = ¶
995 "{Source}mac.c" ¶ 995 "{Src}mac.c" ¶
996 "{Source}macfns.c" ¶ 996 "{Src}macfns.c" ¶
997 "{Source}macterm.c" 997 "{Src}macterm.c"
998 998
999 999
1000LispSource = ¶ 1000LispSource = ¶
@@ -1040,22 +1040,10 @@ LispSource = ¶
1040 {Lisp}language:chinese.elc ¶ 1040 {Lisp}language:chinese.elc ¶
1041 {Lisp}language:cyrillic.elc ¶ 1041 {Lisp}language:cyrillic.elc ¶
1042 {Lisp}language:indian.elc ¶ 1042 {Lisp}language:indian.elc ¶
1043 {Lisp}language:devanagari.elc ¶
1044 {Lisp}language:english.elc ¶
1045 {Lisp}language:ethiopic.elc ¶ 1043 {Lisp}language:ethiopic.elc ¶
1046 {Lisp}language:european.elc ¶ 1044 {Lisp}language:european.elc ¶
1047 {Lisp}language:czech.elc ¶
1048 {Lisp}language:slovak.elc ¶
1049 {Lisp}language:romanian.elc ¶
1050 {Lisp}language:greek.elc ¶
1051 {Lisp}language:hebrew.elc ¶
1052 {Lisp}language:japanese.elc ¶
1053 {Lisp}language:korean.elc ¶
1054 {Lisp}language:lao.elc ¶
1055 {Lisp}language:thai.elc ¶
1056 {Lisp}language:tibetan.elc ¶ 1045 {Lisp}language:tibetan.elc ¶
1057 {Lisp}language:vietnamese.elc ¶ 1046 {Lisp}language:vietnamese.elc ¶
1058 {Lisp}language:misc-lang.elc ¶
1059 {Lisp}paths.el ¶ 1047 {Lisp}paths.el ¶
1060 {Lisp}register.elc ¶ 1048 {Lisp}register.elc ¶
1061 {Lisp}replace.elc ¶ 1049 {Lisp}replace.elc ¶
@@ -1073,13 +1061,27 @@ LispSource = ¶
1073 {Lisp}window.elc ¶ 1061 {Lisp}window.elc ¶
1074 {Lisp}version.el 1062 {Lisp}version.el
1075 1063
1064LispSourceDontCompile = ¶
1065 {Lisp}language:devanagari.el ¶
1066 {Lisp}language:english.el ¶
1067 {Lisp}language:czech.el ¶
1068 {Lisp}language:slovak.el ¶
1069 {Lisp}language:romanian.el ¶
1070 {Lisp}language:greek.el ¶
1071 {Lisp}language:hebrew.el ¶
1072 {Lisp}language:japanese.el ¶
1073 {Lisp}language:korean.el ¶
1074 {Lisp}language:lao.el ¶
1075 {Lisp}language:thai.el ¶
1076 {Lisp}language:misc-lang.el
1076 1077
1077Doc Ä {DocTarget}DOC 1078Doc Ä {DocTarget}DOC
1078 1079
1079{DocTarget}DOC Ä {Makefile} {EmacsSource} {MacSource} {LispSource} {Make-DocFileDir}Make-DocFile 1080{DocTarget}DOC Ä {Makefile} {EmacsSource} {MacSource} {LispSource} {LispSourceDontCompile} {Make-DocFileDir}Make-DocFile
1080 {Make-DocFileDir}make-docfile {EmacsSource} > {DocTarget}DOC 1081 {Make-DocFileDir}make-docfile {EmacsSource} > {DocTarget}DOC
1081 {Make-DocFileDir}make-docfile {MacSource} >> {DocTarget}DOC 1082 {Make-DocFileDir}make-docfile {MacSource} >> {DocTarget}DOC
1082 {Make-DocFileDir}make-docfile {LispSource} >> {DocTarget}DOC 1083 {Make-DocFileDir}make-docfile {LispSource} >> {DocTarget}DOC
1084 {Make-DocFileDir}make-docfile {LispSourceDontCompile} >> {DocTarget}DOC
1083 1085
1084 1086
1085#-----------------------------------------------# 1087#-----------------------------------------------#
diff --git a/mac/osx-install b/mac/osx-install
new file mode 100755
index 00000000000..85a3304b334
--- /dev/null
+++ b/mac/osx-install
@@ -0,0 +1,97 @@
1#!/bin/sh
2
3#### osx-install: create the file ~/.MacOSX/environment.plist with
4#### appropriate paths for Emacs to access lisp and bin directories.
5#### On Mac OS X, this file contains values for environment variables
6#### seen by Aqua application launched in the Finder. This script
7#### must be run at the top level of a Mac OS X binary distribution.
8
9# Copyright (C) 2002 Free Software Foundation, Inc.
10#
11# This file is part of GNU Emacs.
12#
13# GNU Emacs is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2, or (at your option)
16# any later version.
17#
18# GNU Emacs is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with GNU Emacs; see the file COPYING. If not, write to the
25# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
26# Boston, MA 02111-1307, USA.
27
28progname="$0"
29
30### Exit if a command fails.
31#set -e
32
33### Print out each line we read, for debugging's sake.
34set -v
35
36LANGUAGE=C
37LC_ALL=C
38LC_MESSAGES=
39LANG=
40export LANGUAGE LC_ALL LC_MESSAGES LANG
41
42## Don't restrict access to any files.
43umask 0
44
45### Make sure we're running in the right place.
46if [ ! -d Emacs.app -o ! -d libexec -o ! -d share ]; then
47 echo "${progname} must be run in the top directory of the Emacs" >&2
48 echo "binary distribution tree for Mac OS. cd to that directory" >&2
49 echo "and try again." >&2
50 exit 1
51fi
52
53versionfile=`ls share/emacs/21.*/lisp/version.el`
54
55### Find out which version of Emacs this is.
56shortversion=`grep 'defconst[ ]*emacs-version' ${versionfile} \
57 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
58version=`grep 'defconst[ ]*emacs-version' ${versionfile} \
59 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
60if [ ! "${version}" ]; then
61 echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2
62 exit 1
63fi
64
65echo Version numbers are $version and $shortversion
66
67homedir=`ls -d ~`
68initfile="${homedir}/.MacOSX/environment.plist"
69
70if [ -f ${initfile} ]; then
71 mv ${initfile} ${initfile}.old
72fi
73
74if [ -d ${homedir}/.MacOSX ]; then
75 mkdir ${homedir}/.MacOSX
76fi
77
78execpath=`ls -d libexec/emacs/21.*/powerpc-apple-*/`
79
80echo '<?xml version="1.0" encoding="UTF-8"?>' > ${initfile}
81echo '<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">' >> ${initfile}
82echo '<plist version="0.9">' >> ${initfile}
83echo '<dict>' >> ${initfile}
84echo ' <key>EMACSLOADPATH</key>' >> ${initfile}
85echo " <string>`pwd`/share/emacs/${version}/lisp/</string>" >> ${initfile}
86echo ' <key>EMACSPATH</key>' >> ${initfile}
87echo " <string>`pwd`/${execpath}:`pwd`/bin/</string>" >> ${initfile}
88echo ' <key>EMACSDATA</key>' >> ${initfile}
89echo " <string>`pwd`/share/emacs/${version}/etc/</string>" >> ${initfile}
90echo ' <key>EMACSDOC</key>' >> ${initfile}
91echo " <string>`pwd`/share/emacs/${version}/etc/</string>" >> ${initfile}
92echo ' <key>INFOPATH</key>' >> ${initfile}
93echo " <string>`pwd`/info/</string>" >> ${initfile}
94echo '</dict>' >> ${initfile}
95echo '</plist>' >> ${initfile}
96
97### osx-install ends here
diff --git a/mac/src/Emacs.r b/mac/src/Emacs.r
index 475bce62f3c..61630858730 100644
--- a/mac/src/Emacs.r
+++ b/mac/src/Emacs.r
@@ -18,11 +18,13 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef TARGET_API_MAC_CARBON
23#include "Types.r" 24#include "Types.r"
24/* added for finder icon balloon help --ben */ 25/* added for finder icon balloon help --ben */
25#include "Balloons.r" 26#include "Balloons.r"
27#endif
26 28
27/* Define to use gnu icon */ 29/* Define to use gnu icon */
28/* #define GNU_ICON 1 */ 30/* #define GNU_ICON 1 */
@@ -55,10 +57,12 @@ resource 'hfdr' (-5696) { /*help for emacs icon*/
55 } 57 }
56}; 58};
57 59
60#ifndef TARGET_API_MAC_CARBON
58/* added for finder icon balloon help --ben */ 61/* added for finder icon balloon help --ben */
59resource 'STR ' (128) { /*help message for emacs icon*/ 62resource 'STR ' (128) { /*help message for emacs icon*/
60 "GNU Emacs\0xd1the extensible, customizable, self-documenting real-time display editor." 63 "GNU Emacs\0xd1the extensible, customizable, self-documenting real-time display editor."
61}; 64};
65#endif
62 66
63resource 'MENU' (128, preload) { 67resource 'MENU' (128, preload) {
64 128, 68 128,
diff --git a/mac/src/EmacsMPW.r b/mac/src/EmacsMPW.r
index c4ff17f9914..ad49ab3b76d 100644
--- a/mac/src/EmacsMPW.r
+++ b/mac/src/EmacsMPW.r
@@ -20,7 +20,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
20the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA. */ 21Boston, MA 02111-1307, USA. */
22 22
23/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 23/* Contributed by Andrew Choi (akochoi@mac.com). */
24 24
25#include "Types.r" 25#include "Types.r"
26#include "CodeFragmentTypes.r" 26#include "CodeFragmentTypes.r"
diff --git a/mac/src/chdir.c b/mac/src/chdir.c
index 5bf9354b4f5..987df2008bf 100644
--- a/mac/src/chdir.c
+++ b/mac/src/chdir.c
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#include <string.h> 23#include <string.h>
24#include <Files.h> 24#include <Files.h>
diff --git a/make-dist b/make-dist
index 32c678e3f94..91002d905ed 100755
--- a/make-dist
+++ b/make-dist
@@ -325,7 +325,9 @@ for subdir in lisp site-lisp lispref lispintro \
325 src src/m src/s src/bitmaps lib-src oldXMenu lwlib \ 325 src src/m src/s src/bitmaps lib-src oldXMenu lwlib \
326 nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ 326 nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \
327 etc etc/e lock info man msdos vms mac mac/inc mac/inc/sys \ 327 etc etc/e lock info man msdos vms mac mac/inc mac/inc/sys \
328 mac/src 328 mac/src mac/Emacs.app mac/Emacs.app/Contents \
329 mac/Emacs.app/Contents/MacOS mac/Emacs.app/Contents/Resources \
330 mac/Emacs.app/Contents/Resources/English.lproj
329do 331do
330 echo " ${tempdir}/${subdir}" 332 echo " ${tempdir}/${subdir}"
331 mkdir ${tempdir}/${subdir} 333 mkdir ${tempdir}/${subdir}
@@ -528,6 +530,14 @@ echo "Making links to \`mac/src'"
528(cd mac/src 530(cd mac/src
529 ln [a-z]*.c *.r ../../${tempdir}/mac/src) 531 ln [a-z]*.c *.r ../../${tempdir}/mac/src)
530 532
533echo "Making links to \`mac/Emacs.app/Contents'"
534(cd mac/Emacs.app/Contents
535 ln Info.plist PkgInfo ../../../${tempdir}/mac/Emacs.app/Contents)
536
537echo "Making links to \`mac/Emacs.app/Contents/Resources/English.lproj'"
538(cd mac/Emacs.app/Contents/Resources/English.lproj
539 ln InfoPlist.strings ../../../../../${tempdir}/mac/Emacs.app/Contents/Resources/English.lproj)
540
531echo "Making links to \`msdos'" 541echo "Making links to \`msdos'"
532(cd msdos 542(cd msdos
533 ln ChangeLog emacs.ico emacs.pif ../${tempdir}/msdos 543 ln ChangeLog emacs.ico emacs.pif ../${tempdir}/msdos
diff --git a/man/macos.texi b/man/macos.texi
index 99131048f45..6a7b291e7fa 100644
--- a/man/macos.texi
+++ b/man/macos.texi
@@ -1,27 +1,31 @@
1@c This is part of the Emacs manual. 1@c This is part of the Emacs manual.
2@c Copyright (C) 2000,2001 Free Software Foundation, Inc. 2@c Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
3@c See file emacs.texi for copying conditions. 3@c See file emacs.texi for copying conditions.
4@node Mac OS, MS-DOS, Antinews, Top 4@node Mac OS, MS-DOS, Antinews, Top
5@appendix Emacs and the Mac OS 5@appendix Emacs and the Mac OS
6@cindex Mac OS 6@cindex Mac OS
7@cindex Macintosh 7@cindex Macintosh
8 8
9 Emacs built on the Mac OS supports many of its major features: 9 Emacs built on Mac OS X supports most of its major features:
10multiple frames, colors, scroll bars, menu bars, use of the mouse, 10multiple frames, colors, scroll bars, menu bars, use of the mouse,
11fontsets, international characters, input methods, coding systems, and 11fontsets, international characters, input methods, coding systems,
12synchronous subprocesses (@code{call-process}). Much of this works in 12asynchronous and synchronous subprocesses, unexec (@code{dump-emacs}),
13the same way as on other platforms and is therefore documented in the 13and networking (@code{open-network-stream}). Support for various
14rest of this manual. This section describes the peculiarities of using 14image file formats has not been implemented yet.
15Emacs under the Mac OS. 15
16 16 The following features of Emacs are not yet supported on the Mac OS
17 The following features of Emacs are not yet supported on the Mac: 178 or 9: unexec (@code{dump-emacs}), asynchronous subprocesses
18unexec (@code{dump-emacs}), asynchronous subprocesses
19(@code{start-process}), and networking (@code{open-network-stream}). 18(@code{start-process}), and networking (@code{open-network-stream}).
20As a result, packages such as Gnus, GUD, and Comint do not work. 19As a result, packages such as Gnus, GUD, and Comint do not work.
20However, synchronous subprocesses (@code{call-process}) are supported.
21Since external programs to handle commands such as @code{print-buffer}
22and @code{diff} are not available on Mac OS 8 or 9, they are not
23supported.
21 24
22 Since external programs to handle commands such as 25 Most of the features that are supported work in the same way as on
23@code{print-buffer} and @code{diff} are not available on the Mac OS, 26other platforms and are therefore documented in the rest of this
24they are not supported in the Mac OS version. 27manual. This section describes the peculiarities of using Emacs under
28the Mac OS.
25 29
26@menu 30@menu
27* Input: Mac Input. Keyboard input on the Mac. 31* Input: Mac Input. Keyboard input on the Mac.
@@ -138,9 +142,15 @@ Traditional Chinese, use @samp{chinese-big5-mac} and for Japanese,
138@section Environment Variables and Command Line Arguments. 142@section Environment Variables and Command Line Arguments.
139@cindex environment variables (Mac OS) 143@cindex environment variables (Mac OS)
140 144
141 Environment variables and command line arguments for Emacs can be set 145 On Mac OS X, when Emacs is run in a terminal, it inherits the values
142by modifying the @samp{STR#} resources 128 and 129, respectively. A common 146of environment variables from the shell from which it is invoked.
143environment variable that one may want to set is @samp{HOME}. 147However, when it is run from the Finder as a GUI application, it
148inherits no environment variable values.
149
150 On Mac OS 8 or 9, environment variables and command line arguments
151for Emacs can be set by modifying the @samp{STR#} resources 128 and
152129, respectively. A common environment variable that one may want to
153set is @samp{HOME}.
144 154
145 The way to set an environment variable is by adding a string of the 155 The way to set an environment variable is by adding a string of the
146form 156form
@@ -173,17 +183,18 @@ So when Emacs requests a file name, doing file name completion on
173@file{/} will display all volumes on the system. You can use @file{..} 183@file{/} will display all volumes on the system. You can use @file{..}
174to go up a directory level. 184to go up a directory level.
175 185
176 To access files and folders on the desktop, look in the folder 186 On Mac OS 8 or 9, to access files and folders on the desktop, look
177@file{Desktop Folder} in your boot volume (this folder is usually 187in the folder @file{Desktop Folder} in your boot volume (this folder
178invisible in the Mac @code{Finder}). 188is usually invisible in the Mac @code{Finder}).
179 189
180 Emacs creates the Mac folder @file{:Preferences:Emacs:} in the 190 On Mac OS 8 or 9, Emacs creates the Mac folder
181@file{System Folder} and uses it as the temporary directory. Emacs 191@file{:Preferences:Emacs:} in the @file{System Folder} and uses it as
182maps the directory name @file{/tmp/} to that. Therefore it 192the temporary directory. Emacs maps the directory name @file{/tmp/}
183is best to avoid naming a volume @file{tmp}. If everything works 193to that. Therefore it is best to avoid naming a volume @file{tmp}.
184correctly, the program should leave no files in it when it exits. You 194If everything works correctly, the program should leave no files in it
185should be able to set the environment variable @code{TMPDIR} to use 195when it exits. You should be able to set the environment variable
186another directory but this folder will still be created. 196@code{TMPDIR} to use another directory but this folder will still be
197created.
187 198
188 199
189@node Mac Font Specs 200@node Mac Font Specs
diff --git a/src/ChangeLog b/src/ChangeLog
index 990f10d02ec..a2db98db431 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,36 @@
12002-04-26 Andrew Choi <akochoi@shaw.ca>
2
3 * Makefile.in (C_SWITCH_SYSTEM_TEMACS): Add.
4 [HAVE_CARBON]: Include Mac object files.
5
6 * alloc.c, callproc.c, dispextern.h, dispnew.c, emacs.c,
7 fontset.c, frame.c, frame.h, keyboard.c, sysdep.c, term.c,
8 termcap.c, window.c, xdisp.c, xfaces.c: Use macros MAC_OS8,
9 MAC_OSX, and MAC_OS instead of macintosh.
10
11 * editfns.c [MAC_OS8]: Include stdio.h.
12
13 * emacs.c [MAC_OS8]: Call mac_initialize instead of x_term_init.
14
15 * fontset.c [MAC_OS]: Set Vdefault_fontset to ETL Fixed instead of
16 Apple Monaco.
17
18 * process.c: Declare QCfamily and QCfilter as extern.
19 (wait_reading_process_input) [MAC_OSX]: Clear bit for stdin before
20 calling select.
21
22 * termcap.c [MAC_OSX]: Don't define tgetnum, PC, tputs, and
23 tgetent.
24
25 * tparam.c [MAC_OSX]: Don't define BC and UP.
26
27 * config.in [HAVE_CARBON]: Add.
28
29 * mac.c, macgui.h, macfns.c, macmenu.c, macterm.c, macterm.h: Move
30 here from mac/src and mac/inc.
31
32 * s/darwin.h, m/powermac.h, unexmacosx.c: New files.
33
12002-04-26 Gerd Moellmann <gerd@gnu.org> 342002-04-26 Gerd Moellmann <gerd@gnu.org>
2 35
3 * xterm.c (x_draw_phys_cursor_glyph): Undo last change. Compute 36 * xterm.c (x_draw_phys_cursor_glyph): Undo last change. Compute
diff --git a/src/Makefile.in b/src/Makefile.in
index 1d8f1adb4cb..82d1e78aaa0 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -159,6 +159,12 @@ CC = C_COMPILER
159#define LD_SWITCH_SYSTEM_TEMACS 159#define LD_SWITCH_SYSTEM_TEMACS
160#endif 160#endif
161 161
162/* Some s/SYSTEM.h files define this to request special switches
163 for compiling temacs. */
164#ifndef C_SWITCH_SYSTEM_TEMACS
165#define C_SWITCH_SYSTEM_TEMACS
166#endif
167
162/* Some m/MACHINE.h files define this to request special switches in ld. */ 168/* Some m/MACHINE.h files define this to request special switches in ld. */
163#ifndef LD_SWITCH_MACHINE 169#ifndef LD_SWITCH_MACHINE
164#define LD_SWITCH_MACHINE 170#define LD_SWITCH_MACHINE
@@ -266,7 +272,7 @@ TOOLKIT_DEFINES =
266 272
267/* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM 273/* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
268 since it may have -I options that should override those two. */ 274 since it may have -I options that should override those two. */
269ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAG) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM ${CFLAGS} 275ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAG) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS}
270.c.o: 276.c.o:
271 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< 277 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
272 278
@@ -531,10 +537,17 @@ MSDOS_OBJ = dosfns.o msdos.o w16select.o
531#endif 537#endif
532#endif 538#endif
533 539
540#ifdef HAVE_CARBON
541XMENU_OBJ =
542MAC_OBJ = mac.o macterm.o macfns.o macmenu.o fontset.o
543emacsapp = ../mac/Emacs.app/
544#else
545XMENU_OBJ = xmenu.o
546#endif
534 547
535/* lastfile must follow all files 548/* lastfile must follow all files
536 whose initialized data areas should be dumped as pure by dump-emacs. */ 549 whose initialized data areas should be dumped as pure by dump-emacs. */
537obj= dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o \ 550obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \
538 charset.o coding.o category.o ccl.o\ 551 charset.o coding.o category.o ccl.o\
539 cm.o term.o xfaces.o $(XOBJ) \ 552 cm.o term.o xfaces.o $(XOBJ) \
540 emacs.o keyboard.o macros.o keymap.o sysdep.o \ 553 emacs.o keyboard.o macros.o keymap.o sysdep.o \
@@ -547,13 +560,14 @@ obj= dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o \
547 process.o callproc.o \ 560 process.o callproc.o \
548 region-cache.o sound.o atimer.o \ 561 region-cache.o sound.o atimer.o \
549 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \ 562 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
550 $(MSDOS_OBJ) 563 $(MSDOS_OBJ) $(MAC_OBJ)
551 564
552/* Object files used on some machine or other. 565/* Object files used on some machine or other.
553 These go in the DOC file on all machines 566 These go in the DOC file on all machines
554 in case they are needed there. */ 567 in case they are needed there. */
555SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \ 568SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \
556 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o 569 xterm.o xfns.o xmenu.o xselect.o xrdb.o \
570 mac.o macterm.o macfns.o macmenu.o
557 571
558 572
559#ifdef TERMINFO 573#ifdef TERMINFO
@@ -1168,6 +1182,38 @@ composite.o: composite.c buffer.h charset.h $(INTERVAL_SRC) $(config_h)
1168 1182
1169sunfns.o: sunfns.c buffer.h window.h dispextern.h $(config_h) 1183sunfns.o: sunfns.c buffer.h window.h dispextern.h $(config_h)
1170 1184
1185#ifdef HAVE_CARBON
1186abbrev.o buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \
1187 fontset.o indent.o insdel.o keyboard.o macros.o minibuf.o msdos.o process.o \
1188 scroll.o sysdep.o term.o widget.o window.o xdisp.o xfaces.o xfns.o xmenu.o \
1189 xterm.o xselect.o sound.o: macgui.h
1190mac.o: mac.c process.h sysselect.h systime.h $(config_h)
1191macfns.o: macfns.c charset.h macterm.h macgui.h frame.h window.h buffer.h \
1192 dispextern.h macgui.h fontset.h $(INTERVAL_SRC) keyboard.h blockinput.h \
1193 atimer.h systime.h epaths.h termhooks.h coding.h ccl.h systime.h $(config_h)
1194macmenu.o: macmenu.c termhooks.h frame.h window.h dispextern.h macgui.h \
1195 keyboard.h blockinput.h atimer.h systime.h buffer.h macterm.h $(config_h)
1196macterm.o: blockinput.h atimer.h systime.h syssignal.h macterm.h macgui.h \
1197 frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h termopts.h \
1198 termchar.h gnu.h disptab.h buffer.h window.h keyboard.h $(INTERVAL_SRC) \
1199 process.h coding.h $(config_h)
1200
1201macosx-app: ${emacsapp}Contents/MacOS/Emacs \
1202 ${emacsapp}Contents/Resources/Emacs.rsrc
1203
1204${emacsapp}Contents/MacOS/Emacs: emacs
1205 if [ -d ${emacsapp}Contents/MacOS/ ]; then true; else \
1206 mkdir ${emacsapp}Contents/MacOS/; \
1207 fi
1208 cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs Emacs
1209
1210${emacsapp}Contents/Resources/Emacs.rsrc: ../mac/src/Emacs.r
1211 /Developer/Tools/Rez -useDF -o \
1212 ${emacsapp}Contents/Resources/Emacs.rsrc \
1213 /System/Library/Frameworks/Carbon.framework/Headers/Carbon.r \
1214 ../mac/src/Emacs.r
1215#endif
1216
1171${libsrc}emacstool: ${libsrc}emacstool.c 1217${libsrc}emacstool: ${libsrc}emacstool.c
1172 cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool 1218 cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool
1173bootstrapclean: 1219bootstrapclean:
diff --git a/src/alloc.c b/src/alloc.c
index 067dd7b753e..9116508bf6a 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1341,7 +1341,7 @@ allocate_string ()
1341 1341
1342#ifdef GC_CHECK_STRING_BYTES 1342#ifdef GC_CHECK_STRING_BYTES
1343 if (!noninteractive 1343 if (!noninteractive
1344#ifdef macintosh 1344#ifdef MAC_OS8
1345 && current_sblock 1345 && current_sblock
1346#endif 1346#endif
1347 ) 1347 )
diff --git a/src/callproc.c b/src/callproc.c
index 92e6e479eaf..77d8b40e921 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -154,14 +154,14 @@ Lisp_Object
154call_process_cleanup (fdpid) 154call_process_cleanup (fdpid)
155 Lisp_Object fdpid; 155 Lisp_Object fdpid;
156{ 156{
157#if defined (MSDOS) || defined (macintosh) 157#if defined (MSDOS) || defined (MAC_OS8)
158 /* for MSDOS fdpid is really (fd . tempfile) */ 158 /* for MSDOS fdpid is really (fd . tempfile) */
159 register Lisp_Object file; 159 register Lisp_Object file;
160 file = Fcdr (fdpid); 160 file = Fcdr (fdpid);
161 emacs_close (XFASTINT (Fcar (fdpid))); 161 emacs_close (XFASTINT (Fcar (fdpid)));
162 if (strcmp (XSTRING (file)-> data, NULL_DEVICE) != 0) 162 if (strcmp (XSTRING (file)-> data, NULL_DEVICE) != 0)
163 unlink (XSTRING (file)->data); 163 unlink (XSTRING (file)->data);
164#else /* not MSDOS and not macintosh */ 164#else /* not MSDOS and not MAC_OS8 */
165 register int pid = XFASTINT (Fcdr (fdpid)); 165 register int pid = XFASTINT (Fcdr (fdpid));
166 166
167 if (call_process_exited) 167 if (call_process_exited)
@@ -232,7 +232,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
232 char *outf, *tempfile; 232 char *outf, *tempfile;
233 int outfilefd; 233 int outfilefd;
234#endif 234#endif
235#ifdef macintosh 235#ifdef MAC_OS8
236 char *tempfile; 236 char *tempfile;
237 int outfilefd; 237 int outfilefd;
238#endif 238#endif
@@ -440,7 +440,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
440 fd[1] = outfilefd; 440 fd[1] = outfilefd;
441#endif /* MSDOS */ 441#endif /* MSDOS */
442 442
443#ifdef macintosh 443#ifdef MAC_OS8
444 /* Since we don't have pipes on the Mac, create a temporary file to 444 /* Since we don't have pipes on the Mac, create a temporary file to
445 hold the output of the subprocess. */ 445 hold the output of the subprocess. */
446 tempfile = (char *) alloca (STRING_BYTES (XSTRING (Vtemp_file_name_pattern)) + 1); 446 tempfile = (char *) alloca (STRING_BYTES (XSTRING (Vtemp_file_name_pattern)) + 1);
@@ -458,14 +458,14 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
458 } 458 }
459 fd[0] = filefd; 459 fd[0] = filefd;
460 fd[1] = outfilefd; 460 fd[1] = outfilefd;
461#endif /* macintosh */ 461#endif /* MAC_OS8 */
462 462
463 if (INTEGERP (buffer)) 463 if (INTEGERP (buffer))
464 fd[1] = emacs_open (NULL_DEVICE, O_WRONLY, 0), fd[0] = -1; 464 fd[1] = emacs_open (NULL_DEVICE, O_WRONLY, 0), fd[0] = -1;
465 else 465 else
466 { 466 {
467#ifndef MSDOS 467#ifndef MSDOS
468#ifndef macintosh 468#ifndef MAC_OS8
469 errno = 0; 469 errno = 0;
470 if (pipe (fd) == -1) 470 if (pipe (fd) == -1)
471 { 471 {
@@ -531,7 +531,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
531 531
532 current_dir = ENCODE_FILE (current_dir); 532 current_dir = ENCODE_FILE (current_dir);
533 533
534#ifdef macintosh 534#ifdef MAC_OS8
535 { 535 {
536 /* Call run_mac_command in sysdep.c here directly instead of doing 536 /* Call run_mac_command in sysdep.c here directly instead of doing
537 a child_setup as for MSDOS and other platforms. Note that this 537 a child_setup as for MSDOS and other platforms. Note that this
@@ -576,7 +576,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
576 report_file_error ("Cannot re-open temporary file", Qnil); 576 report_file_error ("Cannot re-open temporary file", Qnil);
577 } 577 }
578 } 578 }
579#else /* not macintosh */ 579#else /* not MAC_OS8 */
580#ifdef MSDOS /* MW, July 1993 */ 580#ifdef MSDOS /* MW, July 1993 */
581 /* Note that on MSDOS `child_setup' actually returns the child process 581 /* Note that on MSDOS `child_setup' actually returns the child process
582 exit status, not its PID, so we assign it to `synch_process_retcode' 582 exit status, not its PID, so we assign it to `synch_process_retcode'
@@ -635,7 +635,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
635 if (fd_error >= 0) 635 if (fd_error >= 0)
636 emacs_close (fd_error); 636 emacs_close (fd_error);
637#endif /* not MSDOS */ 637#endif /* not MSDOS */
638#endif /* not macintosh */ 638#endif /* not MAC_OS8 */
639 639
640 environ = save_environ; 640 environ = save_environ;
641 641
@@ -669,14 +669,14 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
669 /* Enable sending signal if user quits below. */ 669 /* Enable sending signal if user quits below. */
670 call_process_exited = 0; 670 call_process_exited = 0;
671 671
672#if defined(MSDOS) || defined(macintosh) 672#if defined(MSDOS) || defined(MAC_OS8)
673 /* MSDOS needs different cleanup information. */ 673 /* MSDOS needs different cleanup information. */
674 record_unwind_protect (call_process_cleanup, 674 record_unwind_protect (call_process_cleanup,
675 Fcons (make_number (fd[0]), build_string (tempfile))); 675 Fcons (make_number (fd[0]), build_string (tempfile)));
676#else 676#else
677 record_unwind_protect (call_process_cleanup, 677 record_unwind_protect (call_process_cleanup,
678 Fcons (make_number (fd[0]), make_number (pid))); 678 Fcons (make_number (fd[0]), make_number (pid)));
679#endif /* not MSDOS and not macintosh */ 679#endif /* not MSDOS and not MAC_OS8 */
680 680
681 681
682 if (BUFFERP (buffer)) 682 if (BUFFERP (buffer))
diff --git a/src/config.in b/src/config.in
index fe68725897c..e54ecc659a1 100644
--- a/src/config.in
+++ b/src/config.in
@@ -717,6 +717,18 @@ Boston, MA 02111-1307, USA. */
717/* Define as `fork' if `vfork' does not work. */ 717/* Define as `fork' if `vfork' does not work. */
718#undef vfork 718#undef vfork
719 719
720/* Define if we should use the Carbon API on Mac OS X. */
721#undef HAVE_CARBON
722
723#ifdef HAVE_CARBON
724#define HAVE_WINDOW_SYSTEM
725#define HAVE_MOUSE
726#define HAVE_MENUS
727#endif
728
729/* Define if we have the session management (SM) library. */
730#undef HAVE_X_SM
731
720/* Define to empty if the keyword `volatile' does not work. Warning: valid 732/* Define to empty if the keyword `volatile' does not work. Warning: valid
721 code using `volatile' can become incorrect without. Disable with care. */ 733 code using `volatile' can become incorrect without. Disable with care. */
722#undef volatile 734#undef volatile
diff --git a/src/dispextern.h b/src/dispextern.h
index 135eaec0ac8..b4442d4426d 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -39,7 +39,7 @@ Boston, MA 02111-1307, USA. */
39#include "w32gui.h" 39#include "w32gui.h"
40#endif 40#endif
41 41
42#ifdef macintosh 42#ifdef MAC_OS
43#include "macgui.h" 43#include "macgui.h"
44#endif 44#endif
45 45
diff --git a/src/dispnew.c b/src/dispnew.c
index f19f111a728..35c1b87a886 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -60,9 +60,9 @@ Boston, MA 02111-1307, USA. */
60#include "w32term.h" 60#include "w32term.h"
61#endif /* HAVE_NTGUI */ 61#endif /* HAVE_NTGUI */
62 62
63#ifdef macintosh 63#ifdef MAC_OS
64#include "macterm.h" 64#include "macterm.h"
65#endif /* macintosh */ 65#endif /* MAC_OS */
66 66
67/* Include systime.h after xterm.h to avoid double inclusion of time.h. */ 67/* Include systime.h after xterm.h to avoid double inclusion of time.h. */
68 68
@@ -6469,7 +6469,7 @@ init_display ()
6469 } 6469 }
6470#endif /* HAVE_NTGUI */ 6470#endif /* HAVE_NTGUI */
6471 6471
6472#ifdef macintosh 6472#ifdef MAC_OS
6473 if (!inhibit_window_system) 6473 if (!inhibit_window_system)
6474 { 6474 {
6475 Vwindow_system = intern ("mac"); 6475 Vwindow_system = intern ("mac");
@@ -6477,7 +6477,7 @@ init_display ()
6477 adjust_frame_glyphs_initially (); 6477 adjust_frame_glyphs_initially ();
6478 return; 6478 return;
6479 } 6479 }
6480#endif /* macintosh */ 6480#endif /* MAC_OS */
6481 6481
6482 /* If no window system has been specified, try to use the terminal. */ 6482 /* If no window system has been specified, try to use the terminal. */
6483 if (! isatty (0)) 6483 if (! isatty (0))
diff --git a/src/editfns.c b/src/editfns.c
index bfc982b9dbe..86129c63698 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -33,6 +33,12 @@ Boston, MA 02111-1307, USA. */
33#include <unistd.h> 33#include <unistd.h>
34#endif 34#endif
35 35
36/* Without this, sprintf on Mac OS Classic will produce wrong
37 result. */
38#ifdef MAC_OS8
39#include <stdio.h>
40#endif
41
36#include <ctype.h> 42#include <ctype.h>
37 43
38#include "lisp.h" 44#include "lisp.h"
diff --git a/src/emacs.c b/src/emacs.c
index fdd53555309..d0bd50222a0 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -793,6 +793,11 @@ main (argc, argv, envp)
793 run_time_remap (argv[0]); 793 run_time_remap (argv[0]);
794#endif 794#endif
795 795
796#ifdef MAC_OSX
797 if (!initialized)
798 unexec_init_emacs_zone ();
799#endif
800
796 sort_args (argc, argv); 801 sort_args (argc, argv);
797 argc = 0; 802 argc = 0;
798 while (argv[argc]) argc++; 803 while (argv[argc]) argc++;
@@ -848,6 +853,13 @@ main (argc, argv, envp)
848 } 853 }
849#endif /* NeXT */ 854#endif /* NeXT */
850 855
856#ifdef MAC_OSX
857 /* Skip process serial number passed in the form -psn_x_y as
858 command-line argument. */
859 if (argc > skip_args + 1 && strncmp (argv[skip_args+1], "-psn_", 5) == 0)
860 skip_args++;
861#endif /* MAC_OSX */
862
851#ifdef VMS 863#ifdef VMS
852 /* If -map specified, map the data file in. */ 864 /* If -map specified, map the data file in. */
853 { 865 {
@@ -1175,12 +1187,12 @@ main (argc, argv, envp)
1175 CANNOT_DUMP is defined. */ 1187 CANNOT_DUMP is defined. */
1176 syms_of_keyboard (); 1188 syms_of_keyboard ();
1177 1189
1178#ifdef macintosh 1190#ifdef MAC_OS8
1179 /* init_window_once calls make_terminal_frame which on Mac OS 1191 /* init_window_once calls make_terminal_frame which on Mac OS
1180 creates a full-fledge output_mac type frame. This does not 1192 creates a full-fledge output_mac type frame. This does not
1181 work correctly before syms_of_textprop, syms_of_macfns, 1193 work correctly before syms_of_textprop, syms_of_macfns,
1182 syms_of_ccl, syms_of_fontset, syms_of_xterm, syms_of_search, 1194 syms_of_ccl, syms_of_fontset, syms_of_xterm, syms_of_search,
1183 syms_of_frame, x_term_init, and init_keyboard have already 1195 syms_of_frame, mac_initialize, and init_keyboard have already
1184 been called. */ 1196 been called. */
1185 syms_of_textprop (); 1197 syms_of_textprop ();
1186 syms_of_macfns (); 1198 syms_of_macfns ();
@@ -1192,7 +1204,7 @@ main (argc, argv, envp)
1192 syms_of_search (); 1204 syms_of_search ();
1193 syms_of_frame (); 1205 syms_of_frame ();
1194 1206
1195 x_term_init (); 1207 mac_initialize ();
1196 init_keyboard (); 1208 init_keyboard ();
1197#endif 1209#endif
1198 1210
@@ -1388,8 +1400,8 @@ main (argc, argv, envp)
1388 /* The basic levels of Lisp must come first. */ 1400 /* The basic levels of Lisp must come first. */
1389 /* And data must come first of all 1401 /* And data must come first of all
1390 for the sake of symbols like error-message. */ 1402 for the sake of symbols like error-message. */
1391#ifndef macintosh 1403#ifndef MAC_OS8
1392 /* Called before init_window_once for Mac OS. */ 1404 /* Called before init_window_once for Mac OS Classic. */
1393 syms_of_data (); 1405 syms_of_data ();
1394#endif 1406#endif
1395 syms_of_alloc (); 1407 syms_of_alloc ();
@@ -1407,8 +1419,8 @@ main (argc, argv, envp)
1407 syms_of_casetab (); 1419 syms_of_casetab ();
1408 syms_of_callproc (); 1420 syms_of_callproc ();
1409 syms_of_category (); 1421 syms_of_category ();
1410#ifndef macintosh 1422#ifndef MAC_OS8
1411 /* Called before init_window_once for Mac OS. */ 1423 /* Called before init_window_once for Mac OS Classic. */
1412 syms_of_ccl (); 1424 syms_of_ccl ();
1413#endif 1425#endif
1414 syms_of_charset (); 1426 syms_of_charset ();
@@ -1432,8 +1444,8 @@ main (argc, argv, envp)
1432 syms_of_marker (); 1444 syms_of_marker ();
1433 syms_of_minibuf (); 1445 syms_of_minibuf ();
1434 syms_of_process (); 1446 syms_of_process ();
1435#ifndef macintosh 1447#ifndef MAC_OS8
1436 /* Called before init_window_once for Mac OS. */ 1448 /* Called before init_window_once for Mac OS Classic. */
1437 syms_of_search (); 1449 syms_of_search ();
1438 syms_of_frame (); 1450 syms_of_frame ();
1439#endif 1451#endif
@@ -1443,8 +1455,8 @@ main (argc, argv, envp)
1443#ifdef HAVE_SOUND 1455#ifdef HAVE_SOUND
1444 syms_of_sound (); 1456 syms_of_sound ();
1445#endif 1457#endif
1446#ifndef macintosh 1458#ifndef MAC_OS8
1447 /* Called before init_window_once for Mac OS. */ 1459 /* Called before init_window_once for Mac OS Classic. */
1448 syms_of_textprop (); 1460 syms_of_textprop ();
1449#endif 1461#endif
1450 syms_of_composite (); 1462 syms_of_composite ();
@@ -1469,7 +1481,8 @@ main (argc, argv, envp)
1469#endif /* HAVE_X_WINDOWS */ 1481#endif /* HAVE_X_WINDOWS */
1470 1482
1471#ifndef HAVE_NTGUI 1483#ifndef HAVE_NTGUI
1472#ifndef macintosh 1484#ifndef MAC_OS
1485 /* Called before init_window_once for Mac OS Classic. */
1473 syms_of_xmenu (); 1486 syms_of_xmenu ();
1474#endif 1487#endif
1475#endif 1488#endif
@@ -1482,6 +1495,13 @@ main (argc, argv, envp)
1482 syms_of_fontset (); 1495 syms_of_fontset ();
1483#endif /* HAVE_NTGUI */ 1496#endif /* HAVE_NTGUI */
1484 1497
1498#ifdef HAVE_CARBON
1499 syms_of_macterm ();
1500 syms_of_macfns ();
1501 syms_of_macmenu ();
1502 syms_of_fontset ();
1503#endif /* HAVE_CARBON */
1504
1485#ifdef SYMS_SYSTEM 1505#ifdef SYMS_SYSTEM
1486 SYMS_SYSTEM; 1506 SYMS_SYSTEM;
1487#endif 1507#endif
@@ -1506,8 +1526,8 @@ main (argc, argv, envp)
1506#endif /* VMS */ 1526#endif /* VMS */
1507 init_display (); /* Determine terminal type. init_sys_modes uses results. */ 1527 init_display (); /* Determine terminal type. init_sys_modes uses results. */
1508 } 1528 }
1509#ifndef macintosh 1529#ifndef MAC_OS8
1510 /* Called before init_window_once for Mac OS. */ 1530 /* Called before init_window_once for Mac OS Classic. */
1511 init_keyboard (); /* This too must precede init_sys_modes. */ 1531 init_keyboard (); /* This too must precede init_sys_modes. */
1512#endif 1532#endif
1513#ifdef VMS 1533#ifdef VMS
diff --git a/src/fontset.c b/src/fontset.c
index 30bec52f024..6679b1f728f 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1410,10 +1410,10 @@ syms_of_fontset ()
1410 FONTSET_ID (Vdefault_fontset) = make_number (0); 1410 FONTSET_ID (Vdefault_fontset) = make_number (0);
1411 FONTSET_NAME (Vdefault_fontset) 1411 FONTSET_NAME (Vdefault_fontset)
1412 = build_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"); 1412 = build_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default");
1413#if defined (macintosh) 1413#if defined (MAC_OS)
1414 FONTSET_ASCII (Vdefault_fontset) 1414 FONTSET_ASCII (Vdefault_fontset)
1415 = Fcons (make_number (0), 1415 = Fcons (make_number (0),
1416 build_string ("-apple-monaco-medium-r-*--*-120-*-*-*-*-mac-roman")); 1416 build_string ("-ETL-fixed-medium-r-*--*-160-*-*-*-*-iso8859-1"));
1417#elif defined (WINDOWSNT) 1417#elif defined (WINDOWSNT)
1418 FONTSET_ASCII (Vdefault_fontset) 1418 FONTSET_ASCII (Vdefault_fontset)
1419 = Fcons (make_number (0), 1419 = Fcons (make_number (0),
diff --git a/src/frame.c b/src/frame.c
index 5525e2a9964..795183b2a2f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
30#ifdef WINDOWSNT 30#ifdef WINDOWSNT
31#include "w32term.h" 31#include "w32term.h"
32#endif 32#endif
33#ifdef macintosh 33#ifdef MAC_OS
34#include "macterm.h" 34#include "macterm.h"
35#endif 35#endif
36#include "buffer.h" 36#include "buffer.h"
@@ -486,11 +486,11 @@ make_terminal_frame ()
486 f->output_method = output_termcap; 486 f->output_method = output_termcap;
487 f->output_data.x = &tty_display; 487 f->output_data.x = &tty_display;
488#else 488#else
489#ifdef macintosh 489#ifdef MAC_OS8
490 make_mac_terminal_frame (f); 490 make_mac_terminal_frame (f);
491#else 491#else
492 f->output_data.x = &tty_display; 492 f->output_data.x = &tty_display;
493#endif /* macintosh */ 493#endif /* MAC_OS8 */
494#endif /* WINDOWSNT */ 494#endif /* WINDOWSNT */
495#endif /* MSDOS */ 495#endif /* MSDOS */
496 496
@@ -521,7 +521,7 @@ Note that changing the size of one terminal frame automatically affects all. */
521 abort (); 521 abort ();
522#else /* not MSDOS */ 522#else /* not MSDOS */
523 523
524#ifdef macintosh 524#ifdef MAC_OS
525 if (sf->output_method != output_mac) 525 if (sf->output_method != output_mac)
526 error ("Not running on a Macintosh screen; cannot make a new Macintosh frame"); 526 error ("Not running on a Macintosh screen; cannot make a new Macintosh frame");
527#else 527#else
@@ -1112,7 +1112,7 @@ frame. The hook is called with one argument FRAME. */)
1112 return Qnil; 1112 return Qnil;
1113 1113
1114 if (NILP (force) && !other_visible_frames (f) 1114 if (NILP (force) && !other_visible_frames (f)
1115#ifdef macintosh 1115#ifdef MAC_OS8
1116 /* Terminal frame deleted before any other visible frames are 1116 /* Terminal frame deleted before any other visible frames are
1117 created. */ 1117 created. */
1118 && strcmp (XSTRING (f->name)->data, "F1") != 0 1118 && strcmp (XSTRING (f->name)->data, "F1") != 0
diff --git a/src/frame.h b/src/frame.h
index bcfb208a9a6..9f6f6474e9c 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -57,7 +57,7 @@ enum vertical_scroll_bar_type
57 vertical_scroll_bar_right 57 vertical_scroll_bar_right
58}; 58};
59 59
60#if !defined(MSDOS) && !defined(WINDOWSNT) && !defined(macintosh) 60#if !defined(MSDOS) && !defined(WINDOWSNT) && !defined(MAC_OS)
61 61
62#if !defined(HAVE_X_WINDOWS) 62#if !defined(HAVE_X_WINDOWS)
63 63
@@ -82,7 +82,7 @@ struct x_output
82/* A structure describing a termcap frame display. */ 82/* A structure describing a termcap frame display. */
83extern struct x_output tty_display; 83extern struct x_output tty_display;
84 84
85#endif /* ! MSDOS && ! WINDOWSNT && ! macintosh */ 85#endif /* ! MSDOS && ! WINDOWSNT && ! MAC_OS */
86 86
87struct frame 87struct frame
88{ 88{
@@ -260,7 +260,7 @@ struct frame
260 /* Number of lines of menu bar. */ 260 /* Number of lines of menu bar. */
261 int menu_bar_lines; 261 int menu_bar_lines;
262 262
263#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh) 263#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
264 /* Nonzero means using a menu bar that comes from the X toolkit. */ 264 /* Nonzero means using a menu bar that comes from the X toolkit. */
265 int external_menu_bar; 265 int external_menu_bar;
266#endif 266#endif
@@ -404,7 +404,7 @@ typedef struct frame *FRAME_PTR;
404#ifdef HAVE_NTGUI 404#ifdef HAVE_NTGUI
405#define FRAME_WINDOW_P(f) FRAME_W32_P (f) 405#define FRAME_WINDOW_P(f) FRAME_W32_P (f)
406#endif 406#endif
407#ifdef macintosh 407#ifdef MAC_OS
408#define FRAME_WINDOW_P(f) FRAME_MAC_P (f) 408#define FRAME_WINDOW_P(f) FRAME_MAC_P (f)
409#endif 409#endif
410#ifndef FRAME_WINDOW_P 410#ifndef FRAME_WINDOW_P
@@ -444,7 +444,7 @@ typedef struct frame *FRAME_PTR;
444 444
445/* Nonzero if this frame should display a menu bar 445/* Nonzero if this frame should display a menu bar
446 in a way that does not use any text lines. */ 446 in a way that does not use any text lines. */
447#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh) 447#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
448#define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar 448#define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar
449#else 449#else
450#define FRAME_EXTERNAL_MENU_BAR(f) 0 450#define FRAME_EXTERNAL_MENU_BAR(f) 0
diff --git a/src/keyboard.c b/src/keyboard.c
index cd3aa3793fb..d1c3681fdbc 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -71,7 +71,7 @@ Boston, MA 02111-1307, USA. */
71#include "w32term.h" 71#include "w32term.h"
72#endif /* HAVE_NTGUI */ 72#endif /* HAVE_NTGUI */
73 73
74#ifdef macintosh 74#ifdef MAC_OS
75#include "macterm.h" 75#include "macterm.h"
76#endif 76#endif
77 77
@@ -94,8 +94,8 @@ extern int input_fd;
94 94
95#ifdef HAVE_WINDOW_SYSTEM 95#ifdef HAVE_WINDOW_SYSTEM
96/* Make all keyboard buffers much bigger when using X windows. */ 96/* Make all keyboard buffers much bigger when using X windows. */
97#ifdef macintosh 97#ifdef MAC_OS8
98/* But not too big (local data > 32K error) if on macintosh. */ 98/* But not too big (local data > 32K error) if on Mac OS Classic. */
99#define KBD_BUFFER_SIZE 512 99#define KBD_BUFFER_SIZE 512
100#else 100#else
101#define KBD_BUFFER_SIZE 4096 101#define KBD_BUFFER_SIZE 4096
@@ -3687,7 +3687,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3687 abort (); 3687 abort ();
3688#endif 3688#endif
3689 } 3689 }
3690#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (macintosh) 3690#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS)
3691 else if (event->kind == delete_window_event) 3691 else if (event->kind == delete_window_event)
3692 { 3692 {
3693 /* Make an event (delete-frame (FRAME)). */ 3693 /* Make an event (delete-frame (FRAME)). */
@@ -3718,7 +3718,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3718 XSETBUFFER (obj, current_buffer); 3718 XSETBUFFER (obj, current_buffer);
3719 kbd_fetch_ptr = event + 1; 3719 kbd_fetch_ptr = event + 1;
3720 } 3720 }
3721#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh) 3721#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
3722 else if (event->kind == menu_bar_activate_event) 3722 else if (event->kind == menu_bar_activate_event)
3723 { 3723 {
3724 kbd_fetch_ptr = event + 1; 3724 kbd_fetch_ptr = event + 1;
@@ -5373,7 +5373,7 @@ make_lispy_event (event)
5373 } 5373 }
5374#endif /* HAVE_MOUSE */ 5374#endif /* HAVE_MOUSE */
5375 5375
5376#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh) 5376#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
5377 case MENU_BAR_EVENT: 5377 case MENU_BAR_EVENT:
5378 if (EQ (event->arg, event->frame_or_window)) 5378 if (EQ (event->arg, event->frame_or_window))
5379 /* This is the prefix key. We translate this to 5379 /* This is the prefix key. We translate this to
diff --git a/src/m/powermac.h b/src/m/powermac.h
new file mode 100644
index 00000000000..0f54d18c839
--- /dev/null
+++ b/src/m/powermac.h
@@ -0,0 +1,121 @@
1/* Machine description file for Apple Power Macintosh
2 Copyright (C) 2001 Free Software Foundation, Inc.
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21
22/* The following line tells the configuration script what sort of
23 operating system this machine is likely to run.
24 USUAL-OPSYS="darwin" */
25
26/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word
27 is the most significant byte. */
28
29#define WORDS_BIG_ENDIAN
30
31/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
32 * group of arguments and treat it as an array of the arguments. */
33
34#define NO_ARG_ARRAY
35
36/* Define WORD_MACHINE if addresses and such have
37 * to be corrected before they can be used as byte counts. */
38
39/* #define WORD_MACHINE */
40
41/* Now define a symbol for the cpu type, if your compiler
42 does not define it automatically:
43 Ones defined so far include vax, m68000, ns16000, pyramid,
44 orion, tahoe, APOLLO and many others */
45
46/* Use type int rather than a union, to represent Lisp_Object */
47/* This is desirable for most machines. */
48
49#define NO_UNION_TYPE
50
51/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
52 the 24-bit bit field into an int. In other words, if bit fields
53 are always unsigned.
54
55 If you use NO_UNION_TYPE, this flag does not matter. */
56
57/* #define EXPLICIT_SIGN_EXTEND */
58
59/* Data type of load average, as read out of kmem. */
60
61#define LOAD_AVE_TYPE long
62
63/* Convert that into an integer that is 100 for a load average of 1.0 */
64
65#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
66
67/* Define CANNOT_DUMP on machines where unexec does not work.
68 Then the function dump-emacs will not be defined
69 and temacs will do (load "loadup") automatically unless told otherwise. */
70
71/* #define CANNOT_DUMP */
72
73/* Define VIRT_ADDR_VARIES if the virtual addresses of
74 pure and impure space as loaded can vary, and even their
75 relative order cannot be relied on.
76
77 Otherwise Emacs assumes that text space precedes data space,
78 numerically. */
79
80/* #define VIRT_ADDR_VARIES * */
81
82/* Define C_ALLOCA if this machine does not support a true alloca
83 and the one written in C should be used instead.
84 Define HAVE_ALLOCA to say that the system provides a properly
85 working alloca function and it should be used.
86 Define neither one if an assembler-language alloca
87 in the file alloca.s should be used. */
88
89/* #define C_ALLOCA */
90/* #define HAVE_ALLOCA */
91
92/* Define NO_REMAP if memory segmentation makes it not work well
93 to change the boundary between the text section and data section
94 when Emacs is dumped. If you define this, the preloaded Lisp
95 code will not be sharable; but that's better than failing completely. */
96
97#define NO_REMAP
98
99/* Some really obscure 4.2-based systems (like Sequent DYNIX)
100 * do not support asynchronous I/O (using SIGIO) on sockets,
101 * even though it works fine on tty's. If you have one of
102 * these systems, define the following, and then use it in
103 * config.h (or elsewhere) to decide when (not) to use SIGIO.
104 *
105 * You'd think this would go in an operating-system description file,
106 * but since it only occurs on some, but not all, BSD systems, the
107 * reasonable place to select for it is in the machine description
108 * file.
109 */
110
111/* #define NO_SOCK_SIGIO */
112
113
114/* After adding support for a new system, modify the large case
115 statement in the `configure' script to recognize reasonable
116 configuration names, and add a description of the system to
117 `etc/MACHINES'.
118
119 If you've just fixed a problem in an existing configuration file,
120 you should also check `etc/MACHINES' to make sure its descriptions
121 of known problems in that configuration should be updated. */
diff --git a/mac/src/mac.c b/src/mac.c
index 473273f13b7..4e6ee4bb8ff 100644
--- a/mac/src/mac.c
+++ b/src/mac.c
@@ -1,5 +1,5 @@
1/* Unix emulation routines for GNU Emacs on the Mac OS. 1/* Unix emulation routines for GNU Emacs on the Mac OS.
2 Copyright (C) 2000 Free Software Foundation, Inc. 2 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#include <config.h> 23#include <config.h>
24 24
@@ -34,6 +34,20 @@ Boston, MA 02111-1307, USA. */
34#include <unistd.h> 34#include <unistd.h>
35#endif 35#endif
36 36
37#ifdef MAC_OSX
38#undef mktime
39#undef DEBUG
40#undef free
41#undef malloc
42#undef realloc
43#include <Carbon/Carbon.h>
44#undef free
45#define free unexec_free
46#undef malloc
47#define malloc unexec_malloc
48#undef realloc
49#define realloc unexec_realloc
50#else /* not MAC_OSX */
37#include <Files.h> 51#include <Files.h>
38#include <MacTypes.h> 52#include <MacTypes.h>
39#include <TextUtils.h> 53#include <TextUtils.h>
@@ -44,6 +58,8 @@ Boston, MA 02111-1307, USA. */
44#include <Timer.h> 58#include <Timer.h>
45#include <OSA.h> 59#include <OSA.h>
46#include <AppleScript.h> 60#include <AppleScript.h>
61#include <Scrap.h>
62#endif /* not MAC_OSX */
47 63
48#include "lisp.h" 64#include "lisp.h"
49#include "process.h" 65#include "process.h"
@@ -81,13 +97,13 @@ string_cat_and_replace (char *s1, const char *s2, int n, char a, char b)
81} 97}
82 98
83 99
84/* Convert a Mac pathname to Unix form. A Mac full pathname is one 100/* Convert a Mac pathname to Posix form. A Mac full pathname is one
85 that does not begin with a ':' and contains at least one ':'. A Mac 101 that does not begin with a ':' and contains at least one ':'. A Mac
86 full pathname causes an '/' to be prepended to the Unix pathname. 102 full pathname causes an '/' to be prepended to the Posix pathname.
87 The algorithm for the rest of the pathname is as follows: 103 The algorithm for the rest of the pathname is as follows:
88 For each segment between two ':', 104 For each segment between two ':',
89 if it is non-null, copy as is and then add a '/' at the end, 105 if it is non-null, copy as is and then add a '/' at the end,
90 otherwise, insert a "../" into the Unix pathname. 106 otherwise, insert a "../" into the Posix pathname.
91 Returns 1 if successful; 0 if fails. */ 107 Returns 1 if successful; 0 if fails. */
92 108
93int 109int
@@ -146,7 +162,7 @@ mac_to_posix_pathname (const char *mfn, char *ufn, int ufnbuflen)
146extern char *get_temp_dir_name (); 162extern char *get_temp_dir_name ();
147 163
148 164
149/* Convert a Unix pathname to Mac form. Approximately reverse of the 165/* Convert a Posix pathname to Mac form. Approximately reverse of the
150 above in algorithm. */ 166 above in algorithm. */
151 167
152int 168int
@@ -235,6 +251,7 @@ posix_to_mac_pathname (const char *ufn, char *mfn, int mfnbuflen)
235 return 1; 251 return 1;
236} 252}
237 253
254#ifndef MAC_OSX
238 255
239/* The following functions with "sys_" prefix are stubs to Unix 256/* The following functions with "sys_" prefix are stubs to Unix
240 functions that have already been implemented by CW or MPW. The 257 functions that have already been implemented by CW or MPW. The
@@ -250,21 +267,21 @@ posix_to_mac_pathname (const char *ufn, char *mfn, int mfnbuflen)
250#define MAC_UNIX_EPOCH_DIFF ((365L * 66 + 17) * 24 * 60 * 60) 267#define MAC_UNIX_EPOCH_DIFF ((365L * 66 + 17) * 24 * 60 * 60)
251 268
252#ifdef __MWERKS__ 269#ifdef __MWERKS__
253#ifndef CODEWARRIOR_VERSION_6 270#if __MSL__ < 0x6000
254/* CW Pro 5 epoch is Jan 1, 1900 (aaarghhhhh!); remember, 1900 is not 271/* CW Pro 5 epoch is Jan 1, 1900 (aaarghhhhh!); remember, 1900 is not
255 a leap year! This is for adjusting time_t values returned by MSL 272 a leap year! This is for adjusting time_t values returned by MSL
256 functions. */ 273 functions. */
257#define CW_OR_MPW_UNIX_EPOCH_DIFF ((365L * 70 + 17) * 24 * 60 * 60) 274#define CW_OR_MPW_UNIX_EPOCH_DIFF ((365L * 70 + 17) * 24 * 60 * 60)
258#else 275#else /* __MSL__ >= 0x6000 */
259/* CW changes Pro 6 to following Unix! */ 276/* CW changes Pro 6 to follow Unix! */
260#define CW_OR_MPW_UNIX_EPOCH_DIFF ((365L * 66 + 17) * 24 * 60 * 60) 277#define CW_OR_MPW_UNIX_EPOCH_DIFF ((365L * 66 + 17) * 24 * 60 * 60)
261#endif 278#endif /* __MSL__ >= 0x6000 */
262#elif __MRC__ 279#elif __MRC__
263/* MPW library functions follow Unix (confused?). */ 280/* MPW library functions follow Unix (confused?). */
264#define CW_OR_MPW_UNIX_EPOCH_DIFF ((365L * 66 + 17) * 24 * 60 * 60) 281#define CW_OR_MPW_UNIX_EPOCH_DIFF ((365L * 66 + 17) * 24 * 60 * 60)
265#else 282#else /* not __MRC__ */
266You lose!!! 283You lose!!!
267#endif 284#endif /* not __MRC__ */
268 285
269 286
270/* Define our own stat function for both MrC and CW. The reason for 287/* Define our own stat function for both MrC and CW. The reason for
@@ -408,8 +425,6 @@ fstat (int fildes, struct stat *buf)
408#endif /* __MRC__ */ 425#endif /* __MRC__ */
409 426
410 427
411/* Adapted from Think Reference code example. */
412
413int 428int
414mkdir (const char *dirname, int mode) 429mkdir (const char *dirname, int mode)
415{ 430{
@@ -611,9 +626,9 @@ sys_open (const char *path, int oflag)
611 if (oflag & O_CREAT) 626 if (oflag & O_CREAT)
612 fsetfileinfo (mac_pathname, 'EMAx', 'TEXT'); 627 fsetfileinfo (mac_pathname, 'EMAx', 'TEXT');
613 return res; 628 return res;
614#else 629#else /* not __MRC__ */
615 return open (mac_pathname, oflag); 630 return open (mac_pathname, oflag);
616#endif 631#endif /* not __MRC__ */
617 } 632 }
618} 633}
619 634
@@ -637,9 +652,9 @@ sys_creat (const char *path, mode_t mode)
637 int result = creat (mac_pathname); 652 int result = creat (mac_pathname);
638 fsetfileinfo (mac_pathname, 'EMAx', 'TEXT'); 653 fsetfileinfo (mac_pathname, 'EMAx', 'TEXT');
639 return result; 654 return result;
640#else 655#else /* not __MRC__ */
641 return creat (mac_pathname, mode); 656 return creat (mac_pathname, mode);
642#endif 657#endif /* not __MRC__ */
643 } 658 }
644} 659}
645 660
@@ -675,7 +690,7 @@ sys_read (int fildes, char *buf, int count)
675 if (fildes == 0) /* this should not be used for console input */ 690 if (fildes == 0) /* this should not be used for console input */
676 return -1; 691 return -1;
677 else 692 else
678#ifdef CODEWARRIOR_VERSION_6 693#if __MSL__ >= 0x6000
679 return _read (fildes, buf, count); 694 return _read (fildes, buf, count);
680#else 695#else
681 return read (fildes, buf, count); 696 return read (fildes, buf, count);
@@ -690,7 +705,7 @@ sys_write (int fildes, const char *buf, int count)
690 if (fildes == DEV_NULL_FD) 705 if (fildes == DEV_NULL_FD)
691 return count; 706 return count;
692 else 707 else
693#ifdef CODEWARRIOR_VERSION_6 708#if __MSL__ >= 0x6000
694 return _write (fildes, buf, count); 709 return _write (fildes, buf, count);
695#else 710#else
696 return write (fildes, buf, count); 711 return write (fildes, buf, count);
@@ -764,7 +779,7 @@ sys_fopen (const char *name, const char *mode)
764#ifdef __MRC__ 779#ifdef __MRC__
765 if (mode[0] == 'w' || mode[0] == 'a') 780 if (mode[0] == 'w' || mode[0] == 'a')
766 fsetfileinfo (mac_pathname, 'EMAx', 'TEXT'); 781 fsetfileinfo (mac_pathname, 'EMAx', 'TEXT');
767#endif 782#endif /* not __MRC__ */
768 return fopen (mac_pathname, mode); 783 return fopen (mac_pathname, mode);
769 } 784 }
770} 785}
@@ -778,9 +793,9 @@ long target_ticks = 0;
778__sigfun alarm_signal_func = (__sigfun) 0; 793__sigfun alarm_signal_func = (__sigfun) 0;
779#elif __MWERKS__ 794#elif __MWERKS__
780__signal_func_ptr alarm_signal_func = (__signal_func_ptr) 0; 795__signal_func_ptr alarm_signal_func = (__signal_func_ptr) 0;
781#else 796#else /* not __MRC__ and not __MWERKS__ */
782You lose!!! 797You lose!!!
783#endif 798#endif /* not __MRC__ and not __MWERKS__ */
784 799
785 800
786/* These functions simulate SIG_ALRM. The stub for function signal 801/* These functions simulate SIG_ALRM. The stub for function signal
@@ -804,13 +819,16 @@ check_alarm ()
804 819
805 820
806int 821int
807select(n, rfds, wfds, efds, timeout) 822select (n, rfds, wfds, efds, timeout)
808 int n; 823 int n;
809 SELECT_TYPE *rfds; 824 SELECT_TYPE *rfds;
810 SELECT_TYPE *wfds; 825 SELECT_TYPE *wfds;
811 SELECT_TYPE *efds; 826 SELECT_TYPE *efds;
812 struct timeval *timeout; 827 struct timeval *timeout;
813{ 828{
829#ifdef TARGET_API_MAC_CARBON
830 return 1;
831#else /* not TARGET_API_MAC_CARBON */
814 EMACS_TIME end_time, now; 832 EMACS_TIME end_time, now;
815 EventRecord e; 833 EventRecord e;
816 834
@@ -844,7 +862,8 @@ select(n, rfds, wfds, efds, timeout)
844 } 862 }
845 } 863 }
846 864
847 WaitNextEvent (0, &e, 1UL, NULL); /* Accept no event; wait 1 tic. by T.I.*/ 865 WaitNextEvent (0, &e, 1UL, NULL); /* Accept no event; wait 1
866 tic. by T.I. */
848 867
849 EMACS_GET_TIME (now); 868 EMACS_GET_TIME (now);
850 EMACS_SUB_TIME (now, end_time, now); 869 EMACS_SUB_TIME (now, end_time, now);
@@ -852,6 +871,7 @@ select(n, rfds, wfds, efds, timeout)
852 while (!EMACS_TIME_NEG_P (now)); 871 while (!EMACS_TIME_NEG_P (now));
853 872
854 return 0; 873 return 0;
874#endif /* not TARGET_API_MAC_CARBON */
855} 875}
856 876
857 877
@@ -866,8 +886,9 @@ pause ()
866 if (!target_ticks) /* no alarm pending */ 886 if (!target_ticks) /* no alarm pending */
867 return -1; 887 return -1;
868 888
869 if ( (tick = TickCount ()) < target_ticks ) 889 if ((tick = TickCount ()) < target_ticks)
870 WaitNextEvent (0, &e, target_ticks - tick, NULL); /* Accept no event; just wait. by T.I.*/ 890 WaitNextEvent (0, &e, target_ticks - tick, NULL); /* Accept no event;
891 just wait. by T.I. */
871 892
872 target_ticks = 0; 893 target_ticks = 0;
873 if (alarm_signal_func) 894 if (alarm_signal_func)
@@ -897,9 +918,9 @@ sys_signal (int signal_num, __sigfun signal_func)
897extern __signal_func_ptr signal (int signal, __signal_func_ptr signal_func); 918extern __signal_func_ptr signal (int signal, __signal_func_ptr signal_func);
898__signal_func_ptr 919__signal_func_ptr
899sys_signal (int signal_num, __signal_func_ptr signal_func) 920sys_signal (int signal_num, __signal_func_ptr signal_func)
900#else 921#else /* not __MRC__ and not __MWERKS__ */
901 You lose!!! 922 You lose!!!
902#endif 923#endif /* not __MRC__ and not __MWERKS__ */
903{ 924{
904 if (signal_num != SIGALRM) 925 if (signal_num != SIGALRM)
905 return signal (signal_num, signal_func); 926 return signal (signal_num, signal_func);
@@ -1003,7 +1024,7 @@ extern struct tm *localtime (const time_t *);
1003struct tm * 1024struct tm *
1004sys_localtime (const time_t *timer) 1025sys_localtime (const time_t *timer)
1005{ 1026{
1006#ifdef CODEWARRIOR_VERSION_6 1027#if __MSL__ >= 0x6000
1007 time_t unix_time = *timer; 1028 time_t unix_time = *timer;
1008#else 1029#else
1009 time_t unix_time = *timer + CW_OR_MPW_UNIX_EPOCH_DIFF; 1030 time_t unix_time = *timer + CW_OR_MPW_UNIX_EPOCH_DIFF;
@@ -1018,7 +1039,7 @@ extern char *ctime (const time_t *);
1018char * 1039char *
1019sys_ctime (const time_t *timer) 1040sys_ctime (const time_t *timer)
1020{ 1041{
1021#ifdef CODEWARRIOR_VERSION_6 1042#if __MSL__ >= 0x6000
1022 time_t unix_time = *timer; 1043 time_t unix_time = *timer;
1023#else 1044#else
1024 time_t unix_time = *timer + CW_OR_MPW_UNIX_EPOCH_DIFF; 1045 time_t unix_time = *timer + CW_OR_MPW_UNIX_EPOCH_DIFF;
@@ -1033,7 +1054,7 @@ extern time_t time (time_t *);
1033time_t 1054time_t
1034sys_time (time_t *timer) 1055sys_time (time_t *timer)
1035{ 1056{
1036#ifdef CODEWARRIOR_VERSION_6 1057#if __MSL__ >= 0x6000
1037 time_t mac_time = time (NULL); 1058 time_t mac_time = time (NULL);
1038#else 1059#else
1039 time_t mac_time = time (NULL) - CW_OR_MPW_UNIX_EPOCH_DIFF; 1060 time_t mac_time = time (NULL) - CW_OR_MPW_UNIX_EPOCH_DIFF;
@@ -1333,6 +1354,7 @@ link (const char *name1, const char *name2)
1333 return -1; 1354 return -1;
1334} 1355}
1335 1356
1357#endif /* ! MAC_OSX */
1336 1358
1337/* Determine the path name of the file specified by VREFNUM, DIRID, 1359/* Determine the path name of the file specified by VREFNUM, DIRID,
1338 and NAME and place that in the buffer PATH of length 1360 and NAME and place that in the buffer PATH of length
@@ -1381,6 +1403,7 @@ path_from_vol_dir_name (char *path, int man_path_len, short vol_ref_num,
1381 return 1; /* success */ 1403 return 1; /* success */
1382} 1404}
1383 1405
1406#ifndef MAC_OSX
1384 1407
1385int 1408int
1386readlink (const char *path, char *buf, int bufsiz) 1409readlink (const char *path, char *buf, int bufsiz)
@@ -1593,7 +1616,7 @@ geteuid ()
1593 1616
1594 1617
1595#ifdef __MWERKS__ 1618#ifdef __MWERKS__
1596#ifndef CODEWARRIOR_VERSION_6 1619#if __MSL__ < 0x6000
1597#undef getpid 1620#undef getpid
1598int 1621int
1599getpid () 1622getpid ()
@@ -1603,6 +1626,8 @@ getpid ()
1603#endif 1626#endif
1604#endif /* __MWERKS__ */ 1627#endif /* __MWERKS__ */
1605 1628
1629#endif /* ! MAC_OSX */
1630
1606 1631
1607/* Return the path to the directory in which Emacs can create 1632/* Return the path to the directory in which Emacs can create
1608 temporary files. The MacOS "temporary items" directory cannot be 1633 temporary files. The MacOS "temporary items" directory cannot be
@@ -1613,7 +1638,7 @@ getpid ()
1613 directory "Emacs" in the Preferences Folder. This directory is 1638 directory "Emacs" in the Preferences Folder. This directory is
1614 created if it does not exist. */ 1639 created if it does not exist. */
1615 1640
1616static char * 1641char *
1617get_temp_dir_name () 1642get_temp_dir_name ()
1618{ 1643{
1619 static char *temp_dir_name = NULL; 1644 static char *temp_dir_name = NULL;
@@ -1658,6 +1683,7 @@ get_temp_dir_name ()
1658 return temp_dir_name; 1683 return temp_dir_name;
1659} 1684}
1660 1685
1686#ifndef MAC_OSX
1661 1687
1662/* Allocate and construct an array of pointers to strings from a list 1688/* Allocate and construct an array of pointers to strings from a list
1663 of strings stored in a 'STR#' resource. The returned pointer array 1689 of strings stored in a 'STR#' resource. The returned pointer array
@@ -1725,7 +1751,8 @@ get_path_to_system_folder ()
1725 if (!path_from_vol_dir_name (full_path, 255, vol_ref_num, dir_id, "\p")) 1751 if (!path_from_vol_dir_name (full_path, 255, vol_ref_num, dir_id, "\p"))
1726 return NULL; 1752 return NULL;
1727 1753
1728 if (!mac_to_posix_pathname (full_path, system_folder_unix_name, MAXPATHLEN+1)) 1754 if (!mac_to_posix_pathname (full_path, system_folder_unix_name,
1755 MAXPATHLEN+1))
1729 return NULL; 1756 return NULL;
1730 1757
1731 return system_folder_unix_name; 1758 return system_folder_unix_name;
@@ -1831,9 +1858,9 @@ char *sys_siglist[] =
1831 "Segment violation", 1858 "Segment violation",
1832 "Terminal" 1859 "Terminal"
1833}; 1860};
1834#else 1861#else /* not __MRC__ and not __MWERKS__ */
1835You lose!!! 1862You lose!!!
1836#endif 1863#endif /* not __MRC__ and not __MWERKS__ */
1837 1864
1838 1865
1839#include <utsname.h> 1866#include <utsname.h>
@@ -1928,6 +1955,9 @@ run_mac_command (argv, workdir, infn, outfn, errfn)
1928 const char *workdir; 1955 const char *workdir;
1929 const char *infn, *outfn, *errfn; 1956 const char *infn, *outfn, *errfn;
1930{ 1957{
1958#ifdef TARGET_API_MAC_CARBON
1959 return -1;
1960#else /* not TARGET_API_MAC_CARBON */
1931 char macappname[MAXPATHLEN+1], macworkdir[MAXPATHLEN+1]; 1961 char macappname[MAXPATHLEN+1], macworkdir[MAXPATHLEN+1];
1932 char macinfn[MAXPATHLEN+1], macoutfn[MAXPATHLEN+1], macerrfn[MAXPATHLEN+1]; 1962 char macinfn[MAXPATHLEN+1], macoutfn[MAXPATHLEN+1], macerrfn[MAXPATHLEN+1];
1933 int paramlen, argc, newargc, j, retries; 1963 int paramlen, argc, newargc, j, retries;
@@ -2008,9 +2038,9 @@ run_mac_command (argv, workdir, infn, outfn, errfn)
2008 char *t = (char *) alloca (strlen (newargv[0]) + 7 + 1); 2038 char *t = (char *) alloca (strlen (newargv[0]) + 7 + 1);
2009 strcpy (t, "~emacs/"); 2039 strcpy (t, "~emacs/");
2010 strcat (t, newargv[0]); 2040 strcat (t, newargv[0]);
2011#endif 2041#endif /* 0 */
2012 Lisp_Object path; 2042 Lisp_Object path;
2013 openp (Vexec_path, build_string (newargv[0]), Vexec_suffixes, &path, 2043 openp (Vexec_path, build_string (newargv[0]), EXEC_SUFFIXES, &path,
2014 1); 2044 1);
2015 2045
2016 if (NILP (path)) 2046 if (NILP (path))
@@ -2158,6 +2188,7 @@ run_mac_command (argv, workdir, infn, outfn, errfn)
2158 free (param); 2188 free (param);
2159 2189
2160 return ref_con; 2190 return ref_con;
2191#endif /* not TARGET_API_MAC_CARBON */
2161} 2192}
2162 2193
2163 2194
@@ -2360,6 +2391,8 @@ getwd (char *path)
2360 return path; 2391 return path;
2361} 2392}
2362 2393
2394#endif /* ! MAC_OSX */
2395
2363 2396
2364void 2397void
2365initialize_applescript () 2398initialize_applescript ()
@@ -2423,6 +2456,15 @@ do_applescript (char *script, char **result)
2423 if (!OSAScriptError (as_scripting_component, kOSAErrorMessage, typeChar, 2456 if (!OSAScriptError (as_scripting_component, kOSAErrorMessage, typeChar,
2424 &error_desc)) 2457 &error_desc))
2425 { 2458 {
2459#if TARGET_API_MAC_CARBON
2460 length = AEGetDescDataSize (&error_desc);
2461 *result = (char *) xmalloc (length + 1);
2462 if (*result)
2463 {
2464 AEGetDescData (&error_desc, *result, length);
2465 *(*result + length) = '\0';
2466 }
2467#else /* not TARGET_API_MAC_CARBON */
2426 HLock (error_desc.dataHandle); 2468 HLock (error_desc.dataHandle);
2427 length = GetHandleSize(error_desc.dataHandle); 2469 length = GetHandleSize(error_desc.dataHandle);
2428 *result = (char *) xmalloc (length + 1); 2470 *result = (char *) xmalloc (length + 1);
@@ -2432,11 +2474,21 @@ do_applescript (char *script, char **result)
2432 *(*result + length) = '\0'; 2474 *(*result + length) = '\0';
2433 } 2475 }
2434 HUnlock (error_desc.dataHandle); 2476 HUnlock (error_desc.dataHandle);
2477#endif /* not TARGET_API_MAC_CARBON */
2435 AEDisposeDesc (&error_desc); 2478 AEDisposeDesc (&error_desc);
2436 } 2479 }
2437 } 2480 }
2438 else if (osaerror == noErr) /* success: retrieve resulting script value */ 2481 else if (osaerror == noErr) /* success: retrieve resulting script value */
2439 { 2482 {
2483#if TARGET_API_MAC_CARBON
2484 length = AEGetDescDataSize (&result_desc);
2485 *result = (char *) xmalloc (length + 1);
2486 if (*result)
2487 {
2488 AEGetDescData (&result_desc, *result, length);
2489 *(*result + length) = '\0';
2490 }
2491#else /* not TARGET_API_MAC_CARBON */
2440 HLock (result_desc.dataHandle); 2492 HLock (result_desc.dataHandle);
2441 length = GetHandleSize(result_desc.dataHandle); 2493 length = GetHandleSize(result_desc.dataHandle);
2442 *result = (char *) xmalloc (length + 1); 2494 *result = (char *) xmalloc (length + 1);
@@ -2446,6 +2498,7 @@ do_applescript (char *script, char **result)
2446 *(*result + length) = '\0'; 2498 *(*result + length) = '\0';
2447 } 2499 }
2448 HUnlock (result_desc.dataHandle); 2500 HUnlock (result_desc.dataHandle);
2501#endif /* not TARGET_API_MAC_CARBON */
2449 } 2502 }
2450 2503
2451 AEDisposeDesc (&script_desc); 2504 AEDisposeDesc (&script_desc);
@@ -2456,11 +2509,11 @@ do_applescript (char *script, char **result)
2456 2509
2457 2510
2458DEFUN ("do-applescript", Fdo_applescript, Sdo_applescript, 1, 1, 0, 2511DEFUN ("do-applescript", Fdo_applescript, Sdo_applescript, 1, 1, 0,
2459 "Compile and execute AppleScript SCRIPT and retrieve and return the\n\ 2512 doc: /* Compile and execute AppleScript SCRIPT and retrieve and return the result.
2460result. If compilation and execution are successful, the resulting script\n\ 2513If compilation and execution are successful, the resulting script
2461value is returned as a string. Otherwise the function aborts and\n\ 2514value is returned as a string. Otherwise the function aborts and
2462displays the error message returned by the AppleScript scripting\n\ 2515displays the error message returned by the AppleScript scripting
2463component.") 2516component. */)
2464 (script) 2517 (script)
2465 Lisp_Object script; 2518 Lisp_Object script;
2466{ 2519{
@@ -2468,7 +2521,7 @@ component.")
2468 Lisp_Object lisp_result; 2521 Lisp_Object lisp_result;
2469 long status; 2522 long status;
2470 2523
2471 CHECK_STRING (script, 0); 2524 CHECK_STRING (script);
2472 2525
2473 status = do_applescript (XSTRING (script)->data, &result); 2526 status = do_applescript (XSTRING (script)->data, &result);
2474 if (status) 2527 if (status)
@@ -2497,15 +2550,15 @@ component.")
2497} 2550}
2498 2551
2499 2552
2500DEFUN ("mac-file-name-to-posix", Fmac_file_name_to_posix, Smac_file_name_to_posix, 1, 2553DEFUN ("mac-file-name-to-posix", Fmac_file_name_to_posix,
2501 1, 0, 2554 Smac_file_name_to_posix, 1, 1, 0,
2502 "Convert Macintosh filename to Posix form.") 2555 doc: /* Convert Macintosh filename to Posix form. */)
2503 (mac_filename) 2556 (mac_filename)
2504 Lisp_Object mac_filename; 2557 Lisp_Object mac_filename;
2505{ 2558{
2506 char posix_filename[MAXPATHLEN+1]; 2559 char posix_filename[MAXPATHLEN+1];
2507 2560
2508 CHECK_STRING (mac_filename, 0); 2561 CHECK_STRING (mac_filename);
2509 2562
2510 if (mac_to_posix_pathname (XSTRING (mac_filename)->data, posix_filename, 2563 if (mac_to_posix_pathname (XSTRING (mac_filename)->data, posix_filename,
2511 MAXPATHLEN)) 2564 MAXPATHLEN))
@@ -2515,15 +2568,15 @@ DEFUN ("mac-file-name-to-posix", Fmac_file_name_to_posix, Smac_file_name_to_posi
2515} 2568}
2516 2569
2517 2570
2518DEFUN ("posix-file-name-to-mac", Fposix_file_name_to_mac, Sposix_file_name_to_mac, 1, 2571DEFUN ("posix-file-name-to-mac", Fposix_file_name_to_mac,
2519 1, 0, 2572 Sposix_file_name_to_mac, 1, 1, 0,
2520 "Convert Unix filename to Mac form.") 2573 doc: /* Convert Posix filename to Mac form. */)
2521 (posix_filename) 2574 (posix_filename)
2522 Lisp_Object posix_filename; 2575 Lisp_Object posix_filename;
2523{ 2576{
2524 char mac_filename[MAXPATHLEN+1]; 2577 char mac_filename[MAXPATHLEN+1];
2525 2578
2526 CHECK_STRING (posix_filename, 0); 2579 CHECK_STRING (posix_filename);
2527 2580
2528 if (posix_to_mac_pathname (XSTRING (posix_filename)->data, mac_filename, 2581 if (posix_to_mac_pathname (XSTRING (posix_filename)->data, mac_filename,
2529 MAXPATHLEN)) 2582 MAXPATHLEN))
@@ -2536,9 +2589,39 @@ DEFUN ("posix-file-name-to-mac", Fposix_file_name_to_mac, Sposix_file_name_to_ma
2536/* set interprogram-paste-function to mac-paste-function in mac-win.el 2589/* set interprogram-paste-function to mac-paste-function in mac-win.el
2537 to enable Emacs to obtain the contents of the Mac clipboard. */ 2590 to enable Emacs to obtain the contents of the Mac clipboard. */
2538DEFUN ("mac-paste-function", Fmac_paste_function, Smac_paste_function, 0, 0, 0, 2591DEFUN ("mac-paste-function", Fmac_paste_function, Smac_paste_function, 0, 0, 0,
2539 "Return the contents of the Mac clipboard as a string.") 2592 doc: /* Return the contents of the Mac clipboard as a string. */)
2540 () 2593 ()
2541{ 2594{
2595#if TARGET_API_MAC_CARBON
2596 ScrapRef scrap;
2597 ScrapFlavorFlags sff;
2598 Size s;
2599 int i;
2600 char *data;
2601
2602 if (GetCurrentScrap (&scrap) != noErr)
2603 return Qnil;
2604
2605 if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) != noErr)
2606 return Qnil;
2607
2608 if (GetScrapFlavorSize (scrap, kScrapFlavorTypeText, &s) != noErr)
2609 return Qnil;
2610
2611 if ((data = (char*) alloca (s)) == NULL)
2612 return Qnil;
2613
2614 if (GetScrapFlavorData (scrap, kScrapFlavorTypeText, &s, data) != noErr
2615 || s == 0)
2616 return Qnil;
2617
2618 /* Emacs expects clipboard contents have Unix-style eol's */
2619 for (i = 0; i < s; i++)
2620 if (data[i] == '\r')
2621 data[i] = '\n';
2622
2623 return make_string (data, s);
2624#else /* not TARGET_API_MAC_CARBON */
2542 Lisp_Object value; 2625 Lisp_Object value;
2543 Handle my_handle; 2626 Handle my_handle;
2544 long scrap_offset, rc, i; 2627 long scrap_offset, rc, i;
@@ -2563,13 +2646,14 @@ DEFUN ("mac-paste-function", Fmac_paste_function, Smac_paste_function, 0, 0, 0,
2563 DisposeHandle (my_handle); 2646 DisposeHandle (my_handle);
2564 2647
2565 return value; 2648 return value;
2649#endif /* not TARGET_API_MAC_CARBON */
2566} 2650}
2567 2651
2568 2652
2569/* set interprogram-cut-function to mac-cut-function in mac-win.el 2653/* set interprogram-cut-function to mac-cut-function in mac-win.el
2570 to enable Emacs to write the top of the kill-ring to the Mac clipboard. */ 2654 to enable Emacs to write the top of the kill-ring to the Mac clipboard. */
2571DEFUN ("mac-cut-function", Fmac_cut_function, Smac_cut_function, 1, 2, 0, 2655DEFUN ("mac-cut-function", Fmac_cut_function, Smac_cut_function, 1, 2, 0,
2572 "Put the value of the string parameter to the Mac clipboard.") 2656 doc: /* Put the value of the string parameter to the Mac clipboard. */)
2573 (value, push) 2657 (value, push)
2574 Lisp_Object value, push; 2658 Lisp_Object value, push;
2575{ 2659{
@@ -2578,36 +2662,50 @@ DEFUN ("mac-cut-function", Fmac_cut_function, Smac_cut_function, 1, 2, 0,
2578 2662
2579 /* fixme: ignore the push flag for now */ 2663 /* fixme: ignore the push flag for now */
2580 2664
2581 CHECK_STRING (value, 0); 2665 CHECK_STRING (value);
2582 2666
2583 len = XSTRING (value)->size; 2667 len = XSTRING (value)->size;
2584 buf = (char *) alloca (len); 2668 buf = (char *) alloca (len+1);
2585 bcopy(XSTRING (value)->data, buf, len); 2669 bcopy (XSTRING (value)->data, buf, len);
2670 buf[len] = '\0';
2586 2671
2587 /* convert to Mac-style eol's before sending to clipboard */ 2672 /* convert to Mac-style eol's before sending to clipboard */
2588 for (i = 0; i < len; i++) 2673 for (i = 0; i < len; i++)
2589 if (buf[i] == '\n') 2674 if (buf[i] == '\n')
2590 buf[i] = '\r'; 2675 buf[i] = '\r';
2591 2676
2677#if TARGET_API_MAC_CARBON
2678 {
2679 ScrapRef scrap;
2680 ClearCurrentScrap ();
2681 if (GetCurrentScrap (&scrap) != noErr)
2682 error ("cannot get current scrap");
2683
2684 if (PutScrapFlavor (scrap, kScrapFlavorTypeText, kScrapFlavorMaskNone, len,
2685 buf) != noErr)
2686 error ("cannot put to scrap");
2687 }
2688#else /* not TARGET_API_MAC_CARBON */
2592 ZeroScrap (); 2689 ZeroScrap ();
2593 PutScrap (len, 'TEXT', buf); 2690 PutScrap (len, 'TEXT', buf);
2691#endif /* not TARGET_API_MAC_CARBON */
2594 2692
2595 return Qnil; 2693 return Qnil;
2596} 2694}
2597 2695
2598 2696
2599DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p, 2697DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p,
2600 0, 1, 0, 2698 0, 1, 0,
2601 "Whether there is an owner for the given X Selection.\n\ 2699 doc: /* Whether there is an owner for the given X Selection.
2602The arg should be the name of the selection in question, typically one of\n\ 2700The arg should be the name of the selection in question, typically one of
2603the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.\n\ 2701the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
2604\(Those are literal upper-case symbol names, since that's what X expects.)\n\ 2702(Those are literal upper-case symbol names, since that's what X expects.)
2605For convenience, the symbol nil is the same as `PRIMARY',\n\ 2703For convenience, the symbol nil is the same as `PRIMARY',
2606and t is the same as `SECONDARY'.") 2704and t is the same as `SECONDARY'. */)
2607 (selection) 2705 (selection)
2608 Lisp_Object selection; 2706 Lisp_Object selection;
2609{ 2707{
2610 CHECK_SYMBOL (selection, 0); 2708 CHECK_SYMBOL (selection);
2611 2709
2612 /* Return nil for PRIMARY and SECONDARY selections; for CLIPBOARD, check 2710 /* Return nil for PRIMARY and SECONDARY selections; for CLIPBOARD, check
2613 if the clipboard currently has valid text format contents. */ 2711 if the clipboard currently has valid text format contents. */
@@ -2615,7 +2713,15 @@ and t is the same as `SECONDARY'.")
2615 if (EQ (selection, QCLIPBOARD)) 2713 if (EQ (selection, QCLIPBOARD))
2616 { 2714 {
2617 Lisp_Object val = Qnil; 2715 Lisp_Object val = Qnil;
2618 Lisp_Object value; 2716
2717#if TARGET_API_MAC_CARBON
2718 ScrapRef scrap;
2719 ScrapFlavorFlags sff;
2720
2721 if (GetCurrentScrap (&scrap) == noErr)
2722 if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) == noErr)
2723 val = Qt;
2724#else /* not TARGET_API_MAC_CARBON */
2619 Handle my_handle; 2725 Handle my_handle;
2620 long rc, scrap_offset; 2726 long rc, scrap_offset;
2621 2727
@@ -2626,6 +2732,7 @@ and t is the same as `SECONDARY'.")
2626 val = Qt; 2732 val = Qt;
2627 2733
2628 DisposeHandle (my_handle); 2734 DisposeHandle (my_handle);
2735#endif /* not TARGET_API_MAC_CARBON */
2629 2736
2630 return val; 2737 return val;
2631 } 2738 }
@@ -2641,7 +2748,9 @@ syms_of_mac ()
2641 2748
2642 defsubr (&Smac_paste_function); 2749 defsubr (&Smac_paste_function);
2643 defsubr (&Smac_cut_function); 2750 defsubr (&Smac_cut_function);
2751#if 0
2644 defsubr (&Sx_selection_exists_p); 2752 defsubr (&Sx_selection_exists_p);
2753#endif /* 0 */
2645 2754
2646 defsubr (&Sdo_applescript); 2755 defsubr (&Sdo_applescript);
2647 defsubr (&Smac_file_name_to_posix); 2756 defsubr (&Smac_file_name_to_posix);
diff --git a/mac/src/macfns.c b/src/macfns.c
index fc0cf27a13b..a4235d7c653 100644
--- a/mac/src/macfns.c
+++ b/src/macfns.c
@@ -1,5 +1,5 @@
1/* Graphical user interface functions for Mac OS. 1/* Graphical user interface functions for Mac OS.
2 Copyright (C) 2000 Free Software Foundation, Inc. 2 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#include <config.h> 23#include <config.h>
24 24
@@ -57,24 +57,41 @@ static unsigned char gray_bits[] = {
57 57
58#include <stdlib.h> 58#include <stdlib.h>
59#include <string.h> 59#include <string.h>
60#ifndef MAC_OSX
60#include <alloca.h> 61#include <alloca.h>
61#if 0
62#include <unistd.h>
63#endif 62#endif
64 63
64#ifdef MAC_OSX
65#undef mktime
66#undef DEBUG
67#undef Z
68#undef free
69#undef malloc
70#undef realloc
71/* Macros max and min defined in lisp.h conflict with those in
72 precompiled header Carbon.h. */
73#undef max
74#undef min
75#include <Carbon/Carbon.h>
76#undef Z
77#define Z (current_buffer->text->z)
78#undef free
79#define free unexec_free
80#undef malloc
81#define malloc unexec_malloc
82#undef realloc
83#define realloc unexec_realloc
84#undef min
85#define min(a, b) ((a) < (b) ? (a) : (b))
86#undef max
87#define max(a, b) ((a) > (b) ? (a) : (b))
88#else /* not MAC_OSX */
65#include <Windows.h> 89#include <Windows.h>
66#include <Gestalt.h> 90#include <Gestalt.h>
67#include <TextUtils.h> 91#include <TextUtils.h>
68 92#endif /* not MAC_OSX */
69#ifndef min
70#define min(a,b) ((a) < (b) ? (a) : (b))
71#endif
72#ifndef max
73#define max(a,b) ((a) > (b) ? (a) : (b))
74#endif
75 93
76/*extern void free_frame_menubar (); 94/*extern void free_frame_menubar ();
77extern void x_compute_fringe_widths (struct frame *, int);
78extern double atof (); 95extern double atof ();
79extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state); 96extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state);
80extern int quit_char;*/ 97extern int quit_char;*/
@@ -232,18 +249,20 @@ extern Lisp_Object Vwindow_system_version;
232 249
233Lisp_Object Qface_set_after_frame_default; 250Lisp_Object Qface_set_after_frame_default;
234 251
252extern int mac_initialized;
253
235/* Functions in macterm.c. */ 254/* Functions in macterm.c. */
236extern void x_set_offset (struct frame *, int, int, int); 255extern void x_set_offset (struct frame *, int, int, int);
237extern void x_wm_set_icon_position (struct frame *, int, int); 256extern void x_wm_set_icon_position (struct frame *, int, int);
238extern void x_display_cursor (struct window *, int, int, int, int, int); 257extern void x_display_cursor (struct window *, int, int, int, int, int);
239extern void x_set_window_size (struct frame *, int, int, int); 258extern void x_set_window_size (struct frame *, int, int, int);
240extern void x_make_frame_visible (struct frame *); 259extern void x_make_frame_visible (struct frame *);
241extern struct mac_display_info *x_term_init (Lisp_Object, char *, char *); 260extern struct mac_display_info *mac_term_init (Lisp_Object, char *, char *);
242extern struct font_info *x_get_font_info (FRAME_PTR, int); 261extern struct font_info *x_get_font_info (FRAME_PTR, int);
243extern struct font_info *x_load_font (struct frame *, char *, int); 262extern struct font_info *x_load_font (struct frame *, char *, int);
244extern void x_find_ccl_program (struct font_info *); 263extern void x_find_ccl_program (struct font_info *);
245extern struct font_info *x_query_font (struct frame *, char *); 264extern struct font_info *x_query_font (struct frame *, char *);
246 265extern void mac_initialize ();
247 266
248/* compare two strings ignoring case */ 267/* compare two strings ignoring case */
249 268
@@ -297,7 +316,7 @@ check_x_frame (frame)
297 316
298 if (NILP (frame)) 317 if (NILP (frame))
299 frame = selected_frame; 318 frame = selected_frame;
300 CHECK_LIVE_FRAME (frame, 0); 319 CHECK_LIVE_FRAME (frame);
301 f = XFRAME (frame); 320 f = XFRAME (frame);
302 if (! FRAME_MAC_P (f)) 321 if (! FRAME_MAC_P (f))
303 error ("non-mac frame used"); 322 error ("non-mac frame used");
@@ -312,6 +331,12 @@ static struct mac_display_info *
312check_x_display_info (frame) 331check_x_display_info (frame)
313 Lisp_Object frame; 332 Lisp_Object frame;
314{ 333{
334 if (!mac_initialized)
335 {
336 mac_initialize ();
337 mac_initialized = 1;
338 }
339
315 if (NILP (frame)) 340 if (NILP (frame))
316 { 341 {
317 struct frame *sf = XFRAME (selected_frame); 342 struct frame *sf = XFRAME (selected_frame);
@@ -327,7 +352,7 @@ check_x_display_info (frame)
327 { 352 {
328 FRAME_PTR f; 353 FRAME_PTR f;
329 354
330 CHECK_LIVE_FRAME (frame, 0); 355 CHECK_LIVE_FRAME (frame);
331 f = XFRAME (frame); 356 f = XFRAME (frame);
332 if (! FRAME_MAC_P (f)) 357 if (! FRAME_MAC_P (f))
333 error ("non-mac frame used"); 358 error ("non-mac frame used");
@@ -356,7 +381,7 @@ x_window_to_frame (dpyinfo, wdesc)
356 f = XFRAME (frame); 381 f = XFRAME (frame);
357 if (!FRAME_W32_P (f) || FRAME_MAC_DISPLAY_INFO (f) != dpyinfo) 382 if (!FRAME_W32_P (f) || FRAME_MAC_DISPLAY_INFO (f) != dpyinfo)
358 continue; 383 continue;
359 /*if (f->output_data.w32->busy_window == wdesc) 384 /*if (f->output_data.w32->hourglass_window == wdesc)
360 return f;*/ 385 return f;*/
361 386
362 /* MAC_TODO: Check tooltips when supported. */ 387 /* MAC_TODO: Check tooltips when supported. */
@@ -514,7 +539,7 @@ x_create_bitmap_from_file (f, file)
514 } 539 }
515 540
516 /* Search bitmap-file-path for the file, if appropriate. */ 541 /* Search bitmap-file-path for the file, if appropriate. */
517 fd = openp (Vx_bitmap_file_path, file, Qnil, &found, 0); 542 fd = openp (Vx_bitmap_file_path, file, "", &found, 0);
518 if (fd < 0) 543 if (fd < 0)
519 return -1; 544 return -1;
520 /* LoadLibraryEx won't handle special files handled by Emacs handler. */ 545 /* LoadLibraryEx won't handle special files handled by Emacs handler. */
@@ -605,7 +630,6 @@ void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
605void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); 630void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
606void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); 631void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
607void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object)); 632void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object));
608static void x_set_fringe_width P_ ((struct frame *, Lisp_Object, Lisp_Object));
609void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); 633void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object));
610void x_set_internal_border_width P_ ((struct frame *, Lisp_Object, 634void x_set_internal_border_width P_ ((struct frame *, Lisp_Object,
611 Lisp_Object)); 635 Lisp_Object));
@@ -661,9 +685,7 @@ static struct x_frame_parm_table x_frame_parms[] =
661 "scroll-bar-background", x_set_scroll_bar_background, 685 "scroll-bar-background", x_set_scroll_bar_background,
662#endif 686#endif
663 "screen-gamma", x_set_screen_gamma, 687 "screen-gamma", x_set_screen_gamma,
664 "line-spacing", x_set_line_spacing, 688 "line-spacing", x_set_line_spacing
665 "left-fringe", x_set_fringe_width,
666 "right-fringe", x_set_fringe_width
667}; 689};
668 690
669/* Attach the `x-frame-parameter' properties to 691/* Attach the `x-frame-parameter' properties to
@@ -755,16 +777,13 @@ x_set_frame_parameters (f, alist)
755 /* Process foreground_color and background_color before anything else. 777 /* Process foreground_color and background_color before anything else.
756 They are independent of other properties, but other properties (e.g., 778 They are independent of other properties, but other properties (e.g.,
757 cursor_color) are dependent upon them. */ 779 cursor_color) are dependent upon them. */
758 /* Process default font as well, since fringe widths depends on it. */
759 for (p = 0; p < i; p++) 780 for (p = 0; p < i; p++)
760 { 781 {
761 Lisp_Object prop, val; 782 Lisp_Object prop, val;
762 783
763 prop = parms[p]; 784 prop = parms[p];
764 val = values[p]; 785 val = values[p];
765 if (EQ (prop, Qforeground_color) 786 if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color))
766 || EQ (prop, Qbackground_color)
767 || EQ (prop, Qfont))
768 { 787 {
769 register Lisp_Object param_index, old_value; 788 register Lisp_Object param_index, old_value;
770 789
@@ -798,9 +817,7 @@ x_set_frame_parameters (f, alist)
798 icon_top = val; 817 icon_top = val;
799 else if (EQ (prop, Qicon_left)) 818 else if (EQ (prop, Qicon_left))
800 icon_left = val; 819 icon_left = val;
801 else if (EQ (prop, Qforeground_color) 820 else if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color))
802 || EQ (prop, Qbackground_color)
803 || EQ (prop, Qfont))
804 /* Processed above. */ 821 /* Processed above. */
805 continue; 822 continue;
806 else 823 else
@@ -959,9 +976,18 @@ x_real_positions (f, xptr, yptr)
959 Point pt; 976 Point pt;
960 GrafPtr oldport; 977 GrafPtr oldport;
961 978
979#ifdef TARGET_API_MAC_CARBON
980 {
981 Rect r;
982
983 GetWindowPortBounds (f->output_data.mac->mWP, &r);
984 SetPt (&pt, r.left, r.top);
985 }
986#else /* not TARGET_API_MAC_CARBON */
962 SetPt (&pt, 987 SetPt (&pt,
963 f->output_data.mac->mWP->portRect.left, 988 f->output_data.mac->mWP->portRect.left,
964 f->output_data.mac->mWP->portRect.top); 989 f->output_data.mac->mWP->portRect.top);
990#endif /* not TARGET_API_MAC_CARBON */
965 GetPort (&oldport); 991 GetPort (&oldport);
966 LocalToGlobal (&pt); 992 LocalToGlobal (&pt);
967 SetPort (oldport); 993 SetPort (oldport);
@@ -1002,14 +1028,6 @@ x_report_frame_params (f, alistptr)
1002 make_number (f->output_data.mac->border_width)); 1028 make_number (f->output_data.mac->border_width));
1003 store_in_alist (alistptr, Qinternal_border_width, 1029 store_in_alist (alistptr, Qinternal_border_width,
1004 make_number (f->output_data.mac->internal_border_width)); 1030 make_number (f->output_data.mac->internal_border_width));
1005 store_in_alist (alistptr, Qleft_fringe,
1006 make_number (f->output_data.mac->left_fringe_width));
1007 store_in_alist (alistptr, Qright_fringe,
1008 make_number (f->output_data.mac->right_fringe_width));
1009 store_in_alist (alistptr, Qscroll_bar_width,
1010 make_number (FRAME_HAS_VERTICAL_SCROLL_BARS (f)
1011 ? FRAME_SCROLL_BAR_PIXEL_WIDTH(f)
1012 : 0));
1013 sprintf (buf, "%ld", (long) FRAME_MAC_WINDOW (f)); 1031 sprintf (buf, "%ld", (long) FRAME_MAC_WINDOW (f));
1014 store_in_alist (alistptr, Qwindow_id, 1032 store_in_alist (alistptr, Qwindow_id,
1015 build_string (buf)); 1033 build_string (buf));
@@ -2044,7 +2062,7 @@ x_decode_color (f, arg, def)
2044{ 2062{
2045 XColor cdef; 2063 XColor cdef;
2046 2064
2047 CHECK_STRING (arg, 0); 2065 CHECK_STRING (arg);
2048 2066
2049 if (strcmp (XSTRING (arg)->data, "black") == 0) 2067 if (strcmp (XSTRING (arg)->data, "black") == 0)
2050 return BLACK_PIX_DEFAULT (f); 2068 return BLACK_PIX_DEFAULT (f);
@@ -2173,7 +2191,7 @@ x_set_mouse_color (f, arg, oldval)
2173 2191
2174 if (!EQ (Qnil, Vx_pointer_shape)) 2192 if (!EQ (Qnil, Vx_pointer_shape))
2175 { 2193 {
2176 CHECK_NUMBER (Vx_pointer_shape, 0); 2194 CHECK_NUMBER (Vx_pointer_shape);
2177 cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_pointer_shape)); 2195 cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_pointer_shape));
2178 } 2196 }
2179 else 2197 else
@@ -2182,7 +2200,7 @@ x_set_mouse_color (f, arg, oldval)
2182 2200
2183 if (!EQ (Qnil, Vx_nontext_pointer_shape)) 2201 if (!EQ (Qnil, Vx_nontext_pointer_shape))
2184 { 2202 {
2185 CHECK_NUMBER (Vx_nontext_pointer_shape, 0); 2203 CHECK_NUMBER (Vx_nontext_pointer_shape);
2186 nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), 2204 nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
2187 XINT (Vx_nontext_pointer_shape)); 2205 XINT (Vx_nontext_pointer_shape));
2188 } 2206 }
@@ -2192,7 +2210,7 @@ x_set_mouse_color (f, arg, oldval)
2192 2210
2193 if (!EQ (Qnil, Vx_hourglass_pointer_shape)) 2211 if (!EQ (Qnil, Vx_hourglass_pointer_shape))
2194 { 2212 {
2195 CHECK_NUMBER (Vx_hourglass_pointer_shape, 0); 2213 CHECK_NUMBER (Vx_hourglass_pointer_shape);
2196 hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), 2214 hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
2197 XINT (Vx_hourglass_pointer_shape)); 2215 XINT (Vx_hourglass_pointer_shape));
2198 } 2216 }
@@ -2203,7 +2221,7 @@ x_set_mouse_color (f, arg, oldval)
2203 x_check_errors (FRAME_W32_DISPLAY (f), "bad nontext pointer cursor: %s"); 2221 x_check_errors (FRAME_W32_DISPLAY (f), "bad nontext pointer cursor: %s");
2204 if (!EQ (Qnil, Vx_mode_pointer_shape)) 2222 if (!EQ (Qnil, Vx_mode_pointer_shape))
2205 { 2223 {
2206 CHECK_NUMBER (Vx_mode_pointer_shape, 0); 2224 CHECK_NUMBER (Vx_mode_pointer_shape);
2207 mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), 2225 mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
2208 XINT (Vx_mode_pointer_shape)); 2226 XINT (Vx_mode_pointer_shape));
2209 } 2227 }
@@ -2213,7 +2231,7 @@ x_set_mouse_color (f, arg, oldval)
2213 2231
2214 if (!EQ (Qnil, Vx_sensitive_text_pointer_shape)) 2232 if (!EQ (Qnil, Vx_sensitive_text_pointer_shape))
2215 { 2233 {
2216 CHECK_NUMBER (Vx_sensitive_text_pointer_shape, 0); 2234 CHECK_NUMBER (Vx_sensitive_text_pointer_shape);
2217 cross_cursor 2235 cross_cursor
2218 = XCreateFontCursor (FRAME_W32_DISPLAY (f), 2236 = XCreateFontCursor (FRAME_W32_DISPLAY (f),
2219 XINT (Vx_sensitive_text_pointer_shape)); 2237 XINT (Vx_sensitive_text_pointer_shape));
@@ -2223,14 +2241,14 @@ x_set_mouse_color (f, arg, oldval)
2223 2241
2224 if (!NILP (Vx_window_horizontal_drag_shape)) 2242 if (!NILP (Vx_window_horizontal_drag_shape))
2225 { 2243 {
2226 CHECK_NUMBER (Vx_window_horizontal_drag_shape, 0); 2244 CHECK_NUMBER (Vx_window_horizontal_drag_shape);
2227 horizontal_drag_cursor 2245 horizontal_drag_cursor
2228 = XCreateFontCursor (FRAME_X_DISPLAY (f), 2246 = XCreateFontCursor (FRAME_W32_DISPLAY (f),
2229 XINT (Vx_window_horizontal_drag_shape)); 2247 XINT (Vx_window_horizontal_drag_shape));
2230 } 2248 }
2231 else 2249 else
2232 horizontal_drag_cursor 2250 horizontal_drag_cursor
2233 = XCreateFontCursor (FRAME_X_DISPLAY (f), XC_sb_h_double_arrow); 2251 = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_sb_h_double_arrow);
2234 2252
2235 /* Check and report errors with the above calls. */ 2253 /* Check and report errors with the above calls. */
2236 x_check_errors (FRAME_W32_DISPLAY (f), "can't set cursor shape: %s"); 2254 x_check_errors (FRAME_W32_DISPLAY (f), "can't set cursor shape: %s");
@@ -2362,7 +2380,7 @@ x_set_border_color (f, arg, oldval)
2362{ 2380{
2363 int pix; 2381 int pix;
2364 2382
2365 CHECK_STRING (arg, 0); 2383 CHECK_STRING (arg);
2366 pix = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); 2384 pix = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
2367 x_set_border_pixel (f, pix); 2385 x_set_border_pixel (f, pix);
2368 update_face_from_frame_parameter (f, Qborder_color, arg); 2386 update_face_from_frame_parameter (f, Qborder_color, arg);
@@ -2447,7 +2465,7 @@ x_set_icon_type (f, arg, oldval)
2447 2465
2448 UNBLOCK_INPUT; 2466 UNBLOCK_INPUT;
2449} 2467}
2450#endif 2468#endif /* MAC_TODO */
2451 2469
2452/* Return non-nil if frame F wants a bitmap icon. */ 2470/* Return non-nil if frame F wants a bitmap icon. */
2453 2471
@@ -2481,7 +2499,7 @@ x_set_icon_name (f, arg, oldval)
2481 2499
2482 f->icon_name = arg; 2500 f->icon_name = arg;
2483 2501
2484#if 0 2502#if 0 /* MAC_TODO */
2485 if (f->output_data.w32->icon_bitmap != 0) 2503 if (f->output_data.w32->icon_bitmap != 0)
2486 return; 2504 return;
2487 2505
@@ -2512,7 +2530,7 @@ x_set_icon_name (f, arg, oldval)
2512 2530
2513 XFlush (FRAME_W32_DISPLAY (f)); 2531 XFlush (FRAME_W32_DISPLAY (f));
2514 UNBLOCK_INPUT; 2532 UNBLOCK_INPUT;
2515#endif 2533#endif /* MAC_TODO */
2516} 2534}
2517 2535
2518extern Lisp_Object x_new_font (); 2536extern Lisp_Object x_new_font ();
@@ -2526,8 +2544,9 @@ x_set_font (f, arg, oldval)
2526 Lisp_Object result; 2544 Lisp_Object result;
2527 Lisp_Object fontset_name; 2545 Lisp_Object fontset_name;
2528 Lisp_Object frame; 2546 Lisp_Object frame;
2547 int old_fontset = FRAME_FONTSET(f);
2529 2548
2530 CHECK_STRING (arg, 1); 2549 CHECK_STRING (arg);
2531 2550
2532 fontset_name = Fquery_fontset (arg, Qnil); 2551 fontset_name = Fquery_fontset (arg, Qnil);
2533 2552
@@ -2543,8 +2562,16 @@ x_set_font (f, arg, oldval)
2543 error ("The characters of the given font have varying widths"); 2562 error ("The characters of the given font have varying widths");
2544 else if (STRINGP (result)) 2563 else if (STRINGP (result))
2545 { 2564 {
2546 if (!NILP (Fequal (result, oldval))) 2565 if (STRINGP (fontset_name))
2547 return; 2566 {
2567 /* Fontset names are built from ASCII font names, so the
2568 names may be equal despite there was a change. */
2569 if (old_fontset == FRAME_FONTSET (f))
2570 return;
2571 }
2572 else if (!NILP (Fequal (result, oldval)))
2573 return;
2574
2548 store_frame_param (f, Qfont, result); 2575 store_frame_param (f, Qfont, result);
2549 recompute_basic_faces (f); 2576 recompute_basic_faces (f);
2550 } 2577 }
@@ -2565,25 +2592,17 @@ x_set_font (f, arg, oldval)
2565 } 2592 }
2566} 2593}
2567 2594
2568static void
2569x_set_fringe_width (f, new_value, old_value)
2570 struct frame *f;
2571 Lisp_Object new_value, old_value;
2572{
2573 x_compute_fringe_widths (f, 1);
2574}
2575
2576void 2595void
2577x_set_border_width (f, arg, oldval) 2596x_set_border_width (f, arg, oldval)
2578 struct frame *f; 2597 struct frame *f;
2579 Lisp_Object arg, oldval; 2598 Lisp_Object arg, oldval;
2580{ 2599{
2581 CHECK_NUMBER (arg, 0); 2600 CHECK_NUMBER (arg);
2582 2601
2583 if (XINT (arg) == f->output_data.mac->border_width) 2602 if (XINT (arg) == f->output_data.mac->border_width)
2584 return; 2603 return;
2585 2604
2586#if 0 2605#if 0 /* MAC_TODO */
2587 if (FRAME_MAC_WINDOW (f) != 0) 2606 if (FRAME_MAC_WINDOW (f) != 0)
2588 error ("Cannot change the border width of a window"); 2607 error ("Cannot change the border width of a window");
2589#endif 2608#endif
@@ -2598,7 +2617,7 @@ x_set_internal_border_width (f, arg, oldval)
2598{ 2617{
2599 int old = f->output_data.mac->internal_border_width; 2618 int old = f->output_data.mac->internal_border_width;
2600 2619
2601 CHECK_NUMBER (arg, 0); 2620 CHECK_NUMBER (arg);
2602 f->output_data.mac->internal_border_width = XINT (arg); 2621 f->output_data.mac->internal_border_width = XINT (arg);
2603 if (f->output_data.mac->internal_border_width < 0) 2622 if (f->output_data.mac->internal_border_width < 0)
2604 f->output_data.mac->internal_border_width = 0; 2623 f->output_data.mac->internal_border_width = 0;
@@ -2612,6 +2631,8 @@ x_set_internal_border_width (f, arg, oldval)
2612 SET_FRAME_GARBAGED (f); 2631 SET_FRAME_GARBAGED (f);
2613 do_pending_window_change (0); 2632 do_pending_window_change (0);
2614 } 2633 }
2634 else
2635 SET_FRAME_GARBAGED (f);
2615} 2636}
2616 2637
2617void 2638void
@@ -2698,6 +2719,7 @@ x_set_menu_bar_lines (f, value, oldval)
2698 adjust_glyphs (f); 2719 adjust_glyphs (f);
2699} 2720}
2700 2721
2722
2701/* Set the number of lines used for the tool bar of frame F to VALUE. 2723/* Set the number of lines used for the tool bar of frame F to VALUE.
2702 VALUE not an integer, or < 0 means set the lines to zero. OLDVAL 2724 VALUE not an integer, or < 0 means set the lines to zero. OLDVAL
2703 is the old number of tool bar lines. This function changes the 2725 is the old number of tool bar lines. This function changes the
@@ -2767,6 +2789,9 @@ x_set_tool_bar_lines (f, value, oldval)
2767 XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), 2789 XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
2768 0, y, width, height, 0); 2790 0, y, width, height, 0);
2769 UNBLOCK_INPUT; 2791 UNBLOCK_INPUT;
2792
2793 if (WINDOWP (f->tool_bar_window))
2794 clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);
2770 } 2795 }
2771} 2796}
2772 2797
@@ -2813,7 +2838,7 @@ x_set_name (f, name, explicit)
2813 name = build_string (FRAME_MAC_DISPLAY_INFO (f)->mac_id_name); 2838 name = build_string (FRAME_MAC_DISPLAY_INFO (f)->mac_id_name);
2814 } 2839 }
2815 else 2840 else
2816 CHECK_STRING (name, 0); 2841 CHECK_STRING (name);
2817 2842
2818 /* Don't change the name if it's already NAME. */ 2843 /* Don't change the name if it's already NAME. */
2819 if (! NILP (Fstring_equal (name, f->name))) 2844 if (! NILP (Fstring_equal (name, f->name)))
@@ -2987,6 +3012,11 @@ x_set_scroll_bar_width (f, arg, oldval)
2987 3012
2988 if (NILP (arg)) 3013 if (NILP (arg))
2989 { 3014 {
3015#ifdef MAC_OSX
3016 FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = 16; /* Aqua scroll bars. */
3017 FRAME_SCROLL_BAR_COLS (f) = (FRAME_SCROLL_BAR_PIXEL_WIDTH (f) +
3018 wid - 1) / wid;
3019#else /* not MAC_OSX */
2990 /* Make the actual width at least 14 pixels and a multiple of a 3020 /* Make the actual width at least 14 pixels and a multiple of a
2991 character width. */ 3021 character width. */
2992 FRAME_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid; 3022 FRAME_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid;
@@ -2994,7 +3024,7 @@ x_set_scroll_bar_width (f, arg, oldval)
2994 /* Use all of that space (aside from required margins) for the 3024 /* Use all of that space (aside from required margins) for the
2995 scroll bar. */ 3025 scroll bar. */
2996 FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = 0; 3026 FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = 0;
2997 3027#endif /* not MAC_OSX */
2998 if (FRAME_MAC_WINDOW (f)) 3028 if (FRAME_MAC_WINDOW (f))
2999 x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f)); 3029 x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f));
3000 do_pending_window_change (0); 3030 do_pending_window_change (0);
@@ -3090,15 +3120,15 @@ validate_x_resource_name ()
3090extern char *x_get_string_resource (); 3120extern char *x_get_string_resource ();
3091 3121
3092DEFUN ("x-get-resource", Fx_get_resource, Sx_get_resource, 2, 4, 0, 3122DEFUN ("x-get-resource", Fx_get_resource, Sx_get_resource, 2, 4, 0,
3093 "Return the value of ATTRIBUTE, of class CLASS, from the X defaults database.\n\ 3123 doc: /* Return the value of ATTRIBUTE, of class CLASS, from the X defaults database.
3094This uses `INSTANCE.ATTRIBUTE' as the key and `Emacs.CLASS' as the\n\ 3124This uses `INSTANCE.ATTRIBUTE' as the key and `Emacs.CLASS' as the
3095class, where INSTANCE is the name under which Emacs was invoked, or\n\ 3125class, where INSTANCE is the name under which Emacs was invoked, or
3096the name specified by the `-name' or `-rn' command-line arguments.\n\ 3126the name specified by the `-name' or `-rn' command-line arguments.
3097\n\ 3127
3098The optional arguments COMPONENT and SUBCLASS add to the key and the\n\ 3128The optional arguments COMPONENT and SUBCLASS add to the key and the
3099class, respectively. You must specify both of them or neither.\n\ 3129class, respectively. You must specify both of them or neither.
3100If you specify them, the key is `INSTANCE.COMPONENT.ATTRIBUTE'\n\ 3130If you specify them, the key is `INSTANCE.COMPONENT.ATTRIBUTE'
3101and the class is `Emacs.CLASS.SUBCLASS'.") 3131and the class is `Emacs.CLASS.SUBCLASS'. */)
3102 (attribute, class, component, subclass) 3132 (attribute, class, component, subclass)
3103 Lisp_Object attribute, class, component, subclass; 3133 Lisp_Object attribute, class, component, subclass;
3104{ 3134{
@@ -3106,13 +3136,13 @@ and the class is `Emacs.CLASS.SUBCLASS'.")
3106 char *name_key; 3136 char *name_key;
3107 char *class_key; 3137 char *class_key;
3108 3138
3109 CHECK_STRING (attribute, 0); 3139 CHECK_STRING (attribute);
3110 CHECK_STRING (class, 0); 3140 CHECK_STRING (class);
3111 3141
3112 if (!NILP (component)) 3142 if (!NILP (component))
3113 CHECK_STRING (component, 1); 3143 CHECK_STRING (component);
3114 if (!NILP (subclass)) 3144 if (!NILP (subclass))
3115 CHECK_STRING (subclass, 2); 3145 CHECK_STRING (subclass);
3116 if (NILP (component) != NILP (subclass)) 3146 if (NILP (component) != NILP (subclass))
3117 error ("x-get-resource: must specify both COMPONENT and SUBCLASS or neither"); 3147 error ("x-get-resource: must specify both COMPONENT and SUBCLASS or neither");
3118 3148
@@ -3185,7 +3215,7 @@ x_get_resource_string (attribute, class)
3185 3215
3186 return x_get_string_resource (sf, name_key, class_key); 3216 return x_get_string_resource (sf, name_key, class_key);
3187} 3217}
3188#endif 3218#endif /* MAC_TODO */
3189 3219
3190/* Types we might convert a resource string into. */ 3220/* Types we might convert a resource string into. */
3191enum resource_types 3221enum resource_types
@@ -3273,7 +3303,7 @@ mac_get_arg (alist, param, attribute, class, type)
3273 } 3303 }
3274 } 3304 }
3275 else 3305 else
3276#endif 3306#endif /* MAC_TODO */
3277 return Qunbound; 3307 return Qunbound;
3278 } 3308 }
3279 return Fcdr (tem); 3309 return Fcdr (tem);
@@ -3304,13 +3334,150 @@ x_default_parameter (f, alist, prop, deflt, xprop, xclass, type)
3304 return tem; 3334 return tem;
3305} 3335}
3306 3336
3337/* XParseGeometry copied from w32xfns.c */
3338
3339/*
3340 * XParseGeometry parses strings of the form
3341 * "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where
3342 * width, height, xoffset, and yoffset are unsigned integers.
3343 * Example: "=80x24+300-49"
3344 * The equal sign is optional.
3345 * It returns a bitmask that indicates which of the four values
3346 * were actually found in the string. For each value found,
3347 * the corresponding argument is updated; for each value
3348 * not found, the corresponding argument is left unchanged.
3349 */
3350
3351static int
3352read_integer (string, NextString)
3353 register char *string;
3354 char **NextString;
3355{
3356 register int Result = 0;
3357 int Sign = 1;
3358
3359 if (*string == '+')
3360 string++;
3361 else if (*string == '-')
3362 {
3363 string++;
3364 Sign = -1;
3365 }
3366 for (; (*string >= '0') && (*string <= '9'); string++)
3367 {
3368 Result = (Result * 10) + (*string - '0');
3369 }
3370 *NextString = string;
3371 if (Sign >= 0)
3372 return (Result);
3373 else
3374 return (-Result);
3375}
3376
3377int
3378XParseGeometry (string, x, y, width, height)
3379 char *string;
3380 int *x, *y;
3381 unsigned int *width, *height; /* RETURN */
3382{
3383 int mask = NoValue;
3384 register char *strind;
3385 unsigned int tempWidth, tempHeight;
3386 int tempX, tempY;
3387 char *nextCharacter;
3388
3389 if ((string == NULL) || (*string == '\0')) return (mask);
3390 if (*string == '=')
3391 string++; /* ignore possible '=' at beg of geometry spec */
3392
3393 strind = (char *)string;
3394 if (*strind != '+' && *strind != '-' && *strind != 'x')
3395 {
3396 tempWidth = read_integer (strind, &nextCharacter);
3397 if (strind == nextCharacter)
3398 return (0);
3399 strind = nextCharacter;
3400 mask |= WidthValue;
3401 }
3402
3403 if (*strind == 'x' || *strind == 'X')
3404 {
3405 strind++;
3406 tempHeight = read_integer (strind, &nextCharacter);
3407 if (strind == nextCharacter)
3408 return (0);
3409 strind = nextCharacter;
3410 mask |= HeightValue;
3411 }
3412
3413 if ((*strind == '+') || (*strind == '-'))
3414 {
3415 if (*strind == '-')
3416 {
3417 strind++;
3418 tempX = -read_integer (strind, &nextCharacter);
3419 if (strind == nextCharacter)
3420 return (0);
3421 strind = nextCharacter;
3422 mask |= XNegative;
3423
3424 }
3425 else
3426 {
3427 strind++;
3428 tempX = read_integer (strind, &nextCharacter);
3429 if (strind == nextCharacter)
3430 return (0);
3431 strind = nextCharacter;
3432 }
3433 mask |= XValue;
3434 if ((*strind == '+') || (*strind == '-'))
3435 {
3436 if (*strind == '-')
3437 {
3438 strind++;
3439 tempY = -read_integer (strind, &nextCharacter);
3440 if (strind == nextCharacter)
3441 return (0);
3442 strind = nextCharacter;
3443 mask |= YNegative;
3444
3445 }
3446 else
3447 {
3448 strind++;
3449 tempY = read_integer (strind, &nextCharacter);
3450 if (strind == nextCharacter)
3451 return (0);
3452 strind = nextCharacter;
3453 }
3454 mask |= YValue;
3455 }
3456 }
3457
3458 /* If strind isn't at the end of the string the it's an invalid
3459 geometry specification. */
3460
3461 if (*strind != '\0') return (0);
3462
3463 if (mask & XValue)
3464 *x = tempX;
3465 if (mask & YValue)
3466 *y = tempY;
3467 if (mask & WidthValue)
3468 *width = tempWidth;
3469 if (mask & HeightValue)
3470 *height = tempHeight;
3471 return (mask);
3472}
3473
3307DEFUN ("x-parse-geometry", Fx_parse_geometry, Sx_parse_geometry, 1, 1, 0, 3474DEFUN ("x-parse-geometry", Fx_parse_geometry, Sx_parse_geometry, 1, 1, 0,
3308 "Parse an X-style geometry string STRING.\n\ 3475 doc: /* Parse an X-style geometry string STRING.
3309Returns an alist of the form ((top . TOP), (left . LEFT) ... ).\n\ 3476Returns an alist of the form ((top . TOP), (left . LEFT) ... ).
3310The properties returned may include `top', `left', `height', and `width'.\n\ 3477The properties returned may include `top', `left', `height', and `width'.
3311The value of `left' or `top' may be an integer,\n\ 3478The value of `left' or `top' may be an integer,
3312or a list (+ N) meaning N pixels relative to top/left corner,\n\ 3479or a list (+ N) meaning N pixels relative to top/left corner,
3313or a list (- N) meaning -N pixels relative to bottom/right corner.") 3480or a list (- N) meaning -N pixels relative to bottom/right corner. */)
3314 (string) 3481 (string)
3315 Lisp_Object string; 3482 Lisp_Object string;
3316{ 3483{
@@ -3318,7 +3485,7 @@ or a list (- N) meaning -N pixels relative to bottom/right corner.")
3318 unsigned int width, height; 3485 unsigned int width, height;
3319 Lisp_Object result; 3486 Lisp_Object result;
3320 3487
3321 CHECK_STRING (string, 0); 3488 CHECK_STRING (string);
3322 3489
3323 geometry = XParseGeometry ((char *) XSTRING (string)->data, 3490 geometry = XParseGeometry ((char *) XSTRING (string)->data,
3324 &x, &y, &width, &height); 3491 &x, &y, &width, &height);
@@ -3391,12 +3558,12 @@ x_figure_window_size (f, parms)
3391 { 3558 {
3392 if (!EQ (tem0, Qunbound)) 3559 if (!EQ (tem0, Qunbound))
3393 { 3560 {
3394 CHECK_NUMBER (tem0, 0); 3561 CHECK_NUMBER (tem0);
3395 f->height = XINT (tem0); 3562 f->height = XINT (tem0);
3396 } 3563 }
3397 if (!EQ (tem1, Qunbound)) 3564 if (!EQ (tem1, Qunbound))
3398 { 3565 {
3399 CHECK_NUMBER (tem1, 0); 3566 CHECK_NUMBER (tem1);
3400 SET_FRAME_WIDTH (f, XINT (tem1)); 3567 SET_FRAME_WIDTH (f, XINT (tem1));
3401 } 3568 }
3402 if (!NILP (tem2) && !EQ (tem2, Qunbound)) 3569 if (!NILP (tem2) && !EQ (tem2, Qunbound))
@@ -3411,7 +3578,9 @@ x_figure_window_size (f, parms)
3411 : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0 3578 : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
3412 ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f) 3579 ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
3413 : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.mac->font))); 3580 : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.mac->font)));
3581
3414 x_compute_fringe_widths (f, 0); 3582 x_compute_fringe_widths (f, 0);
3583
3415 f->output_data.mac->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); 3584 f->output_data.mac->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width);
3416 f->output_data.mac->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); 3585 f->output_data.mac->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height);
3417 3586
@@ -3442,7 +3611,7 @@ x_figure_window_size (f, parms)
3442 f->output_data.mac->top_pos = 0; 3611 f->output_data.mac->top_pos = 0;
3443 else 3612 else
3444 { 3613 {
3445 CHECK_NUMBER (tem0, 0); 3614 CHECK_NUMBER (tem0);
3446 f->output_data.mac->top_pos = XINT (tem0); 3615 f->output_data.mac->top_pos = XINT (tem0);
3447 if (f->output_data.mac->top_pos < 0) 3616 if (f->output_data.mac->top_pos < 0)
3448 window_prompting |= YNegative; 3617 window_prompting |= YNegative;
@@ -3470,7 +3639,7 @@ x_figure_window_size (f, parms)
3470 f->output_data.mac->left_pos = 0; 3639 f->output_data.mac->left_pos = 0;
3471 else 3640 else
3472 { 3641 {
3473 CHECK_NUMBER (tem1, 0); 3642 CHECK_NUMBER (tem1);
3474 f->output_data.mac->left_pos = XINT (tem1); 3643 f->output_data.mac->left_pos = XINT (tem1);
3475 if (f->output_data.mac->left_pos < 0) 3644 if (f->output_data.mac->left_pos < 0)
3476 window_prompting |= XNegative; 3645 window_prompting |= XNegative;
@@ -3486,7 +3655,7 @@ x_figure_window_size (f, parms)
3486} 3655}
3487 3656
3488 3657
3489#if 0 3658#if 0 /* MAC_TODO */
3490/* Create and set up the Mac window for frame F. */ 3659/* Create and set up the Mac window for frame F. */
3491 3660
3492static void 3661static void
@@ -3543,7 +3712,7 @@ mac_window (f, window_prompting, minibuffer_only)
3543 if (FRAME_MAC_WINDOW (f) == 0) 3712 if (FRAME_MAC_WINDOW (f) == 0)
3544 error ("Unable to create window"); 3713 error ("Unable to create window");
3545} 3714}
3546#endif 3715#endif /* MAC_TODO */
3547 3716
3548/* Handle the icon stuff for this window. Perhaps later we might 3717/* Handle the icon stuff for this window. Perhaps later we might
3549 want an x_set_icon_position which can be called interactively as 3718 want an x_set_icon_position which can be called interactively as
@@ -3562,8 +3731,8 @@ x_icon (f, parms)
3562 icon_y = mac_get_arg (parms, Qicon_top, 0, 0, RES_TYPE_NUMBER); 3731 icon_y = mac_get_arg (parms, Qicon_top, 0, 0, RES_TYPE_NUMBER);
3563 if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound)) 3732 if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound))
3564 { 3733 {
3565 CHECK_NUMBER (icon_x, 0); 3734 CHECK_NUMBER (icon_x);
3566 CHECK_NUMBER (icon_y, 0); 3735 CHECK_NUMBER (icon_y);
3567 } 3736 }
3568 else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound)) 3737 else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound))
3569 error ("Both left and top icon corners of icon must be specified"); 3738 error ("Both left and top icon corners of icon must be specified");
@@ -3589,7 +3758,7 @@ x_icon (f, parms)
3589} 3758}
3590 3759
3591 3760
3592static void 3761void
3593x_make_gc (f) 3762x_make_gc (f)
3594 struct frame *f; 3763 struct frame *f;
3595{ 3764{
@@ -3602,23 +3771,23 @@ x_make_gc (f)
3602 3771
3603 /* Normal video */ 3772 /* Normal video */
3604 gc_values.font = f->output_data.mac->font; 3773 gc_values.font = f->output_data.mac->font;
3605 gc_values.foreground = f->output_data.mac->foreground_pixel; 3774 gc_values.foreground = FRAME_FOREGROUND_PIXEL (f);
3606 gc_values.background = f->output_data.mac->background_pixel; 3775 gc_values.background = FRAME_BACKGROUND_PIXEL (f);
3607 f->output_data.mac->normal_gc = XCreateGC (FRAME_MAC_DISPLAY (f), 3776 f->output_data.mac->normal_gc = XCreateGC (FRAME_MAC_DISPLAY (f),
3608 FRAME_MAC_WINDOW (f), 3777 FRAME_MAC_WINDOW (f),
3609 GCFont | GCForeground | GCBackground, 3778 GCFont | GCForeground | GCBackground,
3610 &gc_values); 3779 &gc_values);
3611 3780
3612 /* Reverse video style. */ 3781 /* Reverse video style. */
3613 gc_values.foreground = f->output_data.mac->background_pixel; 3782 gc_values.foreground = FRAME_BACKGROUND_PIXEL (f);
3614 gc_values.background = f->output_data.mac->foreground_pixel; 3783 gc_values.background = FRAME_FOREGROUND_PIXEL (f);
3615 f->output_data.mac->reverse_gc = XCreateGC (FRAME_MAC_DISPLAY (f), 3784 f->output_data.mac->reverse_gc = XCreateGC (FRAME_MAC_DISPLAY (f),
3616 FRAME_MAC_WINDOW (f), 3785 FRAME_MAC_WINDOW (f),
3617 GCFont | GCForeground | GCBackground, 3786 GCFont | GCForeground | GCBackground,
3618 &gc_values); 3787 &gc_values);
3619 3788
3620 /* Cursor has cursor-color background, background-color foreground. */ 3789 /* Cursor has cursor-color background, background-color foreground. */
3621 gc_values.foreground = f->output_data.mac->background_pixel; 3790 gc_values.foreground = FRAME_BACKGROUND_PIXEL (f);
3622 gc_values.background = f->output_data.mac->cursor_pixel; 3791 gc_values.background = f->output_data.mac->cursor_pixel;
3623 f->output_data.mac->cursor_gc = XCreateGC (FRAME_MAC_DISPLAY (f), 3792 f->output_data.mac->cursor_gc = XCreateGC (FRAME_MAC_DISPLAY (f),
3624 FRAME_MAC_WINDOW (f), 3793 FRAME_MAC_WINDOW (f),
@@ -3635,15 +3804,15 @@ x_make_gc (f)
3635 3804
3636DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, 3805DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
3637 1, 1, 0, 3806 1, 1, 0,
3638 "Make a new window, which is called a \"frame\" in Emacs terms.\n\ 3807 doc: /* Make a new window, which is called a \"frame\" in Emacs terms.
3639Returns an Emacs frame object.\n\ 3808Returns an Emacs frame object.
3640ALIST is an alist of frame parameters.\n\ 3809ALIST is an alist of frame parameters.
3641If the parameters specify that the frame should not have a minibuffer,\n\ 3810If the parameters specify that the frame should not have a minibuffer,
3642and do not specify a specific minibuffer window to use,\n\ 3811and do not specify a specific minibuffer window to use,
3643then `default-minibuffer-frame' must be a frame whose minibuffer can\n\ 3812then `default-minibuffer-frame' must be a frame whose minibuffer can
3644be shared by the new frame.\n\ 3813be shared by the new frame.
3645\n\ 3814
3646This function is an internal primitive--use `make-frame' instead.") 3815This function is an internal primitive--use `make-frame' instead. */)
3647 (parms) 3816 (parms)
3648 Lisp_Object parms; 3817 Lisp_Object parms;
3649{ 3818{
@@ -3660,7 +3829,7 @@ This function is an internal primitive--use `make-frame' instead.")
3660 Lisp_Object parent; 3829 Lisp_Object parent;
3661 struct kboard *kb; 3830 struct kboard *kb;
3662 char x_frame_name[10]; 3831 char x_frame_name[10];
3663 static int x_frame_count = 2; /* starts from 2 because terminal frame is F1 */ 3832 static int x_frame_count = 2; /* begins at 2 because terminal frame is F1 */
3664 3833
3665 check_mac (); 3834 check_mac ();
3666 3835
@@ -3692,14 +3861,15 @@ This function is an internal primitive--use `make-frame' instead.")
3692 if (EQ (parent, Qunbound)) 3861 if (EQ (parent, Qunbound))
3693 parent = Qnil; 3862 parent = Qnil;
3694 if (! NILP (parent)) 3863 if (! NILP (parent))
3695 CHECK_NUMBER (parent, 0); 3864 CHECK_NUMBER (parent);
3696 3865
3697 /* make_frame_without_minibuffer can run Lisp code and garbage collect. */ 3866 /* make_frame_without_minibuffer can run Lisp code and garbage collect. */
3698 /* No need to protect DISPLAY because that's not used after passing 3867 /* No need to protect DISPLAY because that's not used after passing
3699 it to make_frame_without_minibuffer. */ 3868 it to make_frame_without_minibuffer. */
3700 frame = Qnil; 3869 frame = Qnil;
3701 GCPRO4 (parms, parent, name, frame); 3870 GCPRO4 (parms, parent, name, frame);
3702 tem = mac_get_arg (parms, Qminibuffer, 0, 0, RES_TYPE_SYMBOL); 3871 tem = mac_get_arg (parms, Qminibuffer, "minibuffer", "Minibuffer",
3872 RES_TYPE_SYMBOL);
3703 if (EQ (tem, Qnone) || NILP (tem)) 3873 if (EQ (tem, Qnone) || NILP (tem))
3704 f = make_frame_without_minibuffer (Qnil, kb, display); 3874 f = make_frame_without_minibuffer (Qnil, kb, display);
3705 else if (EQ (tem, Qonly)) 3875 else if (EQ (tem, Qonly))
@@ -3732,7 +3902,7 @@ This function is an internal primitive--use `make-frame' instead.")
3732 f->output_method = output_mac; 3902 f->output_method = output_mac;
3733 f->output_data.mac = (struct mac_output *) xmalloc (sizeof (struct mac_output)); 3903 f->output_data.mac = (struct mac_output *) xmalloc (sizeof (struct mac_output));
3734 bzero (f->output_data.mac, sizeof (struct mac_output)); 3904 bzero (f->output_data.mac, sizeof (struct mac_output));
3735 f->output_data.mac->fontset = -1; 3905 FRAME_FONTSET (f) = -1;
3736 f->output_data.mac->scroll_bar_foreground_pixel = -1; 3906 f->output_data.mac->scroll_bar_foreground_pixel = -1;
3737 f->output_data.mac->scroll_bar_background_pixel = -1; 3907 f->output_data.mac->scroll_bar_background_pixel = -1;
3738 3908
@@ -3821,18 +3991,16 @@ This function is an internal primitive--use `make-frame' instead.")
3821 Lisp_Object value; 3991 Lisp_Object value;
3822 3992
3823 value = mac_get_arg (parms, Qinternal_border_width, 3993 value = mac_get_arg (parms, Qinternal_border_width,
3824 "internalBorder", "BorderWidth", RES_TYPE_NUMBER); 3994 "internalBorder", "InternalBorder", RES_TYPE_NUMBER);
3825 if (! EQ (value, Qunbound)) 3995 if (! EQ (value, Qunbound))
3826 parms = Fcons (Fcons (Qinternal_border_width, value), 3996 parms = Fcons (Fcons (Qinternal_border_width, value),
3827 parms); 3997 parms);
3828 } 3998 }
3829
3830 /* Default internalBorderWidth to 0 on Windows to match other programs. */ 3999 /* Default internalBorderWidth to 0 on Windows to match other programs. */
3831 x_default_parameter (f, parms, Qinternal_border_width, make_number (0), 4000 x_default_parameter (f, parms, Qinternal_border_width, make_number (0),
3832 "internalBorderWidth", "BorderWidth", RES_TYPE_NUMBER); 4001 "internalBorderWidth", "InternalBorder", RES_TYPE_NUMBER);
3833 4002 x_default_parameter (f, parms, Qvertical_scroll_bars, Qright,
3834 x_default_parameter (f, parms, Qvertical_scroll_bars, Qt, 4003 "verticalScrollBars", "ScrollBars", RES_TYPE_SYMBOL);
3835 "verticalScrollBars", "ScrollBars", RES_TYPE_BOOLEAN);
3836 4004
3837 /* Also do the stuff which must be set before the window exists. */ 4005 /* Also do the stuff which must be set before the window exists. */
3838 x_default_parameter (f, parms, Qforeground_color, build_string ("black"), 4006 x_default_parameter (f, parms, Qforeground_color, build_string ("black"),
@@ -3854,6 +4022,7 @@ This function is an internal primitive--use `make-frame' instead.")
3854 x_default_parameter (f, parms, Qright_fringe, Qnil, 4022 x_default_parameter (f, parms, Qright_fringe, Qnil,
3855 "rightFringe", "RightFringe", RES_TYPE_NUMBER); 4023 "rightFringe", "RightFringe", RES_TYPE_NUMBER);
3856 4024
4025
3857 /* Init faces before x_default_parameter is called for scroll-bar 4026 /* Init faces before x_default_parameter is called for scroll-bar
3858 parameters because that function calls x_set_scroll_bar_width, 4027 parameters because that function calls x_set_scroll_bar_width,
3859 which calls change_frame_size, which calls Fset_window_buffer, 4028 which calls change_frame_size, which calls Fset_window_buffer,
@@ -3866,10 +4035,8 @@ This function is an internal primitive--use `make-frame' instead.")
3866 "menuBar", "MenuBar", RES_TYPE_NUMBER); 4035 "menuBar", "MenuBar", RES_TYPE_NUMBER);
3867 x_default_parameter (f, parms, Qtool_bar_lines, make_number (0), 4036 x_default_parameter (f, parms, Qtool_bar_lines, make_number (0),
3868 "toolBar", "ToolBar", RES_TYPE_NUMBER); 4037 "toolBar", "ToolBar", RES_TYPE_NUMBER);
3869#if 0
3870 x_default_parameter (f, parms, Qbuffer_predicate, Qnil, 4038 x_default_parameter (f, parms, Qbuffer_predicate, Qnil,
3871 "bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL); 4039 "bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL);
3872#endif
3873 x_default_parameter (f, parms, Qtitle, Qnil, 4040 x_default_parameter (f, parms, Qtitle, Qnil,
3874 "title", "Title", RES_TYPE_STRING); 4041 "title", "Title", RES_TYPE_STRING);
3875 4042
@@ -3932,9 +4099,9 @@ This function is an internal primitive--use `make-frame' instead.")
3932 /* Dimensions, especially f->height, must be done via change_frame_size. 4099 /* Dimensions, especially f->height, must be done via change_frame_size.
3933 Change will not be effected unless different from the current 4100 Change will not be effected unless different from the current
3934 f->height. */ 4101 f->height. */
3935
3936 width = f->width; 4102 width = f->width;
3937 height = f->height; 4103 height = f->height;
4104
3938 f->height = 0; 4105 f->height = 0;
3939 SET_FRAME_WIDTH (f, 0); 4106 SET_FRAME_WIDTH (f, 0);
3940 change_frame_size (f, height, width, 1, 0, 0); 4107 change_frame_size (f, height, width, 1, 0, 0);
@@ -3973,8 +4140,12 @@ This function is an internal primitive--use `make-frame' instead.")
3973 /* Must have been Qnil. */ 4140 /* Must have been Qnil. */
3974 ; 4141 ;
3975 } 4142 }
3976
3977 UNGCPRO; 4143 UNGCPRO;
4144
4145 /* Make sure windows on this frame appear in calls to next-window
4146 and similar functions. */
4147 Vwindow_list = Qnil;
4148
3978 return unbind_to (count, frame); 4149 return unbind_to (count, frame);
3979} 4150}
3980 4151
@@ -3995,14 +4166,14 @@ x_get_focus_frame (frame)
3995} 4166}
3996 4167
3997DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, 4168DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
3998 "Internal function called by `color-defined-p', which see.") 4169 doc: /* Internal function called by `color-defined-p', which see. */)
3999 (color, frame) 4170 (color, frame)
4000 Lisp_Object color, frame; 4171 Lisp_Object color, frame;
4001{ 4172{
4002 XColor foo; 4173 XColor foo;
4003 FRAME_PTR f = check_x_frame (frame); 4174 FRAME_PTR f = check_x_frame (frame);
4004 4175
4005 CHECK_STRING (color, 1); 4176 CHECK_STRING (color);
4006 4177
4007 if (mac_defined_color (f, XSTRING (color)->data, &foo, 0)) 4178 if (mac_defined_color (f, XSTRING (color)->data, &foo, 0))
4008 return Qt; 4179 return Qt;
@@ -4011,14 +4182,14 @@ DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
4011} 4182}
4012 4183
4013DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, 4184DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
4014 "Internal function called by `color-values', which see.") 4185 doc: /* Internal function called by `color-values', which see. */)
4015 (color, frame) 4186 (color, frame)
4016 Lisp_Object color, frame; 4187 Lisp_Object color, frame;
4017{ 4188{
4018 XColor foo; 4189 XColor foo;
4019 FRAME_PTR f = check_x_frame (frame); 4190 FRAME_PTR f = check_x_frame (frame);
4020 4191
4021 CHECK_STRING (color, 1); 4192 CHECK_STRING (color);
4022 4193
4023 if (mac_defined_color (f, XSTRING (color)->data, &foo, 0)) 4194 if (mac_defined_color (f, XSTRING (color)->data, &foo, 0))
4024 { 4195 {
@@ -4037,7 +4208,7 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
4037} 4208}
4038 4209
4039DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, 4210DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0,
4040 "Internal function called by `display-color-p', which see.") 4211 doc: /* Internal function called by `display-color-p', which see. */)
4041 (display) 4212 (display)
4042 Lisp_Object display; 4213 Lisp_Object display;
4043{ 4214{
@@ -4050,12 +4221,12 @@ DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0,
4050} 4221}
4051 4222
4052DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p, 4223DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p,
4053 0, 1, 0, 4224 0, 1, 0,
4054 "Return t if the X display supports shades of gray.\n\ 4225 doc: /* Return t if the X display supports shades of gray.
4055Note that color displays do support shades of gray.\n\ 4226Note that color displays do support shades of gray.
4056The optional argument DISPLAY specifies which display to ask about.\n\ 4227The optional argument DISPLAY specifies which display to ask about.
4057DISPLAY should be either a frame or a display name (a string).\n\ 4228DISPLAY should be either a frame or a display name (a string).
4058If omitted or nil, that stands for the selected frame's display.") 4229If omitted or nil, that stands for the selected frame's display. */)
4059 (display) 4230 (display)
4060 Lisp_Object display; 4231 Lisp_Object display;
4061{ 4232{
@@ -4068,11 +4239,11 @@ If omitted or nil, that stands for the selected frame's display.")
4068} 4239}
4069 4240
4070DEFUN ("x-display-pixel-width", Fx_display_pixel_width, Sx_display_pixel_width, 4241DEFUN ("x-display-pixel-width", Fx_display_pixel_width, Sx_display_pixel_width,
4071 0, 1, 0, 4242 0, 1, 0,
4072 "Returns the width in pixels of the X display DISPLAY.\n\ 4243 doc: /* Returns the width in pixels of the X display DISPLAY.
4073The optional argument DISPLAY specifies which display to ask about.\n\ 4244The optional argument DISPLAY specifies which display to ask about.
4074DISPLAY should be either a frame or a display name (a string).\n\ 4245DISPLAY should be either a frame or a display name (a string).
4075If omitted or nil, that stands for the selected frame's display.") 4246If omitted or nil, that stands for the selected frame's display. */)
4076 (display) 4247 (display)
4077 Lisp_Object display; 4248 Lisp_Object display;
4078{ 4249{
@@ -4082,11 +4253,11 @@ If omitted or nil, that stands for the selected frame's display.")
4082} 4253}
4083 4254
4084DEFUN ("x-display-pixel-height", Fx_display_pixel_height, 4255DEFUN ("x-display-pixel-height", Fx_display_pixel_height,
4085 Sx_display_pixel_height, 0, 1, 0, 4256 Sx_display_pixel_height, 0, 1, 0,
4086 "Returns the height in pixels of the X display DISPLAY.\n\ 4257 doc: /* Returns the height in pixels of the X display DISPLAY.
4087The optional argument DISPLAY specifies which display to ask about.\n\ 4258The optional argument DISPLAY specifies which display to ask about.
4088DISPLAY should be either a frame or a display name (a string).\n\ 4259DISPLAY should be either a frame or a display name (a string).
4089If omitted or nil, that stands for the selected frame's display.") 4260If omitted or nil, that stands for the selected frame's display. */)
4090 (display) 4261 (display)
4091 Lisp_Object display; 4262 Lisp_Object display;
4092{ 4263{
@@ -4096,11 +4267,11 @@ If omitted or nil, that stands for the selected frame's display.")
4096} 4267}
4097 4268
4098DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes, 4269DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes,
4099 0, 1, 0, 4270 0, 1, 0,
4100 "Returns the number of bitplanes of the display DISPLAY.\n\ 4271 doc: /* Returns the number of bitplanes of the display DISPLAY.
4101The optional argument DISPLAY specifies which display to ask about.\n\ 4272The optional argument DISPLAY specifies which display to ask about.
4102DISPLAY should be either a frame or a display name (a string).\n\ 4273DISPLAY should be either a frame or a display name (a string).
4103If omitted or nil, that stands for the selected frame's display.") 4274If omitted or nil, that stands for the selected frame's display. */)
4104 (display) 4275 (display)
4105 Lisp_Object display; 4276 Lisp_Object display;
4106{ 4277{
@@ -4110,11 +4281,11 @@ If omitted or nil, that stands for the selected frame's display.")
4110} 4281}
4111 4282
4112DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells, 4283DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells,
4113 0, 1, 0, 4284 0, 1, 0,
4114 "Returns the number of color cells of the display DISPLAY.\n\ 4285 doc: /* Returns the number of color cells of the display DISPLAY.
4115The optional argument DISPLAY specifies which display to ask about.\n\ 4286The optional argument DISPLAY specifies which display to ask about.
4116DISPLAY should be either a frame or a display name (a string).\n\ 4287DISPLAY should be either a frame or a display name (a string).
4117If omitted or nil, that stands for the selected frame's display.") 4288If omitted or nil, that stands for the selected frame's display. */)
4118 (display) 4289 (display)
4119 Lisp_Object display; 4290 Lisp_Object display;
4120{ 4291{
@@ -4126,11 +4297,11 @@ If omitted or nil, that stands for the selected frame's display.")
4126 4297
4127DEFUN ("x-server-max-request-size", Fx_server_max_request_size, 4298DEFUN ("x-server-max-request-size", Fx_server_max_request_size,
4128 Sx_server_max_request_size, 4299 Sx_server_max_request_size,
4129 0, 1, 0, 4300 0, 1, 0,
4130 "Returns the maximum request size of the server of display DISPLAY.\n\ 4301 doc: /* Returns the maximum request size of the server of display DISPLAY.
4131The optional argument DISPLAY specifies which display to ask about.\n\ 4302The optional argument DISPLAY specifies which display to ask about.
4132DISPLAY should be either a frame or a display name (a string).\n\ 4303DISPLAY should be either a frame or a display name (a string).
4133If omitted or nil, that stands for the selected frame's display.") 4304If omitted or nil, that stands for the selected frame's display. */)
4134 (display) 4305 (display)
4135 Lisp_Object display; 4306 Lisp_Object display;
4136{ 4307{
@@ -4140,10 +4311,10 @@ If omitted or nil, that stands for the selected frame's display.")
4140} 4311}
4141 4312
4142DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0, 4313DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
4143 "Returns the vendor ID string of the W32 system (Microsoft).\n\ 4314 doc: /* Returns the vendor ID string of the Mac OS system (Apple).
4144The optional argument DISPLAY specifies which display to ask about.\n\ 4315The optional argument DISPLAY specifies which display to ask about.
4145DISPLAY should be either a frame or a display name (a string).\n\ 4316DISPLAY should be either a frame or a display name (a string).
4146If omitted or nil, that stands for the selected frame's display.") 4317If omitted or nil, that stands for the selected frame's display. */)
4147 (display) 4318 (display)
4148 Lisp_Object display; 4319 Lisp_Object display;
4149{ 4320{
@@ -4151,13 +4322,14 @@ If omitted or nil, that stands for the selected frame's display.")
4151} 4322}
4152 4323
4153DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0, 4324DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0,
4154 "Returns the version numbers of the server of display DISPLAY.\n\ 4325 doc: /* Returns the version numbers of the server of display DISPLAY.
4155The value is a list of three integers: the major and minor\n\ 4326The value is a list of three integers: the major and minor
4156version numbers, and the vendor-specific release\n\ 4327version numbers, and the vendor-specific release
4157number. See also the function `x-server-vendor'.\n\n\ 4328number. See also the function `x-server-vendor'.
4158The optional argument DISPLAY specifies which display to ask about.\n\ 4329
4159DISPLAY should be either a frame or a display name (a string).\n\ 4330The optional argument DISPLAY specifies which display to ask about.
4160If omitted or nil, that stands for the selected frame's display.") 4331DISPLAY should be either a frame or a display name (a string).
4332If omitted or nil, that stands for the selected frame's display. */)
4161 (display) 4333 (display)
4162 Lisp_Object display; 4334 Lisp_Object display;
4163{ 4335{
@@ -4175,10 +4347,10 @@ If omitted or nil, that stands for the selected frame's display.")
4175} 4347}
4176 4348
4177DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0, 4349DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0,
4178 "Returns the number of screens on the server of display DISPLAY.\n\ 4350 doc: /* Return the number of screens on the server of display DISPLAY.
4179The optional argument DISPLAY specifies which display to ask about.\n\ 4351The optional argument DISPLAY specifies which display to ask about.
4180DISPLAY should be either a frame or a display name (a string).\n\ 4352DISPLAY should be either a frame or a display name (a string).
4181If omitted or nil, that stands for the selected frame's display.") 4353If omitted or nil, that stands for the selected frame's display. */)
4182 (display) 4354 (display)
4183 Lisp_Object display; 4355 Lisp_Object display;
4184{ 4356{
@@ -4186,10 +4358,10 @@ If omitted or nil, that stands for the selected frame's display.")
4186} 4358}
4187 4359
4188DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, 0, 1, 0, 4360DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, 0, 1, 0,
4189 "Returns the height in millimeters of the X display DISPLAY.\n\ 4361 doc: /* Return the height in millimeters of the X display DISPLAY.
4190The optional argument DISPLAY specifies which display to ask about.\n\ 4362The optional argument DISPLAY specifies which display to ask about.
4191DISPLAY should be either a frame or a display name (a string).\n\ 4363DISPLAY should be either a frame or a display name (a string).
4192If omitted or nil, that stands for the selected frame's display.") 4364If omitted or nil, that stands for the selected frame's display. */)
4193 (display) 4365 (display)
4194 Lisp_Object display; 4366 Lisp_Object display;
4195{ 4367{
@@ -4204,10 +4376,10 @@ If omitted or nil, that stands for the selected frame's display.")
4204} 4376}
4205 4377
4206DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, 4378DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0,
4207 "Returns the width in millimeters of the X display DISPLAY.\n\ 4379 doc: /* Return the width in millimeters of the X display DISPLAY.
4208The optional argument DISPLAY specifies which display to ask about.\n\ 4380The optional argument DISPLAY specifies which display to ask about.
4209DISPLAY should be either a frame or a display name (a string).\n\ 4381DISPLAY should be either a frame or a display name (a string).
4210If omitted or nil, that stands for the selected frame's display.") 4382If omitted or nil, that stands for the selected frame's display. */)
4211 (display) 4383 (display)
4212 Lisp_Object display; 4384 Lisp_Object display;
4213{ 4385{
@@ -4222,12 +4394,12 @@ If omitted or nil, that stands for the selected frame's display.")
4222} 4394}
4223 4395
4224DEFUN ("x-display-backing-store", Fx_display_backing_store, 4396DEFUN ("x-display-backing-store", Fx_display_backing_store,
4225 Sx_display_backing_store, 0, 1, 0, 4397 Sx_display_backing_store, 0, 1, 0,
4226 "Returns an indication of whether display DISPLAY does backing store.\n\ 4398 doc: /* Returns an indication of whether display DISPLAY does backing store.
4227The value may be `always', `when-mapped', or `not-useful'.\n\ 4399The value may be `always', `when-mapped', or `not-useful'.
4228The optional argument DISPLAY specifies which display to ask about.\n\ 4400The optional argument DISPLAY specifies which display to ask about.
4229DISPLAY should be either a frame or a display name (a string).\n\ 4401DISPLAY should be either a frame or a display name (a string).
4230If omitted or nil, that stands for the selected frame's display.") 4402If omitted or nil, that stands for the selected frame's display. */)
4231 (display) 4403 (display)
4232 Lisp_Object display; 4404 Lisp_Object display;
4233{ 4405{
@@ -4235,13 +4407,14 @@ If omitted or nil, that stands for the selected frame's display.")
4235} 4407}
4236 4408
4237DEFUN ("x-display-visual-class", Fx_display_visual_class, 4409DEFUN ("x-display-visual-class", Fx_display_visual_class,
4238 Sx_display_visual_class, 0, 1, 0, 4410 Sx_display_visual_class, 0, 1, 0,
4239 "Returns the visual class of the display DISPLAY.\n\ 4411 doc: /* Returns the visual class of the display DISPLAY.
4240The value is one of the symbols `static-gray', `gray-scale',\n\ 4412The value is one of the symbols `static-gray', `gray-scale',
4241`static-color', `pseudo-color', `true-color', or `direct-color'.\n\n\ 4413`static-color', `pseudo-color', `true-color', or `direct-color'.
4242The optional argument DISPLAY specifies which display to ask about.\n\ 4414
4243DISPLAY should be either a frame or a display name (a string).\n\ 4415The optional argument DISPLAY specifies which display to ask about.
4244If omitted or nil, that stands for the selected frame's display.") 4416DISPLAY should be either a frame or a display name (a string).
4417If omitted or nil, that stands for the selected frame's display. */)
4245 (display) 4418 (display)
4246 Lisp_Object display; 4419 Lisp_Object display;
4247{ 4420{
@@ -4259,17 +4432,17 @@ If omitted or nil, that stands for the selected frame's display.")
4259 default: 4432 default:
4260 error ("Display has an unknown visual class"); 4433 error ("Display has an unknown visual class");
4261 } 4434 }
4262#endif 4435#endif /* 0 */
4263 4436
4264 error ("Display has an unknown visual class"); 4437 error ("Display has an unknown visual class");
4265} 4438}
4266 4439
4267DEFUN ("x-display-save-under", Fx_display_save_under, 4440DEFUN ("x-display-save-under", Fx_display_save_under,
4268 Sx_display_save_under, 0, 1, 0, 4441 Sx_display_save_under, 0, 1, 0,
4269 "Returns t if the display DISPLAY supports the save-under feature.\n\ 4442 doc: /* Returns t if the display DISPLAY supports the save-under feature.
4270The optional argument DISPLAY specifies which display to ask about.\n\ 4443The optional argument DISPLAY specifies which display to ask about.
4271DISPLAY should be either a frame or a display name (a string).\n\ 4444DISPLAY should be either a frame or a display name (a string).
4272If omitted or nil, that stands for the selected frame's display.") 4445If omitted or nil, that stands for the selected frame's display. */)
4273 (display) 4446 (display)
4274 Lisp_Object display; 4447 Lisp_Object display;
4275{ 4448{
@@ -4321,7 +4494,7 @@ x_display_info_for_name (name)
4321 Lisp_Object names; 4494 Lisp_Object names;
4322 struct mac_display_info *dpyinfo; 4495 struct mac_display_info *dpyinfo;
4323 4496
4324 CHECK_STRING (name, 0); 4497 CHECK_STRING (name);
4325 4498
4326 for (dpyinfo = &one_mac_display_info, names = x_display_name_list; 4499 for (dpyinfo = &one_mac_display_info, names = x_display_name_list;
4327 dpyinfo; 4500 dpyinfo;
@@ -4338,7 +4511,7 @@ x_display_info_for_name (name)
4338 4511
4339 validate_x_resource_name (); 4512 validate_x_resource_name ();
4340 4513
4341 dpyinfo = x_term_init (name, (unsigned char *) 0, 4514 dpyinfo = mac_term_init (name, (unsigned char *) 0,
4342 (char *) XSTRING (Vx_resource_name)->data); 4515 (char *) XSTRING (Vx_resource_name)->data);
4343 4516
4344 if (dpyinfo == 0) 4517 if (dpyinfo == 0)
@@ -4352,20 +4525,21 @@ x_display_info_for_name (name)
4352 4525
4353#if 0 /* MAC_TODO: implement network support */ 4526#if 0 /* MAC_TODO: implement network support */
4354DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection, 4527DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection,
4355 1, 3, 0, "Open a connection to a server.\n\ 4528 1, 3, 0,
4356DISPLAY is the name of the display to connect to.\n\ 4529 doc: /* Open a connection to a server.
4357Optional second arg XRM-STRING is a string of resources in xrdb format.\n\ 4530DISPLAY is the name of the display to connect to.
4358If the optional third arg MUST-SUCCEED is non-nil,\n\ 4531Optional second arg XRM-STRING is a string of resources in xrdb format.
4359terminate Emacs if we can't open the connection.") 4532If the optional third arg MUST-SUCCEED is non-nil,
4533terminate Emacs if we can't open the connection. */)
4360 (display, xrm_string, must_succeed) 4534 (display, xrm_string, must_succeed)
4361 Lisp_Object display, xrm_string, must_succeed; 4535 Lisp_Object display, xrm_string, must_succeed;
4362{ 4536{
4363 unsigned char *xrm_option; 4537 unsigned char *xrm_option;
4364 struct mac_display_info *dpyinfo; 4538 struct mac_display_info *dpyinfo;
4365 4539
4366 CHECK_STRING (display, 0); 4540 CHECK_STRING (display);
4367 if (! NILP (xrm_string)) 4541 if (! NILP (xrm_string))
4368 CHECK_STRING (xrm_string, 1); 4542 CHECK_STRING (xrm_string);
4369 4543
4370 if (! EQ (Vwindow_system, intern ("mac"))) 4544 if (! EQ (Vwindow_system, intern ("mac")))
4371 error ("Not using Mac OS"); 4545 error ("Not using Mac OS");
@@ -4399,9 +4573,9 @@ terminate Emacs if we can't open the connection.")
4399 4573
4400DEFUN ("x-close-connection", Fx_close_connection, 4574DEFUN ("x-close-connection", Fx_close_connection,
4401 Sx_close_connection, 1, 1, 0, 4575 Sx_close_connection, 1, 1, 0,
4402 "Close the connection to DISPLAY's server.\n\ 4576 doc: /* Close the connection to DISPLAY's server.
4403For DISPLAY, specify either a frame or a display name (a string).\n\ 4577For DISPLAY, specify either a frame or a display name (a string).
4404If DISPLAY is nil, that stands for the selected frame's display.") 4578If DISPLAY is nil, that stands for the selected frame's display. */)
4405 (display) 4579 (display)
4406 Lisp_Object display; 4580 Lisp_Object display;
4407{ 4581{
@@ -4428,10 +4602,10 @@ If DISPLAY is nil, that stands for the selected frame's display.")
4428 4602
4429 return Qnil; 4603 return Qnil;
4430} 4604}
4431#endif 4605#endif /* 0 */
4432 4606
4433DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0, 4607DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
4434 "Return the list of display names that Emacs has connections to.") 4608 doc: /* Return the list of display names that Emacs has connections to. */)
4435 () 4609 ()
4436{ 4610{
4437 Lisp_Object tail, result; 4611 Lisp_Object tail, result;
@@ -4444,12 +4618,12 @@ DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
4444} 4618}
4445 4619
4446DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0, 4620DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0,
4447 "If ON is non-nil, report errors as soon as the erring request is made.\n\ 4621 doc: /* If ON is non-nil, report errors as soon as the erring request is made.
4448If ON is nil, allow buffering of requests.\n\ 4622If ON is nil, allow buffering of requests.
4449This is a noop on W32 systems.\n\ 4623This is a noop on Mac OS systems.
4450The optional second argument DISPLAY specifies which display to act on.\n\ 4624The optional second argument DISPLAY specifies which display to act on.
4451DISPLAY should be either a frame or a display name (a string).\n\ 4625DISPLAY should be either a frame or a display name (a string).
4452If DISPLAY is omitted or nil, that stands for the selected frame's display.") 4626If DISPLAY is omitted or nil, that stands for the selected frame's display. */)
4453 (on, display) 4627 (on, display)
4454 Lisp_Object display, on; 4628 Lisp_Object display, on;
4455{ 4629{
@@ -4482,8 +4656,8 @@ Lisp_Object Qxbm;
4482/* Keywords. */ 4656/* Keywords. */
4483 4657
4484extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile; 4658extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile;
4485extern Lisp_Object QCdata; 4659extern Lisp_Object QCdata, QCtype;
4486Lisp_Object QCtype, QCascent, QCmargin, QCrelief; 4660Lisp_Object QCascent, QCmargin, QCrelief;
4487Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; 4661Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask;
4488Lisp_Object QCindex; 4662Lisp_Object QCindex;
4489 4663
@@ -4953,7 +5127,7 @@ x_clear_image (f, img)
4953 img->colors = NULL; 5127 img->colors = NULL;
4954 img->ncolors = 0; 5128 img->ncolors = 0;
4955 } 5129 }
4956#endif 5130#endif /* MAC_TODO */
4957} 5131}
4958 5132
4959 5133
@@ -4989,7 +5163,7 @@ x_alloc_image_color (f, img, color_name, dflt)
4989 else 5163 else
4990 result = dflt; 5164 result = dflt;
4991 return result; 5165 return result;
4992#endif 5166#endif /* MAC_TODO */
4993 return 0; 5167 return 0;
4994} 5168}
4995 5169
@@ -5039,8 +5213,8 @@ free_image_cache (f)
5039 for (i = 0; i < c->used; ++i) 5213 for (i = 0; i < c->used; ++i)
5040 free_image (f, c->images[i]); 5214 free_image (f, c->images[i]);
5041 xfree (c->images); 5215 xfree (c->images);
5042 xfree (c);
5043 xfree (c->buckets); 5216 xfree (c->buckets);
5217 xfree (c);
5044 FRAME_X_IMAGE_CACHE (f) = NULL; 5218 FRAME_X_IMAGE_CACHE (f) = NULL;
5045 } 5219 }
5046} 5220}
@@ -5096,9 +5270,9 @@ clear_image_cache (f, force_p)
5096 5270
5097DEFUN ("clear-image-cache", Fclear_image_cache, Sclear_image_cache, 5271DEFUN ("clear-image-cache", Fclear_image_cache, Sclear_image_cache,
5098 0, 1, 0, 5272 0, 1, 0,
5099 "Clear the image cache of FRAME.\n\ 5273 doc: /* Clear the image cache of FRAME.
5100FRAME nil or omitted means use the selected frame.\n\ 5274FRAME nil or omitted means use the selected frame.
5101FRAME t means clear the image caches of all frames.") 5275FRAME t means clear the image caches of all frames. */)
5102 (frame) 5276 (frame)
5103 Lisp_Object frame; 5277 Lisp_Object frame;
5104{ 5278{
@@ -5154,6 +5328,7 @@ lookup_image (f, spec)
5154 img = make_image (spec, hash); 5328 img = make_image (spec, hash);
5155 cache_image (f, img); 5329 cache_image (f, img);
5156 img->load_failed_p = img->type->load (f, img) == 0; 5330 img->load_failed_p = img->type->load (f, img) == 0;
5331 xassert (!interrupt_input_blocked);
5157 5332
5158 /* If we can't load the image, and we don't have a width and 5333 /* If we can't load the image, and we don't have a width and
5159 height, use some arbitrary width and height so that we can 5334 height, use some arbitrary width and height so that we can
@@ -5331,7 +5506,7 @@ x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap)
5331 image_error ("Unable to create X pixmap", Qnil, Qnil); 5506 image_error ("Unable to create X pixmap", Qnil, Qnil);
5332 return 0; 5507 return 0;
5333 } 5508 }
5334#endif 5509#endif /* MAC_TODO */
5335 return 1; 5510 return 1;
5336} 5511}
5337 5512
@@ -5369,7 +5544,7 @@ x_put_x_image (f, ximg, pixmap, width, height)
5369 XFreeGC (NULL, gc); 5544 XFreeGC (NULL, gc);
5370} 5545}
5371 5546
5372#endif 5547#endif /* MAC_TODO */
5373 5548
5374 5549
5375/*********************************************************************** 5550/***********************************************************************
@@ -5888,7 +6063,7 @@ xbm_load_image_from_file (f, img, specified_file)
5888 success_p = 1; 6063 success_p = 1;
5889 6064
5890 UNBLOCK_INPUT; 6065 UNBLOCK_INPUT;
5891#endif 6066#endif /* MAC_TODO */
5892 } 6067 }
5893 else 6068 else
5894 image_error ("Error loading XBM image `%s'", img->spec, Qnil); 6069 image_error ("Error loading XBM image `%s'", img->spec, Qnil);
@@ -6489,7 +6664,7 @@ x_laplace_write_row (f, pixels, width, ximg, y)
6489 for (x = 0; x < width; ++x) 6664 for (x = 0; x < width; ++x)
6490 XPutPixel (ximg, x, y, pixels[x]); 6665 XPutPixel (ximg, x, y, pixels[x]);
6491} 6666}
6492#endif 6667#endif /* MAC_TODO */
6493 6668
6494/* Transform image IMG which is used on frame F with a Laplace 6669/* Transform image IMG which is used on frame F with a Laplace
6495 edge-detection algorithm. The result is an image that can be used 6670 edge-detection algorithm. The result is an image that can be used
@@ -8807,9 +8982,9 @@ x_kill_gs_process (pixmap, f)
8807 8982
8808DEFUN ("x-change-window-property", Fx_change_window_property, 8983DEFUN ("x-change-window-property", Fx_change_window_property,
8809 Sx_change_window_property, 2, 3, 0, 8984 Sx_change_window_property, 2, 3, 0,
8810 "Change window property PROP to VALUE on the X window of FRAME.\n\ 8985 doc: /* Change window property PROP to VALUE on the X window of FRAME.
8811PROP and VALUE must be strings. FRAME nil or omitted means use the\n\ 8986PROP and VALUE must be strings. FRAME nil or omitted means use the
8812selected frame. Value is VALUE.") 8987selected frame. Value is VALUE. */)
8813 (prop, value, frame) 8988 (prop, value, frame)
8814 Lisp_Object frame, prop, value; 8989 Lisp_Object frame, prop, value;
8815{ 8990{
@@ -8817,8 +8992,8 @@ selected frame. Value is VALUE.")
8817 struct frame *f = check_x_frame (frame); 8992 struct frame *f = check_x_frame (frame);
8818 Atom prop_atom; 8993 Atom prop_atom;
8819 8994
8820 CHECK_STRING (prop, 1); 8995 CHECK_STRING (prop);
8821 CHECK_STRING (value, 2); 8996 CHECK_STRING (value);
8822 8997
8823 BLOCK_INPUT; 8998 BLOCK_INPUT;
8824 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False); 8999 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False);
@@ -8838,8 +9013,8 @@ selected frame. Value is VALUE.")
8838 9013
8839DEFUN ("x-delete-window-property", Fx_delete_window_property, 9014DEFUN ("x-delete-window-property", Fx_delete_window_property,
8840 Sx_delete_window_property, 1, 2, 0, 9015 Sx_delete_window_property, 1, 2, 0,
8841 "Remove window property PROP from X window of FRAME.\n\ 9016 doc: /* Remove window property PROP from X window of FRAME.
8842FRAME nil or omitted means use the selected frame. Value is PROP.") 9017FRAME nil or omitted means use the selected frame. Value is PROP. */)
8843 (prop, frame) 9018 (prop, frame)
8844 Lisp_Object prop, frame; 9019 Lisp_Object prop, frame;
8845{ 9020{
@@ -8848,7 +9023,7 @@ FRAME nil or omitted means use the selected frame. Value is PROP.")
8848 struct frame *f = check_x_frame (frame); 9023 struct frame *f = check_x_frame (frame);
8849 Atom prop_atom; 9024 Atom prop_atom;
8850 9025
8851 CHECK_STRING (prop, 1); 9026 CHECK_STRING (prop);
8852 BLOCK_INPUT; 9027 BLOCK_INPUT;
8853 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False); 9028 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False);
8854 XDeleteProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), prop_atom); 9029 XDeleteProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), prop_atom);
@@ -8864,10 +9039,10 @@ FRAME nil or omitted means use the selected frame. Value is PROP.")
8864 9039
8865DEFUN ("x-window-property", Fx_window_property, Sx_window_property, 9040DEFUN ("x-window-property", Fx_window_property, Sx_window_property,
8866 1, 2, 0, 9041 1, 2, 0,
8867 "Value is the value of window property PROP on FRAME.\n\ 9042 doc: /* Value is the value of window property PROP on FRAME.
8868If FRAME is nil or omitted, use the selected frame. Value is nil\n\ 9043If FRAME is nil or omitted, use the selected frame. Value is nil
8869if FRAME hasn't a property with name PROP or if PROP has no string\n\ 9044if FRAME hasn't a property with name PROP or if PROP has no string
8870value.") 9045value. */)
8871 (prop, frame) 9046 (prop, frame)
8872 Lisp_Object prop, frame; 9047 Lisp_Object prop, frame;
8873{ 9048{
@@ -8882,7 +9057,7 @@ value.")
8882 int actual_format; 9057 int actual_format;
8883 unsigned long actual_size, bytes_remaining; 9058 unsigned long actual_size, bytes_remaining;
8884 9059
8885 CHECK_STRING (prop, 1); 9060 CHECK_STRING (prop);
8886 BLOCK_INPUT; 9061 BLOCK_INPUT;
8887 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False); 9062 prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), XSTRING (prop)->data, False);
8888 rc = XGetWindowProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), 9063 rc = XGetWindowProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f),
@@ -8919,7 +9094,7 @@ value.")
8919 9094
8920 9095
8921/*********************************************************************** 9096/***********************************************************************
8922 Busy cursor 9097 Hourglass cursor
8923 ***********************************************************************/ 9098 ***********************************************************************/
8924 9099
8925/* If non-null, an asynchronous timer that, when it expires, displays 9100/* If non-null, an asynchronous timer that, when it expires, displays
@@ -8951,7 +9126,7 @@ static void hide_hourglass P_ ((void));
8951void 9126void
8952start_hourglass () 9127start_hourglass ()
8953{ 9128{
8954#if 0 /* TODO: cursor shape changes. */ 9129#if 0 /* MAC_TODO: cursor shape changes. */
8955 EMACS_TIME delay; 9130 EMACS_TIME delay;
8956 int secs, usecs = 0; 9131 int secs, usecs = 0;
8957 9132
@@ -8973,8 +9148,8 @@ start_hourglass ()
8973 9148
8974 EMACS_SET_SECS_USECS (delay, secs, usecs); 9149 EMACS_SET_SECS_USECS (delay, secs, usecs);
8975 hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay, 9150 hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay,
8976 show_hourglass, NULL); 9151 show_hourglass, NULL);
8977#endif 9152#endif /* MAC_TODO */
8978} 9153}
8979 9154
8980 9155
@@ -9050,7 +9225,7 @@ show_hourglass (timer)
9050 hourglass_shown_p = 1; 9225 hourglass_shown_p = 1;
9051 UNBLOCK_INPUT; 9226 UNBLOCK_INPUT;
9052 } 9227 }
9053#endif 9228#endif /* MAC_TODO */
9054} 9229}
9055 9230
9056 9231
@@ -9059,7 +9234,7 @@ show_hourglass (timer)
9059static void 9234static void
9060hide_hourglass () 9235hide_hourglass ()
9061{ 9236{
9062#if 0 /* TODO: cursor shape changes. */ 9237#if 0 /* MAC_TODO: cursor shape changes. */
9063 if (hourglass_shown_p) 9238 if (hourglass_shown_p)
9064 { 9239 {
9065 Lisp_Object rest, frame; 9240 Lisp_Object rest, frame;
@@ -9085,7 +9260,7 @@ hide_hourglass ()
9085 hourglass_shown_p = 0; 9260 hourglass_shown_p = 0;
9086 UNBLOCK_INPUT; 9261 UNBLOCK_INPUT;
9087 } 9262 }
9088#endif 9263#endif /* MAC_TODO */
9089} 9264}
9090 9265
9091 9266
@@ -9094,7 +9269,7 @@ hide_hourglass ()
9094 Tool tips 9269 Tool tips
9095 ***********************************************************************/ 9270 ***********************************************************************/
9096 9271
9097static Lisp_Object x_create_tip_frame P_ ((struct w32_display_info *, 9272static Lisp_Object x_create_tip_frame P_ ((struct mac_display_info *,
9098 Lisp_Object)); 9273 Lisp_Object));
9099 9274
9100/* The frame of a currently visible tooltip, or null. */ 9275/* The frame of a currently visible tooltip, or null. */
@@ -9107,12 +9282,17 @@ Lisp_Object tip_frame;
9107Lisp_Object tip_timer; 9282Lisp_Object tip_timer;
9108Window tip_window; 9283Window tip_window;
9109 9284
9285/* If non-nil, a vector of 3 elements containing the last args
9286 with which x-show-tip was called. See there. */
9287
9288Lisp_Object last_show_tip_args;
9289
9110/* Create a frame for a tooltip on the display described by DPYINFO. 9290/* Create a frame for a tooltip on the display described by DPYINFO.
9111 PARMS is a list of frame parameters. Value is the frame. */ 9291 PARMS is a list of frame parameters. Value is the frame. */
9112 9292
9113static Lisp_Object 9293static Lisp_Object
9114x_create_tip_frame (dpyinfo, parms) 9294x_create_tip_frame (dpyinfo, parms)
9115 struct w32_display_info *dpyinfo; 9295 struct mac_display_info *dpyinfo;
9116 Lisp_Object parms; 9296 Lisp_Object parms;
9117{ 9297{
9118#if 0 /* MAC_TODO : Mac version */ 9298#if 0 /* MAC_TODO : Mac version */
@@ -9345,26 +9525,26 @@ x_create_tip_frame (dpyinfo, parms)
9345 return Qnil; 9525 return Qnil;
9346} 9526}
9347 9527
9348#ifdef TODO /* Tooltip support not complete. */ 9528
9349DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, 9529DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
9350 "Show STRING in a \"tooltip\" window on frame FRAME.\n\ 9530 doc : /* Show STRING in a "tooltip" window on frame FRAME.
9351A tooltip window is a small window displaying a string.\n\ 9531A tooltip window is a small window displaying a string.
9352\n\ 9532
9353FRAME nil or omitted means use the selected frame.\n\ 9533FRAME nil or omitted means use the selected frame.
9354\n\ 9534
9355PARMS is an optional list of frame parameters which can be\n\ 9535PARMS is an optional list of frame parameters which can be used to
9356used to change the tooltip's appearance.\n\ 9536change the tooltip's appearance.
9357\n\ 9537
9358Automatically hide the tooltip after TIMEOUT seconds.\n\ 9538Automatically hide the tooltip after TIMEOUT seconds. TIMEOUT nil
9359TIMEOUT nil means use the default timeout of 5 seconds.\n\ 9539means use the default timeout of 5 seconds.
9360\n\ 9540
9361If the list of frame parameters PARAMS contains a `left' parameters,\n\ 9541If the list of frame parameters PARAMS contains a `left' parameters,
9362the tooltip is displayed at that x-position. Otherwise it is\n\ 9542the tooltip is displayed at that x-position. Otherwise it is
9363displayed at the mouse position, with offset DX added (default is 5 if\n\ 9543displayed at the mouse position, with offset DX added (default is 5 if
9364DX isn't specified). Likewise for the y-position; if a `top' frame\n\ 9544DX isn't specified). Likewise for the y-position; if a `top' frame
9365parameter is specified, it determines the y-position of the tooltip\n\ 9545parameter is specified, it determines the y-position of the tooltip
9366window, otherwise it is displayed at the mouse position, with offset\n\ 9546window, otherwise it is displayed at the mouse position, with offset
9367DY added (default is 10).") 9547DY added (default is 10). */)
9368 (string, frame, parms, timeout, dx, dy) 9548 (string, frame, parms, timeout, dx, dy)
9369 Lisp_Object string, frame, parms, timeout, dx, dy; 9549 Lisp_Object string, frame, parms, timeout, dx, dy;
9370{ 9550{
@@ -9385,22 +9565,22 @@ DY added (default is 10).")
9385 9565
9386 GCPRO4 (string, parms, frame, timeout); 9566 GCPRO4 (string, parms, frame, timeout);
9387 9567
9388 CHECK_STRING (string, 0); 9568 CHECK_STRING (string);
9389 f = check_x_frame (frame); 9569 f = check_x_frame (frame);
9390 if (NILP (timeout)) 9570 if (NILP (timeout))
9391 timeout = make_number (5); 9571 timeout = make_number (5);
9392 else 9572 else
9393 CHECK_NATNUM (timeout, 2); 9573 CHECK_NATNUM (timeout);
9394 9574
9395 if (NILP (dx)) 9575 if (NILP (dx))
9396 dx = make_number (5); 9576 dx = make_number (5);
9397 else 9577 else
9398 CHECK_NUMBER (dx, 5); 9578 CHECK_NUMBER (dx);
9399 9579
9400 if (NILP (dy)) 9580 if (NILP (dy))
9401 dy = make_number (-10); 9581 dy = make_number (-10);
9402 else 9582 else
9403 CHECK_NUMBER (dy, 6); 9583 CHECK_NUMBER (dy);
9404 9584
9405 if (NILP (last_show_tip_args)) 9585 if (NILP (last_show_tip_args))
9406 last_show_tip_args = Fmake_vector (make_number (3), Qnil); 9586 last_show_tip_args = Fmake_vector (make_number (3), Qnil);
@@ -9425,11 +9605,13 @@ DY added (default is 10).")
9425 call1 (Qcancel_timer, timer); 9605 call1 (Qcancel_timer, timer);
9426 } 9606 }
9427 9607
9608#if 0 /* MAC_TODO : Mac specifics */
9428 BLOCK_INPUT; 9609 BLOCK_INPUT;
9429 compute_tip_xy (f, parms, dx, dy, &root_x, &root_y); 9610 compute_tip_xy (f, parms, dx, dy, &root_x, &root_y);
9430 XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 9611 XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
9431 root_x, root_y - PIXEL_HEIGHT (f)); 9612 root_x, root_y - PIXEL_HEIGHT (f));
9432 UNBLOCK_INPUT; 9613 UNBLOCK_INPUT;
9614#endif /* MAC_TODO */
9433 goto start_timer; 9615 goto start_timer;
9434 } 9616 }
9435 } 9617 }
@@ -9517,15 +9699,17 @@ DY added (default is 10).")
9517 9699
9518 /* Move the tooltip window where the mouse pointer is. Resize and 9700 /* Move the tooltip window where the mouse pointer is. Resize and
9519 show it. */ 9701 show it. */
9702#if 0 /* TODO : Mac specifics */
9520 compute_tip_xy (f, parms, dx, dy, &root_x, &root_y); 9703 compute_tip_xy (f, parms, dx, dy, &root_x, &root_y);
9521 9704
9522#if 0 /* TODO : Mac specifics */
9523 BLOCK_INPUT; 9705 BLOCK_INPUT;
9524 XMoveResizeWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 9706 XQueryPointer (FRAME_W32_DISPLAY (f), FRAME_W32_DISPLAY_INFO (f)->root_window,
9525 root_x, root_y - height, width, height); 9707 &root, &child, &root_x, &root_y, &win_x, &win_y, &pmask);
9526 XMapRaised (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); 9708 XMoveResizeWindow (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f),
9709 root_x + 5, root_y - height - 5, width, height);
9710 XMapRaised (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f));
9527 UNBLOCK_INPUT; 9711 UNBLOCK_INPUT;
9528#endif /* TODO */ 9712#endif /* MAC_TODO */
9529 9713
9530 /* Draw into the window. */ 9714 /* Draw into the window. */
9531 w->must_be_updated_p = 1; 9715 w->must_be_updated_p = 1;
@@ -9546,8 +9730,8 @@ DY added (default is 10).")
9546 9730
9547 9731
9548DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0, 9732DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0,
9549 "Hide the current tooltip window, if there is any.\n\ 9733 doc: /* Hide the current tooltip window, if there is any.
9550Value is t is tooltip was open, nil otherwise.") 9734Value is t is tooltip was open, nil otherwise. */)
9551 () 9735 ()
9552{ 9736{
9553 int count; 9737 int count;
@@ -9579,7 +9763,6 @@ Value is t is tooltip was open, nil otherwise.")
9579 UNGCPRO; 9763 UNGCPRO;
9580 return unbind_to (count, deleted); 9764 return unbind_to (count, deleted);
9581} 9765}
9582#endif
9583 9766
9584 9767
9585 9768
@@ -9591,11 +9774,11 @@ Value is t is tooltip was open, nil otherwise.")
9591extern Lisp_Object Qfile_name_history; 9774extern Lisp_Object Qfile_name_history;
9592 9775
9593DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 4, 0, 9776DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 4, 0,
9594 "Read file name, prompting with PROMPT in directory DIR.\n\ 9777 doc: /* Read file name, prompting with PROMPT in directory DIR.
9595Use a file selection dialog.\n\ 9778Use a file selection dialog.
9596Select DEFAULT-FILENAME in the dialog's file selection box, if\n\ 9779Select DEFAULT-FILENAME in the dialog's file selection box, if
9597specified. Don't let the user enter a file name in the file\n\ 9780specified. Don't let the user enter a file name in the file
9598selection dialog's entry field, if MUSTMATCH is non-nil.") 9781selection dialog's entry field, if MUSTMATCH is non-nil. */)
9599 (prompt, dir, default_filename, mustmatch) 9782 (prompt, dir, default_filename, mustmatch)
9600 Lisp_Object prompt, dir, default_filename, mustmatch; 9783 Lisp_Object prompt, dir, default_filename, mustmatch;
9601{ 9784{
@@ -9608,8 +9791,8 @@ selection dialog's entry field, if MUSTMATCH is non-nil.")
9608 int use_dialog_p = 1; 9791 int use_dialog_p = 1;
9609 9792
9610 GCPRO5 (prompt, dir, default_filename, mustmatch, file); 9793 GCPRO5 (prompt, dir, default_filename, mustmatch, file);
9611 CHECK_STRING (prompt, 0); 9794 CHECK_STRING (prompt);
9612 CHECK_STRING (dir, 1); 9795 CHECK_STRING (dir);
9613 9796
9614 /* Create the dialog with PROMPT as title, using DIR as initial 9797 /* Create the dialog with PROMPT as title, using DIR as initial
9615 directory and using "*" as pattern. */ 9798 directory and using "*" as pattern. */
@@ -9692,7 +9875,7 @@ selection dialog's entry field, if MUSTMATCH is non-nil.")
9692 9875
9693 return unbind_to (count, file); 9876 return unbind_to (count, file);
9694} 9877}
9695#endif 9878#endif /* MAC_TODO */
9696 9879
9697 9880
9698 9881
@@ -9703,7 +9886,7 @@ selection dialog's entry field, if MUSTMATCH is non-nil.")
9703#if GLYPH_DEBUG 9886#if GLYPH_DEBUG
9704 9887
9705DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0, 9888DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0,
9706 "Value is non-nil if SPEC is a valid image specification.") 9889 doc: /* Value is non-nil if SPEC is a valid image specification. */)
9707 (spec) 9890 (spec)
9708 Lisp_Object spec; 9891 Lisp_Object spec;
9709{ 9892{
@@ -9801,8 +9984,6 @@ syms_of_macfns ()
9801 staticpro (&Qline_spacing); 9984 staticpro (&Qline_spacing);
9802 Qcenter = intern ("center"); 9985 Qcenter = intern ("center");
9803 staticpro (&Qcenter); 9986 staticpro (&Qcenter);
9804 Qcancel_timer = intern ("cancel-timer");
9805 staticpro (&Qcancel_timer);
9806 /* This is the end of symbol initialization. */ 9987 /* This is the end of symbol initialization. */
9807 9988
9808 Qhyper = intern ("hyper"); 9989 Qhyper = intern ("hyper");
@@ -9839,22 +10020,22 @@ syms_of_macfns ()
9839 init_x_parm_symbols (); 10020 init_x_parm_symbols ();
9840 10021
9841 DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, 10022 DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path,
9842 "List of directories to search for bitmap files for w32."); 10023 doc: /* List of directories to search for bitmap files for w32. */);
9843 Vx_bitmap_file_path = decode_env_path ((char *) 0, "PATH"); 10024 Vx_bitmap_file_path = decode_env_path ((char *) 0, "PATH");
9844 10025
9845 DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape, 10026 DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape,
9846 "The shape of the pointer when over text.\n\ 10027 doc: /* The shape of the pointer when over text.
9847Changing the value does not affect existing frames\n\ 10028Changing the value does not affect existing frames
9848unless you set the mouse color."); 10029unless you set the mouse color. */);
9849 Vx_pointer_shape = Qnil; 10030 Vx_pointer_shape = Qnil;
9850 10031
9851 DEFVAR_LISP ("x-resource-name", &Vx_resource_name, 10032 DEFVAR_LISP ("x-resource-name", &Vx_resource_name,
9852 "The name Emacs uses to look up resources; for internal use only.\n\ 10033 doc: /* The name Emacs uses to look up resources; for internal use only.
9853`x-get-resource' uses this as the first component of the instance name\n\ 10034`x-get-resource' uses this as the first component of the instance name
9854when requesting resource values.\n\ 10035when requesting resource values.
9855Emacs initially sets `x-resource-name' to the name under which Emacs\n\ 10036Emacs initially sets `x-resource-name' to the name under which Emacs
9856was invoked, or to the value specified with the `-name' or `-rn'\n\ 10037was invoked, or to the value specified with the `-name' or `-rn'
9857switches, if present."); 10038switches, if present. */);
9858 Vx_resource_name = Qnil; 10039 Vx_resource_name = Qnil;
9859 10040
9860 Vx_nontext_pointer_shape = Qnil; 10041 Vx_nontext_pointer_shape = Qnil;
@@ -9862,54 +10043,54 @@ switches, if present.");
9862 Vx_mode_pointer_shape = Qnil; 10043 Vx_mode_pointer_shape = Qnil;
9863 10044
9864 DEFVAR_LISP ("x-hourglass-pointer-shape", &Vx_hourglass_pointer_shape, 10045 DEFVAR_LISP ("x-hourglass-pointer-shape", &Vx_hourglass_pointer_shape,
9865 "The shape of the pointer when Emacs is busy.\n\ 10046 doc: /* The shape of the pointer when Emacs is hourglass.
9866This variable takes effect when you create a new frame\n\ 10047This variable takes effect when you create a new frame
9867or when you set the mouse color."); 10048or when you set the mouse color. */);
9868 Vx_hourglass_pointer_shape = Qnil; 10049 Vx_hourglass_pointer_shape = Qnil;
9869 10050
9870 DEFVAR_BOOL ("display-hourglass", &display_hourglass_p, 10051 DEFVAR_BOOL ("display-hourglass", &display_hourglass_p,
9871 "Non-zero means Emacs displays an hourglass pointer on window systems."); 10052 doc: /* Non-zero means Emacs displays an hourglass pointer on window systems. */);
9872 display_hourglass_p = 1; 10053 display_hourglass_p = 1;
9873 10054
9874 DEFVAR_LISP ("hourglass-delay", &Vhourglass_delay, 10055 DEFVAR_LISP ("hourglass-delay", &Vhourglass_delay,
9875 "*Seconds to wait before displaying an hourglass pointer.\n\ 10056 doc: /* *Seconds to wait before displaying an hourglass pointer.
9876Value must be an integer or float."); 10057Value must be an integer or float. */);
9877 Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY); 10058 Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY);
9878 10059
9879 DEFVAR_LISP ("x-sensitive-text-pointer-shape", 10060 DEFVAR_LISP ("x-sensitive-text-pointer-shape",
9880 &Vx_sensitive_text_pointer_shape, 10061 &Vx_sensitive_text_pointer_shape,
9881 "The shape of the pointer when over mouse-sensitive text.\n\ 10062 doc: /* The shape of the pointer when over mouse-sensitive text.
9882This variable takes effect when you create a new frame\n\ 10063This variable takes effect when you create a new frame
9883or when you set the mouse color."); 10064or when you set the mouse color. */);
9884 Vx_sensitive_text_pointer_shape = Qnil; 10065 Vx_sensitive_text_pointer_shape = Qnil;
9885 10066
9886 DEFVAR_LISP ("x-cursor-fore-pixel", &Vx_cursor_fore_pixel, 10067 DEFVAR_LISP ("x-cursor-fore-pixel", &Vx_cursor_fore_pixel,
9887 "A string indicating the foreground color of the cursor box."); 10068 doc: /* A string indicating the foreground color of the cursor box. */);
9888 Vx_cursor_fore_pixel = Qnil; 10069 Vx_cursor_fore_pixel = Qnil;
9889 10070
9890 DEFVAR_LISP ("x-no-window-manager", &Vx_no_window_manager, 10071 DEFVAR_LISP ("x-no-window-manager", &Vx_no_window_manager,
9891 "Non-nil if no window manager is in use.\n\ 10072 doc: /* Non-nil if no window manager is in use.
9892Emacs doesn't try to figure this out; this is always nil\n\ 10073Emacs doesn't try to figure this out; this is always nil
9893unless you set it to something else."); 10074unless you set it to something else. */);
9894 /* We don't have any way to find this out, so set it to nil 10075 /* We don't have any way to find this out, so set it to nil
9895 and maybe the user would like to set it to t. */ 10076 and maybe the user would like to set it to t. */
9896 Vx_no_window_manager = Qnil; 10077 Vx_no_window_manager = Qnil;
9897 10078
9898 DEFVAR_LISP ("x-pixel-size-width-font-regexp", 10079 DEFVAR_LISP ("x-pixel-size-width-font-regexp",
9899 &Vx_pixel_size_width_font_regexp, 10080 &Vx_pixel_size_width_font_regexp,
9900 "Regexp matching a font name whose width is the same as `PIXEL_SIZE'.\n\ 10081 doc: /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'.
9901\n\ 10082
9902Since Emacs gets width of a font matching with this regexp from\n\ 10083Since Emacs gets width of a font matching with this regexp from
9903PIXEL_SIZE field of the name, font finding mechanism gets faster for\n\ 10084PIXEL_SIZE field of the name, font finding mechanism gets faster for
9904such a font. This is especially effective for such large fonts as\n\ 10085such a font. This is especially effective for such large fonts as
9905Chinese, Japanese, and Korean."); 10086Chinese, Japanese, and Korean. */);
9906 Vx_pixel_size_width_font_regexp = Qnil; 10087 Vx_pixel_size_width_font_regexp = Qnil;
9907 10088
9908 DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay, 10089 DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay,
9909 "Time after which cached images are removed from the cache.\n\ 10090 doc: /* Time after which cached images are removed from the cache.
9910When an image has not been displayed this many seconds, remove it\n\ 10091When an image has not been displayed this many seconds, remove it
9911from the image cache. Value must be an integer or nil with nil\n\ 10092from the image cache. Value must be an integer or nil with nil
9912meaning don't clear the cache."); 10093meaning don't clear the cache. */);
9913 Vimage_cache_eviction_delay = make_number (30 * 60); 10094 Vimage_cache_eviction_delay = make_number (30 * 60);
9914 10095
9915#if 0 /* MAC_TODO: implement get X resource */ 10096#if 0 /* MAC_TODO: implement get X resource */
@@ -10024,18 +10205,15 @@ meaning don't clear the cache.");
10024 defsubr (&Simagep); 10205 defsubr (&Simagep);
10025 defsubr (&Slookup_image); 10206 defsubr (&Slookup_image);
10026#endif 10207#endif
10027#endif /* TODO */ 10208#endif /* MAC_TODO */
10028 10209
10029 hourglass_atimer = NULL; 10210 hourglass_atimer = NULL;
10030 hourglass_shown_p = 0; 10211 hourglass_shown_p = 0;
10031#ifdef TODO /* Tooltip support not complete. */ 10212
10032 defsubr (&Sx_show_tip); 10213 defsubr (&Sx_show_tip);
10033 defsubr (&Sx_hide_tip); 10214 defsubr (&Sx_hide_tip);
10034#endif
10035 tip_timer = Qnil;
10036 staticpro (&tip_timer); 10215 staticpro (&tip_timer);
10037 tip_frame = Qnil; 10216 tip_timer = Qnil;
10038 staticpro (&tip_frame);
10039 10217
10040#if 0 /* MAC_TODO */ 10218#if 0 /* MAC_TODO */
10041 defsubr (&Sx_file_dialog); 10219 defsubr (&Sx_file_dialog);
@@ -10049,8 +10227,8 @@ init_xfns ()
10049 image_types = NULL; 10227 image_types = NULL;
10050 Vimage_types = Qnil; 10228 Vimage_types = Qnil;
10051 10229
10052#if 0 /* TODO : Image support for W32 */
10053 define_image_type (&xbm_type); 10230 define_image_type (&xbm_type);
10231#if 0 /* NTEMACS_TODO : Image support for W32 */
10054 define_image_type (&gs_type); 10232 define_image_type (&gs_type);
10055 define_image_type (&pbm_type); 10233 define_image_type (&pbm_type);
10056 10234
@@ -10075,38 +10253,3 @@ init_xfns ()
10075#endif 10253#endif
10076#endif /* NTEMACS_TODO */ 10254#endif /* NTEMACS_TODO */
10077} 10255}
10078
10079#undef abort
10080
10081#if 0
10082void
10083w32_abort()
10084{
10085 int button;
10086 button = MessageBox (NULL,
10087 "A fatal error has occurred!\n\n"
10088 "Select Abort to exit, Retry to debug, Ignore to continue",
10089 "Emacs Abort Dialog",
10090 MB_ICONEXCLAMATION | MB_TASKMODAL
10091 | MB_SETFOREGROUND | MB_ABORTRETRYIGNORE);
10092 switch (button)
10093 {
10094 case IDRETRY:
10095 DebugBreak ();
10096 break;
10097 case IDIGNORE:
10098 break;
10099 case IDABORT:
10100 default:
10101 abort ();
10102 break;
10103 }
10104}
10105
10106/* For convenience when debugging. */
10107int
10108w32_last_error()
10109{
10110 return GetLastError ();
10111}
10112#endif
diff --git a/mac/inc/macgui.h b/src/macgui.h
index 1072bcec533..a6ad18fddcf 100644
--- a/mac/inc/macgui.h
+++ b/src/macgui.h
@@ -1,5 +1,5 @@
1/* Definitions and headers for communication on the Mac OS. 1/* Definitions and headers for communication on the Mac OS.
2 Copyright (C) 2000 Free Software Foundation, Inc. 2 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -18,22 +18,24 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#ifndef EMACS_MACGUI_H 23#ifndef EMACS_MACGUI_H
24#define EMACS_MACGUI_H 24#define EMACS_MACGUI_H
25 25
26#include <MacTypes.h>
27#include <Quickdraw.h>
28
29typedef int Pixmap; 26typedef int Pixmap;
30typedef int Bitmap; 27typedef int Bitmap;
31 28
32typedef int Display; /* fix later */ 29typedef int Display; /* fix later */
33 30
34typedef unsigned long Time; 31typedef unsigned long Time;
35typedef RGBColor Color; 32
33#if MAC_OSX
34typedef struct OpaqueWindowPtr* Window;
35#else
36#include <QuickDraw.h>
36typedef WindowPtr Window; 37typedef WindowPtr Window;
38#endif
37 39
38#define FACE_DEFAULT (~0) 40#define FACE_DEFAULT (~0)
39 41
@@ -51,9 +53,9 @@ typedef struct _XCharStruct
51struct MacFontStruct { 53struct MacFontStruct {
52 char *fontname; 54 char *fontname;
53 55
54 SInt16 mac_fontnum; /* font number of font used in this window */ 56 short mac_fontnum; /* font number of font used in this window */
55 int mac_fontsize; /* size of font */ 57 int mac_fontsize; /* size of font */
56 Style mac_fontface; /* plain, bold, italics, etc. */ 58 short mac_fontface; /* plain, bold, italics, etc. */
57 short mac_scriptcode; /* Mac OS script code for font used */ 59 short mac_scriptcode; /* Mac OS script code for font used */
58 60
59#if 0 61#if 0
@@ -67,14 +69,14 @@ struct MacFontStruct {
67 int mDescent; 69 int mDescent;
68 int mLeading; 70 int mLeading;
69 char mTwoByte; /* true for two-byte font */ 71 char mTwoByte; /* true for two-byte font */
70#endif 72#endif /* 0 */
71 73
72/* from Xlib.h */ 74/* from Xlib.h */
73#if 0 75#if 0
74 XExtData *ext_data; /* hook for extension to hang data */ 76 XExtData *ext_data; /* hook for extension to hang data */
75 Font fid; /* Font id for this font */ 77 Font fid; /* Font id for this font */
76 unsigned direction; /* hint about the direction font is painted */ 78 unsigned direction; /* hint about the direction font is painted */
77#endif 79#endif /* 0 */
78 unsigned min_char_or_byte2;/* first character */ 80 unsigned min_char_or_byte2;/* first character */
79 unsigned max_char_or_byte2;/* last character */ 81 unsigned max_char_or_byte2;/* last character */
80 unsigned min_byte1; /* first row that exists */ 82 unsigned min_byte1; /* first row that exists */
@@ -84,7 +86,7 @@ struct MacFontStruct {
84 unsigned default_char; /* char to print for undefined character */ 86 unsigned default_char; /* char to print for undefined character */
85 int n_properties; /* how many properties there are */ 87 int n_properties; /* how many properties there are */
86 XFontProp *properties; /* pointer to array of additional properties */ 88 XFontProp *properties; /* pointer to array of additional properties */
87#endif 89#endif /* 0 */
88 XCharStruct min_bounds; /* minimum bounds over all existing char */ 90 XCharStruct min_bounds; /* minimum bounds over all existing char */
89 XCharStruct max_bounds; /* maximum bounds over all existing char */ 91 XCharStruct max_bounds; /* maximum bounds over all existing char */
90 XCharStruct *per_char; /* first_char to last_char information */ 92 XCharStruct *per_char; /* first_char to last_char information */
diff --git a/mac/src/macmenu.c b/src/macmenu.c
index b7ed55adcec..f9498cda67d 100644
--- a/mac/src/macmenu.c
+++ b/src/macmenu.c
@@ -1,5 +1,5 @@
1/* Menu support for GNU Emacs on the for Mac OS. 1/* Menu support for GNU Emacs on the for Mac OS.
2 Copyright (C) 2000 Free Software Foundation, Inc. 2 Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#include <config.h> 23#include <config.h>
24#include <signal.h> 24#include <signal.h>
@@ -26,15 +26,40 @@ Boston, MA 02111-1307, USA. */
26#include <stdio.h> 26#include <stdio.h>
27#include "lisp.h" 27#include "lisp.h"
28#include "termhooks.h" 28#include "termhooks.h"
29#include "keyboard.h"
30#include "keymap.h"
29#include "frame.h" 31#include "frame.h"
30#include "window.h" 32#include "window.h"
31#include "keyboard.h"
32#include "blockinput.h" 33#include "blockinput.h"
33#include "buffer.h" 34#include "buffer.h"
34#include "charset.h" 35#include "charset.h"
35#include "coding.h" 36#include "coding.h"
36#include "keymap.h"
37 37
38#ifdef MAC_OSX
39#undef mktime
40#undef DEBUG
41#undef Z
42#undef free
43#undef malloc
44#undef realloc
45/* Macros max and min defined in lisp.h conflict with those in
46 precompiled header Carbon.h. */
47#undef max
48#undef min
49#include <Carbon/Carbon.h>
50#undef Z
51#define Z (current_buffer->text->z)
52#undef free
53#define free unexec_free
54#undef malloc
55#define malloc unexec_malloc
56#undef realloc
57#define realloc unexec_realloc
58#undef min
59#define min(a, b) ((a) < (b) ? (a) : (b))
60#undef max
61#define max(a, b) ((a) > (b) ? (a) : (b))
62#else /* not MAC_OSX */
38#include <MacTypes.h> 63#include <MacTypes.h>
39#include <Menus.h> 64#include <Menus.h>
40#include <QuickDraw.h> 65#include <QuickDraw.h>
@@ -43,9 +68,10 @@ Boston, MA 02111-1307, USA. */
43#include <Controls.h> 68#include <Controls.h>
44#include <Windows.h> 69#include <Windows.h>
45#include <Events.h> 70#include <Events.h>
46#if defined (__MRC__) || defined (CODEWARRIOR_VERSION_6) 71#if defined (__MRC__) || (__MSL__ >= 0x6000)
47#include <ControlDefinitions.h> 72#include <ControlDefinitions.h>
48#endif 73#endif
74#endif /* not MAC_OSX */
49 75
50/* This may include sys/types.h, and that somehow loses 76/* This may include sys/types.h, and that somehow loses
51 if this is not done before the other system files. */ 77 if this is not done before the other system files. */
@@ -68,15 +94,13 @@ Boston, MA 02111-1307, USA. */
68#define HAVE_DIALOGS 1 94#define HAVE_DIALOGS 1
69 95
70#undef HAVE_MULTILINGUAL_MENU 96#undef HAVE_MULTILINGUAL_MENU
97#undef HAVE_DIALOGS /* TODO: Implement native dialogs. */
71 98
72/******************************************************************/ 99/******************************************************************/
73/* Definitions copied from lwlib.h */ 100/* Definitions copied from lwlib.h */
74 101
75typedef void * XtPointer; 102typedef void * XtPointer;
76 103
77#define True 1
78#define False 0
79
80enum button_type 104enum button_type
81{ 105{
82 BUTTON_TYPE_NONE, 106 BUTTON_TYPE_NONE,
@@ -84,6 +108,8 @@ enum button_type
84 BUTTON_TYPE_RADIO 108 BUTTON_TYPE_RADIO
85}; 109};
86 110
111/* This structure is based on the one in ../lwlib/lwlib.h, modified
112 for Mac OS. */
87typedef struct _widget_value 113typedef struct _widget_value
88{ 114{
89 /* name of widget */ 115 /* name of widget */
@@ -92,8 +118,10 @@ typedef struct _widget_value
92 char* value; 118 char* value;
93 /* keyboard equivalent. no implications for XtTranslations */ 119 /* keyboard equivalent. no implications for XtTranslations */
94 char* key; 120 char* key;
95 /* Help string or null if none. */ 121 /* Help string or nil if none.
96 char *help; 122 GC finds this string through the frame's menu_bar_vector
123 or through menu_items. */
124 Lisp_Object help;
97 /* true if enabled */ 125 /* true if enabled */
98 Boolean enabled; 126 Boolean enabled;
99 /* true if selected */ 127 /* true if selected */
@@ -138,9 +166,6 @@ typedef struct _widget_value
138 166
139/******************************************************************/ 167/******************************************************************/
140 168
141#define min(x,y) (((x) < (y)) ? (x) : (y))
142#define max(x,y) (((x) > (y)) ? (x) : (y))
143
144#ifndef TRUE 169#ifndef TRUE
145#define TRUE 1 170#define TRUE 1
146#define FALSE 0 171#define FALSE 0
@@ -167,7 +192,9 @@ void set_frame_menubar ();
167static void push_menu_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, 192static void push_menu_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
168 Lisp_Object, Lisp_Object, Lisp_Object, 193 Lisp_Object, Lisp_Object, Lisp_Object,
169 Lisp_Object, Lisp_Object)); 194 Lisp_Object, Lisp_Object));
195#ifdef HAVE_DIALOGS
170static Lisp_Object mac_dialog_show (); 196static Lisp_Object mac_dialog_show ();
197#endif
171static Lisp_Object mac_menu_show (); 198static Lisp_Object mac_menu_show ();
172 199
173static void keymap_panes (); 200static void keymap_panes ();
@@ -339,7 +366,7 @@ push_left_right_boundary ()
339 XVECTOR (menu_items)->contents[menu_items_used++] = Qquote; 366 XVECTOR (menu_items)->contents[menu_items_used++] = Qquote;
340} 367}
341 368
342/* Start a new menu pane in menu_items.. 369/* Start a new menu pane in menu_items.
343 NAME is the pane name. PREFIX_VEC is a prefix key for this pane. */ 370 NAME is the pane name. PREFIX_VEC is a prefix key for this pane. */
344 371
345static void 372static void
@@ -400,7 +427,8 @@ keymap_panes (keymaps, nmaps, notreal)
400 But don't make a pane that is empty--ignore that map instead. 427 But don't make a pane that is empty--ignore that map instead.
401 P is the number of panes we have made so far. */ 428 P is the number of panes we have made so far. */
402 for (mapno = 0; mapno < nmaps; mapno++) 429 for (mapno = 0; mapno < nmaps; mapno++)
403 single_keymap_panes (keymaps[mapno], Qnil, Qnil, notreal, 10); 430 single_keymap_panes (keymaps[mapno],
431 Fkeymap_prompt (keymaps[mapno]), Qnil, notreal, 10);
404 432
405 finish_menu_items (); 433 finish_menu_items ();
406} 434}
@@ -553,10 +581,10 @@ list_of_panes (menu)
553 Lisp_Object elt, pane_name, pane_data; 581 Lisp_Object elt, pane_name, pane_data;
554 elt = Fcar (tail); 582 elt = Fcar (tail);
555 pane_name = Fcar (elt); 583 pane_name = Fcar (elt);
556 CHECK_STRING (pane_name, 0); 584 CHECK_STRING (pane_name);
557 push_menu_pane (pane_name, Qnil); 585 push_menu_pane (pane_name, Qnil);
558 pane_data = Fcdr (elt); 586 pane_data = Fcdr (elt);
559 CHECK_CONS (pane_data, 0); 587 CHECK_CONS (pane_data);
560 list_of_items (pane_data); 588 list_of_items (pane_data);
561 } 589 }
562 590
@@ -580,56 +608,55 @@ list_of_items (pane)
580 push_left_right_boundary (); 608 push_left_right_boundary ();
581 else 609 else
582 { 610 {
583 CHECK_CONS (item, 0); 611 CHECK_CONS (item);
584 item1 = Fcar (item); 612 item1 = Fcar (item);
585 CHECK_STRING (item1, 1); 613 CHECK_STRING (item1);
586 push_menu_item (item1, Qt, Fcdr (item), Qt, Qnil, Qnil, Qnil, Qnil); 614 push_menu_item (item1, Qt, Fcdr (item), Qt, Qnil, Qnil, Qnil, Qnil);
587 } 615 }
588 } 616 }
589} 617}
590 618
591DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, 619DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0,
592 "Pop up a deck-of-cards menu and return user's selection.\n\ 620 doc: /* Pop up a deck-of-cards menu and return user's selection.
593POSITION is a position specification. This is either a mouse button event\n\ 621POSITION is a position specification. This is either a mouse button
594or a list ((XOFFSET YOFFSET) WINDOW)\n\ 622event or a list ((XOFFSET YOFFSET) WINDOW) where XOFFSET and YOFFSET
595where XOFFSET and YOFFSET are positions in pixels from the top left\n\ 623are positions in pixels from the top left corner of WINDOW's frame
596corner of WINDOW's frame. (WINDOW may be a frame object instead of a window.)\n\ 624\(WINDOW may be a frame object instead of a window). This controls the
597This controls the position of the center of the first line\n\ 625position of the center of the first line in the first pane of the
598in the first pane of the menu, not the top left of the menu as a whole.\n\ 626menu, not the top left of the menu as a whole. If POSITION is t, it
599If POSITION is t, it means to use the current mouse position.\n\ 627means to use the current mouse position.
600\n\ 628
601MENU is a specifier for a menu. For the simplest case, MENU is a keymap.\n\ 629MENU is a specifier for a menu. For the simplest case, MENU is a keymap.
602The menu items come from key bindings that have a menu string as well as\n\ 630The menu items come from key bindings that have a menu string as well as
603a definition; actually, the \"definition\" in such a key binding looks like\n\ 631a definition; actually, the \"definition\" in such a key binding looks like
604\(STRING . REAL-DEFINITION). To give the menu a title, put a string into\n\ 632\(STRING . REAL-DEFINITION). To give the menu a title, put a string into
605the keymap as a top-level element.\n\n\ 633the keymap as a top-level element.
606If REAL-DEFINITION is nil, that puts a nonselectable string in the menu.\n\ 634
607Otherwise, REAL-DEFINITION should be a valid key binding definition.\n\ 635If REAL-DEFINITION is nil, that puts a nonselectable string in the menu.
608\n\ 636Otherwise, REAL-DEFINITION should be a valid key binding definition.
609You can also use a list of keymaps as MENU.\n\ 637
610 Then each keymap makes a separate pane.\n\ 638You can also use a list of keymaps as MENU. Then each keymap makes a
611When MENU is a keymap or a list of keymaps, the return value\n\ 639separate pane. When MENU is a keymap or a list of keymaps, the return
612is a list of events.\n\n\ 640value is a list of events.
613\n\ 641
614Alternatively, you can specify a menu of multiple panes\n\ 642Alternatively, you can specify a menu of multiple panes with a list of
615 with a list of the form (TITLE PANE1 PANE2...),\n\ 643the form (TITLE PANE1 PANE2...), where each pane is a list of
616where each pane is a list of form (TITLE ITEM1 ITEM2...).\n\ 644form (TITLE ITEM1 ITEM2...).
617Each ITEM is normally a cons cell (STRING . VALUE);\n\ 645Each ITEM is normally a cons cell (STRING . VALUE); but a string can
618but a string can appear as an item--that makes a nonselectable line\n\ 646appear as an item--that makes a nonselectable line in the menu.
619in the menu.\n\ 647With this form of menu, the return value is VALUE from the chosen item.
620With this form of menu, the return value is VALUE from the chosen item.\n\ 648
621\n\ 649If POSITION is nil, don't display the menu at all, just precalculate the
622If POSITION is nil, don't display the menu at all, just precalculate the\n\ 650cached information about equivalent key sequences. */)
623cached information about equivalent key sequences.")
624 (position, menu) 651 (position, menu)
625 Lisp_Object position, menu; 652 Lisp_Object position, menu;
626{ 653{
627 Lisp_Object keymap, tem; 654 Lisp_Object keymap, tem;
628 int xpos, ypos; 655 int xpos = 0, ypos = 0;
629 Lisp_Object title; 656 Lisp_Object title;
630 char *error_name; 657 char *error_name;
631 Lisp_Object selection; 658 Lisp_Object selection;
632 FRAME_PTR f; 659 FRAME_PTR f = NULL;
633 Lisp_Object x, y, window; 660 Lisp_Object x, y, window;
634 int keymaps = 0; 661 int keymaps = 0;
635 int for_click = 0; 662 int for_click = 0;
@@ -642,7 +669,8 @@ cached information about equivalent key sequences.")
642 669
643 /* Decode the first argument: find the window and the coordinates. */ 670 /* Decode the first argument: find the window and the coordinates. */
644 if (EQ (position, Qt) 671 if (EQ (position, Qt)
645 || (CONSP (position) && EQ (XCAR (position), Qmenu_bar))) 672 || (CONSP (position) && (EQ (XCAR (position), Qmenu_bar)
673 || EQ (XCAR (position), Qtool_bar))))
646 { 674 {
647 /* Use the mouse's current position. */ 675 /* Use the mouse's current position. */
648 FRAME_PTR new_f = SELECTED_FRAME (); 676 FRAME_PTR new_f = SELECTED_FRAME ();
@@ -682,8 +710,8 @@ cached information about equivalent key sequences.")
682 } 710 }
683 } 711 }
684 712
685 CHECK_NUMBER (x, 0); 713 CHECK_NUMBER (x);
686 CHECK_NUMBER (y, 0); 714 CHECK_NUMBER (y);
687 715
688 /* Decode where to put the menu. */ 716 /* Decode where to put the menu. */
689 717
@@ -695,7 +723,7 @@ cached information about equivalent key sequences.")
695 } 723 }
696 else if (WINDOWP (window)) 724 else if (WINDOWP (window))
697 { 725 {
698 CHECK_LIVE_WINDOW (window, 0); 726 CHECK_LIVE_WINDOW (window);
699 f = XFRAME (WINDOW_FRAME (XWINDOW (window))); 727 f = XFRAME (WINDOW_FRAME (XWINDOW (window)));
700 728
701 xpos = (FONT_WIDTH (FRAME_FONT (f)) 729 xpos = (FONT_WIDTH (FRAME_FONT (f))
@@ -706,7 +734,7 @@ cached information about equivalent key sequences.")
706 else 734 else
707 /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME, 735 /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME,
708 but I don't want to make one now. */ 736 but I don't want to make one now. */
709 CHECK_WINDOW (window, 0); 737 CHECK_WINDOW (window);
710 738
711 xpos += XINT (x); 739 xpos += XINT (x);
712 ypos += XINT (y); 740 ypos += XINT (y);
@@ -721,15 +749,11 @@ cached information about equivalent key sequences.")
721 749
722 /* Decode the menu items from what was specified. */ 750 /* Decode the menu items from what was specified. */
723 751
724 keymap = Fkeymapp (menu); 752 keymap = get_keymap (menu, 0, 0);
725 tem = Qnil; 753 if (CONSP (keymap))
726 if (CONSP (menu))
727 tem = Fkeymapp (Fcar (menu));
728 if (!NILP (keymap))
729 { 754 {
730 /* We were given a keymap. Extract menu info from the keymap. */ 755 /* We were given a keymap. Extract menu info from the keymap. */
731 Lisp_Object prompt; 756 Lisp_Object prompt;
732 keymap = get_keymap (menu);
733 757
734 /* Extract the detailed info to make one pane. */ 758 /* Extract the detailed info to make one pane. */
735 keymap_panes (&menu, 1, NILP (position)); 759 keymap_panes (&menu, 1, NILP (position));
@@ -746,7 +770,7 @@ cached information about equivalent key sequences.")
746 770
747 keymaps = 1; 771 keymaps = 1;
748 } 772 }
749 else if (!NILP (tem)) 773 else if (CONSP (menu) && KEYMAPP (XCAR (menu)))
750 { 774 {
751 /* We were given a list of keymaps. */ 775 /* We were given a list of keymaps. */
752 int nmaps = XFASTINT (Flength (menu)); 776 int nmaps = XFASTINT (Flength (menu));
@@ -762,7 +786,7 @@ cached information about equivalent key sequences.")
762 { 786 {
763 Lisp_Object prompt; 787 Lisp_Object prompt;
764 788
765 maps[i++] = keymap = get_keymap (Fcar (tem)); 789 maps[i++] = keymap = get_keymap (Fcar (tem), 1, 0);
766 790
767 prompt = Fkeymap_prompt (keymap); 791 prompt = Fkeymap_prompt (keymap);
768 if (NILP (title) && !NILP (prompt)) 792 if (NILP (title) && !NILP (prompt))
@@ -782,7 +806,7 @@ cached information about equivalent key sequences.")
782 { 806 {
783 /* We were given an old-fashioned menu. */ 807 /* We were given an old-fashioned menu. */
784 title = Fcar (menu); 808 title = Fcar (menu);
785 CHECK_STRING (title, 1); 809 CHECK_STRING (title);
786 810
787 list_of_panes (Fcdr (menu)); 811 list_of_panes (Fcdr (menu));
788 812
@@ -816,37 +840,39 @@ cached information about equivalent key sequences.")
816#ifdef HAVE_MENUS 840#ifdef HAVE_MENUS
817 841
818DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0, 842DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0,
819 "Pop up a dialog box and return user's selection.\n\ 843 doc: /* Pop up a dialog box and return user's selection.
820POSITION specifies which frame to use.\n\ 844POSITION specifies which frame to use.
821This is normally a mouse button event or a window or frame.\n\ 845This is normally a mouse button event or a window or frame.
822If POSITION is t, it means to use the frame the mouse is on.\n\ 846If POSITION is t, it means to use the frame the mouse is on.
823The dialog box appears in the middle of the specified frame.\n\ 847The dialog box appears in the middle of the specified frame.
824\n\ 848
825CONTENTS specifies the alternatives to display in the dialog box.\n\ 849CONTENTS specifies the alternatives to display in the dialog box.
826It is a list of the form (TITLE ITEM1 ITEM2...).\n\ 850It is a list of the form (TITLE ITEM1 ITEM2...).
827Each ITEM is a cons cell (STRING . VALUE).\n\ 851Each ITEM is a cons cell (STRING . VALUE).
828The return value is VALUE from the chosen item.\n\n\ 852The return value is VALUE from the chosen item.
829An ITEM may also be just a string--that makes a nonselectable item.\n\ 853
830An ITEM may also be nil--that means to put all preceding items\n\ 854An ITEM may also be just a string--that makes a nonselectable item.
831on the left of the dialog box and all following items on the right.\n\ 855An ITEM may also be nil--that means to put all preceding items
832\(By default, approximately half appear on each side.)") 856on the left of the dialog box and all following items on the right.
857\(By default, approximately half appear on each side.) */)
833 (position, contents) 858 (position, contents)
834 Lisp_Object position, contents; 859 Lisp_Object position, contents;
835{ 860{
836 FRAME_PTR f; 861 FRAME_PTR f = NULL;
837 Lisp_Object window; 862 Lisp_Object window;
838 863
839 check_mac (); 864 check_mac ();
840 865
841 /* Decode the first argument: find the window or frame to use. */ 866 /* Decode the first argument: find the window or frame to use. */
842 if (EQ (position, Qt) 867 if (EQ (position, Qt)
843 || (CONSP (position) && EQ (XCAR (position), Qmenu_bar))) 868 || (CONSP (position) && (EQ (XCAR (position), Qmenu_bar)
869 || EQ (XCAR (position), Qtool_bar))))
844 { 870 {
845#if 0 /* Using the frame the mouse is on may not be right. */ 871#if 0 /* Using the frame the mouse is on may not be right. */
846 /* Use the mouse's current position. */ 872 /* Use the mouse's current position. */
847 FRAME_PTR new_f = SELECTED_FRAME (); 873 FRAME_PTR new_f = SELECTED_FRAME ();
848 Lisp_Object bar_window; 874 Lisp_Object bar_window;
849 int part; 875 enum scroll_bar_part part;
850 unsigned long time; 876 unsigned long time;
851 Lisp_Object x, y; 877 Lisp_Object x, y;
852 878
@@ -882,13 +908,13 @@ on the left of the dialog box and all following items on the right.\n\
882 f = XFRAME (window); 908 f = XFRAME (window);
883 else if (WINDOWP (window)) 909 else if (WINDOWP (window))
884 { 910 {
885 CHECK_LIVE_WINDOW (window, 0); 911 CHECK_LIVE_WINDOW (window);
886 f = XFRAME (WINDOW_FRAME (XWINDOW (window))); 912 f = XFRAME (WINDOW_FRAME (XWINDOW (window)));
887 } 913 }
888 else 914 else
889 /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME, 915 /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME,
890 but I don't want to make one now. */ 916 but I don't want to make one now. */
891 CHECK_WINDOW (window, 0); 917 CHECK_WINDOW (window);
892 918
893#ifndef HAVE_DIALOGS 919#ifndef HAVE_DIALOGS
894 /* Display a menu with these alternatives 920 /* Display a menu with these alternatives
@@ -911,7 +937,7 @@ on the left of the dialog box and all following items on the right.\n\
911 937
912 /* Decode the dialog items from what was specified. */ 938 /* Decode the dialog items from what was specified. */
913 title = Fcar (contents); 939 title = Fcar (contents);
914 CHECK_STRING (title, 1); 940 CHECK_STRING (title);
915 941
916 list_of_panes (Fcons (contents, Qnil)); 942 list_of_panes (Fcons (contents, Qnil));
917 943
@@ -972,6 +998,7 @@ menubar_selection_callback (FRAME_PTR f, int client_data)
972 998
973 if (!f) 999 if (!f)
974 return; 1000 return;
1001 entry = Qnil;
975 subprefix_stack = (Lisp_Object *) alloca (f->menu_bar_items_used * sizeof (Lisp_Object)); 1002 subprefix_stack = (Lisp_Object *) alloca (f->menu_bar_items_used * sizeof (Lisp_Object));
976 vector = f->menu_bar_vector; 1003 vector = f->menu_bar_vector;
977 prefix = Qnil; 1004 prefix = Qnil;
@@ -997,7 +1024,9 @@ menubar_selection_callback (FRAME_PTR f, int client_data)
997 else 1024 else
998 { 1025 {
999 entry = XVECTOR (vector)->contents[i + MENU_ITEMS_ITEM_VALUE]; 1026 entry = XVECTOR (vector)->contents[i + MENU_ITEMS_ITEM_VALUE];
1000 if (client_data == i) 1027 /* The EMACS_INT cast avoids a warning. There's no problem
1028 as long as pointers have enough bits to hold small integers. */
1029 if ((int) (EMACS_INT) client_data == i)
1001 { 1030 {
1002 int j; 1031 int j;
1003 struct input_event buf; 1032 struct input_event buf;
@@ -1031,19 +1060,15 @@ menubar_selection_callback (FRAME_PTR f, int client_data)
1031 buf.arg = entry; 1060 buf.arg = entry;
1032 kbd_buffer_store_event (&buf); 1061 kbd_buffer_store_event (&buf);
1033 1062
1034#if 0 1063 f->output_data.mac->menu_command_in_progress = 0;
1035 /* Queue this to recompute possibly updated menubar. */ 1064 f->output_data.mac->menubar_active = 0;
1036 buf.kind = menu_bar_activate_event;
1037 buf.frame_or_window = frame;
1038 buf.arg = Qnil;
1039 kbd_buffer_store_event (&buf);
1040#endif
1041
1042 return; 1065 return;
1043 } 1066 }
1044 i += MENU_ITEMS_ITEM_LENGTH; 1067 i += MENU_ITEMS_ITEM_LENGTH;
1045 } 1068 }
1046 } 1069 }
1070 f->output_data.mac->menu_command_in_progress = 0;
1071 f->output_data.mac->menubar_active = 0;
1047} 1072}
1048 1073
1049/* Allocate a widget_value, blocking input. */ 1074/* Allocate a widget_value, blocking input. */
@@ -1124,8 +1149,7 @@ single_submenu (item_key, item_name, maps)
1124 for (i = 0; i < len; i++) 1149 for (i = 0; i < len; i++)
1125 { 1150 {
1126 if (SYMBOLP (mapvec[i]) 1151 if (SYMBOLP (mapvec[i])
1127 || (CONSP (mapvec[i]) 1152 || (CONSP (mapvec[i]) && !KEYMAPP (mapvec[i])))
1128 && NILP (Fkeymapp (mapvec[i]))))
1129 { 1153 {
1130 /* Here we have a command at top level in the menu bar 1154 /* Here we have a command at top level in the menu bar
1131 as opposed to a submenu. */ 1155 as opposed to a submenu. */
@@ -1148,6 +1172,7 @@ single_submenu (item_key, item_name, maps)
1148 wv->value = 0; 1172 wv->value = 0;
1149 wv->enabled = 1; 1173 wv->enabled = 1;
1150 wv->button_type = BUTTON_TYPE_NONE; 1174 wv->button_type = BUTTON_TYPE_NONE;
1175 wv->help = Qnil;
1151 first_wv = wv; 1176 first_wv = wv;
1152 save_wv = 0; 1177 save_wv = 0;
1153 prev_wv = 0; 1178 prev_wv = 0;
@@ -1184,11 +1209,16 @@ single_submenu (item_key, item_name, maps)
1184 /* Create a new pane. */ 1209 /* Create a new pane. */
1185 Lisp_Object pane_name, prefix; 1210 Lisp_Object pane_name, prefix;
1186 char *pane_string; 1211 char *pane_string;
1212
1187 pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; 1213 pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME];
1188 prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; 1214 prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX];
1215
1189#ifndef HAVE_MULTILINGUAL_MENU 1216#ifndef HAVE_MULTILINGUAL_MENU
1190 if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) 1217 if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name))
1191 pane_name = string_make_unibyte (pane_name); 1218 {
1219 pane_name = ENCODE_SYSTEM (pane_name);
1220 AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name;
1221 }
1192#endif 1222#endif
1193 pane_string = (NILP (pane_name) 1223 pane_string = (NILP (pane_name)
1194 ? "" : (char *) XSTRING (pane_name)->data); 1224 ? "" : (char *) XSTRING (pane_name)->data);
@@ -1215,6 +1245,7 @@ single_submenu (item_key, item_name, maps)
1215 wv->value = 0; 1245 wv->value = 0;
1216 wv->enabled = 1; 1246 wv->enabled = 1;
1217 wv->button_type = BUTTON_TYPE_NONE; 1247 wv->button_type = BUTTON_TYPE_NONE;
1248 wv->help = Qnil;
1218 } 1249 }
1219 save_wv = wv; 1250 save_wv = wv;
1220 prev_wv = 0; 1251 prev_wv = 0;
@@ -1226,21 +1257,27 @@ single_submenu (item_key, item_name, maps)
1226 Lisp_Object item_name, enable, descrip, def, type, selected; 1257 Lisp_Object item_name, enable, descrip, def, type, selected;
1227 Lisp_Object help; 1258 Lisp_Object help;
1228 1259
1229 item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; 1260 item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME);
1230 enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; 1261 enable = AREF (menu_items, i + MENU_ITEMS_ITEM_ENABLE);
1231 descrip 1262 descrip = AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY);
1232 = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; 1263 def = AREF (menu_items, i + MENU_ITEMS_ITEM_DEFINITION);
1233 def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; 1264 type = AREF (menu_items, i + MENU_ITEMS_ITEM_TYPE);
1234 type = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_TYPE]; 1265 selected = AREF (menu_items, i + MENU_ITEMS_ITEM_SELECTED);
1235 selected = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_SELECTED]; 1266 help = AREF (menu_items, i + MENU_ITEMS_ITEM_HELP);
1236 help = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_HELP];
1237 1267
1238#ifndef HAVE_MULTILINGUAL_MENU 1268#ifndef HAVE_MULTILINGUAL_MENU
1239 if (STRING_MULTIBYTE (item_name)) 1269 if (STRING_MULTIBYTE (item_name))
1240 item_name = string_make_unibyte (item_name); 1270 {
1241 if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) 1271 item_name = ENCODE_SYSTEM (item_name);
1242 descrip = string_make_unibyte (descrip); 1272 AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name;
1243#endif 1273 }
1274
1275 if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
1276 {
1277 descrip = ENCODE_SYSTEM (descrip);
1278 AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip;
1279 }
1280#endif /* not HAVE_MULTILINGUAL_MENU */
1244 1281
1245 wv = xmalloc_widget_value (); 1282 wv = xmalloc_widget_value ();
1246 if (prev_wv) 1283 if (prev_wv)
@@ -1267,10 +1304,10 @@ single_submenu (item_key, item_name, maps)
1267 abort (); 1304 abort ();
1268 1305
1269 wv->selected = !NILP (selected); 1306 wv->selected = !NILP (selected);
1270 if (STRINGP (help)) 1307 if (!STRINGP (help))
1271 wv->help = (char *) XSTRING (help)->data; 1308 help = Qnil;
1272 else 1309
1273 wv->help = NULL; 1310 wv->help = help;
1274 1311
1275 prev_wv = wv; 1312 prev_wv = wv;
1276 1313
@@ -1305,149 +1342,203 @@ set_frame_menubar (f, first_time, deep_p)
1305 widget_value *wv, *first_wv, *prev_wv = 0; 1342 widget_value *wv, *first_wv, *prev_wv = 0;
1306 int i; 1343 int i;
1307 1344
1345 /* We must not change the menubar when actually in use. */
1346 if (f->output_data.mac->menubar_active)
1347 return;
1348
1308 XSETFRAME (Vmenu_updating_frame, f); 1349 XSETFRAME (Vmenu_updating_frame, f);
1309 1350
1351 if (! menubar_widget)
1352 deep_p = 1;
1353 else if (pending_menu_activation && !deep_p)
1354 deep_p = 1;
1355
1310 wv = xmalloc_widget_value (); 1356 wv = xmalloc_widget_value ();
1311 wv->name = "menubar"; 1357 wv->name = "menubar";
1312 wv->value = 0; 1358 wv->value = 0;
1313 wv->enabled = 1; 1359 wv->enabled = 1;
1314 wv->button_type = BUTTON_TYPE_NONE; 1360 wv->button_type = BUTTON_TYPE_NONE;
1361 wv->help = Qnil;
1315 first_wv = wv; 1362 first_wv = wv;
1316 1363
1317 { 1364 if (deep_p)
1318 /* Make a widget-value tree representing the entire menu trees. */ 1365 {
1319 1366 /* Make a widget-value tree representing the entire menu trees. */
1320 struct buffer *prev = current_buffer; 1367
1321 Lisp_Object buffer; 1368 struct buffer *prev = current_buffer;
1322 int specpdl_count = specpdl_ptr - specpdl; 1369 Lisp_Object buffer;
1323 int previous_menu_items_used = f->menu_bar_items_used; 1370 int specpdl_count = specpdl_ptr - specpdl;
1324 Lisp_Object *previous_items 1371 int previous_menu_items_used = f->menu_bar_items_used;
1325 = (Lisp_Object *) alloca (previous_menu_items_used 1372 Lisp_Object *previous_items
1326 * sizeof (Lisp_Object)); 1373 = (Lisp_Object *) alloca (previous_menu_items_used
1327 1374 * sizeof (Lisp_Object));
1328 /* If we are making a new widget, its contents are empty, 1375
1329 do always reinitialize them. */ 1376 /* If we are making a new widget, its contents are empty,
1330 if (! menubar_widget) 1377 do always reinitialize them. */
1331 previous_menu_items_used = 0; 1378 if (! menubar_widget)
1332 1379 previous_menu_items_used = 0;
1333 buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer; 1380
1334 specbind (Qinhibit_quit, Qt); 1381 buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer;
1335 /* Don't let the debugger step into this code 1382 specbind (Qinhibit_quit, Qt);
1336 because it is not reentrant. */ 1383 /* Don't let the debugger step into this code
1337 specbind (Qdebug_on_next_call, Qnil); 1384 because it is not reentrant. */
1338 1385 specbind (Qdebug_on_next_call, Qnil);
1339 record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); 1386
1340 if (NILP (Voverriding_local_map_menu_flag)) 1387 record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
1341 { 1388 if (NILP (Voverriding_local_map_menu_flag))
1342 specbind (Qoverriding_terminal_local_map, Qnil); 1389 {
1343 specbind (Qoverriding_local_map, Qnil); 1390 specbind (Qoverriding_terminal_local_map, Qnil);
1344 } 1391 specbind (Qoverriding_local_map, Qnil);
1392 }
1345 1393
1346 set_buffer_internal_1 (XBUFFER (buffer)); 1394 set_buffer_internal_1 (XBUFFER (buffer));
1347 1395
1348 /* Run the Lucid hook. */ 1396 /* Run the Lucid hook. */
1349 safe_run_hooks (Qactivate_menubar_hook); 1397 safe_run_hooks (Qactivate_menubar_hook);
1350 /* If it has changed current-menubar from previous value, 1398 /* If it has changed current-menubar from previous value,
1351 really recompute the menubar from the value. */ 1399 really recompute the menubar from the value. */
1352 if (! NILP (Vlucid_menu_bar_dirty_flag)) 1400 if (! NILP (Vlucid_menu_bar_dirty_flag))
1353 call0 (Qrecompute_lucid_menubar); 1401 call0 (Qrecompute_lucid_menubar);
1354 safe_run_hooks (Qmenu_bar_update_hook); 1402 safe_run_hooks (Qmenu_bar_update_hook);
1355 FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f)); 1403 FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f));
1356 1404
1357 items = FRAME_MENU_BAR_ITEMS (f); 1405 items = FRAME_MENU_BAR_ITEMS (f);
1358 1406
1359 inhibit_garbage_collection (); 1407 inhibit_garbage_collection ();
1360 1408
1361 /* Save the frame's previous menu bar contents data. */ 1409 /* Save the frame's previous menu bar contents data. */
1362 bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, 1410 if (previous_menu_items_used)
1363 previous_menu_items_used * sizeof (Lisp_Object)); 1411 bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items,
1412 previous_menu_items_used * sizeof (Lisp_Object));
1364 1413
1365 /* Fill in the current menu bar contents. */ 1414 /* Fill in the current menu bar contents. */
1366 menu_items = f->menu_bar_vector; 1415 menu_items = f->menu_bar_vector;
1367 menu_items_allocated = XVECTOR (menu_items)->size; 1416 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0;
1368 init_menu_items (); 1417 init_menu_items ();
1369 for (i = 0; i < XVECTOR (items)->size; i += 4) 1418 for (i = 0; i < XVECTOR (items)->size; i += 4)
1370 { 1419 {
1371 Lisp_Object key, string, maps; 1420 Lisp_Object key, string, maps;
1421
1422 key = XVECTOR (items)->contents[i];
1423 string = XVECTOR (items)->contents[i + 1];
1424 maps = XVECTOR (items)->contents[i + 2];
1425 if (NILP (string))
1426 break;
1427
1428 wv = single_submenu (key, string, maps);
1429 if (prev_wv)
1430 prev_wv->next = wv;
1431 else
1432 first_wv->contents = wv;
1433 /* Don't set wv->name here; GC during the loop might relocate it. */
1434 wv->enabled = 1;
1435 wv->button_type = BUTTON_TYPE_NONE;
1436 prev_wv = wv;
1437 }
1438
1439 finish_menu_items ();
1372 1440
1373 key = XVECTOR (items)->contents[i]; 1441 set_buffer_internal_1 (prev);
1374 string = XVECTOR (items)->contents[i + 1]; 1442 unbind_to (specpdl_count, Qnil);
1375 maps = XVECTOR (items)->contents[i + 2]; 1443
1376 if (NILP (string)) 1444 /* If there has been no change in the Lisp-level contents
1445 of the menu bar, skip redisplaying it. Just exit. */
1446
1447 for (i = 0; i < previous_menu_items_used; i++)
1448 if (menu_items_used == i
1449 || (!Fequal (previous_items[i], XVECTOR (menu_items)->contents[i])))
1377 break; 1450 break;
1451 if (i == menu_items_used && i == previous_menu_items_used && i != 0)
1452 {
1453 free_menubar_widget_value_tree (first_wv);
1454 menu_items = Qnil;
1378 1455
1379 wv = single_submenu (key, string, maps); 1456 return;
1380 if (prev_wv) 1457 }
1381 prev_wv->next = wv;
1382 else
1383 first_wv->contents = wv;
1384 /* Don't set wv->name here; GC during the loop might relocate it. */
1385 wv->enabled = 1;
1386 wv->button_type = BUTTON_TYPE_NONE;
1387 prev_wv = wv;
1388 }
1389 1458
1390 finish_menu_items (); 1459 /* Now GC cannot happen during the lifetime of the widget_value,
1460 so it's safe to store data from a Lisp_String, as long as
1461 local copies are made when the actual menu is created.
1462 Windows takes care of this for normal string items, but
1463 not for owner-drawn items or additional item-info. */
1464 wv = first_wv->contents;
1465 for (i = 0; i < XVECTOR (items)->size; i += 4)
1466 {
1467 Lisp_Object string;
1468 string = XVECTOR (items)->contents[i + 1];
1469 if (NILP (string))
1470 break;
1471 wv->name = (char *) XSTRING (string)->data;
1472 wv = wv->next;
1473 }
1391 1474
1392 set_buffer_internal_1 (prev); 1475 f->menu_bar_vector = menu_items;
1393 unbind_to (specpdl_count, Qnil); 1476 f->menu_bar_items_used = menu_items_used;
1477 menu_items = Qnil;
1478 }
1479 else
1480 {
1481 /* Make a widget-value tree containing
1482 just the top level menu bar strings. */
1394 1483
1395 /* If there has been no change in the Lisp-level contents 1484 items = FRAME_MENU_BAR_ITEMS (f);
1396 of the menu bar, skip redisplaying it. Just exit. */ 1485 for (i = 0; i < XVECTOR (items)->size; i += 4)
1486 {
1487 Lisp_Object string;
1397 1488
1398 for (i = 0; i < previous_menu_items_used; i++) 1489 string = XVECTOR (items)->contents[i + 1];
1399 if (menu_items_used == i 1490 if (NILP (string))
1400 || (!EQ (previous_items[i], XVECTOR (menu_items)->contents[i]))) 1491 break;
1401 break;
1402 if (i == menu_items_used && i == previous_menu_items_used && i != 0)
1403 {
1404 free_menubar_widget_value_tree (first_wv);
1405 menu_items = Qnil;
1406 1492
1407 return; 1493 wv = xmalloc_widget_value ();
1408 } 1494 wv->name = (char *) XSTRING (string)->data;
1495 wv->value = 0;
1496 wv->enabled = 1;
1497 wv->button_type = BUTTON_TYPE_NONE;
1498 wv->help = Qnil;
1499 /* This prevents lwlib from assuming this
1500 menu item is really supposed to be empty. */
1501 /* The EMACS_INT cast avoids a warning.
1502 This value just has to be different from small integers. */
1503 wv->call_data = (void *) (EMACS_INT) (-1);
1409 1504
1410 /* Now GC cannot happen during the lifetime of the widget_value, 1505 if (prev_wv)
1411 so it's safe to store data from a Lisp_String. */ 1506 prev_wv->next = wv;
1412 wv = first_wv->contents; 1507 else
1413 for (i = 0; i < XVECTOR (items)->size; i += 4) 1508 first_wv->contents = wv;
1414 { 1509 prev_wv = wv;
1415 Lisp_Object string; 1510 }
1416 string = XVECTOR (items)->contents[i + 1];
1417 if (NILP (string))
1418 break;
1419 wv->name = (char *) XSTRING (string)->data;
1420 wv = wv->next;
1421 }
1422 1511
1423 f->menu_bar_vector = menu_items; 1512 /* Forget what we thought we knew about what is in the
1424 f->menu_bar_items_used = menu_items_used; 1513 detailed contents of the menu bar menus.
1425 menu_items = Qnil; 1514 Changing the top level always destroys the contents. */
1426 } 1515 f->menu_bar_items_used = 0;
1516 }
1427 1517
1428 /* Create or update the menu bar widget. */ 1518 /* Create or update the menu bar widget. */
1429 1519
1430 BLOCK_INPUT; 1520 BLOCK_INPUT;
1431 1521
1432 f->output_data.mac->menubar_widget = NULL; /* always NULL on Mac */ 1522 /* Non-null value to indicate menubar has already been "created". */
1523 f->output_data.mac->menubar_widget = 1;
1433 1524
1434 { 1525 {
1435 int i = MIN_MENU_ID; 1526 int i = MIN_MENU_ID;
1436 MenuHandle menu = GetMenuHandle (i); 1527 MenuHandle menu = GetMenuHandle (i);
1437 while (menu != NULL) 1528 while (menu != NULL)
1438 { 1529 {
1439 DeleteMenu (i); 1530 DeleteMenu (i);
1440 DisposeMenu (menu); 1531 DisposeMenu (menu);
1441 menu = GetMenuHandle (++i); 1532 menu = GetMenuHandle (++i);
1442 } 1533 }
1443 1534
1444 i = MIN_SUBMENU_ID; 1535 i = MIN_SUBMENU_ID;
1445 menu = GetMenuHandle (i); 1536 menu = GetMenuHandle (i);
1446 while (menu != NULL) 1537 while (menu != NULL)
1447 { 1538 {
1448 DeleteMenu (i); 1539 DeleteMenu (i);
1449 DisposeMenu (menu); 1540 DisposeMenu (menu);
1450 menu = GetMenuHandle (++i); 1541 menu = GetMenuHandle (++i);
1451 } 1542 }
1452 } 1543 }
1453 1544
@@ -1460,10 +1551,10 @@ set_frame_menubar (f, first_time, deep_p)
1460 UNBLOCK_INPUT; 1551 UNBLOCK_INPUT;
1461} 1552}
1462 1553
1463/* Called from Fx_create_frame to create the initial menubar of a 1554/* Called from Fx_create_frame to create the initial menubar of a frame
1464 frame before it is mapped, so that the window is mapped with the 1555 before it is mapped, so that the window is mapped with the menubar already
1465 menubar already there instead of us tacking it on later and 1556 there instead of us tacking it on later and thrashing the window after it
1466 thrashing the window after it is visible. */ 1557 is visible. */
1467 1558
1468void 1559void
1469initialize_frame_menubar (f) 1560initialize_frame_menubar (f)
@@ -1482,8 +1573,7 @@ void
1482free_frame_menubar (f) 1573free_frame_menubar (f)
1483 FRAME_PTR f; 1574 FRAME_PTR f;
1484{ 1575{
1485 /* Nothing to do since set_frame_menubar disposes of menus before 1576 f->output_data.mac->menubar_widget = NULL;
1486 installing new ones. */
1487} 1577}
1488 1578
1489 1579
@@ -1523,7 +1613,6 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1523 = (Lisp_Object *) alloca (menu_items_used * sizeof (Lisp_Object)); 1613 = (Lisp_Object *) alloca (menu_items_used * sizeof (Lisp_Object));
1524 int submenu_depth = 0; 1614 int submenu_depth = 0;
1525 int first_pane; 1615 int first_pane;
1526 int next_release_must_exit = 0;
1527 1616
1528 *error = NULL; 1617 *error = NULL;
1529 1618
@@ -1540,6 +1629,7 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1540 wv->value = 0; 1629 wv->value = 0;
1541 wv->enabled = 1; 1630 wv->enabled = 1;
1542 wv->button_type = BUTTON_TYPE_NONE; 1631 wv->button_type = BUTTON_TYPE_NONE;
1632 wv->help = Qnil;
1543 first_wv = wv; 1633 first_wv = wv;
1544 first_pane = 1; 1634 first_pane = 1;
1545 1635
@@ -1574,11 +1664,14 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1574 /* Create a new pane. */ 1664 /* Create a new pane. */
1575 Lisp_Object pane_name, prefix; 1665 Lisp_Object pane_name, prefix;
1576 char *pane_string; 1666 char *pane_string;
1577 pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; 1667 pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME);
1578 prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; 1668 prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
1579#ifndef HAVE_MULTILINGUAL_MENU 1669#ifndef HAVE_MULTILINGUAL_MENU
1580 if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) 1670 if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name))
1581 pane_name = string_make_unibyte (pane_name); 1671 {
1672 pane_name = ENCODE_SYSTEM (pane_name);
1673 AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name;
1674 }
1582#endif 1675#endif
1583 pane_string = (NILP (pane_name) 1676 pane_string = (NILP (pane_name)
1584 ? "" : (char *) XSTRING (pane_name)->data); 1677 ? "" : (char *) XSTRING (pane_name)->data);
@@ -1603,6 +1696,7 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1603 wv->value = 0; 1696 wv->value = 0;
1604 wv->enabled = 1; 1697 wv->enabled = 1;
1605 wv->button_type = BUTTON_TYPE_NONE; 1698 wv->button_type = BUTTON_TYPE_NONE;
1699 wv->help = Qnil;
1606 save_wv = wv; 1700 save_wv = wv;
1607 prev_wv = 0; 1701 prev_wv = 0;
1608 } 1702 }
@@ -1619,21 +1713,26 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1619 /* Create a new item within current pane. */ 1713 /* Create a new item within current pane. */
1620 Lisp_Object item_name, enable, descrip, def, type, selected, help; 1714 Lisp_Object item_name, enable, descrip, def, type, selected, help;
1621 1715
1622 item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; 1716 item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME);
1623 enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; 1717 enable = AREF (menu_items, i + MENU_ITEMS_ITEM_ENABLE);
1624 descrip 1718 descrip = AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY);
1625 = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; 1719 def = AREF (menu_items, i + MENU_ITEMS_ITEM_DEFINITION);
1626 def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; 1720 type = AREF (menu_items, i + MENU_ITEMS_ITEM_TYPE);
1627 type = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_TYPE]; 1721 selected = AREF (menu_items, i + MENU_ITEMS_ITEM_SELECTED);
1628 selected = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_SELECTED]; 1722 help = AREF (menu_items, i + MENU_ITEMS_ITEM_HELP);
1629 help = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_HELP];
1630 1723
1631#ifndef HAVE_MULTILINGUAL_MENU 1724#ifndef HAVE_MULTILINGUAL_MENU
1632 if (STRING_MULTIBYTE (item_name)) 1725 if (STRINGP (item_name) && STRING_MULTIBYTE (item_name))
1633 item_name = string_make_unibyte (item_name); 1726 {
1727 item_name = ENCODE_SYSTEM (item_name);
1728 AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name;
1729 }
1634 if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) 1730 if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
1635 descrip = string_make_unibyte (descrip); 1731 {
1636#endif 1732 descrip = ENCODE_SYSTEM (descrip);
1733 AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip;
1734 }
1735#endif /* not HAVE_MULTILINGUAL_MENU */
1637 1736
1638 wv = xmalloc_widget_value (); 1737 wv = xmalloc_widget_value ();
1639 if (prev_wv) 1738 if (prev_wv)
@@ -1645,7 +1744,7 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1645 wv->key = (char *) XSTRING (descrip)->data; 1744 wv->key = (char *) XSTRING (descrip)->data;
1646 wv->value = 0; 1745 wv->value = 0;
1647 /* Use the contents index as call_data, since we are 1746 /* Use the contents index as call_data, since we are
1648 restricted to 16-bits.. */ 1747 restricted to 16-bits. */
1649 wv->call_data = !NILP (def) ? (void *) (EMACS_INT) i : 0; 1748 wv->call_data = !NILP (def) ? (void *) (EMACS_INT) i : 0;
1650 wv->enabled = !NILP (enable); 1749 wv->enabled = !NILP (enable);
1651 1750
@@ -1659,11 +1758,10 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1659 abort (); 1758 abort ();
1660 1759
1661 wv->selected = !NILP (selected); 1760 wv->selected = !NILP (selected);
1761 if (!STRINGP (help))
1762 help = Qnil;
1662 1763
1663 if (STRINGP (help)) 1764 wv->help = help;
1664 wv->help = (char *) XSTRING (help)->data;
1665 else
1666 wv->help = NULL;
1667 1765
1668 prev_wv = wv; 1766 prev_wv = wv;
1669 1767
@@ -1681,14 +1779,17 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1681 so that it looks better. Having two separators looks odd. */ 1779 so that it looks better. Having two separators looks odd. */
1682 wv_sep->name = "--"; 1780 wv_sep->name = "--";
1683 wv_sep->next = first_wv->contents; 1781 wv_sep->next = first_wv->contents;
1782 wv_sep->help = Qnil;
1684 1783
1685#ifndef HAVE_MULTILINGUAL_MENU 1784#ifndef HAVE_MULTILINGUAL_MENU
1686 if (STRING_MULTIBYTE (title)) 1785 if (STRING_MULTIBYTE (title))
1687 title = string_make_unibyte (title); 1786 title = ENCODE_SYSTEM (title);
1688#endif 1787#endif
1689 wv_title->name = (char *) XSTRING (title)->data; 1788 wv_title->name = (char *) XSTRING (title)->data;
1690 wv_title->enabled = True; 1789 wv_title->enabled = TRUE;
1790 wv_title->title = TRUE;
1691 wv_title->button_type = BUTTON_TYPE_NONE; 1791 wv_title->button_type = BUTTON_TYPE_NONE;
1792 wv_title->help = Qnil;
1692 wv_title->next = wv_sep; 1793 wv_title->next = wv_sep;
1693 first_wv->contents = wv_title; 1794 first_wv->contents = wv_title;
1694 } 1795 }
@@ -1700,16 +1801,23 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1700 /* Adjust coordinates to be root-window-relative. */ 1801 /* Adjust coordinates to be root-window-relative. */
1701 pos.h = x; 1802 pos.h = x;
1702 pos.v = y; 1803 pos.v = y;
1804
1805#if TARGET_API_MAC_CARBON
1806 SetPort (GetWindowPort (FRAME_MAC_WINDOW (f)));
1807#else
1703 SetPort (FRAME_MAC_WINDOW (f)); 1808 SetPort (FRAME_MAC_WINDOW (f));
1809#endif
1810
1704 LocalToGlobal (&pos); 1811 LocalToGlobal (&pos);
1705 1812
1813 /* No selection has been chosen yet. */
1814 menu_item_selection = 0;
1815
1706 InsertMenu (menu, -1); 1816 InsertMenu (menu, -1);
1707 1817
1708 /* Display the menu. */ 1818 /* Display the menu. */
1709 menu_item_selection = LoWord (PopUpMenuSelect (menu, pos.v, pos.h, 0)); 1819 menu_item_selection = LoWord (PopUpMenuSelect (menu, pos.v, pos.h, 0));
1710 1820
1711 GetMenuItemRefCon (menu, menu_item_selection, &menu_item_selection);
1712
1713 DeleteMenu (POPUP_SUBMENU_ID); 1821 DeleteMenu (POPUP_SUBMENU_ID);
1714 1822
1715#if 0 1823#if 0
@@ -1724,13 +1832,13 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1724 1832
1725 DisposeMenu (menu); 1833 DisposeMenu (menu);
1726 1834
1727 /* Find the selected item, and its pane, to return the proper 1835 /* Find the selected item, and its pane, to return
1728 value. */ 1836 the proper value. */
1729 if (menu_item_selection != 0) 1837 if (menu_item_selection != 0)
1730 { 1838 {
1731 Lisp_Object prefix, entry; 1839 Lisp_Object prefix, entry;
1732 1840
1733 prefix = Qnil; 1841 prefix = entry = Qnil;
1734 i = 0; 1842 i = 0;
1735 while (i < menu_items_used) 1843 while (i < menu_items_used)
1736 { 1844 {
@@ -1751,8 +1859,8 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1751 = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; 1859 = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX];
1752 i += MENU_ITEMS_PANE_LENGTH; 1860 i += MENU_ITEMS_PANE_LENGTH;
1753 } 1861 }
1754 /* Ignore a nil in the item list. It's meaningful only for 1862 /* Ignore a nil in the item list.
1755 dialog boxes. */ 1863 It's meaningful only for dialog boxes. */
1756 else if (EQ (XVECTOR (menu_items)->contents[i], Qquote)) 1864 else if (EQ (XVECTOR (menu_items)->contents[i], Qquote))
1757 i += 1; 1865 i += 1;
1758 else 1866 else
@@ -1783,6 +1891,7 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1783} 1891}
1784 1892
1785 1893
1894#ifdef HAVE_DIALOGS
1786/* Construct native Mac OS menubar based on widget_value tree. */ 1895/* Construct native Mac OS menubar based on widget_value tree. */
1787 1896
1788static int 1897static int
@@ -1809,7 +1918,7 @@ mac_dialog (widget_value *wv)
1809 nb_buttons = dialog_name[1] - '0'; 1918 nb_buttons = dialog_name[1] - '0';
1810 left_count = nb_buttons - (dialog_name[4] - '0'); 1919 left_count = nb_buttons - (dialog_name[4] - '0');
1811 button_labels = (char **) alloca (sizeof (char *) * nb_buttons); 1920 button_labels = (char **) alloca (sizeof (char *) * nb_buttons);
1812 ref_cons = (int *) alloca (sizeof (UInt32) * nb_buttons); 1921 ref_cons = (UInt32 *) alloca (sizeof (UInt32) * nb_buttons);
1813 1922
1814 wv = wv->contents; 1923 wv = wv->contents;
1815 prompt = (char *) alloca (strlen (wv->value) + 1); 1924 prompt = (char *) alloca (strlen (wv->value) + 1);
@@ -1828,7 +1937,12 @@ mac_dialog (widget_value *wv)
1828 } 1937 }
1829 1938
1830 window_ptr = GetNewCWindow (DIALOG_WINDOW_RESOURCE, NULL, (WindowPtr) -1); 1939 window_ptr = GetNewCWindow (DIALOG_WINDOW_RESOURCE, NULL, (WindowPtr) -1);
1940
1941#if TARGET_API_MAC_CARBON
1942 SetPort (GetWindowPort (window_ptr));
1943#else
1831 SetPort (window_ptr); 1944 SetPort (window_ptr);
1945#endif
1832 1946
1833 TextFont (0); 1947 TextFont (0);
1834 /* Left and right margins in the dialog are 13 pixels each.*/ 1948 /* Left and right margins in the dialog are 13 pixels each.*/
@@ -1846,7 +1960,12 @@ mac_dialog (widget_value *wv)
1846 SizeWindow (window_ptr, dialog_width, 78, 0); 1960 SizeWindow (window_ptr, dialog_width, 78, 0);
1847 ShowWindow (window_ptr); 1961 ShowWindow (window_ptr);
1848 1962
1963#if TARGET_API_MAC_CARBON
1964 SetPort (GetWindowPort (window_ptr));
1965#else
1849 SetPort (window_ptr); 1966 SetPort (window_ptr);
1967#endif
1968
1850 TextFont (0); 1969 TextFont (0);
1851 1970
1852 MoveTo (13, 29); 1971 MoveTo (13, 29);
@@ -1903,12 +2022,11 @@ mac_dialog_show (f, keymaps, title, error)
1903 char dialog_name[6]; 2022 char dialog_name[6];
1904 int menu_item_selection; 2023 int menu_item_selection;
1905 2024
1906 widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0; 2025 widget_value *wv, *first_wv = 0, *prev_wv = 0;
1907 2026
1908 /* Number of elements seen so far, before boundary. */ 2027 /* Number of elements seen so far, before boundary. */
1909 int left_count = 0; 2028 int left_count = 0;
1910 /* 1 means we've seen the boundary between left-hand elts and 2029 /* 1 means we've seen the boundary between left-hand elts and right-hand. */
1911 right-hand. */
1912 int boundary_seen = 0; 2030 int boundary_seen = 0;
1913 2031
1914 *error = NULL; 2032 *error = NULL;
@@ -1919,8 +2037,8 @@ mac_dialog_show (f, keymaps, title, error)
1919 return Qnil; 2037 return Qnil;
1920 } 2038 }
1921 2039
1922 /* Create a tree of widget_value objects representing the text label 2040 /* Create a tree of widget_value objects
1923 and buttons. */ 2041 representing the text label and buttons. */
1924 { 2042 {
1925 Lisp_Object pane_name, prefix; 2043 Lisp_Object pane_name, prefix;
1926 char *pane_string; 2044 char *pane_string;
@@ -1934,6 +2052,7 @@ mac_dialog_show (f, keymaps, title, error)
1934 prev_wv->name++; 2052 prev_wv->name++;
1935 prev_wv->enabled = 1; 2053 prev_wv->enabled = 1;
1936 prev_wv->name = "message"; 2054 prev_wv->name = "message";
2055 prev_wv->help = Qnil;
1937 first_wv = prev_wv; 2056 first_wv = prev_wv;
1938 2057
1939 /* Loop over all panes and items, filling in the tree. */ 2058 /* Loop over all panes and items, filling in the tree. */
@@ -1958,8 +2077,8 @@ mac_dialog_show (f, keymaps, title, error)
1958 } 2077 }
1959 if (EQ (item_name, Qquote)) 2078 if (EQ (item_name, Qquote))
1960 { 2079 {
1961 /* This is the boundary between left-side elts and 2080 /* This is the boundary between left-side elts
1962 right-side elts. Stop incrementing right_count. */ 2081 and right-side elts. Stop incrementing right_count. */
1963 boundary_seen = 1; 2082 boundary_seen = 1;
1964 i++; 2083 i++;
1965 continue; 2084 continue;
@@ -1980,6 +2099,7 @@ mac_dialog_show (f, keymaps, title, error)
1980 wv->call_data = (void *) i; 2099 wv->call_data = (void *) i;
1981 /* menu item is identified by its index in menu_items table */ 2100 /* menu item is identified by its index in menu_items table */
1982 wv->enabled = !NILP (enable); 2101 wv->enabled = !NILP (enable);
2102 wv->help = Qnil;
1983 prev_wv = wv; 2103 prev_wv = wv;
1984 2104
1985 if (! boundary_seen) 2105 if (! boundary_seen)
@@ -1989,16 +2109,18 @@ mac_dialog_show (f, keymaps, title, error)
1989 i += MENU_ITEMS_ITEM_LENGTH; 2109 i += MENU_ITEMS_ITEM_LENGTH;
1990 } 2110 }
1991 2111
1992 /* If the boundary was not specified, by default put half on the 2112 /* If the boundary was not specified,
1993 left and half on the right. */ 2113 by default put half on the left and half on the right. */
1994 if (! boundary_seen) 2114 if (! boundary_seen)
1995 left_count = nb_buttons - nb_buttons / 2; 2115 left_count = nb_buttons - nb_buttons / 2;
1996 2116
1997 wv = xmalloc_widget_value (); 2117 wv = xmalloc_widget_value ();
1998 wv->name = dialog_name; 2118 wv->name = dialog_name;
2119 wv->help = Qnil;
1999 2120
2000 /* Dialog boxes use a really stupid name encoding which specifies 2121 /* Dialog boxes use a really stupid name encoding
2001 how many buttons to use and how many buttons are on the right. 2122 which specifies how many buttons to use
2123 and how many buttons are on the right.
2002 The Q means something also. */ 2124 The Q means something also. */
2003 dialog_name[0] = 'Q'; 2125 dialog_name[0] = 'Q';
2004 dialog_name[1] = '0' + nb_buttons; 2126 dialog_name[1] = '0' + nb_buttons;
@@ -2018,8 +2140,7 @@ mac_dialog_show (f, keymaps, title, error)
2018 menu_item_selection = 0; 2140 menu_item_selection = 0;
2019#endif 2141#endif
2020 2142
2021 /* Free the widget_value objects we used to specify the 2143 /* Free the widget_value objects we used to specify the contents. */
2022 contents. */
2023 free_menubar_widget_value_tree (first_wv); 2144 free_menubar_widget_value_tree (first_wv);
2024 2145
2025 /* Find the selected item, and its pane, to return the proper 2146 /* Find the selected item, and its pane, to return the proper
@@ -2061,6 +2182,7 @@ mac_dialog_show (f, keymaps, title, error)
2061 2182
2062 return Qnil; 2183 return Qnil;
2063} 2184}
2185#endif /* HAVE_DIALOGS */
2064 2186
2065 2187
2066/* Is this item a separator? */ 2188/* Is this item a separator? */
@@ -2068,9 +2190,14 @@ static int
2068name_is_separator (name) 2190name_is_separator (name)
2069 char *name; 2191 char *name;
2070{ 2192{
2071 /* Check if name string consists of only dashes ('-') */ 2193 char *start = name;
2194
2195 /* Check if name string consists of only dashes ('-'). */
2072 while (*name == '-') name++; 2196 while (*name == '-') name++;
2073 return (*name == '\0'); 2197 /* Separators can also be of the form "--:TripleSuperMegaEtched"
2198 or "--deep-shadow". We don't implement them yet, se we just treat
2199 them like normal separators. */
2200 return (*name == '\0' || start + 2 == name);
2074} 2201}
2075 2202
2076static void 2203static void
@@ -2086,7 +2213,11 @@ add_menu_item (MenuHandle menu, widget_value *wv, int submenu, int indent,
2086 { 2213 {
2087 AppendMenu (menu, "\pX"); 2214 AppendMenu (menu, "\pX");
2088 2215
2216#if TARGET_API_MAC_CARBON
2217 pos = CountMenuItems (menu);
2218#else
2089 pos = CountMItems (menu); 2219 pos = CountMItems (menu);
2220#endif
2090 2221
2091 strcpy (item_name, ""); 2222 strcpy (item_name, "");
2092 for (i = 0; i < indent; i++) 2223 for (i = 0; i < indent; i++)
@@ -2101,9 +2232,17 @@ add_menu_item (MenuHandle menu, widget_value *wv, int submenu, int indent,
2101 SetMenuItemText (menu, pos, item_name); 2232 SetMenuItemText (menu, pos, item_name);
2102 2233
2103 if (wv->enabled && !force_disable) 2234 if (wv->enabled && !force_disable)
2104 EnableItem (menu, pos); 2235#if TARGET_API_MAC_CARBON
2236 EnableMenuItem (menu, pos);
2237#else
2238 EnableItem (menu, pos);
2239#endif
2105 else 2240 else
2106 DisableItem (menu, pos); 2241#if TARGET_API_MAC_CARBON
2242 DisableMenuItem (menu, pos);
2243#else
2244 DisableItem (menu, pos);
2245#endif
2107 2246
2108 /* Draw radio buttons and tickboxes. */ 2247 /* Draw radio buttons and tickboxes. */
2109 { 2248 {
@@ -2184,6 +2323,7 @@ fill_menubar (widget_value *wv)
2184} 2323}
2185 2324
2186#endif /* HAVE_MENUS */ 2325#endif /* HAVE_MENUS */
2326
2187 2327
2188void 2328void
2189syms_of_macmenu () 2329syms_of_macmenu ()
@@ -2195,8 +2335,8 @@ syms_of_macmenu ()
2195 staticpro (&Qdebug_on_next_call); 2335 staticpro (&Qdebug_on_next_call);
2196 2336
2197 DEFVAR_LISP ("menu-updating-frame", &Vmenu_updating_frame, 2337 DEFVAR_LISP ("menu-updating-frame", &Vmenu_updating_frame,
2198 "Frame for which we are updating a menu.\n\ 2338 doc: /* Frame for which we are updating a menu.
2199The enable predicate for a menu command should check this variable."); 2339The enable predicate for a menu command should check this variable. */);
2200 Vmenu_updating_frame = Qnil; 2340 Vmenu_updating_frame = Qnil;
2201 2341
2202 defsubr (&Sx_popup_menu); 2342 defsubr (&Sx_popup_menu);
diff --git a/mac/src/macterm.c b/src/macterm.c
index 3def0223a92..4e3dc93d7ce 100644
--- a/mac/src/macterm.c
+++ b/src/macterm.c
@@ -1,5 +1,5 @@
1/* Implementation of GUI terminal on the Mac OS. 1/* Implementation of GUI terminal on the Mac OS.
2 Copyright (C) 2000 Free Software Foundation, Inc. 2 Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -18,31 +18,44 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#include <config.h> 23#include <config.h>
24
25/* On 4.3 these lose if they come after xterm.h. */
26/* Putting these at the beginning seems to be standard for other .c files. */
27#include <signal.h> 24#include <signal.h>
28
29#include <stdio.h> 25#include <stdio.h>
30 26#include <stdlib.h>
31#include "lisp.h" 27#include "lisp.h"
28#include "charset.h"
32#include "blockinput.h" 29#include "blockinput.h"
33 30
34/* Need syssignal.h for various externs and definitions that may be required
35 by some configurations for calls to signal later in this source file. */
36#include "syssignal.h"
37
38/* This may include sys/types.h, and that somehow loses
39 if this is not done before the other system files. */
40#include "macterm.h" 31#include "macterm.h"
41 32
42#include <stdlib.h> 33#ifndef MAC_OSX
43#include <string.h>
44#include <alloca.h> 34#include <alloca.h>
35#endif
45 36
37#ifdef MAC_OSX
38#undef mktime
39#undef DEBUG
40#undef free
41#undef malloc
42#undef realloc
43/* Macros max and min defined in lisp.h conflict with those in
44 precompiled header Carbon.h. */
45#undef max
46#undef min
47#include <Carbon/Carbon.h>
48#undef free
49#define free unexec_free
50#undef malloc
51#define malloc unexec_malloc
52#undef realloc
53#define realloc unexec_realloc
54#undef min
55#define min(a, b) ((a) < (b) ? (a) : (b))
56#undef max
57#define max(a, b) ((a) > (b) ? (a) : (b))
58#else /* not MAC_OSX */
46#include <Quickdraw.h> 59#include <Quickdraw.h>
47#include <ToolUtils.h> 60#include <ToolUtils.h>
48#include <Sound.h> 61#include <Sound.h>
@@ -53,29 +66,27 @@ Boston, MA 02111-1307, USA. */
53#include <TextUtils.h> 66#include <TextUtils.h>
54#include <LowMem.h> 67#include <LowMem.h>
55#include <Controls.h> 68#include <Controls.h>
56#if defined (__MRC__) || defined (CODEWARRIOR_VERSION_6) 69#if defined (__MRC__) || (__MSL__ >= 0x6000)
57#include <ControlDefinitions.h> 70#include <ControlDefinitions.h>
58#endif 71#endif
72#include <Gestalt.h>
59 73
60#if __profile__ 74#if __profile__
61#include <profiler.h> 75#include <profiler.h>
62#endif 76#endif
63 77#endif /* not MAC_OSX */
64#include <sys/types.h>
65 78
66#include "systty.h" 79#include "systty.h"
67#include "systime.h" 80#include "systime.h"
81#include "atimer.h"
82#include "keymap.h"
68 83
69#ifndef INCLUDED_FCNTL
70#include <fcntl.h>
71#endif
72#include <ctype.h> 84#include <ctype.h>
73#include <errno.h> 85#include <errno.h>
74#include <setjmp.h> 86#include <setjmp.h>
75#include <sys/stat.h> 87#include <sys/stat.h>
76 88
77#include "charset.h" 89#include "keyboard.h"
78#include "ccl.h"
79#include "frame.h" 90#include "frame.h"
80#include "dispextern.h" 91#include "dispextern.h"
81#include "fontset.h" 92#include "fontset.h"
@@ -86,29 +97,10 @@ Boston, MA 02111-1307, USA. */
86#include "disptab.h" 97#include "disptab.h"
87#include "buffer.h" 98#include "buffer.h"
88#include "window.h" 99#include "window.h"
89#include "keyboard.h"
90#include "intervals.h" 100#include "intervals.h"
91#include "process.h" 101#include "composite.h"
92#include "atimer.h"
93#include "keymap.h"
94#include "coding.h" 102#include "coding.h"
95 103
96#ifdef HAVE_UNISTD_H
97#include <unistd.h>
98#endif
99
100#ifndef USE_X_TOOLKIT
101#define x_any_window_to_frame x_window_to_frame
102#define x_top_window_to_frame x_window_to_frame
103#endif
104
105#ifndef min
106#define min(a,b) ((a) < (b) ? (a) : (b))
107#endif
108#ifndef max
109#define max(a,b) ((a) > (b) ? (a) : (b))
110#endif
111
112#define BETWEEN(X, LOWER, UPPER) ((X) >= (LOWER) && (X) < (UPPER)) 104#define BETWEEN(X, LOWER, UPPER) ((X) >= (LOWER) && (X) < (UPPER))
113 105
114 106
@@ -188,9 +180,9 @@ static unsigned char ov_bits[] = {
188extern Lisp_Object Qhelp_echo; 180extern Lisp_Object Qhelp_echo;
189 181
190 182
191/* Non-zero means Emacs uses toolkit scroll bars. */ 183/* Non-nil means Emacs uses toolkit scroll bars. */
192 184
193int x_toolkit_scroll_bars_p; 185Lisp_Object Vx_toolkit_scroll_bars;
194 186
195/* If a string, XTread_socket generates an event to display that string. 187/* If a string, XTread_socket generates an event to display that string.
196 (The display is done in read_char.) */ 188 (The display is done in read_char.) */
@@ -209,12 +201,20 @@ static Lisp_Object previous_help_echo;
209 201
210static int any_help_event_p; 202static int any_help_event_p;
211 203
204/* Non-zero means autoselect window with the mouse cursor. */
205
206int x_autoselect_window_p;
207
212/* Non-zero means draw block and hollow cursor as wide as the glyph 208/* Non-zero means draw block and hollow cursor as wide as the glyph
213 under it. For example, if a block cursor is over a tab, it will be 209 under it. For example, if a block cursor is over a tab, it will be
214 drawn as wide as that tab on the display. */ 210 drawn as wide as that tab on the display. */
215 211
216int x_stretch_cursor_p; 212int x_stretch_cursor_p;
217 213
214/* Non-zero means make use of UNDERLINE_POSITION font properties. */
215
216int x_use_underline_position_properties;
217
218/* This is a chain of structures for all the X displays currently in 218/* This is a chain of structures for all the X displays currently in
219 use. */ 219 use. */
220 220
@@ -237,6 +237,8 @@ struct mac_display_info one_mac_display_info;
237 237
238extern struct frame *updating_frame; 238extern struct frame *updating_frame;
239 239
240extern int waiting_for_input;
241
240/* This is a frame waiting to be auto-raised, within XTread_socket. */ 242/* This is a frame waiting to be auto-raised, within XTread_socket. */
241 243
242struct frame *pending_autoraise_frame; 244struct frame *pending_autoraise_frame;
@@ -371,21 +373,21 @@ struct frame * x_window_to_frame (struct mac_display_info *, WindowPtr);
371struct mac_display_info *mac_display_info_for_display (Display *); 373struct mac_display_info *mac_display_info_for_display (Display *);
372static void x_update_window_end P_ ((struct window *, int, int)); 374static void x_update_window_end P_ ((struct window *, int, int));
373static void frame_to_window_pixel_xy P_ ((struct window *, int *, int *)); 375static void frame_to_window_pixel_xy P_ ((struct window *, int *, int *));
374void x_delete_display P_ ((struct x_display_info *));
375static unsigned int x_mac_to_emacs_modifiers P_ ((struct x_display_info *,
376 unsigned short));
377static int fast_find_position P_ ((struct window *, int, int *, int *, 376static int fast_find_position P_ ((struct window *, int, int *, int *,
378 int *, int *)); 377 int *, int *, Lisp_Object));
378static int fast_find_string_pos P_ ((struct window *, int, Lisp_Object,
379 int *, int *, int *, int *, int));
379static void set_output_cursor P_ ((struct cursor_pos *)); 380static void set_output_cursor P_ ((struct cursor_pos *));
380static struct glyph *x_y_to_hpos_vpos P_ ((struct window *, int, int, 381static struct glyph *x_y_to_hpos_vpos P_ ((struct window *, int, int,
381 int *, int *, int *)); 382 int *, int *, int *, int));
382static void note_mode_line_highlight P_ ((struct window *, int, int)); 383static void note_mode_line_highlight P_ ((struct window *, int, int));
383static void note_mouse_highlight P_ ((struct frame *, int, int)); 384static void note_mouse_highlight P_ ((struct frame *, int, int));
384static void note_tool_bar_highlight P_ ((struct frame *f, int, int)); 385static void note_tool_bar_highlight P_ ((struct frame *f, int, int));
385static void x_handle_tool_bar_click P_ ((struct frame *, XButtonEvent *)); 386static void x_handle_tool_bar_click P_ ((struct frame *, EventRecord *));
386static void show_mouse_face P_ ((struct x_display_info *, 387static void show_mouse_face P_ ((struct x_display_info *,
387 enum draw_glyphs_face)); 388 enum draw_glyphs_face));
388void clear_mouse_face P_ ((struct mac_display_info *)); 389static int cursor_in_mouse_face_p P_ ((struct window *));
390static int clear_mouse_face P_ ((struct mac_display_info *));
389static int x_io_error_quitter P_ ((Display *)); 391static int x_io_error_quitter P_ ((Display *));
390int x_catch_errors P_ ((Display *)); 392int x_catch_errors P_ ((Display *));
391void x_uncatch_errors P_ ((Display *, int)); 393void x_uncatch_errors P_ ((Display *, int));
@@ -397,7 +399,7 @@ void x_raise_frame P_ ((struct frame *));
397void x_set_window_size P_ ((struct frame *, int, int, int)); 399void x_set_window_size P_ ((struct frame *, int, int, int));
398void x_wm_set_window_state P_ ((struct frame *, int)); 400void x_wm_set_window_state P_ ((struct frame *, int));
399void x_wm_set_icon_pixmap P_ ((struct frame *, int)); 401void x_wm_set_icon_pixmap P_ ((struct frame *, int));
400void x_initialize P_ ((void)); 402void mac_initialize P_ ((void));
401static void x_font_min_bounds P_ ((XFontStruct *, int *, int *)); 403static void x_font_min_bounds P_ ((XFontStruct *, int *, int *));
402static int x_compute_min_glyph_bounds P_ ((struct frame *)); 404static int x_compute_min_glyph_bounds P_ ((struct frame *));
403enum text_cursor_kinds x_specified_cursor_type P_ ((Lisp_Object, int *)); 405enum text_cursor_kinds x_specified_cursor_type P_ ((Lisp_Object, int *));
@@ -424,12 +426,12 @@ static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
424static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int)); 426static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int));
425static int x_intersect_rectangles P_ ((Rect *, Rect *, Rect *)); 427static int x_intersect_rectangles P_ ((Rect *, Rect *, Rect *));
426static void expose_frame P_ ((struct frame *, int, int, int, int)); 428static void expose_frame P_ ((struct frame *, int, int, int, int));
427static void expose_window_tree P_ ((struct window *, Rect *)); 429static int expose_window_tree P_ ((struct window *, Rect *));
428static void expose_window P_ ((struct window *, Rect *)); 430static int expose_window P_ ((struct window *, Rect *));
429static void expose_area P_ ((struct window *, struct glyph_row *, 431static void expose_area P_ ((struct window *, struct glyph_row *,
430 XRectangle *, enum glyph_row_area)); 432 Rect *, enum glyph_row_area));
431static void expose_line P_ ((struct window *, struct glyph_row *, 433static int expose_line P_ ((struct window *, struct glyph_row *,
432 XRectangle *)); 434 Rect *));
433void x_display_cursor (struct window *, int, int, int, int, int); 435void x_display_cursor (struct window *, int, int, int, int, int);
434void x_update_cursor P_ ((struct frame *, int)); 436void x_update_cursor P_ ((struct frame *, int));
435static void x_update_cursor_in_window_tree P_ ((struct window *, int)); 437static void x_update_cursor_in_window_tree P_ ((struct window *, int));
@@ -442,7 +444,9 @@ static void x_clip_to_row P_ ((struct window *, struct glyph_row *,
442 GC, int)); 444 GC, int));
443static int x_phys_cursor_in_rect_p P_ ((struct window *, Rect *)); 445static int x_phys_cursor_in_rect_p P_ ((struct window *, Rect *));
444static void x_draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *)); 446static void x_draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *));
445static void note_overwritten_text_cursor P_ ((struct window *, int, int)); 447static void notice_overwritten_cursor P_ ((struct window *,
448 enum glyph_row_area,
449 int, int, int, int));
446static void x_flush P_ ((struct frame *f)); 450static void x_flush P_ ((struct frame *f));
447static void x_update_begin P_ ((struct frame *)); 451static void x_update_begin P_ ((struct frame *));
448static void x_update_window_begin P_ ((struct window *)); 452static void x_update_window_begin P_ ((struct window *));
@@ -537,7 +541,12 @@ XDrawLine (display, w, gc, x1, y1, x2, y2)
537 GC gc; 541 GC gc;
538 int x1, y1, x2, y2; 542 int x1, y1, x2, y2;
539{ 543{
544#if TARGET_API_MAC_CARBON
545 SetPort (GetWindowPort (w));
546#else
540 SetPort (w); 547 SetPort (w);
548#endif
549
541 mac_set_colors (gc); 550 mac_set_colors (gc);
542 551
543 MoveTo (x1, y1); 552 MoveTo (x1, y1);
@@ -558,10 +567,15 @@ XClearArea (display, w, x, y, width, height, exposures)
558 Rect r; 567 Rect r;
559 XGCValues xgc; 568 XGCValues xgc;
560 569
561 xgc.foreground = mwp->foreground_pixel; 570 xgc.foreground = mwp->x_compatible.foreground_pixel;
562 xgc.background = mwp->background_pixel; 571 xgc.background = mwp->x_compatible.background_pixel;
563 572
573#if TARGET_API_MAC_CARBON
574 SetPort (GetWindowPort (w));
575#else
564 SetPort (w); 576 SetPort (w);
577#endif
578
565 mac_set_colors (&xgc); 579 mac_set_colors (&xgc);
566 SetRect (&r, x, y, x + width, y + height); 580 SetRect (&r, x, y, x + width, y + height);
567 581
@@ -578,13 +592,27 @@ XClearWindow (display, w)
578 struct mac_output *mwp = (mac_output *) GetWRefCon (w); 592 struct mac_output *mwp = (mac_output *) GetWRefCon (w);
579 XGCValues xgc; 593 XGCValues xgc;
580 594
581 xgc.foreground = mwp->foreground_pixel; 595 xgc.foreground = mwp->x_compatible.foreground_pixel;
582 xgc.background = mwp->background_pixel; 596 xgc.background = mwp->x_compatible.background_pixel;
583 597
598#if TARGET_API_MAC_CARBON
599 SetPort (GetWindowPort (w));
600#else
584 SetPort (w); 601 SetPort (w);
602#endif
603
585 mac_set_colors (&xgc); 604 mac_set_colors (&xgc);
586 605
587 EraseRect (&(w->portRect)); 606#if TARGET_API_MAC_CARBON
607 {
608 Rect r;
609
610 GetWindowPortBounds (w, &r);
611 EraseRect (&r);
612 }
613#else /* not TARGET_API_MAC_CARBON */
614 EraseRect (&(w->portRect));
615#endif /* not TARGET_API_MAC_CARBON */
588} 616}
589 617
590 618
@@ -600,11 +628,27 @@ mac_draw_bitmap (display, w, gc, x, y, bitmap)
600{ 628{
601 Rect r; 629 Rect r;
602 630
631#if TARGET_API_MAC_CARBON
632 SetPort (GetWindowPort (w));
633#else
603 SetPort (w); 634 SetPort (w);
635#endif
636
604 mac_set_colors (gc); 637 mac_set_colors (gc);
605 SetRect (&r, x, y, x + bitmap->bounds.right, y + bitmap->bounds.bottom); 638 SetRect (&r, x, y, x + bitmap->bounds.right, y + bitmap->bounds.bottom);
606 639
640#if TARGET_API_MAC_CARBON
641 {
642 PixMapHandle pmh;
643
644 LockPortBits (GetWindowPort (w));
645 pmh = GetPortPixMap (GetWindowPort (w));
646 CopyBits (bitmap, (BitMap *) *pmh, &(bitmap->bounds), &r, srcCopy, 0);
647 UnlockPortBits (GetWindowPort (w));
648 }
649#else /* not TARGET_API_MAC_CARBON */
607 CopyBits (bitmap, &(w->portBits), &(bitmap->bounds), &r, srcCopy, 0); 650 CopyBits (bitmap, &(w->portBits), &(bitmap->bounds), &r, srcCopy, 0);
651#endif /* not TARGET_API_MAC_CARBON */
608} 652}
609 653
610 654
@@ -616,7 +660,11 @@ mac_set_clip_rectangle (display, w, r)
616 WindowPtr w; 660 WindowPtr w;
617 Rect *r; 661 Rect *r;
618{ 662{
663#if TARGET_API_MAC_CARBON
664 SetPort (GetWindowPort (w));
665#else
619 SetPort (w); 666 SetPort (w);
667#endif
620 668
621 ClipRect (r); 669 ClipRect (r);
622} 670}
@@ -631,7 +679,11 @@ mac_reset_clipping (display, w)
631{ 679{
632 Rect r; 680 Rect r;
633 681
682#if TARGET_API_MAC_CARBON
683 SetPort (GetWindowPort (w));
684#else
634 SetPort (w); 685 SetPort (w);
686#endif
635 687
636 SetRect (&r, -32767, -32767, 32767, 32767); 688 SetRect (&r, -32767, -32767, 32767, 32767);
637 ClipRect (&r); 689 ClipRect (&r);
@@ -682,7 +734,12 @@ XFillRectangle (display, w, gc, x, y, width, height)
682{ 734{
683 Rect r; 735 Rect r;
684 736
737#if TARGET_API_MAC_CARBON
738 SetPort (GetWindowPort (w));
739#else
685 SetPort (w); 740 SetPort (w);
741#endif
742
686 mac_set_colors (gc); 743 mac_set_colors (gc);
687 SetRect (&r, x, y, x + width, y + height); 744 SetRect (&r, x, y, x + width, y + height);
688 745
@@ -702,7 +759,12 @@ mac_draw_rectangle (display, w, gc, x, y, width, height)
702{ 759{
703 Rect r; 760 Rect r;
704 761
762#if TARGET_API_MAC_CARBON
763 SetPort (GetWindowPort (w));
764#else
705 SetPort (w); 765 SetPort (w);
766#endif
767
706 mac_set_colors (gc); 768 mac_set_colors (gc);
707 SetRect (&r, x, y, x + width + 1, y + height + 1); 769 SetRect (&r, x, y, x + width + 1, y + height + 1);
708 770
@@ -723,12 +785,17 @@ mac_draw_rectangle_to_pixmap (display, p, gc, x, y, width, height)
723#if 0 /* MAC_TODO: draw a rectangle in a PixMap */ 785#if 0 /* MAC_TODO: draw a rectangle in a PixMap */
724 Rect r; 786 Rect r;
725 787
788#if TARGET_API_MAC_CARBON
789 SetPort (GetWindowPort (w));
790#else
726 SetPort (w); 791 SetPort (w);
792#endif
793
727 mac_set_colors (gc); 794 mac_set_colors (gc);
728 SetRect (&r, x, y, x + width, y + height); 795 SetRect (&r, x, y, x + width, y + height);
729 796
730 FrameRect (&r); /* using foreground color of gc */ 797 FrameRect (&r); /* using foreground color of gc */
731#endif 798#endif /* 0 */
732} 799}
733 800
734 801
@@ -742,7 +809,12 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode,
742 char *buf; 809 char *buf;
743 int nchars, mode, bytes_per_char; 810 int nchars, mode, bytes_per_char;
744{ 811{
812#if TARGET_API_MAC_CARBON
813 SetPort (GetWindowPort (w));
814#else
745 SetPort (w); 815 SetPort (w);
816#endif
817
746 mac_set_colors (gc); 818 mac_set_colors (gc);
747 819
748 TextFont (gc->font->mac_fontnum); 820 TextFont (gc->font->mac_fontnum);
@@ -832,13 +904,29 @@ mac_copy_area (display, src, dest, gc, src_x, src_y, width, height, dest_x,
832{ 904{
833 Rect src_r, dest_r; 905 Rect src_r, dest_r;
834 906
907#if TARGET_API_MAC_CARBON
908 SetPort (GetWindowPort (dest));
909#else
835 SetPort (dest); 910 SetPort (dest);
911#endif
912
836 mac_set_colors (gc); 913 mac_set_colors (gc);
837 914
838 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); 915 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
839 SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height); 916 SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height);
840 917
841 CopyBits ((BitMap *) src, &(dest->portBits), &src_r, &dest_r, srcCopy, 0); 918#if TARGET_API_MAC_CARBON
919 {
920 PixMapHandle pmh;
921
922 LockPortBits (GetWindowPort (dest));
923 pmh = GetPortPixMap (GetWindowPort (dest));
924 CopyBits ((BitMap *) &src, (BitMap *) *pmh, &src_r, &dest_r, srcCopy, 0);
925 UnlockPortBits (GetWindowPort (dest));
926 }
927#else /* not TARGET_API_MAC_CARBON */
928 CopyBits ((BitMap *) &src, &(dest->portBits), &src_r, &dest_r, srcCopy, 0);
929#endif /* not TARGET_API_MAC_CARBON */
842} 930}
843 931
844 932
@@ -871,6 +959,21 @@ mac_scroll_area (display, w, gc, src_x, src_y, width, height, dest_x, dest_y)
871 unsigned int width, height; 959 unsigned int width, height;
872 int dest_x, dest_y; 960 int dest_x, dest_y;
873{ 961{
962#if TARGET_API_MAC_CARBON
963 Rect gw_r, src_r, dest_r;
964 PixMapHandle pmh;
965
966 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
967 SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height);
968
969 SetPort (GetWindowPort (w));
970 mac_set_colors (gc);
971
972 LockPortBits (GetWindowPort (w));
973 pmh = GetPortPixMap (GetWindowPort (w));
974 CopyBits ((BitMap *) *pmh, (BitMap *) *pmh, &src_r, &dest_r, srcCopy, 0);
975 UnlockPortBits (GetWindowPort (w));
976#else /* not TARGET_API_MAC_CARBON */
874 Rect src_r, dest_r; 977 Rect src_r, dest_r;
875 978
876 SetPort (w); 979 SetPort (w);
@@ -899,6 +1002,7 @@ mac_scroll_area (display, w, gc, src_x, src_y, width, height, dest_x, dest_y)
899 1002
900 mac_set_colors (gc); 1003 mac_set_colors (gc);
901#endif 1004#endif
1005#endif /* not TARGET_API_MAC_CARBON */
902} 1006}
903 1007
904 1008
@@ -926,7 +1030,7 @@ mac_copy_area_to_pixmap (display, src, dest, gc, src_x, src_y, width, height,
926 SetRect (&src_r, src_x, src_y, src_right, src_bottom); 1030 SetRect (&src_r, src_x, src_y, src_right, src_bottom);
927 SetRect (&dest_r, dest_x, dest_y, dest_x + w, dest_y + h); 1031 SetRect (&dest_r, dest_x, dest_y, dest_x + w, dest_y + h);
928 1032
929 CopyBits ((BitMap *) src, (BitMap *) dest, &src_r, &dest_r, srcCopy, 0); 1033 CopyBits ((BitMap *) &src, (BitMap *) &dest, &src_r, &dest_r, srcCopy, 0);
930} 1034}
931 1035
932 1036
@@ -1022,13 +1126,26 @@ x_sync (f)
1022} 1126}
1023 1127
1024 1128
1129/* Remove calls to XFlush by defining XFlush to an empty replacement.
1130 Calls to XFlush should be unnecessary because the X output buffer
1131 is flushed automatically as needed by calls to XPending,
1132 XNextEvent, or XWindowEvent according to the XFlush man page.
1133 XTread_socket calls XPending. Removing XFlush improves
1134 performance. */
1135
1136#if TARGET_API_MAC_CARBON
1137#define XFlush(DISPLAY) QDFlushPortBuffer (GetQDGlobalsThePort (), NULL)
1138#else
1139#define XFlush(DISPLAY) (void) 0
1140#endif
1141
1025/* Flush display of frame F, or of all frames if F is null. */ 1142/* Flush display of frame F, or of all frames if F is null. */
1026 1143
1027void 1144void
1028x_flush (f) 1145x_flush (f)
1029 struct frame *f; 1146 struct frame *f;
1030{ 1147{
1031#if 0 /* Nothing to do for Mac OS (needed in OS X perhaps?). */ 1148#if TARGET_API_MAC_CARBON
1032 BLOCK_INPUT; 1149 BLOCK_INPUT;
1033 if (f == NULL) 1150 if (f == NULL)
1034 { 1151 {
@@ -1039,19 +1156,10 @@ x_flush (f)
1039 else if (FRAME_X_P (f)) 1156 else if (FRAME_X_P (f))
1040 XFlush (FRAME_MAC_DISPLAY (f)); 1157 XFlush (FRAME_MAC_DISPLAY (f));
1041 UNBLOCK_INPUT; 1158 UNBLOCK_INPUT;
1042#endif 1159#endif /* TARGET_API_MAC_CARBON */
1043} 1160}
1044 1161
1045 1162
1046/* Remove calls to XFlush by defining XFlush to an empty replacement.
1047 Calls to XFlush should be unnecessary because the X output buffer
1048 is flushed automatically as needed by calls to XPending,
1049 XNextEvent, or XWindowEvent according to the XFlush man page.
1050 XTread_socket calls XPending. Removing XFlush improves
1051 performance. */
1052
1053#define XFlush(DISPLAY) (void) 0
1054
1055 1163
1056/* Return the struct mac_display_info corresponding to DPY. There's 1164/* Return the struct mac_display_info corresponding to DPY. There's
1057 only one. */ 1165 only one. */
@@ -1072,10 +1180,9 @@ mac_display_info_for_display (dpy)
1072/* Start an update of frame F. This function is installed as a hook 1180/* Start an update of frame F. This function is installed as a hook
1073 for update_begin, i.e. it is called when update_begin is called. 1181 for update_begin, i.e. it is called when update_begin is called.
1074 This function is called prior to calls to x_update_window_begin for 1182 This function is called prior to calls to x_update_window_begin for
1075 each window being updated. Currently, there is nothing to do here 1183 each window being updated. */
1076 because all interesting stuff is done on a window basis. */
1077 1184
1078void 1185static void
1079x_update_begin (f) 1186x_update_begin (f)
1080 struct frame *f; 1187 struct frame *f;
1081{ 1188{
@@ -1087,7 +1194,7 @@ x_update_begin (f)
1087 to the window being updated and set output_cursor to the cursor 1194 to the window being updated and set output_cursor to the cursor
1088 position of W. */ 1195 position of W. */
1089 1196
1090void 1197static void
1091x_update_window_begin (w) 1198x_update_window_begin (w)
1092 struct window *w; 1199 struct window *w;
1093{ 1200{
@@ -1126,7 +1233,7 @@ x_update_window_begin (w)
1126 { 1233 {
1127 int i; 1234 int i;
1128 1235
1129 for (i = 0; i < w->desired_matrix->nrows; ++i) 1236 for (i = 0; i < w->desired_matrix->nrows; ++i)
1130 if (MATRIX_ROW_ENABLED_P (w->desired_matrix, i)) 1237 if (MATRIX_ROW_ENABLED_P (w->desired_matrix, i))
1131 break; 1238 break;
1132 1239
@@ -1166,7 +1273,7 @@ x_draw_vertical_border (w)
1166 f->output_data.mac->normal_gc, x1, y0, x1, y1); 1273 f->output_data.mac->normal_gc, x1, y0, x1, y1);
1167 } 1274 }
1168} 1275}
1169 1276
1170 1277
1171/* End update of window W (which is equal to updated_window). 1278/* End update of window W (which is equal to updated_window).
1172 1279
@@ -1178,30 +1285,21 @@ x_draw_vertical_border (w)
1178 make sure that the mouse-highlight is properly redrawn. 1285 make sure that the mouse-highlight is properly redrawn.
1179 1286
1180 W may be a menu bar pseudo-window in case we don't have X toolkit 1287 W may be a menu bar pseudo-window in case we don't have X toolkit
1181 support. Such windows don't have a cursor, so don't display it 1288 support. Such windows don't have a cursor, so don't display it
1182 here. */ 1289 here. */
1183 1290
1184void 1291static void
1185x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) 1292x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
1186 struct window *w; 1293 struct window *w;
1187 int cursor_on_p, mouse_face_overwritten_p; 1294 int cursor_on_p, mouse_face_overwritten_p;
1188{ 1295{
1296 struct mac_display_info *dpyinfo
1297 = FRAME_MAC_DISPLAY_INFO (XFRAME (w->frame));
1298
1189 if (!w->pseudo_window_p) 1299 if (!w->pseudo_window_p)
1190 { 1300 {
1191 struct mac_display_info *dpyinfo
1192 = FRAME_MAC_DISPLAY_INFO (XFRAME (w->frame));
1193
1194 BLOCK_INPUT; 1301 BLOCK_INPUT;
1195 1302
1196 /* If a row with mouse-face was overwritten, arrange for
1197 XTframe_up_to_date to redisplay the mouse highlight. */
1198 if (mouse_face_overwritten_p)
1199 {
1200 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
1201 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
1202 dpyinfo->mouse_face_window = Qnil;
1203 }
1204
1205 if (cursor_on_p) 1303 if (cursor_on_p)
1206 x_display_and_set_cursor (w, 1, output_cursor.hpos, 1304 x_display_and_set_cursor (w, 1, output_cursor.hpos,
1207 output_cursor.vpos, 1305 output_cursor.vpos,
@@ -1210,7 +1308,24 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
1210 x_draw_vertical_border (w); 1308 x_draw_vertical_border (w);
1211 UNBLOCK_INPUT; 1309 UNBLOCK_INPUT;
1212 } 1310 }
1213 1311
1312 /* If a row with mouse-face was overwritten, arrange for
1313 XTframe_up_to_date to redisplay the mouse highlight. */
1314 if (mouse_face_overwritten_p)
1315 {
1316 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
1317 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
1318 dpyinfo->mouse_face_window = Qnil;
1319 }
1320
1321#if 0
1322 /* Unhide the caret. This won't actually show the cursor, unless it
1323 was visible before the corresponding call to HideCaret in
1324 x_update_window_begin. */
1325 if (w32_use_visible_system_caret)
1326 SendMessage (w32_system_caret_hwnd, WM_EMACS_SHOW_CARET, 0, 0);
1327#endif
1328
1214 updated_window = NULL; 1329 updated_window = NULL;
1215} 1330}
1216 1331
@@ -1218,14 +1333,19 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
1218/* End update of frame F. This function is installed as a hook in 1333/* End update of frame F. This function is installed as a hook in
1219 update_end. */ 1334 update_end. */
1220 1335
1221void 1336static void
1222x_update_end (f) 1337x_update_end (f)
1223 struct frame *f; 1338 struct frame *f;
1224{ 1339{
1225 /* Reset the background color of Mac OS Window to that of the frame after 1340 /* Reset the background color of Mac OS Window to that of the frame after
1226 update so that it is used by Mac Toolbox to clear the update region before 1341 update so that it is used by Mac Toolbox to clear the update region before
1227 an update event is generated. */ 1342 an update event is generated. */
1343#if TARGET_API_MAC_CARBON
1344 SetPort (GetWindowPort (FRAME_MAC_WINDOW (f)));
1345#else
1228 SetPort (FRAME_MAC_WINDOW (f)); 1346 SetPort (FRAME_MAC_WINDOW (f));
1347#endif
1348
1229 mac_set_backcolor (FRAME_BACKGROUND_PIXEL (f)); 1349 mac_set_backcolor (FRAME_BACKGROUND_PIXEL (f));
1230 1350
1231 /* Mouse highlight may be displayed again. */ 1351 /* Mouse highlight may be displayed again. */
@@ -1241,7 +1361,7 @@ x_update_end (f)
1241 complete update has been performed. The global variable 1361 complete update has been performed. The global variable
1242 updated_window is not available here. */ 1362 updated_window is not available here. */
1243 1363
1244void 1364static void
1245XTframe_up_to_date (f) 1365XTframe_up_to_date (f)
1246 struct frame *f; 1366 struct frame *f;
1247{ 1367{
@@ -1267,37 +1387,54 @@ XTframe_up_to_date (f)
1267/* Draw truncation mark bitmaps, continuation mark bitmaps, overlay 1387/* Draw truncation mark bitmaps, continuation mark bitmaps, overlay
1268 arrow bitmaps, or clear the fringes if no bitmaps are required 1388 arrow bitmaps, or clear the fringes if no bitmaps are required
1269 before DESIRED_ROW is made current. The window being updated is 1389 before DESIRED_ROW is made current. The window being updated is
1270 found in updated_window. This function It is called from 1390 found in updated_window. This function is called from
1271 update_window_line only if it is known that there are differences 1391 update_window_line only if it is known that there are differences
1272 between bitmaps to be drawn between current row and DESIRED_ROW. */ 1392 between bitmaps to be drawn between current row and DESIRED_ROW. */
1273 1393
1274void 1394static void
1275x_after_update_window_line (desired_row) 1395x_after_update_window_line (desired_row)
1276 struct glyph_row *desired_row; 1396 struct glyph_row *desired_row;
1277{ 1397{
1278 struct window *w = updated_window; 1398 struct window *w = updated_window;
1279 1399 struct frame *f;
1400 int width, height;
1401
1280 xassert (w); 1402 xassert (w);
1281 1403
1282 if (!desired_row->mode_line_p && !w->pseudo_window_p) 1404 if (!desired_row->mode_line_p && !w->pseudo_window_p)
1283 { 1405 {
1284 BLOCK_INPUT; 1406 BLOCK_INPUT;
1285 x_draw_row_fringe_bitmaps (w, desired_row); 1407 x_draw_row_fringe_bitmaps (w, desired_row);
1408 UNBLOCK_INPUT;
1409 }
1286 1410
1287 /* When a window has disappeared, make sure that no rest of 1411 /* When a window has disappeared, make sure that no rest of
1288 full-width rows stays visible in the internal border. */ 1412 full-width rows stays visible in the internal border. Could
1289 if (windows_or_buffers_changed) 1413 check here if updated_window is the leftmost/rightmost window,
1290 { 1414 but I guess it's not worth doing since vertically split windows
1291 struct frame *f = XFRAME (w->frame); 1415 are almost never used, internal border is rarely set, and the
1292 int width = FRAME_INTERNAL_BORDER_WIDTH (f); 1416 overhead is very small. */
1293 int height = desired_row->visible_height; 1417 if (windows_or_buffers_changed
1294 int x = (window_box_right (w, -1) 1418 && desired_row->full_width_p
1295 + FRAME_X_RIGHT_FRINGE_WIDTH (f)); 1419 && (f = XFRAME (w->frame),
1296 int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); 1420 width = FRAME_INTERNAL_BORDER_WIDTH (f),
1421 width != 0)
1422 && (height = desired_row->visible_height,
1423 height > 0))
1424 {
1425 int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y));
1426 /* Internal border is drawn below the tool bar. */
1427 if (WINDOWP (f->tool_bar_window)
1428 && w == XWINDOW (f->tool_bar_window))
1429 y -= width;
1297 1430
1298 XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), 1431 BLOCK_INPUT;
1299 x, y, width, height, 0); 1432
1300 } 1433 XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
1434 0, y, width, height, 0);
1435 XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
1436 f->output_data.mac->pixel_width - width, y,
1437 width, height, 0);
1301 1438
1302 UNBLOCK_INPUT; 1439 UNBLOCK_INPUT;
1303 } 1440 }
@@ -1324,10 +1461,11 @@ x_draw_fringe_bitmap (w, row, which, left_p)
1324 unsigned char *bits; 1461 unsigned char *bits;
1325 BitMap bitmap; 1462 BitMap bitmap;
1326 XGCValues gcv; 1463 XGCValues gcv;
1464 GC gc = f->output_data.mac->normal_gc;
1327 struct face *face; 1465 struct face *face;
1328 1466
1329 /* Must clip because of partially visible lines. */ 1467 /* Must clip because of partially visible lines. */
1330 x_clip_to_row (w, row, 1); 1468 x_clip_to_row (w, row, gc, 1);
1331 1469
1332 /* Convert row to frame coordinates. */ 1470 /* Convert row to frame coordinates. */
1333 y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); 1471 y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y);
@@ -1386,8 +1524,7 @@ x_draw_fringe_bitmap (w, row, which, left_p)
1386 /* Set dy to the offset in the row to start drawing the bitmap. */ 1524 /* Set dy to the offset in the row to start drawing the bitmap. */
1387 dy = (row->height - h) / 2; 1525 dy = (row->height - h) / 2;
1388 1526
1389 /* Draw the bitmap. I believe these small pixmaps can be cached 1527 /* Draw the bitmap. */
1390 by the server. */
1391 face = FACE_FROM_ID (f, FRINGE_FACE_ID); 1528 face = FACE_FROM_ID (f, FRINGE_FACE_ID);
1392 PREPARE_FACE_FOR_DISPLAY (f, face); 1529 PREPARE_FACE_FOR_DISPLAY (f, face);
1393 1530
@@ -1460,7 +1597,10 @@ x_draw_fringe_bitmap (w, row, which, left_p)
1460 } 1597 }
1461 1598
1462 if (which == NO_FRINGE_BITMAP) 1599 if (which == NO_FRINGE_BITMAP)
1463 return; 1600 {
1601 mac_reset_clipping (display, window);
1602 return;
1603 }
1464 1604
1465 mac_create_bitmap_from_bitmap_data (&bitmap, bits, wd, h); 1605 mac_create_bitmap_from_bitmap_data (&bitmap, bits, wd, h);
1466 gcv.foreground = face->foreground; 1606 gcv.foreground = face->foreground;
@@ -1525,47 +1665,20 @@ x_draw_row_fringe_bitmaps (w, row)
1525} 1665}
1526 1666
1527 1667
1528/***********************************************************************
1529 Line Highlighting
1530 ***********************************************************************/
1531
1532/* External interface to control of standout mode. Not used for X
1533 frames. Aborts when called. */
1534
1535void
1536XTreassert_line_highlight (new, vpos)
1537 int new, vpos;
1538{
1539 abort ();
1540}
1541
1542
1543/* Call this when about to modify line at position VPOS and change
1544 whether it is highlighted. Not used for X frames. Aborts when
1545 called. */
1546
1547void
1548x_change_line_highlight (new_highlight, vpos, y, first_unused_hpos)
1549 int new_highlight, vpos, y, first_unused_hpos;
1550{
1551 abort ();
1552}
1553
1554
1555/* This is called when starting Emacs and when restarting after 1668/* This is called when starting Emacs and when restarting after
1556 suspend. When starting Emacs, no X window is mapped. And nothing 1669 suspend. When starting Emacs, no window is mapped. And nothing
1557 must be done to Emacs's own window if it is suspended (though that 1670 must be done to Emacs's own window if it is suspended (though that
1558 rarely happens). */ 1671 rarely happens). */
1559 1672
1560void 1673static void
1561XTset_terminal_modes () 1674XTset_terminal_modes ()
1562{ 1675{
1563} 1676}
1564 1677
1565/* This is called when exiting or suspending Emacs. Exiting will make 1678/* This is called when exiting or suspending Emacs. Exiting will make
1566 the X-windows go away, and suspending requires no action. */ 1679 the windows go away, and suspending requires no action. */
1567 1680
1568void 1681static void
1569XTreset_terminal_modes () 1682XTreset_terminal_modes ()
1570{ 1683{
1571} 1684}
@@ -1600,7 +1713,7 @@ set_output_cursor (cursor)
1600 cursor position for that window. If updated_window is null, use 1713 cursor position for that window. If updated_window is null, use
1601 selected_window and display the cursor at the given position. */ 1714 selected_window and display the cursor at the given position. */
1602 1715
1603void 1716static void
1604XTcursor_to (vpos, hpos, y, x) 1717XTcursor_to (vpos, hpos, y, x)
1605 int vpos, hpos, y, x; 1718 int vpos, hpos, y, x;
1606{ 1719{
@@ -2047,13 +2160,16 @@ x_produce_image_glyph (it)
2047 2160
2048 if (face->box != FACE_NO_BOX) 2161 if (face->box != FACE_NO_BOX)
2049 { 2162 {
2050 it->ascent += face->box_line_width; 2163 if (face->box_line_width > 0)
2051 it->descent += face->box_line_width; 2164 {
2165 it->ascent += face->box_line_width;
2166 it->descent += face->box_line_width;
2167 }
2052 2168
2053 if (it->start_of_box_run_p) 2169 if (it->start_of_box_run_p)
2054 it->pixel_width += face->box_line_width; 2170 it->pixel_width += abs (face->box_line_width);
2055 if (it->end_of_box_run_p) 2171 if (it->end_of_box_run_p)
2056 it->pixel_width += face->box_line_width; 2172 it->pixel_width += abs (face->box_line_width);
2057 } 2173 }
2058 2174
2059 take_vertical_position_into_account (it); 2175 take_vertical_position_into_account (it);
@@ -2145,9 +2261,9 @@ x_append_stretch_glyph (it, object, width, height, ascent)
2145 4. `:height HEIGHT' specifies that the height of the stretch produced 2261 4. `:height HEIGHT' specifies that the height of the stretch produced
2146 should be HEIGHT, measured in canonical character units. 2262 should be HEIGHT, measured in canonical character units.
2147 2263
2148 5. `:relative-height FACTOR' specifies that the height of the stretch 2264 5. `:relative-height FACTOR' specifies that the height of the
2149 should be FACTOR times the height of the characters having the glyph 2265 stretch should be FACTOR times the height of the characters having
2150 property. 2266 the glyph property.
2151 2267
2152 Either none or exactly one of 4 or 5 must be present. 2268 Either none or exactly one of 4 or 5 must be present.
2153 2269
@@ -2236,7 +2352,7 @@ x_produce_stretch_glyph (it)
2236 NUMVAL (prop) > 0 && NUMVAL (prop) <= 100) 2352 NUMVAL (prop) > 0 && NUMVAL (prop) <= 100)
2237 ascent = NUMVAL (prop) / 100.0; 2353 ascent = NUMVAL (prop) / 100.0;
2238 else 2354 else
2239 ascent = (double) font->ascent / FONT_HEIGHT (font); 2355 ascent = (double) FONT_BASE (font) / FONT_HEIGHT (font);
2240 2356
2241 if (width <= 0) 2357 if (width <= 0)
2242 width = 1; 2358 width = 1;
@@ -2258,13 +2374,16 @@ x_produce_stretch_glyph (it)
2258 2374
2259 if (face->box != FACE_NO_BOX) 2375 if (face->box != FACE_NO_BOX)
2260 { 2376 {
2261 it->ascent += face->box_line_width; 2377 if (face->box_line_width > 0)
2262 it->descent += face->box_line_width; 2378 {
2379 it->ascent += face->box_line_width;
2380 it->descent += face->box_line_width;
2381 }
2263 2382
2264 if (it->start_of_box_run_p) 2383 if (it->start_of_box_run_p)
2265 it->pixel_width += face->box_line_width; 2384 it->pixel_width += abs (face->box_line_width);
2266 if (it->end_of_box_run_p) 2385 if (it->end_of_box_run_p)
2267 it->pixel_width += face->box_line_width; 2386 it->pixel_width += abs (face->box_line_width);
2268 } 2387 }
2269 2388
2270 take_vertical_position_into_account (it); 2389 take_vertical_position_into_account (it);
@@ -2298,16 +2417,17 @@ x_produce_stretch_glyph (it)
2298 F_HEIGHT = FRAME_LINE_HEIGHT (F) 2417 F_HEIGHT = FRAME_LINE_HEIGHT (F)
2299*/ 2418*/
2300 2419
2301#define VCENTER_BASELINE_OFFSET(FONT, F) \ 2420#define VCENTER_BASELINE_OFFSET(FONT, F) \
2302 ((FONT)->descent \ 2421 (FONT_DESCENT (FONT) \
2303 + (FRAME_LINE_HEIGHT ((F)) - FONT_HEIGHT ((FONT))) / 2 \ 2422 + (FRAME_LINE_HEIGHT ((F)) - FONT_HEIGHT ((FONT)) \
2304 - ((F)->output_data.mac->font->descent - (F)->output_data.mac->baseline_offset)) 2423 + (FRAME_LINE_HEIGHT ((F)) > FONT_HEIGHT ((FONT)))) / 2 \
2424 - (FONT_DESCENT (FRAME_FONT (F)) - FRAME_BASELINE_OFFSET (F)))
2305 2425
2306/* Produce glyphs/get display metrics for the display element IT is 2426/* Produce glyphs/get display metrics for the display element IT is
2307 loaded with. See the description of struct display_iterator in 2427 loaded with. See the description of struct display_iterator in
2308 dispextern.h for an overview of struct display_iterator. */ 2428 dispextern.h for an overview of struct display_iterator. */
2309 2429
2310void 2430static void
2311x_produce_glyphs (it) 2431x_produce_glyphs (it)
2312 struct it *it; 2432 struct it *it;
2313{ 2433{
@@ -2321,35 +2441,47 @@ x_produce_glyphs (it)
2321 XCharStruct *pcm; 2441 XCharStruct *pcm;
2322 int font_not_found_p; 2442 int font_not_found_p;
2323 struct font_info *font_info; 2443 struct font_info *font_info;
2324 int boff; /* baseline offset */ 2444 int boff; /* baseline offset */
2445 /* We may change it->multibyte_p upon unibyte<->multibyte
2446 conversion. So, save the current value now and restore it
2447 later.
2448
2449 Note: It seems that we don't have to record multibyte_p in
2450 struct glyph because the character code itself tells if or
2451 not the character is multibyte. Thus, in the future, we must
2452 consider eliminating the field `multibyte_p' in the struct
2453 glyph.
2454 */
2455 int saved_multibyte_p = it->multibyte_p;
2325 2456
2326 /* Maybe translate single-byte characters to multibyte, or the 2457 /* Maybe translate single-byte characters to multibyte, or the
2327 other way. */ 2458 other way. */
2328 it->char_to_display = it->c; 2459 it->char_to_display = it->c;
2329 if (!ASCII_BYTE_P (it->c)) 2460 if (!ASCII_BYTE_P (it->c))
2330 { 2461 {
2331 if (unibyte_display_via_language_environment 2462 if (unibyte_display_via_language_environment
2332 && SINGLE_BYTE_CHAR_P (it->c) 2463 && SINGLE_BYTE_CHAR_P (it->c)
2333 && (it->c >= 0240 2464 && (it->c >= 0240
2334 || !NILP (Vnonascii_translation_table))) 2465 || !NILP (Vnonascii_translation_table)))
2335 { 2466 {
2336 it->char_to_display = unibyte_char_to_multibyte (it->c); 2467 it->char_to_display = unibyte_char_to_multibyte (it->c);
2468 it->multibyte_p = 1;
2337 it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display); 2469 it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display);
2338 face = FACE_FROM_ID (it->f, it->face_id); 2470 face = FACE_FROM_ID (it->f, it->face_id);
2339 } 2471 }
2340 else if (!SINGLE_BYTE_CHAR_P (it->c) 2472 else if (!SINGLE_BYTE_CHAR_P (it->c)
2341 && !it->multibyte_p) 2473 && !it->multibyte_p)
2342 { 2474 {
2343 it->char_to_display = multibyte_char_to_unibyte (it->c, Qnil); 2475 it->multibyte_p = 1;
2344 it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display); 2476 it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display);
2345 face = FACE_FROM_ID (it->f, it->face_id); 2477 face = FACE_FROM_ID (it->f, it->face_id);
2346 } 2478 }
2347 } 2479 }
2348 2480
2349 /* Get font to use. Encode IT->char_to_display. */ 2481 /* Get font to use. Encode IT->char_to_display. */
2350 x_get_char_face_and_encoding (it->f, it->char_to_display, 2482 x_get_char_face_and_encoding (it->f, it->char_to_display,
2351 it->face_id, &char2b, 2483 it->face_id, &char2b,
2352 it->multibyte_p); 2484 it->multibyte_p);
2353 font = face->font; 2485 font = face->font;
2354 2486
2355 /* When no suitable font found, use the default font. */ 2487 /* When no suitable font found, use the default font. */
@@ -2376,24 +2508,24 @@ x_produce_glyphs (it)
2376 2508
2377 it->nglyphs = 1; 2509 it->nglyphs = 1;
2378 2510
2379 pcm = x_per_char_metric (font, &char2b); 2511 pcm = x_per_char_metric (font, &char2b);
2380 it->ascent = font->ascent + boff; 2512 it->ascent = FONT_BASE (font) + boff;
2381 it->descent = font->descent - boff; 2513 it->descent = FONT_DESCENT (font) - boff;
2382
2383 if (pcm)
2384 {
2385 it->phys_ascent = pcm->ascent + boff;
2386 it->phys_descent = pcm->descent - boff;
2387 it->pixel_width = pcm->width;
2388 }
2389 else
2390 {
2391 it->glyph_not_available_p = 1;
2392 it->phys_ascent = font->ascent + boff;
2393 it->phys_descent = font->descent - boff;
2394 it->pixel_width = FONT_WIDTH (font);
2395 }
2396 2514
2515 if (pcm)
2516 {
2517 it->phys_ascent = pcm->ascent + boff;
2518 it->phys_descent = pcm->descent - boff;
2519 it->pixel_width = pcm->width;
2520 }
2521 else
2522 {
2523 it->glyph_not_available_p = 1;
2524 it->phys_ascent = FONT_BASE (font) + boff;
2525 it->phys_descent = FONT_DESCENT (font) - boff;
2526 it->pixel_width = FONT_WIDTH (font);
2527 }
2528
2397 /* If this is a space inside a region of text with 2529 /* If this is a space inside a region of text with
2398 `space-width' property, change its width. */ 2530 `space-width' property, change its width. */
2399 stretched_p = it->char_to_display == ' ' && !NILP (it->space_width); 2531 stretched_p = it->char_to_display == ' ' && !NILP (it->space_width);
@@ -2407,8 +2539,13 @@ x_produce_glyphs (it)
2407 { 2539 {
2408 int thick = face->box_line_width; 2540 int thick = face->box_line_width;
2409 2541
2410 it->ascent += thick; 2542 if (thick > 0)
2411 it->descent += thick; 2543 {
2544 it->ascent += thick;
2545 it->descent += thick;
2546 }
2547 else
2548 thick = -thick;
2412 2549
2413 if (it->start_of_box_run_p) 2550 if (it->start_of_box_run_p)
2414 it->pixel_width += thick; 2551 it->pixel_width += thick;
@@ -2430,7 +2567,8 @@ x_produce_glyphs (it)
2430 { 2567 {
2431 /* Translate a space with a `space-width' property 2568 /* Translate a space with a `space-width' property
2432 into a stretch glyph. */ 2569 into a stretch glyph. */
2433 double ascent = (double) font->ascent / FONT_HEIGHT (font); 2570 double ascent = (double) FONT_BASE (font)
2571 / FONT_HEIGHT (font);
2434 x_append_stretch_glyph (it, it->object, it->pixel_width, 2572 x_append_stretch_glyph (it, it->object, it->pixel_width,
2435 it->ascent + it->descent, ascent); 2573 it->ascent + it->descent, ascent);
2436 } 2574 }
@@ -2449,14 +2587,14 @@ x_produce_glyphs (it)
2449 /* A newline has no width but we need the height of the line. */ 2587 /* A newline has no width but we need the height of the line. */
2450 it->pixel_width = 0; 2588 it->pixel_width = 0;
2451 it->nglyphs = 0; 2589 it->nglyphs = 0;
2452 it->ascent = it->phys_ascent = font->ascent + boff; 2590 it->ascent = it->phys_ascent = FONT_BASE (font) + boff;
2453 it->descent = it->phys_descent = font->descent - boff; 2591 it->descent = it->phys_descent = FONT_DESCENT (font) - boff;
2454 2592
2455 if (face->box != FACE_NO_BOX) 2593 if (face->box != FACE_NO_BOX
2594 && face->box_line_width > 0)
2456 { 2595 {
2457 int thick = face->box_line_width; 2596 it->ascent += face->box_line_width;
2458 it->ascent += thick; 2597 it->descent += face->box_line_width;
2459 it->descent += thick;
2460 } 2598 }
2461 } 2599 }
2462 else if (it->char_to_display == '\t') 2600 else if (it->char_to_display == '\t')
@@ -2465,10 +2603,16 @@ x_produce_glyphs (it)
2465 int x = it->current_x + it->continuation_lines_width; 2603 int x = it->current_x + it->continuation_lines_width;
2466 int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width; 2604 int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width;
2467 2605
2606 /* If the distance from the current position to the next tab
2607 stop is less than a canonical character width, use the
2608 tab stop after that. */
2609 if (next_tab_x - x < CANON_X_UNIT (it->f))
2610 next_tab_x += tab_width;
2611
2468 it->pixel_width = next_tab_x - x; 2612 it->pixel_width = next_tab_x - x;
2469 it->nglyphs = 1; 2613 it->nglyphs = 1;
2470 it->ascent = it->phys_ascent = font->ascent + boff; 2614 it->ascent = it->phys_ascent = FONT_BASE (font) + boff;
2471 it->descent = it->phys_descent = font->descent - boff; 2615 it->descent = it->phys_descent = FONT_DESCENT (font) - boff;
2472 2616
2473 if (it->glyph_row) 2617 if (it->glyph_row)
2474 { 2618 {
@@ -2496,27 +2640,33 @@ x_produce_glyphs (it)
2496 it->glyph_not_available_p = 1; 2640 it->glyph_not_available_p = 1;
2497 it->pixel_width = (FONT_WIDTH (FRAME_FONT (it->f)) 2641 it->pixel_width = (FONT_WIDTH (FRAME_FONT (it->f))
2498 * CHARSET_WIDTH (charset)); 2642 * CHARSET_WIDTH (charset));
2499 it->phys_ascent = font->ascent + boff; 2643 it->phys_ascent = FONT_BASE (font) + boff;
2500 it->phys_descent = font->descent - boff; 2644 it->phys_descent = FONT_DESCENT (font) - boff;
2501 } 2645 }
2502 else 2646 else
2503 { 2647 {
2504 it->pixel_width = pcm->width; 2648 it->pixel_width = pcm->width;
2505 it->phys_ascent = pcm->ascent + boff; 2649 it->phys_ascent = pcm->ascent + boff;
2506 it->phys_descent = pcm->descent - boff; 2650 it->phys_descent = pcm->descent - boff;
2507 if (it->glyph_row 2651 if (it->glyph_row
2508 && (pcm->lbearing < 0 2652 && (pcm->lbearing < 0
2509 || pcm->rbearing > pcm->width)) 2653 || pcm->rbearing > pcm->width))
2510 it->glyph_row->contains_overlapping_glyphs_p = 1; 2654 it->glyph_row->contains_overlapping_glyphs_p = 1;
2511 } 2655 }
2512 it->nglyphs = 1; 2656 it->nglyphs = 1;
2513 it->ascent = font->ascent + boff; 2657 it->ascent = FONT_BASE (font) + boff;
2514 it->descent = font->descent - boff; 2658 it->descent = FONT_DESCENT (font) - boff;
2515 if (face->box != FACE_NO_BOX) 2659 if (face->box != FACE_NO_BOX)
2516 { 2660 {
2517 int thick = face->box_line_width; 2661 int thick = face->box_line_width;
2518 it->ascent += thick; 2662
2519 it->descent += thick; 2663 if (thick > 0)
2664 {
2665 it->ascent += thick;
2666 it->descent += thick;
2667 }
2668 else
2669 thick = - thick;
2520 2670
2521 if (it->start_of_box_run_p) 2671 if (it->start_of_box_run_p)
2522 it->pixel_width += thick; 2672 it->pixel_width += thick;
@@ -2534,6 +2684,7 @@ x_produce_glyphs (it)
2534 if (it->glyph_row) 2684 if (it->glyph_row)
2535 x_append_glyph (it); 2685 x_append_glyph (it);
2536 } 2686 }
2687 it->multibyte_p = saved_multibyte_p;
2537 } 2688 }
2538 else if (it->what == IT_COMPOSITION) 2689 else if (it->what == IT_COMPOSITION)
2539 { 2690 {
@@ -2558,7 +2709,7 @@ x_produce_glyphs (it)
2558 { 2709 {
2559 it->char_to_display = unibyte_char_to_multibyte (it->c); 2710 it->char_to_display = unibyte_char_to_multibyte (it->c);
2560 } 2711 }
2561 2712
2562 /* Get face and font to use. Encode IT->char_to_display. */ 2713 /* Get face and font to use. Encode IT->char_to_display. */
2563 it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display); 2714 it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display);
2564 face = FACE_FROM_ID (it->f, it->face_id); 2715 face = FACE_FROM_ID (it->f, it->face_id);
@@ -2601,8 +2752,8 @@ x_produce_glyphs (it)
2601 this composition (adjusted by baseline offset). Ascent 2752 this composition (adjusted by baseline offset). Ascent
2602 and descent of overall glyphs should not be less than 2753 and descent of overall glyphs should not be less than
2603 them respectively. */ 2754 them respectively. */
2604 int font_ascent = font->ascent + boff; 2755 int font_ascent = FONT_BASE (font) + boff;
2605 int font_descent = font->descent - boff; 2756 int font_descent = FONT_DESCENT (font) - boff;
2606 /* Bounding box of the overall glyphs. */ 2757 /* Bounding box of the overall glyphs. */
2607 int leftmost, rightmost, lowest, highest; 2758 int leftmost, rightmost, lowest, highest;
2608 int i, width, ascent, descent; 2759 int i, width, ascent, descent;
@@ -2620,8 +2771,8 @@ x_produce_glyphs (it)
2620 else 2771 else
2621 { 2772 {
2622 width = FONT_WIDTH (font); 2773 width = FONT_WIDTH (font);
2623 ascent = font->ascent; 2774 ascent = FONT_BASE (font);
2624 descent = font->descent; 2775 descent = FONT_DESCENT (font);
2625 } 2776 }
2626 2777
2627 rightmost = width; 2778 rightmost = width;
@@ -2648,7 +2799,7 @@ x_produce_glyphs (it)
2648 int left, right, btm, top; 2799 int left, right, btm, top;
2649 int ch = COMPOSITION_GLYPH (cmp, i); 2800 int ch = COMPOSITION_GLYPH (cmp, i);
2650 int face_id = FACE_FOR_CHAR (it->f, face, ch); 2801 int face_id = FACE_FOR_CHAR (it->f, face, ch);
2651 2802
2652 face = FACE_FROM_ID (it->f, face_id); 2803 face = FACE_FROM_ID (it->f, face_id);
2653 x_get_char_face_and_encoding (it->f, ch, face->id, &char2b, 2804 x_get_char_face_and_encoding (it->f, ch, face->id, &char2b,
2654 it->multibyte_p); 2805 it->multibyte_p);
@@ -2678,8 +2829,8 @@ x_produce_glyphs (it)
2678 else 2829 else
2679 { 2830 {
2680 width = FONT_WIDTH (font); 2831 width = FONT_WIDTH (font);
2681 ascent = font->ascent; 2832 ascent = 1;
2682 descent = font->descent; 2833 descent = 0;
2683 } 2834 }
2684 2835
2685 if (cmp->method != COMPOSITION_WITH_RULE_ALTCHARS) 2836 if (cmp->method != COMPOSITION_WITH_RULE_ALTCHARS)
@@ -2781,8 +2932,14 @@ x_produce_glyphs (it)
2781 if (face->box != FACE_NO_BOX) 2932 if (face->box != FACE_NO_BOX)
2782 { 2933 {
2783 int thick = face->box_line_width; 2934 int thick = face->box_line_width;
2784 it->ascent += thick; 2935
2785 it->descent += thick; 2936 if (thick > 0)
2937 {
2938 it->ascent += thick;
2939 it->descent += thick;
2940 }
2941 else
2942 thick = - thick;
2786 2943
2787 if (it->start_of_box_run_p) 2944 if (it->start_of_box_run_p)
2788 it->pixel_width += thick; 2945 it->pixel_width += thick;
@@ -2810,9 +2967,9 @@ x_produce_glyphs (it)
2810 xassert (it->ascent >= 0 && it->descent >= 0); 2967 xassert (it->ascent >= 0 && it->descent >= 0);
2811 if (it->area == TEXT_AREA) 2968 if (it->area == TEXT_AREA)
2812 it->current_x += it->pixel_width; 2969 it->current_x += it->pixel_width;
2813 2970
2814 it->descent += it->extra_line_spacing; 2971 it->descent += it->extra_line_spacing;
2815 2972
2816 it->max_ascent = max (it->max_ascent, it->ascent); 2973 it->max_ascent = max (it->max_ascent, it->ascent);
2817 it->max_descent = max (it->max_descent, it->descent); 2974 it->max_descent = max (it->max_descent, it->descent);
2818 it->max_phys_ascent = max (it->max_phys_ascent, it->phys_ascent); 2975 it->max_phys_ascent = max (it->max_phys_ascent, it->phys_ascent);
@@ -2828,7 +2985,7 @@ x_estimate_mode_line_height (f, face_id)
2828 struct frame *f; 2985 struct frame *f;
2829 enum face_id face_id; 2986 enum face_id face_id;
2830{ 2987{
2831 int height = 1; 2988 int height = FONT_HEIGHT (FRAME_FONT (f));
2832 2989
2833 /* This function is called so early when Emacs starts that the face 2990 /* This function is called so early when Emacs starts that the face
2834 cache and mode line face are not yet initialized. */ 2991 cache and mode line face are not yet initialized. */
@@ -2836,7 +2993,12 @@ x_estimate_mode_line_height (f, face_id)
2836 { 2993 {
2837 struct face *face = FACE_FROM_ID (f, face_id); 2994 struct face *face = FACE_FROM_ID (f, face_id);
2838 if (face) 2995 if (face)
2839 height = FONT_HEIGHT (face->font) + 2 * face->box_line_width; 2996 {
2997 if (face->font)
2998 height = FONT_HEIGHT (face->font);
2999 if (face->box_line_width > 0)
3000 height += 2 * face->box_line_width;
3001 }
2840 } 3002 }
2841 3003
2842 return height; 3004 return height;
@@ -3012,7 +3174,7 @@ static void x_init_glyph_string P_ ((struct glyph_string *,
3012 enum draw_glyphs_face)); 3174 enum draw_glyphs_face));
3013static int x_draw_glyphs P_ ((struct window *, int , struct glyph_row *, 3175static int x_draw_glyphs P_ ((struct window *, int , struct glyph_row *,
3014 enum glyph_row_area, int, int, 3176 enum glyph_row_area, int, int,
3015 enum draw_glyphs_face, int *, int *, int)); 3177 enum draw_glyphs_face, int));
3016static void x_set_glyph_string_clipping P_ ((struct glyph_string *)); 3178static void x_set_glyph_string_clipping P_ ((struct glyph_string *));
3017static void x_set_glyph_string_gc P_ ((struct glyph_string *)); 3179static void x_set_glyph_string_gc P_ ((struct glyph_string *));
3018static void x_draw_glyph_string_background P_ ((struct glyph_string *, 3180static void x_draw_glyph_string_background P_ ((struct glyph_string *,
@@ -3028,8 +3190,8 @@ static void x_set_mouse_face_gc P_ ((struct glyph_string *));
3028static void x_get_glyph_overhangs P_ ((struct glyph *, struct frame *, 3190static void x_get_glyph_overhangs P_ ((struct glyph *, struct frame *,
3029 int *, int *)); 3191 int *, int *));
3030static void x_compute_overhangs_and_x P_ ((struct glyph_string *, int, int)); 3192static void x_compute_overhangs_and_x P_ ((struct glyph_string *, int, int));
3031static int x_alloc_lighter_color P_ ((struct frame *, Display *, Colormap, 3193/*static int x_alloc_lighter_color P_ ((struct frame *, Display *, Colormap,
3032 unsigned long *, double, int)); 3194 unsigned long *, double, int));*/
3033static void x_setup_relief_color P_ ((struct frame *, struct relief *, 3195static void x_setup_relief_color P_ ((struct frame *, struct relief *,
3034 double, int, unsigned long)); 3196 double, int, unsigned long));
3035static void x_setup_relief_colors P_ ((struct glyph_string *)); 3197static void x_setup_relief_colors P_ ((struct glyph_string *));
@@ -3041,9 +3203,9 @@ static void x_fill_image_glyph_string P_ ((struct glyph_string *));
3041static void x_clear_glyph_string_rect P_ ((struct glyph_string *, int, 3203static void x_clear_glyph_string_rect P_ ((struct glyph_string *, int,
3042 int, int, int)); 3204 int, int, int));
3043static void x_draw_relief_rect P_ ((struct frame *, int, int, int, int, 3205static void x_draw_relief_rect P_ ((struct frame *, int, int, int, int,
3044 int, int, int, int, XRectangle *)); 3206 int, int, int, int, Rect *));
3045static void x_draw_box_rect P_ ((struct glyph_string *, int, int, int, int, 3207static void x_draw_box_rect P_ ((struct glyph_string *, int, int, int, int,
3046 int, int, int, XRectangle *)); 3208 int, int, int, Rect *));
3047static void x_fix_overlapping_area P_ ((struct window *, struct glyph_row *, 3209static void x_fix_overlapping_area P_ ((struct window *, struct glyph_row *,
3048 enum glyph_row_area)); 3210 enum glyph_row_area));
3049static int x_fill_stretch_glyph_string P_ ((struct glyph_string *, 3211static int x_fill_stretch_glyph_string P_ ((struct glyph_string *,
@@ -3054,7 +3216,7 @@ static int x_fill_stretch_glyph_string P_ ((struct glyph_string *,
3054static void x_check_font P_ ((struct frame *, XFontStruct *)); 3216static void x_check_font P_ ((struct frame *, XFontStruct *));
3055#endif 3217#endif
3056 3218
3057 3219
3058/* Append the list of glyph strings with head H and tail T to the list 3220/* Append the list of glyph strings with head H and tail T to the list
3059 with head *HEAD and tail *TAIL. Set *HEAD and *TAIL to the result. */ 3221 with head *HEAD and tail *TAIL. Set *HEAD and *TAIL to the result. */
3060 3222
@@ -3171,9 +3333,12 @@ x_set_mouse_face_gc (s)
3171 int face_id; 3333 int face_id;
3172 struct face *face; 3334 struct face *face;
3173 3335
3174 /* What face has to be used for the mouse face? */ 3336 /* What face has to be used last for the mouse face? */
3175 face_id = FRAME_X_DISPLAY_INFO (s->f)->mouse_face_face_id; 3337 face_id = FRAME_X_DISPLAY_INFO (s->f)->mouse_face_face_id;
3176 face = FACE_FROM_ID (s->f, face_id); 3338 face = FACE_FROM_ID (s->f, face_id);
3339 if (face == NULL)
3340 face = FACE_FROM_ID (s->f, MOUSE_FACE_ID);
3341
3177 if (s->first_glyph->type == CHAR_GLYPH) 3342 if (s->first_glyph->type == CHAR_GLYPH)
3178 face_id = FACE_FOR_CHAR (s->f, face, s->first_glyph->u.ch); 3343 face_id = FACE_FOR_CHAR (s->f, face, s->first_glyph->u.ch);
3179 else 3344 else
@@ -3311,20 +3476,6 @@ x_get_glyph_string_clip_rect (s, r)
3311 r_height = s->row->visible_height; 3476 r_height = s->row->visible_height;
3312 } 3477 }
3313 3478
3314 /* Don't use S->y for clipping because it doesn't take partially
3315 visible lines into account. For example, it can be negative for
3316 partially visible lines at the top of a window. */
3317 if (!s->row->full_width_p
3318 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row))
3319 r->top = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w);
3320 else
3321 r->top = max (0, s->row->y);
3322
3323 /* If drawing a tool-bar window, draw it over the internal border
3324 at the top of the window. */
3325 if (s->w == XWINDOW (s->f->tool_bar_window))
3326 r->top -= s->f->output_data.mac->internal_border_width;
3327
3328 /* If S draws overlapping rows, it's sufficient to use the top and 3479 /* If S draws overlapping rows, it's sufficient to use the top and
3329 bottom of the window for clipping because this glyph string 3480 bottom of the window for clipping because this glyph string
3330 intentionally draws over other lines. */ 3481 intentionally draws over other lines. */
@@ -3333,7 +3484,23 @@ x_get_glyph_string_clip_rect (s, r)
3333 r->top = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w); 3484 r->top = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w);
3334 r_height = window_text_bottom_y (s->w) - r->top; 3485 r_height = window_text_bottom_y (s->w) - r->top;
3335 } 3486 }
3336 3487 else
3488 {
3489 /* Don't use S->y for clipping because it doesn't take partially
3490 visible lines into account. For example, it can be negative for
3491 partially visible lines at the top of a window. */
3492 if (!s->row->full_width_p
3493 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row))
3494 r->top = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w);
3495 else
3496 r->top = max (0, s->row->y);
3497
3498 /* If drawing a tool-bar window, draw it over the internal border
3499 at the top of the window. */
3500 if (s->w == XWINDOW (s->f->tool_bar_window))
3501 r->top -= s->f->output_data.mac->internal_border_width;
3502 }
3503
3337 r->top = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->top); 3504 r->top = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->top);
3338 3505
3339 r->bottom = r->top + r_height; 3506 r->bottom = r->top + r_height;
@@ -3581,28 +3748,30 @@ x_draw_glyph_string_background (s, force_p)
3581 shouldn't be drawn in the first place. */ 3748 shouldn't be drawn in the first place. */
3582 if (!s->background_filled_p) 3749 if (!s->background_filled_p)
3583 { 3750 {
3751 int box_line_width = max (s->face->box_line_width, 0);
3752
3584#if 0 /* MAC_TODO: stipple */ 3753#if 0 /* MAC_TODO: stipple */
3585 if (s->stippled_p) 3754 if (s->stippled_p)
3586 { 3755 {
3587 /* Fill background with a stipple pattern. */ 3756 /* Fill background with a stipple pattern. */
3588 XSetFillStyle (s->display, s->gc, FillOpaqueStippled); 3757 XSetFillStyle (s->display, s->gc, FillOpaqueStippled);
3589 XFillRectangle (s->display, s->window, s->gc, s->x, 3758 XFillRectangle (s->display, s->window, s->gc, s->x,
3590 s->y + s->face->box_line_width, 3759 s->y + box_line_width,
3591 s->background_width, 3760 s->background_width,
3592 s->height - 2 * s->face->box_line_width); 3761 s->height - 2 * box_line_width);
3593 XSetFillStyle (s->display, s->gc, FillSolid); 3762 XSetFillStyle (s->display, s->gc, FillSolid);
3594 s->background_filled_p = 1; 3763 s->background_filled_p = 1;
3595 } 3764 }
3596 else 3765 else
3597#endif 3766#endif
3598 if (FONT_HEIGHT (s->font) < s->height - 2 * s->face->box_line_width 3767 if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
3599 || s->font_not_found_p 3768 || s->font_not_found_p
3600 || s->extends_to_end_of_line_p 3769 || s->extends_to_end_of_line_p
3601 || force_p) 3770 || force_p)
3602 { 3771 {
3603 x_clear_glyph_string_rect (s, s->x, s->y + s->face->box_line_width, 3772 x_clear_glyph_string_rect (s, s->x, s->y + box_line_width,
3604 s->background_width, 3773 s->background_width,
3605 s->height - 2 * s->face->box_line_width); 3774 s->height - 2 * box_line_width);
3606 s->background_filled_p = 1; 3775 s->background_filled_p = 1;
3607 } 3776 }
3608 } 3777 }
@@ -3621,7 +3790,7 @@ x_draw_glyph_string_foreground (s)
3621 of S to the right of that box line. */ 3790 of S to the right of that box line. */
3622 if (s->face->box != FACE_NO_BOX 3791 if (s->face->box != FACE_NO_BOX
3623 && s->first_glyph->left_box_line_p) 3792 && s->first_glyph->left_box_line_p)
3624 x = s->x + s->face->box_line_width; 3793 x = s->x + abs (s->face->box_line_width);
3625 else 3794 else
3626 x = s->x; 3795 x = s->x;
3627 3796
@@ -3691,7 +3860,7 @@ x_draw_composite_glyph_string_foreground (s)
3691 of S to the right of that box line. */ 3860 of S to the right of that box line. */
3692 if (s->face->box != FACE_NO_BOX 3861 if (s->face->box != FACE_NO_BOX
3693 && s->first_glyph->left_box_line_p) 3862 && s->first_glyph->left_box_line_p)
3694 x = s->x + s->face->box_line_width; 3863 x = s->x + abs (s->face->box_line_width);
3695 else 3864 else
3696 x = s->x; 3865 x = s->x;
3697 3866
@@ -3776,7 +3945,7 @@ x_alloc_nearest_color_for_widget (widget, cmap, color)
3776 3945
3777#endif /* USE_X_TOOLKIT */ 3946#endif /* USE_X_TOOLKIT */
3778 3947
3779#if 0 3948#if 0 /* MAC_TODO */
3780 3949
3781/* Allocate the color COLOR->pixel on SCREEN of DISPLAY, colormap 3950/* Allocate the color COLOR->pixel on SCREEN of DISPLAY, colormap
3782 CMAP. If an exact match can't be allocated, try the nearest color 3951 CMAP. If an exact match can't be allocated, try the nearest color
@@ -3885,7 +4054,7 @@ x_copy_dpy_color (dpy, cmap, pixel)
3885 return color.pixel; 4054 return color.pixel;
3886} 4055}
3887 4056
3888#endif 4057#endif /* MAC_TODO */
3889 4058
3890/* Allocate a color which is lighter or darker than *COLOR by FACTOR 4059/* Allocate a color which is lighter or darker than *COLOR by FACTOR
3891 or DELTA. Try a color with RGB values multiplied by FACTOR first. 4060 or DELTA. Try a color with RGB values multiplied by FACTOR first.
@@ -4044,7 +4213,8 @@ x_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width,
4044 gc = f->output_data.mac->black_relief.gc; 4213 gc = f->output_data.mac->black_relief.gc;
4045 else 4214 else
4046 gc = f->output_data.mac->white_relief.gc; 4215 gc = f->output_data.mac->white_relief.gc;
4047 mac_set_clip_rectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), clip_rect); 4216 mac_set_clip_rectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
4217 clip_rect);
4048 4218
4049 /* Bottom. */ 4219 /* Bottom. */
4050 for (i = 0; i < width; ++i) 4220 for (i = 0; i < width; ++i)
@@ -4128,10 +4298,10 @@ x_draw_glyph_string_box (s)
4128 ? s->first_glyph 4298 ? s->first_glyph
4129 : s->first_glyph + s->nchars - 1); 4299 : s->first_glyph + s->nchars - 1);
4130 4300
4131 width = s->face->box_line_width; 4301 width = abs (s->face->box_line_width);
4132 raised_p = s->face->box == FACE_RAISED_BOX; 4302 raised_p = s->face->box == FACE_RAISED_BOX;
4133 left_x = s->x; 4303 left_x = s->x;
4134 right_x = ((s->row->full_width_p 4304 right_x = ((s->row->full_width_p && s->extends_to_end_of_line_p
4135 ? last_x - 1 4305 ? last_x - 1
4136 : min (last_x, s->x + s->background_width) - 1)); 4306 : min (last_x, s->x + s->background_width) - 1));
4137 top_y = s->y; 4307 top_y = s->y;
@@ -4173,7 +4343,7 @@ x_draw_image_foreground (s)
4173 right of that line. */ 4343 right of that line. */
4174 if (s->face->box != FACE_NO_BOX 4344 if (s->face->box != FACE_NO_BOX
4175 && s->first_glyph->left_box_line_p) 4345 && s->first_glyph->left_box_line_p)
4176 x = s->x + s->face->box_line_width; 4346 x = s->x + abs (s->face->box_line_width);
4177 else 4347 else
4178 x = s->x; 4348 x = s->x;
4179 4349
@@ -4213,7 +4383,7 @@ x_draw_image_foreground (s)
4213 r.x - x, r.y - y, r.width, r.height, r.x, r.y); 4383 r.x - x, r.y - y, r.width, r.height, r.x, r.y);
4214 } 4384 }
4215 else 4385 else
4216#endif 4386#endif /* MAC_TODO */
4217 { 4387 {
4218 mac_copy_area (s->display, s->img->pixmap, s->window, s->gc, 4388 mac_copy_area (s->display, s->img->pixmap, s->window, s->gc,
4219 0, 0, s->img->width, s->img->height, x, y); 4389 0, 0, s->img->width, s->img->height, x, y);
@@ -4236,6 +4406,7 @@ x_draw_image_foreground (s)
4236} 4406}
4237 4407
4238 4408
4409
4239/* Draw a relief around the image glyph string S. */ 4410/* Draw a relief around the image glyph string S. */
4240 4411
4241static void 4412static void
@@ -4246,12 +4417,12 @@ x_draw_image_relief (s)
4246 Rect r; 4417 Rect r;
4247 int x; 4418 int x;
4248 int y = s->ybase - image_ascent (s->img, s->face); 4419 int y = s->ybase - image_ascent (s->img, s->face);
4249 4420
4250 /* If first glyph of S has a left box line, start drawing it to the 4421 /* If first glyph of S has a left box line, start drawing it to the
4251 right of that line. */ 4422 right of that line. */
4252 if (s->face->box != FACE_NO_BOX 4423 if (s->face->box != FACE_NO_BOX
4253 && s->first_glyph->left_box_line_p) 4424 && s->first_glyph->left_box_line_p)
4254 x = s->x + s->face->box_line_width; 4425 x = s->x + abs (s->face->box_line_width);
4255 else 4426 else
4256 x = s->x; 4427 x = s->x;
4257 4428
@@ -4263,7 +4434,7 @@ x_draw_image_relief (s)
4263 if (s->hl == DRAW_IMAGE_SUNKEN 4434 if (s->hl == DRAW_IMAGE_SUNKEN
4264 || s->hl == DRAW_IMAGE_RAISED) 4435 || s->hl == DRAW_IMAGE_RAISED)
4265 { 4436 {
4266 thick = tool_bar_button_relief > 0 ? tool_bar_button_relief : 3; 4437 thick = tool_bar_button_relief >= 0 ? tool_bar_button_relief : DEFAULT_TOOL_BAR_BUTTON_RELIEF;
4267 raised_p = s->hl == DRAW_IMAGE_RAISED; 4438 raised_p = s->hl == DRAW_IMAGE_RAISED;
4268 } 4439 }
4269 else 4440 else
@@ -4297,7 +4468,7 @@ x_draw_image_foreground_1 (s, pixmap)
4297 right of that line. */ 4468 right of that line. */
4298 if (s->face->box != FACE_NO_BOX 4469 if (s->face->box != FACE_NO_BOX
4299 && s->first_glyph->left_box_line_p) 4470 && s->first_glyph->left_box_line_p)
4300 x = s->face->box_line_width; 4471 x = abs (s->face->box_line_width);
4301 else 4472 else
4302 x = 0; 4473 x = 0;
4303 4474
@@ -4331,7 +4502,7 @@ x_draw_image_foreground_1 (s, pixmap)
4331 XSetClipMask (s->display, s->gc, None); 4502 XSetClipMask (s->display, s->gc, None);
4332 } 4503 }
4333 else 4504 else
4334#endif 4505#endif /* MAC_TODO */
4335 { 4506 {
4336 mac_copy_area_to_pixmap (s->display, s->img->pixmap, pixmap, s->gc, 4507 mac_copy_area_to_pixmap (s->display, s->img->pixmap, pixmap, s->gc,
4337 0, 0, s->img->width, s->img->height, x, y); 4508 0, 0, s->img->width, s->img->height, x, y);
@@ -4371,7 +4542,7 @@ x_draw_glyph_string_bg_rect (s, x, y, w, h)
4371 XSetFillStyle (s->display, s->gc, FillSolid); 4542 XSetFillStyle (s->display, s->gc, FillSolid);
4372 } 4543 }
4373 else 4544 else
4374#endif 4545#endif /* MAC_TODO */
4375 x_clear_glyph_string_rect (s, x, y, w, h); 4546 x_clear_glyph_string_rect (s, x, y, w, h);
4376} 4547}
4377 4548
@@ -4395,38 +4566,38 @@ x_draw_image_glyph_string (s)
4395 struct glyph_string *s; 4566 struct glyph_string *s;
4396{ 4567{
4397 int x, y; 4568 int x, y;
4398 int box_line_width = s->face->box_line_width; 4569 int box_line_hwidth = abs (s->face->box_line_width);
4570 int box_line_vwidth = max (s->face->box_line_width, 0);
4399 int height; 4571 int height;
4400 Pixmap pixmap = 0; 4572 Pixmap pixmap = 0;
4401 4573
4402 height = s->height - 2 * box_line_width; 4574 height = s->height - 2 * box_line_vwidth;
4403 4575
4404 /* Fill background with face under the image. Do it only if row is 4576 /* Fill background with face under the image. Do it only if row is
4405 taller than image or if image has a clip mask to reduce 4577 taller than image or if image has a clip mask to reduce
4406 flickering. */ 4578 flickering. */
4407 s->stippled_p = s->face->stipple != 0; 4579 s->stippled_p = s->face->stipple != 0;
4408 if (height > s->img->height 4580 if (height > s->img->height
4409 || s->img->vmargin
4410 || s->img->hmargin 4581 || s->img->hmargin
4411#if 0 /* MAC_TODO: image mask */ 4582 || s->img->vmargin
4583#if 0 /* TODO: image mask */
4412 || s->img->mask 4584 || s->img->mask
4413#endif 4585#endif
4414 || s->img->pixmap == 0 4586 || s->img->pixmap == 0
4415 || s->width != s->background_width) 4587 || s->width != s->background_width)
4416 { 4588 {
4417 if (box_line_width && s->first_glyph->left_box_line_p) 4589 if (box_line_hwidth && s->first_glyph->left_box_line_p)
4418 x = s->x + box_line_width; 4590 x = s->x + box_line_hwidth;
4419 else 4591 else
4420 x = s->x; 4592 x = s->x;
4421 4593
4422 y = s->y + box_line_width; 4594 y = s->y + box_line_vwidth;
4423 4595#if 0 /* TODO: image mask */
4424#if 0 /* MAC_TODO: image mask */
4425 if (s->img->mask) 4596 if (s->img->mask)
4426 { 4597 {
4427 /* Create a pixmap as large as the glyph string Fill it with 4598 /* Create a pixmap as large as the glyph string. Fill it
4428 the background color. Copy the image to it, using its 4599 with the background color. Copy the image to it, using
4429 mask. Copy the temporary pixmap to the display. */ 4600 its mask. Copy the temporary pixmap to the display. */
4430 Screen *screen = FRAME_X_SCREEN (s->f); 4601 Screen *screen = FRAME_X_SCREEN (s->f);
4431 int depth = DefaultDepthOfScreen (screen); 4602 int depth = DefaultDepthOfScreen (screen);
4432 4603
@@ -4461,10 +4632,6 @@ x_draw_image_glyph_string (s)
4461 } 4632 }
4462 else 4633 else
4463#endif 4634#endif
4464 /* Implementation idea: Is it possible to construct a mask?
4465 We could look at the color at the margins of the image, and
4466 say that this color is probably the background color of the
4467 image. */
4468 x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height); 4635 x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height);
4469 4636
4470 s->background_filled_p = 1; 4637 s->background_filled_p = 1;
@@ -4477,6 +4644,7 @@ x_draw_image_glyph_string (s)
4477 x_set_glyph_string_clipping (s); 4644 x_set_glyph_string_clipping (s);
4478 mac_copy_area (s->display, pixmap, s->window, s->gc, 4645 mac_copy_area (s->display, pixmap, s->window, s->gc,
4479 0, 0, s->background_width, s->height, s->x, s->y); 4646 0, 0, s->background_width, s->height, s->x, s->y);
4647 mac_reset_clipping (s->display, s->window);
4480 XFreePixmap (s->display, pixmap); 4648 XFreePixmap (s->display, pixmap);
4481 } 4649 }
4482 else 4650 else
@@ -4517,6 +4685,15 @@ x_draw_stretch_glyph_string (s)
4517 int w = s->background_width - width, h = s->height; 4685 int w = s->background_width - width, h = s->height;
4518 Rect r; 4686 Rect r;
4519 4687
4688 if (s->row->mouse_face_p
4689 && cursor_in_mouse_face_p (s->w))
4690 {
4691 x_set_mouse_face_gc (s);
4692 gc = s->gc;
4693 }
4694 else
4695 gc = s->face->gc;
4696
4520 x_get_glyph_string_clip_rect (s, &r); 4697 x_get_glyph_string_clip_rect (s, &r);
4521 mac_set_clip_rectangle (s->display, s->window, &r); 4698 mac_set_clip_rectangle (s->display, s->window, &r);
4522 4699
@@ -4529,7 +4706,7 @@ x_draw_stretch_glyph_string (s)
4529 XSetFillStyle (s->display, gc, FillSolid); 4706 XSetFillStyle (s->display, gc, FillSolid);
4530 } 4707 }
4531 else 4708 else
4532#endif 4709#endif /* MAC_TODO */
4533 { 4710 {
4534 XGCValues xgcv; 4711 XGCValues xgcv;
4535 XGetGCValues (s->display, gc, GCForeground | GCBackground, &xgcv); 4712 XGetGCValues (s->display, gc, GCForeground | GCBackground, &xgcv);
@@ -4537,9 +4714,11 @@ x_draw_stretch_glyph_string (s)
4537 XFillRectangle (s->display, s->window, gc, x, y, w, h); 4714 XFillRectangle (s->display, s->window, gc, x, y, w, h);
4538 XSetForeground (s->display, gc, xgcv.foreground); 4715 XSetForeground (s->display, gc, xgcv.foreground);
4539 } 4716 }
4717
4718 mac_reset_clipping (s->display, s->window);
4540 } 4719 }
4541 } 4720 }
4542 else 4721 else if (!s->background_filled_p)
4543 x_draw_glyph_string_bg_rect (s, s->x, s->y, s->background_width, 4722 x_draw_glyph_string_bg_rect (s, s->x, s->y, s->background_width,
4544 s->height); 4723 s->height);
4545 4724
@@ -4553,6 +4732,8 @@ static void
4553x_draw_glyph_string (s) 4732x_draw_glyph_string (s)
4554 struct glyph_string *s; 4733 struct glyph_string *s;
4555{ 4734{
4735 int relief_drawn_p = 0;
4736
4556 /* If S draws into the background of its successor, draw the 4737 /* If S draws into the background of its successor, draw the
4557 background of the successor first so that S can draw into it. 4738 background of the successor first so that S can draw into it.
4558 This makes S->next use XDrawString instead of XDrawImageString. */ 4739 This makes S->next use XDrawString instead of XDrawImageString. */
@@ -4562,11 +4743,28 @@ x_draw_glyph_string (s)
4562 x_set_glyph_string_gc (s->next); 4743 x_set_glyph_string_gc (s->next);
4563 x_set_glyph_string_clipping (s->next); 4744 x_set_glyph_string_clipping (s->next);
4564 x_draw_glyph_string_background (s->next, 1); 4745 x_draw_glyph_string_background (s->next, 1);
4746
4565 } 4747 }
4566 4748
4567 /* Set up S->gc, set clipping and draw S. */ 4749 /* Set up S->gc, set clipping and draw S. */
4568 x_set_glyph_string_gc (s); 4750 x_set_glyph_string_gc (s);
4569 x_set_glyph_string_clipping (s); 4751
4752 /* Draw relief (if any) in advance for char/composition so that the
4753 glyph string can be drawn over it. */
4754 if (!s->for_overlaps_p
4755 && s->face->box != FACE_NO_BOX
4756 && (s->first_glyph->type == CHAR_GLYPH
4757 || s->first_glyph->type == COMPOSITE_GLYPH))
4758
4759 {
4760 x_set_glyph_string_clipping (s);
4761 x_draw_glyph_string_background (s, 1);
4762 x_draw_glyph_string_box (s);
4763 x_set_glyph_string_clipping (s);
4764 relief_drawn_p = 1;
4765 }
4766 else
4767 x_set_glyph_string_clipping (s);
4570 4768
4571 switch (s->first_glyph->type) 4769 switch (s->first_glyph->type)
4572 { 4770 {
@@ -4582,7 +4780,7 @@ x_draw_glyph_string (s)
4582 if (s->for_overlaps_p) 4780 if (s->for_overlaps_p)
4583 s->background_filled_p = 1; 4781 s->background_filled_p = 1;
4584 else 4782 else
4585 x_draw_glyph_string_background (s, 0); 4783 x_draw_glyph_string_background (s, 0);
4586 x_draw_glyph_string_foreground (s); 4784 x_draw_glyph_string_foreground (s);
4587 break; 4785 break;
4588 4786
@@ -4660,10 +4858,10 @@ x_draw_glyph_string (s)
4660 } 4858 }
4661 4859
4662 /* Draw relief. */ 4860 /* Draw relief. */
4663 if (s->face->box != FACE_NO_BOX) 4861 if (!relief_drawn_p && s->face->box != FACE_NO_BOX)
4664 x_draw_glyph_string_box (s); 4862 x_draw_glyph_string_box (s);
4665 } 4863 }
4666 4864
4667 /* Reset clipping. */ 4865 /* Reset clipping. */
4668 mac_reset_clipping (s->display, s->window); 4866 mac_reset_clipping (s->display, s->window);
4669} 4867}
@@ -4693,7 +4891,7 @@ x_fill_composite_glyph_string (s, faces, overlaps_p)
4693 xassert (s); 4891 xassert (s);
4694 4892
4695 s->for_overlaps_p = overlaps_p; 4893 s->for_overlaps_p = overlaps_p;
4696 4894
4697 s->face = faces[s->gidx]; 4895 s->face = faces[s->gidx];
4698 s->font = s->face->font; 4896 s->font = s->face->font;
4699 s->font_info = FONT_INFO_FROM_ID (s->f, s->face->font_info_id); 4897 s->font_info = FONT_INFO_FROM_ID (s->f, s->face->font_info_id);
@@ -4750,16 +4948,16 @@ x_fill_glyph_string (s, face_id, start, end, overlaps_p)
4750 struct glyph *glyph, *last; 4948 struct glyph *glyph, *last;
4751 int voffset; 4949 int voffset;
4752 int glyph_not_available_p; 4950 int glyph_not_available_p;
4753 4951
4754 xassert (s->f == XFRAME (s->w->frame)); 4952 xassert (s->f == XFRAME (s->w->frame));
4755 xassert (s->nchars == 0); 4953 xassert (s->nchars == 0);
4756 xassert (start >= 0 && end > start); 4954 xassert (start >= 0 && end > start);
4757 4955
4758 s->for_overlaps_p = overlaps_p, 4956 s->for_overlaps_p = overlaps_p;
4759 glyph = s->row->glyphs[s->area] + start; 4957 glyph = s->row->glyphs[s->area] + start;
4760 last = s->row->glyphs[s->area] + end; 4958 last = s->row->glyphs[s->area] + end;
4761 voffset = glyph->voffset; 4959 voffset = glyph->voffset;
4762 4960
4763 glyph_not_available_p = glyph->glyph_not_available_p; 4961 glyph_not_available_p = glyph->glyph_not_available_p;
4764 4962
4765 while (glyph < last 4963 while (glyph < last
@@ -4767,13 +4965,13 @@ x_fill_glyph_string (s, face_id, start, end, overlaps_p)
4767 && glyph->voffset == voffset 4965 && glyph->voffset == voffset
4768 /* Same face id implies same font, nowadays. */ 4966 /* Same face id implies same font, nowadays. */
4769 && glyph->face_id == face_id 4967 && glyph->face_id == face_id
4770 && glyph->glyph_not_available_p == glyph_not_available_p) 4968 && glyph->glyph_not_available_p == glyph_not_available_p)
4771 { 4969 {
4772 int two_byte_p; 4970 int two_byte_p;
4773 4971
4774 s->face = x_get_glyph_face_and_encoding (s->f, glyph, 4972 s->face = x_get_glyph_face_and_encoding (s->f, glyph,
4775 s->char2b + s->nchars, 4973 s->char2b + s->nchars,
4776 &two_byte_p); 4974 &two_byte_p);
4777 s->two_byte_p = two_byte_p; 4975 s->two_byte_p = two_byte_p;
4778 ++s->nchars; 4976 ++s->nchars;
4779 xassert (s->nchars <= end - start); 4977 xassert (s->nchars <= end - start);
@@ -4796,7 +4994,7 @@ x_fill_glyph_string (s, face_id, start, end, overlaps_p)
4796 4994
4797 /* Adjust base line for subscript/superscript text. */ 4995 /* Adjust base line for subscript/superscript text. */
4798 s->ybase += voffset; 4996 s->ybase += voffset;
4799 4997
4800 xassert (s->face && s->face->gc); 4998 xassert (s->face && s->face->gc);
4801 return glyph - s->row->glyphs[s->area]; 4999 return glyph - s->row->glyphs[s->area];
4802} 5000}
@@ -4860,7 +5058,7 @@ x_fill_stretch_glyph_string (s, row, area, start, end)
4860 /* Adjust base line for subscript/superscript text. */ 5058 /* Adjust base line for subscript/superscript text. */
4861 s->ybase += voffset; 5059 s->ybase += voffset;
4862 5060
4863 xassert (s->face && s->face->gc); 5061 xassert (s->face);
4864 return glyph - s->row->glyphs[s->area]; 5062 return glyph - s->row->glyphs[s->area];
4865} 5063}
4866 5064
@@ -4919,10 +5117,15 @@ x_set_glyph_string_background_width (s, start, last_x)
4919 struct face *default_face = FACE_FROM_ID (s->f, DEFAULT_FACE_ID); 5117 struct face *default_face = FACE_FROM_ID (s->f, DEFAULT_FACE_ID);
4920 5118
4921 if (start == s->row->used[s->area] 5119 if (start == s->row->used[s->area]
4922 && s->hl == DRAW_NORMAL_TEXT 5120 && s->area == TEXT_AREA
4923 && ((s->area == TEXT_AREA && s->row->fill_line_p) 5121 && ((s->hl == DRAW_NORMAL_TEXT
4924 || s->face->background != default_face->background 5122 && (s->row->fill_line_p
4925 || s->face->stipple != default_face->stipple)) 5123 || s->face->background != default_face->background
5124 || s->face->stipple != default_face->stipple
5125 || s->row->mouse_face_p))
5126 || s->hl == DRAW_MOUSE_FACE
5127 || ((s->hl == DRAW_IMAGE_RAISED || s->hl == DRAW_IMAGE_SUNKEN)
5128 && s->row->fill_line_p)))
4926 s->extends_to_end_of_line_p = 1; 5129 s->extends_to_end_of_line_p = 1;
4927 5130
4928 /* If S extends its face to the end of the line, set its 5131 /* If S extends its face to the end of the line, set its
@@ -5126,27 +5329,19 @@ x_set_glyph_string_background_width (s, start, last_x)
5126 DRAW_IMAGE_SUNKEN draw an image with a sunken relief around it 5329 DRAW_IMAGE_SUNKEN draw an image with a sunken relief around it
5127 DRAW_IMAGE_RAISED draw an image with a raised relief around it 5330 DRAW_IMAGE_RAISED draw an image with a raised relief around it
5128 5331
5129 If REAL_START is non-null, return in *REAL_START the real starting
5130 position for display. This can be different from START in case
5131 overlapping glyphs must be displayed. If REAL_END is non-null,
5132 return in *REAL_END the real end position for display. This can be
5133 different from END in case overlapping glyphs must be displayed.
5134
5135 If OVERLAPS_P is non-zero, draw only the foreground of characters 5332 If OVERLAPS_P is non-zero, draw only the foreground of characters
5136 and clip to the physical height of ROW. 5333 and clip to the physical height of ROW.
5137 5334
5138 Value is the x-position reached, relative to AREA of W. */ 5335 Value is the x-position reached, relative to AREA of W. */
5139 5336
5140static int 5337static int
5141x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end, 5338x_draw_glyphs (w, x, row, area, start, end, hl, overlaps_p)
5142 overlaps_p)
5143 struct window *w; 5339 struct window *w;
5144 int x; 5340 int x;
5145 struct glyph_row *row; 5341 struct glyph_row *row;
5146 enum glyph_row_area area; 5342 enum glyph_row_area area;
5147 int start, end; 5343 int start, end;
5148 enum draw_glyphs_face hl; 5344 enum draw_glyphs_face hl;
5149 int *real_start, *real_end;
5150 int overlaps_p; 5345 int overlaps_p;
5151{ 5346{
5152 struct glyph_string *head, *tail; 5347 struct glyph_string *head, *tail;
@@ -5156,12 +5351,9 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
5156 int i, j; 5351 int i, j;
5157 5352
5158 /* Let's rather be paranoid than getting a SEGV. */ 5353 /* Let's rather be paranoid than getting a SEGV. */
5159 start = max (0, start);
5160 end = min (end, row->used[area]); 5354 end = min (end, row->used[area]);
5161 if (real_start) 5355 start = max (0, start);
5162 *real_start = start; 5356 start = min (end, start);
5163 if (real_end)
5164 *real_end = end;
5165 5357
5166 /* Translate X to frame coordinates. Set last_x to the right 5358 /* Translate X to frame coordinates. Set last_x to the right
5167 end of the drawing area. */ 5359 end of the drawing area. */
@@ -5169,7 +5361,7 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
5169 { 5361 {
5170 /* X is relative to the left edge of W, without scroll bars 5362 /* X is relative to the left edge of W, without scroll bars
5171 or fringes. */ 5363 or fringes. */
5172 struct frame *f = XFRAME (w->frame); 5364 struct frame *f = XFRAME (WINDOW_FRAME (w));
5173 int window_left_x = WINDOW_LEFT_MARGIN (w) * CANON_X_UNIT (f); 5365 int window_left_x = WINDOW_LEFT_MARGIN (w) * CANON_X_UNIT (f);
5174 5366
5175 x += window_left_x; 5367 x += window_left_x;
@@ -5201,7 +5393,7 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
5201 the reason we use a separate variable `i'. */ 5393 the reason we use a separate variable `i'. */
5202 i = start; 5394 i = start;
5203 BUILD_GLYPH_STRINGS (w, row, area, i, end, head, tail, hl, x, last_x, 5395 BUILD_GLYPH_STRINGS (w, row, area, i, end, head, tail, hl, x, last_x,
5204 overlaps_p); 5396 overlaps_p);
5205 if (tail) 5397 if (tail)
5206 x_reached = tail->x + tail->background_width; 5398 x_reached = tail->x + tail->background_width;
5207 else 5399 else
@@ -5210,7 +5402,7 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
5210 /* If there are any glyphs with lbearing < 0 or rbearing > width in 5402 /* If there are any glyphs with lbearing < 0 or rbearing > width in
5211 the row, redraw some glyphs in front or following the glyph 5403 the row, redraw some glyphs in front or following the glyph
5212 strings built above. */ 5404 strings built above. */
5213 if (!overlaps_p && row->contains_overlapping_glyphs_p) 5405 if (head && !overlaps_p && row->contains_overlapping_glyphs_p)
5214 { 5406 {
5215 int dummy_x = 0; 5407 int dummy_x = 0;
5216 struct glyph_string *h, *t; 5408 struct glyph_string *h, *t;
@@ -5230,10 +5422,8 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
5230 j = i; 5422 j = i;
5231 BUILD_GLYPH_STRINGS (w, row, area, j, start, h, t, 5423 BUILD_GLYPH_STRINGS (w, row, area, j, start, h, t,
5232 DRAW_NORMAL_TEXT, dummy_x, last_x, 5424 DRAW_NORMAL_TEXT, dummy_x, last_x,
5233 overlaps_p); 5425 overlaps_p);
5234 start = i; 5426 start = i;
5235 if (real_start)
5236 *real_start = start;
5237 x_compute_overhangs_and_x (t, head->x, 1); 5427 x_compute_overhangs_and_x (t, head->x, 1);
5238 x_prepend_glyph_string_lists (&head, &tail, h, t); 5428 x_prepend_glyph_string_lists (&head, &tail, h, t);
5239 } 5429 }
@@ -5250,11 +5440,9 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
5250 { 5440 {
5251 BUILD_GLYPH_STRINGS (w, row, area, i, start, h, t, 5441 BUILD_GLYPH_STRINGS (w, row, area, i, start, h, t,
5252 DRAW_NORMAL_TEXT, dummy_x, last_x, 5442 DRAW_NORMAL_TEXT, dummy_x, last_x,
5253 overlaps_p); 5443 overlaps_p);
5254 for (s = h; s; s = s->next) 5444 for (s = h; s; s = s->next)
5255 s->background_filled_p = 1; 5445 s->background_filled_p = 1;
5256 if (real_start)
5257 *real_start = i;
5258 x_compute_overhangs_and_x (t, head->x, 1); 5446 x_compute_overhangs_and_x (t, head->x, 1);
5259 x_prepend_glyph_string_lists (&head, &tail, h, t); 5447 x_prepend_glyph_string_lists (&head, &tail, h, t);
5260 } 5448 }
@@ -5268,11 +5456,9 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
5268 { 5456 {
5269 BUILD_GLYPH_STRINGS (w, row, area, end, i, h, t, 5457 BUILD_GLYPH_STRINGS (w, row, area, end, i, h, t,
5270 DRAW_NORMAL_TEXT, x, last_x, 5458 DRAW_NORMAL_TEXT, x, last_x,
5271 overlaps_p); 5459 overlaps_p);
5272 x_compute_overhangs_and_x (h, tail->x + tail->width, 0); 5460 x_compute_overhangs_and_x (h, tail->x + tail->width, 0);
5273 x_append_glyph_string_lists (&head, &tail, h, t); 5461 x_append_glyph_string_lists (&head, &tail, h, t);
5274 if (real_end)
5275 *real_end = i;
5276 } 5462 }
5277 5463
5278 /* Append glyph strings for glyphs following the last glyph 5464 /* Append glyph strings for glyphs following the last glyph
@@ -5285,13 +5471,11 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
5285 { 5471 {
5286 BUILD_GLYPH_STRINGS (w, row, area, end, i, h, t, 5472 BUILD_GLYPH_STRINGS (w, row, area, end, i, h, t,
5287 DRAW_NORMAL_TEXT, x, last_x, 5473 DRAW_NORMAL_TEXT, x, last_x,
5288 overlaps_p); 5474 overlaps_p);
5289 for (s = h; s; s = s->next) 5475 for (s = h; s; s = s->next)
5290 s->background_filled_p = 1; 5476 s->background_filled_p = 1;
5291 x_compute_overhangs_and_x (h, tail->x + tail->width, 0); 5477 x_compute_overhangs_and_x (h, tail->x + tail->width, 0);
5292 x_append_glyph_string_lists (&head, &tail, h, t); 5478 x_append_glyph_string_lists (&head, &tail, h, t);
5293 if (real_end)
5294 *real_end = i;
5295 } 5479 }
5296 } 5480 }
5297 5481
@@ -5299,6 +5483,30 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
5299 for (s = head; s; s = s->next) 5483 for (s = head; s; s = s->next)
5300 x_draw_glyph_string (s); 5484 x_draw_glyph_string (s);
5301 5485
5486 if (area == TEXT_AREA
5487 && !row->full_width_p
5488 /* When drawing overlapping rows, only the glyph strings'
5489 foreground is drawn, which doesn't erase a cursor
5490 completely. */
5491 && !overlaps_p)
5492 {
5493 int x0 = head ? head->x : x;
5494 int x1 = tail ? tail->x + tail->background_width : x;
5495
5496 x0 = FRAME_TO_WINDOW_PIXEL_X (w, x0);
5497 x1 = FRAME_TO_WINDOW_PIXEL_X (w, x1);
5498
5499 if (!row->full_width_p && XFASTINT (w->left_margin_width) != 0)
5500 {
5501 int left_area_width = window_box_width (w, LEFT_MARGIN_AREA);
5502 x0 -= left_area_width;
5503 x1 -= left_area_width;
5504 }
5505
5506 notice_overwritten_cursor (w, area, x0, x1,
5507 row->y, MATRIX_ROW_BOTTOM_Y (row));
5508 }
5509
5302 /* Value is the x-position up to which drawn, relative to AREA of W. 5510 /* Value is the x-position up to which drawn, relative to AREA of W.
5303 This doesn't include parts drawn because of overhangs. */ 5511 This doesn't include parts drawn because of overhangs. */
5304 x_reached = FRAME_TO_WINDOW_PIXEL_X (w, x_reached); 5512 x_reached = FRAME_TO_WINDOW_PIXEL_X (w, x_reached);
@@ -5309,13 +5517,14 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
5309 if (area > TEXT_AREA) 5517 if (area > TEXT_AREA)
5310 x_reached -= window_box_width (w, TEXT_AREA); 5518 x_reached -= window_box_width (w, TEXT_AREA);
5311 } 5519 }
5520
5312 return x_reached; 5521 return x_reached;
5313} 5522}
5314 5523
5315 5524
5316/* Fix the display of area AREA of overlapping row ROW in window W. */ 5525/* Fix the display of area AREA of overlapping row ROW in window W. */
5317 5526
5318void 5527static void
5319x_fix_overlapping_area (w, row, area) 5528x_fix_overlapping_area (w, row, area)
5320 struct window *w; 5529 struct window *w;
5321 struct glyph_row *row; 5530 struct glyph_row *row;
@@ -5348,9 +5557,7 @@ x_fix_overlapping_area (w, row, area)
5348 && row->glyphs[area][i].overlaps_vertically_p); 5557 && row->glyphs[area][i].overlaps_vertically_p);
5349 5558
5350 x_draw_glyphs (w, start_x, row, area, start, i, 5559 x_draw_glyphs (w, start_x, row, area, start, i,
5351 (row->inverse_p 5560 DRAW_NORMAL_TEXT, 1);
5352 ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT),
5353 NULL, NULL, 1);
5354 } 5561 }
5355 else 5562 else
5356 { 5563 {
@@ -5369,12 +5576,12 @@ x_fix_overlapping_area (w, row, area)
5369 the glyph row being updated, and updated_area is the area of that 5576 the glyph row being updated, and updated_area is the area of that
5370 row being updated. */ 5577 row being updated. */
5371 5578
5372void 5579static void
5373x_write_glyphs (start, len) 5580x_write_glyphs (start, len)
5374 struct glyph *start; 5581 struct glyph *start;
5375 int len; 5582 int len;
5376{ 5583{
5377 int x, hpos, real_start, real_end; 5584 int x, hpos;
5378 5585
5379 xassert (updated_window && updated_row); 5586 xassert (updated_window && updated_row);
5380 BLOCK_INPUT; 5587 BLOCK_INPUT;
@@ -5385,13 +5592,7 @@ x_write_glyphs (start, len)
5385 x = x_draw_glyphs (updated_window, output_cursor.x, 5592 x = x_draw_glyphs (updated_window, output_cursor.x,
5386 updated_row, updated_area, 5593 updated_row, updated_area,
5387 hpos, hpos + len, 5594 hpos, hpos + len,
5388 (updated_row->inverse_p 5595 DRAW_NORMAL_TEXT, 0);
5389 ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT),
5390 &real_start, &real_end, 0);
5391
5392 /* If we drew over the cursor, note that it is not visible any more. */
5393 note_overwritten_text_cursor (updated_window, real_start,
5394 real_end - real_start);
5395 5596
5396 UNBLOCK_INPUT; 5597 UNBLOCK_INPUT;
5397 5598
@@ -5403,7 +5604,7 @@ x_write_glyphs (start, len)
5403 5604
5404/* Insert LEN glyphs from START at the nominal cursor position. */ 5605/* Insert LEN glyphs from START at the nominal cursor position. */
5405 5606
5406void 5607static void
5407x_insert_glyphs (start, len) 5608x_insert_glyphs (start, len)
5408 struct glyph *start; 5609 struct glyph *start;
5409 register int len; 5610 register int len;
@@ -5413,7 +5614,7 @@ x_insert_glyphs (start, len)
5413 int line_height, shift_by_width, shifted_region_width; 5614 int line_height, shift_by_width, shifted_region_width;
5414 struct glyph_row *row; 5615 struct glyph_row *row;
5415 struct glyph *glyph; 5616 struct glyph *glyph;
5416 int frame_x, frame_y, hpos, real_start, real_end; 5617 int frame_x, frame_y, hpos;
5417 5618
5418 xassert (updated_window && updated_row); 5619 xassert (updated_window && updated_row);
5419 BLOCK_INPUT; 5620 BLOCK_INPUT;
@@ -5435,7 +5636,7 @@ x_insert_glyphs (start, len)
5435 - shift_by_width); 5636 - shift_by_width);
5436 5637
5437 /* Shift right. */ 5638 /* Shift right. */
5438 frame_x = WINDOW_TO_FRAME_PIXEL_X (w, output_cursor.x); 5639 frame_x = window_box_left (w, updated_area) + output_cursor.x;
5439 frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, output_cursor.y); 5640 frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, output_cursor.y);
5440 5641
5441 mac_scroll_area (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), 5642 mac_scroll_area (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
@@ -5447,9 +5648,8 @@ x_insert_glyphs (start, len)
5447 /* Write the glyphs. */ 5648 /* Write the glyphs. */
5448 hpos = start - row->glyphs[updated_area]; 5649 hpos = start - row->glyphs[updated_area];
5449 x_draw_glyphs (w, output_cursor.x, row, updated_area, hpos, hpos + len, 5650 x_draw_glyphs (w, output_cursor.x, row, updated_area, hpos, hpos + len,
5450 DRAW_NORMAL_TEXT, &real_start, &real_end, 0); 5651 DRAW_NORMAL_TEXT, 0);
5451 note_overwritten_text_cursor (w, real_start, real_end - real_start); 5652
5452
5453 /* Advance the output cursor. */ 5653 /* Advance the output cursor. */
5454 output_cursor.hpos += len; 5654 output_cursor.hpos += len;
5455 output_cursor.x += shift_by_width; 5655 output_cursor.x += shift_by_width;
@@ -5460,7 +5660,7 @@ x_insert_glyphs (start, len)
5460/* Delete N glyphs at the nominal cursor position. Not implemented 5660/* Delete N glyphs at the nominal cursor position. Not implemented
5461 for X frames. */ 5661 for X frames. */
5462 5662
5463void 5663static void
5464x_delete_glyphs (n) 5664x_delete_glyphs (n)
5465 register int n; 5665 register int n;
5466{ 5666{
@@ -5475,7 +5675,7 @@ x_delete_glyphs (n)
5475 TO_X is a pixel position relative to updated_area of 5675 TO_X is a pixel position relative to updated_area of
5476 updated_window. TO_X == -1 means clear to the end of this area. */ 5676 updated_window. TO_X == -1 means clear to the end of this area. */
5477 5677
5478void 5678static void
5479x_clear_end_of_line (to_x) 5679x_clear_end_of_line (to_x)
5480 int to_x; 5680 int to_x;
5481{ 5681{
@@ -5511,10 +5711,13 @@ x_clear_end_of_line (to_x)
5511 5711
5512 /* Notice if the cursor will be cleared by this operation. */ 5712 /* Notice if the cursor will be cleared by this operation. */
5513 if (!updated_row->full_width_p) 5713 if (!updated_row->full_width_p)
5514 note_overwritten_text_cursor (w, output_cursor.hpos, -1); 5714 notice_overwritten_cursor (w, updated_area,
5715 output_cursor.x, -1,
5716 updated_row->y,
5717 MATRIX_ROW_BOTTOM_Y (updated_row));
5515 5718
5516 from_x = output_cursor.x; 5719 from_x = output_cursor.x;
5517 5720
5518 /* Translate to frame coordinates. */ 5721 /* Translate to frame coordinates. */
5519 if (updated_row->full_width_p) 5722 if (updated_row->full_width_p)
5520 { 5723 {
@@ -5546,7 +5749,7 @@ x_clear_end_of_line (to_x)
5546/* Clear entire frame. If updating_frame is non-null, clear that 5749/* Clear entire frame. If updating_frame is non-null, clear that
5547 frame. Otherwise clear the selected frame. */ 5750 frame. Otherwise clear the selected frame. */
5548 5751
5549void 5752static void
5550x_clear_frame () 5753x_clear_frame ()
5551{ 5754{
5552 struct frame *f; 5755 struct frame *f;
@@ -5705,7 +5908,7 @@ XTset_terminal_window (n)
5705/* Perform an insert-lines or delete-lines operation, inserting N 5908/* Perform an insert-lines or delete-lines operation, inserting N
5706 lines or deleting -N lines at vertical position VPOS. */ 5909 lines or deleting -N lines at vertical position VPOS. */
5707 5910
5708void 5911static void
5709x_ins_del_lines (vpos, n) 5912x_ins_del_lines (vpos, n)
5710 int vpos, n; 5913 int vpos, n;
5711{ 5914{
@@ -5715,7 +5918,7 @@ x_ins_del_lines (vpos, n)
5715 5918
5716/* Scroll part of the display as described by RUN. */ 5919/* Scroll part of the display as described by RUN. */
5717 5920
5718void 5921static void
5719x_scroll_run (w, run) 5922x_scroll_run (w, run)
5720 struct window *w; 5923 struct window *w;
5721 struct run *run; 5924 struct run *run;
@@ -5785,6 +5988,7 @@ expose_frame (f, x, y, w, h)
5785 int x, y, w, h; 5988 int x, y, w, h;
5786{ 5989{
5787 Rect r; 5990 Rect r;
5991 int mouse_face_overwritten_p = 0;
5788 5992
5789 TRACE ((stderr, "expose_frame ")); 5993 TRACE ((stderr, "expose_frame "));
5790 5994
@@ -5828,90 +6032,65 @@ expose_frame (f, x, y, w, h)
5828 } 6032 }
5829 6033
5830 TRACE ((stderr, "(%d, %d, %d, %d)\n", r.left, r.top, r.right, r.bottom)); 6034 TRACE ((stderr, "(%d, %d, %d, %d)\n", r.left, r.top, r.right, r.bottom));
5831 expose_window_tree (XWINDOW (f->root_window), &r); 6035 mouse_face_overwritten_p = expose_window_tree (XWINDOW (f->root_window), &r);
5832 6036
5833 if (WINDOWP (f->tool_bar_window)) 6037 if (WINDOWP (f->tool_bar_window))
6038 mouse_face_overwritten_p
6039 |= expose_window (XWINDOW (f->tool_bar_window), &r);
6040
6041 /* Some window managers support a focus-follows-mouse style with
6042 delayed raising of frames. Imagine a partially obscured frame,
6043 and moving the mouse into partially obscured mouse-face on that
6044 frame. The visible part of the mouse-face will be highlighted,
6045 then the WM raises the obscured frame. With at least one WM, KDE
6046 2.1, Emacs is not getting any event for the raising of the frame
6047 (even tried with SubstructureRedirectMask), only Expose events.
6048 These expose events will draw text normally, i.e. not
6049 highlighted. Which means we must redo the highlight here.
6050 Subsume it under ``we love X''. --gerd 2001-08-15 */
6051 /* Included in Windows version because Windows most likely does not
6052 do the right thing if any third party tool offers
6053 focus-follows-mouse with delayed raise. --jason 2001-10-12 */
6054 if (mouse_face_overwritten_p && !FRAME_GARBAGED_P (f))
5834 { 6055 {
5835 struct window *w = XWINDOW (f->tool_bar_window); 6056 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f);
5836 Rect window_rect; 6057 if (f == dpyinfo->mouse_face_mouse_frame)
5837 Rect intersection_rect; 6058 {
5838 int window_x, window_y, window_width, window_height; 6059 int x = dpyinfo->mouse_face_mouse_x;
5839 6060 int y = dpyinfo->mouse_face_mouse_y;
5840 6061 clear_mouse_face (dpyinfo);
5841 window_box (w, -1, &window_x, &window_y, &window_width, &window_height); 6062 note_mouse_highlight (f, x, y);
5842 window_rect.left = window_x; 6063 }
5843 window_rect.top = window_y;
5844 window_rect.right = window_x + window_width;
5845 window_rect.bottom = window_y + window_height;
5846
5847 if (x_intersect_rectangles (&r, &window_rect, &intersection_rect))
5848 expose_window (w, &intersection_rect);
5849 }
5850
5851#ifndef USE_X_TOOLKIT
5852 if (WINDOWP (f->menu_bar_window))
5853 {
5854 struct window *w = XWINDOW (f->menu_bar_window);
5855 Rect window_rect;
5856 Rect intersection_rect;
5857 int window_x, window_y, window_width, window_height;
5858
5859
5860 window_box (w, -1, &window_x, &window_y, &window_width, &window_height);
5861 window_rect.left = window_x;
5862 window_rect.top = window_y;
5863 window_rect.right = window_x + window_width;
5864 window_rect.bottom = window_y + window_height;
5865
5866 if (x_intersect_rectangles (&r, &window_rect, &intersection_rect))
5867 expose_window (w, &intersection_rect);
5868 } 6064 }
5869#endif /* not USE_X_TOOLKIT */
5870} 6065}
5871 6066
5872 6067
5873/* Redraw (parts) of all windows in the window tree rooted at W that 6068/* Redraw (parts) of all windows in the window tree rooted at W that
5874 intersect R. R contains frame pixel coordinates. */ 6069 intersect R. R contains frame pixel coordinates. */
5875 6070
5876static void 6071static int
5877expose_window_tree (w, r) 6072expose_window_tree (w, r)
5878 struct window *w; 6073 struct window *w;
5879 Rect *r; 6074 Rect *r;
5880{ 6075{
5881 while (w) 6076 struct frame *f = XFRAME (w->frame);
6077 int mouse_face_overwritten_p = 0;
6078
6079 while (w && !FRAME_GARBAGED_P (f))
5882 { 6080 {
5883 if (!NILP (w->hchild)) 6081 if (!NILP (w->hchild))
5884 expose_window_tree (XWINDOW (w->hchild), r); 6082 mouse_face_overwritten_p
6083 |= expose_window_tree (XWINDOW (w->hchild), r);
5885 else if (!NILP (w->vchild)) 6084 else if (!NILP (w->vchild))
5886 expose_window_tree (XWINDOW (w->vchild), r); 6085 mouse_face_overwritten_p
6086 |= expose_window_tree (XWINDOW (w->vchild), r);
5887 else 6087 else
5888 { 6088 mouse_face_overwritten_p |= expose_window (w, r);
5889 Rect window_rect;
5890 Rect intersection_rect;
5891 struct frame *f = XFRAME (w->frame);
5892 int window_x, window_y, window_width, window_height;
5893
5894 /* Frame-relative pixel rectangle of W. */
5895 window_box (w, -1, &window_x, &window_y, &window_width,
5896 &window_height);
5897 window_rect.left
5898 = (window_x
5899 - FRAME_X_LEFT_FRINGE_WIDTH (f)
5900 - FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_Y_UNIT (f));
5901 window_rect.top = window_y;
5902 window_rect.right = window_rect.left
5903 + (window_width
5904 + FRAME_X_FRINGE_WIDTH (f)
5905 + FRAME_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f));
5906 window_rect.bottom = window_rect.top
5907 + window_height + CURRENT_MODE_LINE_HEIGHT (w);
5908
5909 if (x_intersect_rectangles (r, &window_rect, &intersection_rect))
5910 expose_window (w, &intersection_rect);
5911 }
5912 6089
5913 w = NILP (w->next) ? 0 : XWINDOW (w->next); 6090 w = NILP (w->next) ? NULL : XWINDOW (w->next);
5914 } 6091 }
6092
6093 return mouse_face_overwritten_p;
5915} 6094}
5916 6095
5917 6096
@@ -5925,31 +6104,30 @@ expose_area (w, row, r, area)
5925 Rect *r; 6104 Rect *r;
5926 enum glyph_row_area area; 6105 enum glyph_row_area area;
5927{ 6106{
5928 int x;
5929 struct glyph *first = row->glyphs[area]; 6107 struct glyph *first = row->glyphs[area];
5930 struct glyph *end = row->glyphs[area] + row->used[area]; 6108 struct glyph *end = row->glyphs[area] + row->used[area];
5931 struct glyph *last; 6109 struct glyph *last;
5932 int first_x; 6110 int first_x, start_x, x;
5933
5934 /* Set x to the window-relative start position for drawing glyphs of
5935 AREA. The first glyph of the text area can be partially visible.
5936 The first glyphs of other areas cannot. */
5937 if (area == LEFT_MARGIN_AREA)
5938 x = 0;
5939 else if (area == TEXT_AREA)
5940 x = row->x + window_box_width (w, LEFT_MARGIN_AREA);
5941 else
5942 x = (window_box_width (w, LEFT_MARGIN_AREA)
5943 + window_box_width (w, TEXT_AREA));
5944 6111
5945 if (area == TEXT_AREA && row->fill_line_p) 6112 if (area == TEXT_AREA && row->fill_line_p)
5946 /* If row extends face to end of line write the whole line. */ 6113 /* If row extends face to end of line write the whole line. */
5947 x_draw_glyphs (w, x, row, area, 6114 x_draw_glyphs (w, 0, row, area,
5948 0, row->used[area], 6115 0, row->used[area],
5949 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, 6116 DRAW_NORMAL_TEXT, 0);
5950 NULL, NULL, 0);
5951 else 6117 else
5952 { 6118 {
6119 /* Set START_X to the window-relative start position for drawing glyphs of
6120 AREA. The first glyph of the text area can be partially visible.
6121 The first glyphs of other areas cannot. */
6122 if (area == LEFT_MARGIN_AREA)
6123 start_x = 0;
6124 else if (area == TEXT_AREA)
6125 start_x = row->x + window_box_width (w, LEFT_MARGIN_AREA);
6126 else
6127 start_x = (window_box_width (w, LEFT_MARGIN_AREA)
6128 + window_box_width (w, TEXT_AREA));
6129 x = start_x;
6130
5953 /* Find the first glyph that must be redrawn. */ 6131 /* Find the first glyph that must be redrawn. */
5954 while (first < end 6132 while (first < end
5955 && x + first->pixel_width < r->left) 6133 && x + first->pixel_width < r->left)
@@ -5967,22 +6145,22 @@ expose_area (w, row, r, area)
5967 x += last->pixel_width; 6145 x += last->pixel_width;
5968 ++last; 6146 ++last;
5969 } 6147 }
5970 6148
5971 /* Repaint. */ 6149 /* Repaint. */
5972 if (last > first) 6150 if (last > first)
5973 x_draw_glyphs (w, first_x, row, area, 6151 x_draw_glyphs (w, first_x - start_x, row, area,
5974 first - row->glyphs[area], 6152 first - row->glyphs[area],
5975 last - row->glyphs[area], 6153 last - row->glyphs[area],
5976 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, 6154 DRAW_NORMAL_TEXT, 0);
5977 NULL, NULL, 0);
5978 } 6155 }
5979} 6156}
5980 6157
5981 6158
5982/* Redraw the parts of the glyph row ROW on window W intersecting 6159/* Redraw the parts of the glyph row ROW on window W intersecting
5983 rectangle R. R is in window-relative coordinates. */ 6160 rectangle R. R is in window-relative coordinates. Value is
6161 non-zero if mouse face was overwritten. */
5984 6162
5985static void 6163static int
5986expose_line (w, row, r) 6164expose_line (w, row, r)
5987 struct window *w; 6165 struct window *w;
5988 struct glyph_row *row; 6166 struct glyph_row *row;
@@ -5992,8 +6170,7 @@ expose_line (w, row, r)
5992 6170
5993 if (row->mode_line_p || w->pseudo_window_p) 6171 if (row->mode_line_p || w->pseudo_window_p)
5994 x_draw_glyphs (w, 0, row, TEXT_AREA, 0, row->used[TEXT_AREA], 6172 x_draw_glyphs (w, 0, row, TEXT_AREA, 0, row->used[TEXT_AREA],
5995 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, 6173 DRAW_NORMAL_TEXT, 0);
5996 NULL, NULL, 0);
5997 else 6174 else
5998 { 6175 {
5999 if (row->used[LEFT_MARGIN_AREA]) 6176 if (row->used[LEFT_MARGIN_AREA])
@@ -6004,6 +6181,8 @@ expose_line (w, row, r)
6004 expose_area (w, row, r, RIGHT_MARGIN_AREA); 6181 expose_area (w, row, r, RIGHT_MARGIN_AREA);
6005 x_draw_row_fringe_bitmaps (w, row); 6182 x_draw_row_fringe_bitmaps (w, row);
6006 } 6183 }
6184
6185 return row->mouse_face_p;
6007} 6186}
6008 6187
6009 6188
@@ -6031,97 +6210,120 @@ x_phys_cursor_in_rect_p (w, r)
6031} 6210}
6032 6211
6033 6212
6034/* Redraw a rectangle of window W. R is a rectangle in window 6213/* Redraw the part of window W intersection rectagle FR. Pixel
6035 relative coordinates. Call this function with input blocked. */ 6214 coordinates in FR are frame relative. Call this function with
6215 input blocked. Value is non-zero if the exposure overwrites
6216 mouse-face. */
6036 6217
6037static void 6218static int
6038expose_window (w, r) 6219expose_window (w, fr)
6039 struct window *w; 6220 struct window *w;
6040 Rect *r; 6221 Rect *fr;
6041{ 6222{
6042 struct glyph_row *row; 6223 struct frame *f = XFRAME (w->frame);
6043 int y; 6224 Rect wr, r;
6044 int yb = window_text_bottom_y (w); 6225 int mouse_face_overwritten_p = 0;
6045 int cursor_cleared_p;
6046 6226
6047 /* If window is not yet fully initialized, do nothing. This can 6227 /* If window is not yet fully initialized, do nothing. This can
6048 happen when toolkit scroll bars are used and a window is split. 6228 happen when toolkit scroll bars are used and a window is split.
6049 Reconfiguring the scroll bar will generate an expose for a newly 6229 Reconfiguring the scroll bar will generate an expose for a newly
6050 created window. */ 6230 created window. */
6051 if (w->current_matrix == NULL) 6231 if (w->current_matrix == NULL)
6052 return; 6232 return 0;
6053
6054 TRACE ((stderr, "expose_window (%d, %d, %d, %d)\n",
6055 r->left, r->top, r->right, r->bottom));
6056
6057 /* Convert to window coordinates. */
6058 r->left = FRAME_TO_WINDOW_PIXEL_X (w, r->left);
6059 r->top = FRAME_TO_WINDOW_PIXEL_Y (w, r->top);
6060 r->right = FRAME_TO_WINDOW_PIXEL_X (w, r->right);
6061 r->bottom = FRAME_TO_WINDOW_PIXEL_Y (w, r->bottom);
6062 6233
6063 /* Turn off the cursor. */ 6234 /* When we're currently updating the window, display and current
6064 if (!w->pseudo_window_p 6235 matrix usually don't agree. Arrange for a thorough display
6065 && x_phys_cursor_in_rect_p (w, r)) 6236 later. */
6237 if (w == updated_window)
6066 { 6238 {
6067 x_clear_cursor (w); 6239 SET_FRAME_GARBAGED (f);
6068 cursor_cleared_p = 1; 6240 return 0;
6069 } 6241 }
6070 else
6071 cursor_cleared_p = 0;
6072 6242
6073 /* Find the first row intersecting the rectangle R. */ 6243 /* Frame-relative pixel rectangle of W. */
6074 row = w->current_matrix->rows; 6244 wr.left = XFASTINT (w->left) * CANON_X_UNIT (f);
6075 y = 0; 6245 wr.top = XFASTINT (w->top) * CANON_Y_UNIT (f);
6076 while (row->enabled_p 6246 wr.right = wr.left + XFASTINT (w->width) * CANON_X_UNIT (f);
6077 && y < yb 6247 wr.bottom = wr.top + XFASTINT (w->height) * CANON_Y_UNIT (f);
6078 && y + row->height < r->top) 6248
6079 { 6249 if (x_intersect_rectangles (fr, &wr, &r))
6080 y += row->height;
6081 ++row;
6082 }
6083
6084 /* Display the text in the rectangle, one text line at a time. */
6085 while (row->enabled_p
6086 && y < yb
6087 && y < r->bottom)
6088 { 6250 {
6089 expose_line (w, row, r); 6251 int yb = window_text_bottom_y (w);
6090 y += row->height; 6252 struct glyph_row *row;
6091 ++row; 6253 int cursor_cleared_p;
6092 }
6093 6254
6094 /* Display the mode line if there is one. */ 6255 TRACE ((stderr, "expose_window (%d, %d, %d, %d)\n",
6095 if (WINDOW_WANTS_MODELINE_P (w) 6256 r.left, r.top, r.right, r.bottom));
6096 && (row = MATRIX_MODE_LINE_ROW (w->current_matrix),
6097 row->enabled_p)
6098 && row->y < r->bottom)
6099 expose_line (w, row, r);
6100 6257
6101 if (!w->pseudo_window_p) 6258 /* Convert to window coordinates. */
6102 { 6259 r.left = FRAME_TO_WINDOW_PIXEL_X (w, r.left);
6103 /* Draw border between windows. */ 6260 r.right = FRAME_TO_WINDOW_PIXEL_X (w, r.right);
6104 x_draw_vertical_border (w); 6261 r.top = FRAME_TO_WINDOW_PIXEL_Y (w, r.top);
6105 6262 r.bottom = FRAME_TO_WINDOW_PIXEL_Y (w, r.bottom);
6106 /* Turn the cursor on again. */ 6263
6107 if (cursor_cleared_p) 6264 /* Turn off the cursor. */
6108 x_update_window_cursor (w, 1); 6265 if (!w->pseudo_window_p
6266 && x_phys_cursor_in_rect_p (w, &r))
6267 {
6268 x_clear_cursor (w);
6269 cursor_cleared_p = 1;
6270 }
6271 else
6272 cursor_cleared_p = 0;
6273
6274 /* Find the first row intersecting the rectangle R. */
6275 for (row = w->current_matrix->rows;
6276 row->enabled_p;
6277 ++row)
6278 {
6279 int y0 = row->y;
6280 int y1 = MATRIX_ROW_BOTTOM_Y (row);
6281
6282 if ((y0 >= r.top && y0 < r.bottom)
6283 || (y1 > r.top && y1 < r.bottom)
6284 || (r.top >= y0 && r.top < y1)
6285 || (r.bottom > y0 && r.bottom < y1))
6286 {
6287 if (expose_line (w, row, &r))
6288 mouse_face_overwritten_p = 1;
6289 }
6290
6291 if (y1 >= yb)
6292 break;
6293 }
6294
6295 /* Display the mode line if there is one. */
6296 if (WINDOW_WANTS_MODELINE_P (w)
6297 && (row = MATRIX_MODE_LINE_ROW (w->current_matrix),
6298 row->enabled_p)
6299 && row->y < r.bottom)
6300 {
6301 if (expose_line (w, row, &r))
6302 mouse_face_overwritten_p = 1;
6303 }
6304
6305 if (!w->pseudo_window_p)
6306 {
6307 /* Draw border between windows. */
6308 x_draw_vertical_border (w);
6309
6310 /* Turn the cursor on again. */
6311 if (cursor_cleared_p)
6312 x_update_window_cursor (w, 1);
6313 }
6109 } 6314 }
6110 6315
6111 /* Display scroll bar for this window. */ 6316 /* Display scroll bar for this window. */
6112 if (!NILP (w->vertical_scroll_bar)) 6317 if (!NILP (w->vertical_scroll_bar))
6113 { 6318 {
6114 ControlHandle ch 6319 ControlHandle ch
6115 = SCROLL_BAR_CONTROL_HANDLE (XSCROLL_BAR (w->vertical_scroll_bar)); 6320 = SCROLL_BAR_CONTROL_HANDLE (XSCROLL_BAR (w->vertical_scroll_bar));
6116 6321
6117 Draw1Control (ch); 6322 Draw1Control (ch);
6118 } 6323 }
6119}
6120
6121 6324
6122/* Determine the intersection of two rectangles R1 and R2. Return 6325 return mouse_face_overwritten_p;
6123 the intersection in *RESULT. Value is non-zero if RESULT is not 6326}
6124 empty. */
6125 6327
6126static int 6328static int
6127x_intersect_rectangles (r1, r2, result) 6329x_intersect_rectangles (r1, r2, result)
@@ -6228,7 +6430,7 @@ x_new_focus_frame (dpyinfo, frame)
6228 6430
6229/* Handle an event saying the mouse has moved out of an Emacs frame. */ 6431/* Handle an event saying the mouse has moved out of an Emacs frame. */
6230 6432
6231static void 6433void
6232x_mouse_leave (dpyinfo) 6434x_mouse_leave (dpyinfo)
6233 struct x_display_info *dpyinfo; 6435 struct x_display_info *dpyinfo;
6234{ 6436{
@@ -6243,7 +6445,7 @@ x_mouse_leave (dpyinfo)
6243 frame is being highlighted or un-highlighted; we only use it to find 6445 frame is being highlighted or un-highlighted; we only use it to find
6244 the appropriate X display info. */ 6446 the appropriate X display info. */
6245 6447
6246void 6448static void
6247XTframe_rehighlight (frame) 6449XTframe_rehighlight (frame)
6248 struct frame *frame; 6450 struct frame *frame;
6249{ 6451{
@@ -6284,7 +6486,7 @@ x_frame_rehighlight (dpyinfo)
6284 6486
6285/* Keyboard processing - modifier keys, vendor-specific keysyms, etc. */ 6487/* Keyboard processing - modifier keys, vendor-specific keysyms, etc. */
6286 6488
6287#if 0 6489#if 0 /* MAC_TODO */
6288/* Initialize mode_switch_bit and modifier_meaning. */ 6490/* Initialize mode_switch_bit and modifier_meaning. */
6289static void 6491static void
6290x_find_modifier_meanings (dpyinfo) 6492x_find_modifier_meanings (dpyinfo)
@@ -6387,7 +6589,7 @@ x_find_modifier_meanings (dpyinfo)
6387 XFreeModifiermap (mods); 6589 XFreeModifiermap (mods);
6388} 6590}
6389 6591
6390#endif 6592#endif /* MAC_TODO */
6391 6593
6392/* Convert between the modifier bits X uses and the modifier bits 6594/* Convert between the modifier bits X uses and the modifier bits
6393 Emacs uses. */ 6595 Emacs uses. */
@@ -6403,7 +6605,7 @@ x_mac_to_emacs_modifiers (dpyinfo, state)
6403 | ((state & optionKey) ? alt_modifier : 0)); 6605 | ((state & optionKey) ? alt_modifier : 0));
6404} 6606}
6405 6607
6406#if 0 6608#if 0 /* MAC_TODO */
6407static unsigned short 6609static unsigned short
6408x_emacs_to_x_modifiers (dpyinfo, state) 6610x_emacs_to_x_modifiers (dpyinfo, state)
6409 struct x_display_info *dpyinfo; 6611 struct x_display_info *dpyinfo;
@@ -6416,7 +6618,7 @@ x_emacs_to_x_modifiers (dpyinfo, state)
6416 | ((state & ctrl_modifier) ? ControlMask : 0) 6618 | ((state & ctrl_modifier) ? ControlMask : 0)
6417 | ((state & meta_modifier) ? dpyinfo->meta_mod_mask : 0)); 6619 | ((state & meta_modifier) ? dpyinfo->meta_mod_mask : 0));
6418} 6620}
6419#endif 6621#endif /* MAC_TODO */
6420 6622
6421/* Convert a keysym to its name. */ 6623/* Convert a keysym to its name. */
6422 6624
@@ -6454,10 +6656,18 @@ pixel_to_glyph_coords (f, pix_x, pix_y, x, y, bounds, noclip)
6454 Rect *bounds; 6656 Rect *bounds;
6455 int noclip; 6657 int noclip;
6456{ 6658{
6457 /* Arrange for the division in PIXEL_TO_CHAR_COL etc. to round down 6659 /* Support tty mode: if Vwindow_system is nil, behave correctly. */
6660 if (NILP (Vwindow_system))
6661 {
6662 *x = pix_x;
6663 *y = pix_y;
6664 return;
6665 }
6666
6667 /* Arrange for the division in PIXEL_TO_CHAR_COL etc. to round down
6458 even for negative values. */ 6668 even for negative values. */
6459 if (pix_x < 0) 6669 if (pix_x < 0)
6460 pix_x -= FONT_WIDTH ((f)->output_data.mac->font) - 1; 6670 pix_x -= FONT_WIDTH (FRAME_FONT (f)) - 1;
6461 if (pix_y < 0) 6671 if (pix_y < 0)
6462 pix_y -= (f)->output_data.mac->line_height - 1; 6672 pix_y -= (f)->output_data.mac->line_height - 1;
6463 6673
@@ -6468,8 +6678,8 @@ pixel_to_glyph_coords (f, pix_x, pix_y, x, y, bounds, noclip)
6468 { 6678 {
6469 bounds->left = CHAR_TO_PIXEL_COL (f, pix_x); 6679 bounds->left = CHAR_TO_PIXEL_COL (f, pix_x);
6470 bounds->top = CHAR_TO_PIXEL_ROW (f, pix_y); 6680 bounds->top = CHAR_TO_PIXEL_ROW (f, pix_y);
6471 bounds->right = bounds->left + FONT_WIDTH (f->output_data.mac->font); 6681 bounds->right = bounds->left + FONT_WIDTH (FRAME_FONT (f)) - 1;
6472 bounds->bottom = bounds->top + f->output_data.mac->line_height; 6682 bounds->bottom = bounds->top + f->output_data.mac->line_height - 1;
6473 } 6683 }
6474 6684
6475 if (!noclip) 6685 if (!noclip)
@@ -6495,7 +6705,7 @@ pixel_to_glyph_coords (f, pix_x, pix_y, x, y, bounds, noclip)
6495 can't tell the positions because W's display is not up to date, 6705 can't tell the positions because W's display is not up to date,
6496 return 0. */ 6706 return 0. */
6497 6707
6498static int 6708int
6499glyph_to_pixel_coords (w, hpos, vpos, frame_x, frame_y) 6709glyph_to_pixel_coords (w, hpos, vpos, frame_x, frame_y)
6500 struct window *w; 6710 struct window *w;
6501 int hpos, vpos; 6711 int hpos, vpos;
@@ -6553,7 +6763,13 @@ construct_mouse_click (result, event, f)
6553 result->modifiers = event->what == mouseDown ? down_modifier : up_modifier; 6763 result->modifiers = event->what == mouseDown ? down_modifier : up_modifier;
6554 6764
6555 mouseLoc = event->where; 6765 mouseLoc = event->where;
6766
6767#if TARGET_API_MAC_CARBON
6768 SetPort (GetWindowPort (FRAME_MAC_WINDOW (f)));
6769#else
6556 SetPort (FRAME_MAC_WINDOW (f)); 6770 SetPort (FRAME_MAC_WINDOW (f));
6771#endif
6772
6557 GlobalToLocal (&mouseLoc); 6773 GlobalToLocal (&mouseLoc);
6558 XSETINT (result->x, mouseLoc.h); 6774 XSETINT (result->x, mouseLoc.h);
6559 XSETINT (result->y, mouseLoc.v); 6775 XSETINT (result->y, mouseLoc.v);
@@ -6581,11 +6797,19 @@ note_mouse_movement (frame, pos)
6581 FRAME_PTR frame; 6797 FRAME_PTR frame;
6582 Point *pos; 6798 Point *pos;
6583{ 6799{
6800#if TARGET_API_MAC_CARBON
6801 Rect r;
6802#endif
6803
6584 last_mouse_movement_time = TickCount () * (1000 / 60); /* to milliseconds */ 6804 last_mouse_movement_time = TickCount () * (1000 / 60); /* to milliseconds */
6585 last_mouse_motion_position = *pos; 6805 last_mouse_motion_position = *pos;
6586 XSETFRAME (last_mouse_motion_frame, frame); 6806 XSETFRAME (last_mouse_motion_frame, frame);
6587 6807
6808#if TARGET_API_MAC_CARBON
6809 if (!PtInRect (*pos, GetWindowPortBounds (FRAME_MAC_WINDOW (frame), &r)))
6810#else
6588 if (!PtInRect (*pos, &FRAME_MAC_WINDOW (frame)->portRect)) 6811 if (!PtInRect (*pos, &FRAME_MAC_WINDOW (frame)->portRect))
6812#endif
6589 { 6813 {
6590 frame->mouse_moved = 1; 6814 frame->mouse_moved = 1;
6591 last_mouse_scroll_bar = Qnil; 6815 last_mouse_scroll_bar = Qnil;
@@ -6622,10 +6846,11 @@ int disable_mouse_highlight;
6622 date. */ 6846 date. */
6623 6847
6624static struct glyph * 6848static struct glyph *
6625x_y_to_hpos_vpos (w, x, y, hpos, vpos, area) 6849x_y_to_hpos_vpos (w, x, y, hpos, vpos, area, buffer_only_p)
6626 struct window *w; 6850 struct window *w;
6627 int x, y; 6851 int x, y;
6628 int *hpos, *vpos, *area; 6852 int *hpos, *vpos, *area;
6853 int buffer_only_p;
6629{ 6854{
6630 struct glyph *glyph, *end; 6855 struct glyph *glyph, *end;
6631 struct glyph_row *row = NULL; 6856 struct glyph_row *row = NULL;
@@ -6683,7 +6908,7 @@ x_y_to_hpos_vpos (w, x, y, hpos, vpos, area)
6683 { 6908 {
6684 if (w->pseudo_window_p) 6909 if (w->pseudo_window_p)
6685 break; 6910 break;
6686 else if (BUFFERP (glyph->object)) 6911 else if (!buffer_only_p || BUFFERP (glyph->object))
6687 break; 6912 break;
6688 } 6913 }
6689 6914
@@ -6723,7 +6948,7 @@ frame_to_window_pixel_xy (w, x, y)
6723} 6948}
6724 6949
6725 6950
6726/* Take proper action when mouse has moved to the mode or top line of 6951/* Take proper action when mouse has moved to the mode or header line of
6727 window W, x-position X. MODE_LINE_P non-zero means mouse is on the 6952 window W, x-position X. MODE_LINE_P non-zero means mouse is on the
6728 mode line. X is relative to the start of the text display area of 6953 mode line. X is relative to the start of the text display area of
6729 W, so the width of fringes and scroll bars must be subtracted 6954 W, so the width of fringes and scroll bars must be subtracted
@@ -6736,14 +6961,14 @@ note_mode_line_highlight (w, x, mode_line_p)
6736{ 6961{
6737 struct frame *f = XFRAME (w->frame); 6962 struct frame *f = XFRAME (w->frame);
6738 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); 6963 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f);
6739 Cursor cursor = dpyinfo->vertical_scroll_bar_cursor; 6964 struct Cursor *cursor = dpyinfo->vertical_scroll_bar_cursor;
6740 struct glyph_row *row; 6965 struct glyph_row *row;
6741 6966
6742 if (mode_line_p) 6967 if (mode_line_p)
6743 row = MATRIX_MODE_LINE_ROW (w->current_matrix); 6968 row = MATRIX_MODE_LINE_ROW (w->current_matrix);
6744 else 6969 else
6745 row = MATRIX_HEADER_LINE_ROW (w->current_matrix); 6970 row = MATRIX_HEADER_LINE_ROW (w->current_matrix);
6746 6971
6747 if (row->enabled_p) 6972 if (row->enabled_p)
6748 { 6973 {
6749 struct glyph *glyph, *end; 6974 struct glyph *glyph, *end;
@@ -6755,6 +6980,7 @@ note_mode_line_highlight (w, x, mode_line_p)
6755 end = glyph + row->used[TEXT_AREA]; 6980 end = glyph + row->used[TEXT_AREA];
6756 x0 = - (FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f) 6981 x0 = - (FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f)
6757 + FRAME_X_LEFT_FRINGE_WIDTH (f)); 6982 + FRAME_X_LEFT_FRINGE_WIDTH (f));
6983
6758 while (glyph < end 6984 while (glyph < end
6759 && x >= x0 + glyph->pixel_width) 6985 && x >= x0 + glyph->pixel_width)
6760 { 6986 {
@@ -6774,12 +7000,12 @@ note_mode_line_highlight (w, x, mode_line_p)
6774 help = Fget_text_property (make_number (glyph->charpos), 7000 help = Fget_text_property (make_number (glyph->charpos),
6775 Qhelp_echo, glyph->object); 7001 Qhelp_echo, glyph->object);
6776 if (!NILP (help)) 7002 if (!NILP (help))
6777 { 7003 {
6778 help_echo = help; 7004 help_echo = help;
6779 XSETWINDOW (help_echo_window, w); 7005 XSETWINDOW (help_echo_window, w);
6780 help_echo_object = glyph->object; 7006 help_echo_object = glyph->object;
6781 help_echo_pos = glyph->charpos; 7007 help_echo_pos = glyph->charpos;
6782 } 7008 }
6783 7009
6784 /* Change the mouse pointer according to what is under X/Y. */ 7010 /* Change the mouse pointer according to what is under X/Y. */
6785 map = Fget_text_property (make_number (glyph->charpos), 7011 map = Fget_text_property (make_number (glyph->charpos),
@@ -6816,14 +7042,15 @@ note_mouse_highlight (f, x, y)
6816 int portion; 7042 int portion;
6817 Lisp_Object window; 7043 Lisp_Object window;
6818 struct window *w; 7044 struct window *w;
7045 struct buffer *b;
6819 7046
6820 /* When a menu is active, don't highlight because this looks odd. */ 7047#if 0
6821#ifdef USE_X_TOOLKIT 7048 /* When a menu is active, don't highlight because this looks odd. */
6822 if (popup_activated ()) 7049 if (popup_activated ())
6823 return; 7050 return;
6824#endif 7051#endif
6825 7052
6826 if (disable_mouse_highlight 7053 if (NILP (Vmouse_highlight)
6827 || !f->glyphs_initialized_p) 7054 || !f->glyphs_initialized_p)
6828 return; 7055 return;
6829 7056
@@ -6851,6 +7078,9 @@ note_mouse_highlight (f, x, y)
6851 if (!WINDOWP (window)) 7078 if (!WINDOWP (window))
6852 return; 7079 return;
6853 7080
7081 /* Reset help_echo. It will get recomputed below. */
7082 help_echo = Qnil;
7083
6854 /* Convert to window-relative pixel coordinates. */ 7084 /* Convert to window-relative pixel coordinates. */
6855 w = XWINDOW (window); 7085 w = XWINDOW (window);
6856 frame_to_window_pixel_xy (w, &x, &y); 7086 frame_to_window_pixel_xy (w, &x, &y);
@@ -6863,32 +7093,38 @@ note_mouse_highlight (f, x, y)
6863 return; 7093 return;
6864 } 7094 }
6865 7095
7096 /* Mouse is on the mode or header line? */
6866 if (portion == 1 || portion == 3) 7097 if (portion == 1 || portion == 3)
6867 { 7098 {
6868 /* Mouse is on the mode or top line. */
6869 note_mode_line_highlight (w, x, portion == 1); 7099 note_mode_line_highlight (w, x, portion == 1);
6870 return; 7100 return;
6871 } 7101 }
6872#if 0 /* MAC_TODO: mouse cursor */ 7102#if 0 /* TODO: mouse cursor */
7103 if (portion == 2)
7104 cursor = f->output_data.x->horizontal_drag_cursor;
6873 else 7105 else
6874 XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 7106 cursor = f->output_data.x->text_cursor;
6875 f->output_data.x->text_cursor);
6876#endif 7107#endif
6877
6878 /* Are we in a window whose display is up to date? 7108 /* Are we in a window whose display is up to date?
6879 And verify the buffer's text has not changed. */ 7109 And verify the buffer's text has not changed. */
7110 b = XBUFFER (w->buffer);
6880 if (/* Within text portion of the window. */ 7111 if (/* Within text portion of the window. */
6881 portion == 0 7112 portion == 0
6882 && EQ (w->window_end_valid, w->buffer) 7113 && EQ (w->window_end_valid, w->buffer)
6883 && XFASTINT (w->last_modified) == BUF_MODIFF (XBUFFER (w->buffer)) 7114 && XFASTINT (w->last_modified) == BUF_MODIFF (b)
6884 && (XFASTINT (w->last_overlay_modified) 7115 && XFASTINT (w->last_overlay_modified) == BUF_OVERLAY_MODIFF (b))
6885 == BUF_OVERLAY_MODIFF (XBUFFER (w->buffer))))
6886 { 7116 {
6887 int hpos, vpos, pos, i, area; 7117 int hpos, vpos, pos, i, area;
6888 struct glyph *glyph; 7118 struct glyph *glyph;
7119 Lisp_Object object;
7120 Lisp_Object mouse_face = Qnil, overlay = Qnil, position;
7121 Lisp_Object *overlay_vec = NULL;
7122 int len, noverlays;
7123 struct buffer *obuf;
7124 int obegv, ozv, same_region;
6889 7125
6890 /* Find the glyph under X/Y. */ 7126 /* Find the glyph under X/Y. */
6891 glyph = x_y_to_hpos_vpos (w, x, y, &hpos, &vpos, &area); 7127 glyph = x_y_to_hpos_vpos (w, x, y, &hpos, &vpos, &area, 0);
6892 7128
6893 /* Clear mouse face if X/Y not over text. */ 7129 /* Clear mouse face if X/Y not over text. */
6894 if (glyph == NULL 7130 if (glyph == NULL
@@ -6896,197 +7132,333 @@ note_mouse_highlight (f, x, y)
6896 || !MATRIX_ROW (w->current_matrix, vpos)->displays_text_p) 7132 || !MATRIX_ROW (w->current_matrix, vpos)->displays_text_p)
6897 { 7133 {
6898 clear_mouse_face (dpyinfo); 7134 clear_mouse_face (dpyinfo);
6899 return; 7135 /* TODO: mouse cursor */
7136 goto set_cursor;
6900 } 7137 }
6901 7138
6902 pos = glyph->charpos; 7139 pos = glyph->charpos;
6903 xassert (w->pseudo_window_p || BUFFERP (glyph->object)); 7140 object = glyph->object;
7141 if (!STRINGP (object) && !BUFFERP (object))
7142 goto set_cursor;
7143
7144 /* If we get an out-of-range value, return now; avoid an error. */
7145 if (BUFFERP (object) && pos > BUF_Z (b))
7146 goto set_cursor;
7147
7148 /* Make the window's buffer temporarily current for
7149 overlays_at and compute_char_face. */
7150 obuf = current_buffer;
7151 current_buffer = b;
7152 obegv = BEGV;
7153 ozv = ZV;
7154 BEGV = BEG;
7155 ZV = Z;
7156
7157 /* Is this char mouse-active or does it have help-echo? */
7158 position = make_number (pos);
7159
7160 if (BUFFERP (object))
7161 {
7162 /* Put all the overlays we want in a vector in overlay_vec.
7163 Store the length in len. If there are more than 10, make
7164 enough space for all, and try again. */
7165 len = 10;
7166 overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
7167 noverlays = overlays_at (pos, 0, &overlay_vec, &len, NULL, NULL, 0);
7168 if (noverlays > len)
7169 {
7170 len = noverlays;
7171 overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
7172 noverlays = overlays_at (pos, 0, &overlay_vec, &len, NULL, NULL,0);
7173 }
6904 7174
6905 /* Check for mouse-face and help-echo. */ 7175 /* Sort overlays into increasing priority order. */
6906 { 7176 noverlays = sort_overlays (overlay_vec, noverlays, w);
6907 Lisp_Object mouse_face, overlay, position; 7177 }
6908 Lisp_Object *overlay_vec; 7178 else
6909 int len, noverlays; 7179 noverlays = 0;
6910 struct buffer *obuf; 7180
6911 int obegv, ozv; 7181 same_region = (EQ (window, dpyinfo->mouse_face_window)
6912 7182 && vpos >= dpyinfo->mouse_face_beg_row
6913 /* If we get an out-of-range value, return now; avoid an error. */ 7183 && vpos <= dpyinfo->mouse_face_end_row
6914 if (pos > BUF_Z (XBUFFER (w->buffer))) 7184 && (vpos > dpyinfo->mouse_face_beg_row
6915 return; 7185 || hpos >= dpyinfo->mouse_face_beg_col)
7186 && (vpos < dpyinfo->mouse_face_end_row
7187 || hpos < dpyinfo->mouse_face_end_col
7188 || dpyinfo->mouse_face_past_end));
7189
7190 /* TODO: if (same_region)
7191 mouse cursor */
7192
7193 /* Check mouse-face highlighting. */
7194 if (! same_region
7195 /* If there exists an overlay with mouse-face overlapping
7196 the one we are currently highlighting, we have to
7197 check if we enter the overlapping overlay, and then
7198 highlight that. */
7199 || (OVERLAYP (dpyinfo->mouse_face_overlay)
7200 && mouse_face_overlay_overlaps (dpyinfo->mouse_face_overlay)))
7201 {
7202 /* Find the highest priority overlay that has a mouse-face
7203 property. */
7204 overlay = Qnil;
7205 for (i = noverlays - 1; i >= 0 && NILP (overlay); --i)
7206 {
7207 mouse_face = Foverlay_get (overlay_vec[i], Qmouse_face);
7208 if (!NILP (mouse_face))
7209 overlay = overlay_vec[i];
7210 }
6916 7211
6917 /* Make the window's buffer temporarily current for 7212 /* If we're actually highlighting the same overlay as
6918 overlays_at and compute_char_face. */ 7213 before, there's no need to do that again. */
6919 obuf = current_buffer; 7214 if (!NILP (overlay)
6920 current_buffer = XBUFFER (w->buffer); 7215 && EQ (overlay, dpyinfo->mouse_face_overlay))
6921 obegv = BEGV; 7216 goto check_help_echo;
6922 ozv = ZV;
6923 BEGV = BEG;
6924 ZV = Z;
6925
6926 /* Is this char mouse-active or does it have help-echo? */
6927 XSETINT (position, pos);
6928
6929 /* Put all the overlays we want in a vector in overlay_vec.
6930 Store the length in len. If there are more than 10, make
6931 enough space for all, and try again. */
6932 len = 10;
6933 overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
6934 noverlays = overlays_at (pos, 0, &overlay_vec, &len, NULL, NULL);
6935 if (noverlays > len)
6936 {
6937 len = noverlays;
6938 overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
6939 noverlays = overlays_at (pos, 0, &overlay_vec, &len, NULL, NULL);
6940 }
6941 7217
6942 /* Sort overlays into increasing priority order. */ 7218 dpyinfo->mouse_face_overlay = overlay;
6943 noverlays = sort_overlays (overlay_vec, noverlays, w);
6944
6945 /* Check mouse-face highlighting. */
6946 if (! (EQ (window, dpyinfo->mouse_face_window)
6947 && vpos >= dpyinfo->mouse_face_beg_row
6948 && vpos <= dpyinfo->mouse_face_end_row
6949 && (vpos > dpyinfo->mouse_face_beg_row
6950 || hpos >= dpyinfo->mouse_face_beg_col)
6951 && (vpos < dpyinfo->mouse_face_end_row
6952 || hpos < dpyinfo->mouse_face_end_col
6953 || dpyinfo->mouse_face_past_end)))
6954 {
6955 /* Clear the display of the old active region, if any. */
6956 clear_mouse_face (dpyinfo);
6957 7219
6958 /* Find the highest priority overlay that has a mouse-face prop. */ 7220 /* Clear the display of the old active region, if any. */
6959 overlay = Qnil; 7221 clear_mouse_face (dpyinfo);
6960 for (i = noverlays - 1; i >= 0; --i) 7222 /* TODO: mouse cursor changes. */
6961 {
6962 mouse_face = Foverlay_get (overlay_vec[i], Qmouse_face);
6963 if (!NILP (mouse_face))
6964 {
6965 overlay = overlay_vec[i];
6966 break;
6967 }
6968 }
6969 7223
6970 /* If no overlay applies, get a text property. */ 7224 /* If no overlay applies, get a text property. */
6971 if (NILP (overlay)) 7225 if (NILP (overlay))
6972 mouse_face = Fget_text_property (position, Qmouse_face, w->buffer); 7226 mouse_face = Fget_text_property (position, Qmouse_face, object);
6973 7227
6974 /* Handle the overlay case. */ 7228 /* Handle the overlay case. */
6975 if (! NILP (overlay)) 7229 if (!NILP (overlay))
6976 { 7230 {
6977 /* Find the range of text around this char that 7231 /* Find the range of text around this char that
6978 should be active. */ 7232 should be active. */
6979 Lisp_Object before, after; 7233 Lisp_Object before, after;
6980 int ignore; 7234 int ignore;
6981 7235
6982 before = Foverlay_start (overlay); 7236 before = Foverlay_start (overlay);
6983 after = Foverlay_end (overlay); 7237 after = Foverlay_end (overlay);
6984 /* Record this as the current active region. */ 7238 /* Record this as the current active region. */
6985 fast_find_position (w, XFASTINT (before), 7239 fast_find_position (w, XFASTINT (before),
6986 &dpyinfo->mouse_face_beg_col, 7240 &dpyinfo->mouse_face_beg_col,
6987 &dpyinfo->mouse_face_beg_row, 7241 &dpyinfo->mouse_face_beg_row,
6988 &dpyinfo->mouse_face_beg_x, 7242 &dpyinfo->mouse_face_beg_x,
6989 &dpyinfo->mouse_face_beg_y); 7243 &dpyinfo->mouse_face_beg_y, Qnil);
6990 dpyinfo->mouse_face_past_end 7244
6991 = !fast_find_position (w, XFASTINT (after), 7245 dpyinfo->mouse_face_past_end
6992 &dpyinfo->mouse_face_end_col, 7246 = !fast_find_position (w, XFASTINT (after),
6993 &dpyinfo->mouse_face_end_row, 7247 &dpyinfo->mouse_face_end_col,
6994 &dpyinfo->mouse_face_end_x, 7248 &dpyinfo->mouse_face_end_row,
6995 &dpyinfo->mouse_face_end_y); 7249 &dpyinfo->mouse_face_end_x,
6996 dpyinfo->mouse_face_window = window; 7250 &dpyinfo->mouse_face_end_y, Qnil);
7251 dpyinfo->mouse_face_window = window;
7252
7253 dpyinfo->mouse_face_face_id
7254 = face_at_buffer_position (w, pos, 0, 0,
7255 &ignore, pos + 1, 1);
7256
7257 /* Display it as active. */
7258 show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
7259 /* TODO: mouse cursor changes. */
7260 }
7261 /* Handle the text property case. */
7262 else if (! NILP (mouse_face) && BUFFERP (object))
7263 {
7264 /* Find the range of text around this char that
7265 should be active. */
7266 Lisp_Object before, after, beginning, end;
7267 int ignore;
7268
7269 beginning = Fmarker_position (w->start);
7270 end = make_number (BUF_Z (XBUFFER (object))
7271 - XFASTINT (w->window_end_pos));
7272 before
7273 = Fprevious_single_property_change (make_number (pos + 1),
7274 Qmouse_face,
7275 object, beginning);
7276 after
7277 = Fnext_single_property_change (position, Qmouse_face,
7278 object, end);
7279
7280 /* Record this as the current active region. */
7281 fast_find_position (w, XFASTINT (before),
7282 &dpyinfo->mouse_face_beg_col,
7283 &dpyinfo->mouse_face_beg_row,
7284 &dpyinfo->mouse_face_beg_x,
7285 &dpyinfo->mouse_face_beg_y, Qnil);
7286 dpyinfo->mouse_face_past_end
7287 = !fast_find_position (w, XFASTINT (after),
7288 &dpyinfo->mouse_face_end_col,
7289 &dpyinfo->mouse_face_end_row,
7290 &dpyinfo->mouse_face_end_x,
7291 &dpyinfo->mouse_face_end_y, Qnil);
7292 dpyinfo->mouse_face_window = window;
7293
7294 if (BUFFERP (object))
6997 dpyinfo->mouse_face_face_id 7295 dpyinfo->mouse_face_face_id
6998 = face_at_buffer_position (w, pos, 0, 0, 7296 = face_at_buffer_position (w, pos, 0, 0,
6999 &ignore, pos + 1, 1); 7297 &ignore, pos + 1, 1);
7000 7298
7001 /* Display it as active. */ 7299 /* Display it as active. */
7002 show_mouse_face (dpyinfo, DRAW_MOUSE_FACE); 7300 show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
7003 } 7301 /* TODO: mouse cursor changes. */
7004 /* Handle the text property case. */ 7302 }
7005 else if (! NILP (mouse_face)) 7303 else if (!NILP (mouse_face) && STRINGP (object))
7006 { 7304 {
7007 /* Find the range of text around this char that 7305 Lisp_Object b, e;
7008 should be active. */ 7306 int ignore;
7009 Lisp_Object before, after, beginning, end; 7307
7010 int ignore; 7308 b = Fprevious_single_property_change (make_number (pos + 1),
7011 7309 Qmouse_face,
7012 beginning = Fmarker_position (w->start); 7310 object, Qnil);
7013 XSETINT (end, (BUF_Z (XBUFFER (w->buffer)) 7311 e = Fnext_single_property_change (position, Qmouse_face,
7014 - XFASTINT (w->window_end_pos))); 7312 object, Qnil);
7015 before 7313 if (NILP (b))
7016 = Fprevious_single_property_change (make_number (pos + 1), 7314 b = make_number (0);
7017 Qmouse_face, 7315 if (NILP (e))
7018 w->buffer, beginning); 7316 e = make_number (XSTRING (object)->size - 1);
7019 after 7317 fast_find_string_pos (w, XINT (b), object,
7020 = Fnext_single_property_change (position, Qmouse_face,
7021 w->buffer, end);
7022 /* Record this as the current active region. */
7023 fast_find_position (w, XFASTINT (before),
7024 &dpyinfo->mouse_face_beg_col, 7318 &dpyinfo->mouse_face_beg_col,
7025 &dpyinfo->mouse_face_beg_row, 7319 &dpyinfo->mouse_face_beg_row,
7026 &dpyinfo->mouse_face_beg_x, 7320 &dpyinfo->mouse_face_beg_x,
7027 &dpyinfo->mouse_face_beg_y); 7321 &dpyinfo->mouse_face_beg_y, 0);
7028 dpyinfo->mouse_face_past_end 7322 fast_find_string_pos (w, XINT (e), object,
7029 = !fast_find_position (w, XFASTINT (after), 7323 &dpyinfo->mouse_face_end_col,
7030 &dpyinfo->mouse_face_end_col, 7324 &dpyinfo->mouse_face_end_row,
7031 &dpyinfo->mouse_face_end_row, 7325 &dpyinfo->mouse_face_end_x,
7032 &dpyinfo->mouse_face_end_x, 7326 &dpyinfo->mouse_face_end_y, 1);
7033 &dpyinfo->mouse_face_end_y); 7327 dpyinfo->mouse_face_past_end = 0;
7034 dpyinfo->mouse_face_window = window; 7328 dpyinfo->mouse_face_window = window;
7035 dpyinfo->mouse_face_face_id 7329 dpyinfo->mouse_face_face_id
7036 = face_at_buffer_position (w, pos, 0, 0, 7330 = face_at_string_position (w, object, pos, 0, 0, 0, &ignore,
7037 &ignore, pos + 1, 1); 7331 glyph->face_id, 1);
7038 7332 show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
7039 /* Display it as active. */ 7333 /* TODO: mouse cursor changes. */
7040 show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
7041 }
7042 }
7043
7044 /* Look for a `help-echo' property. */
7045 {
7046 Lisp_Object help, overlay;
7047
7048 /* Check overlays first. */
7049 help = Qnil;
7050 for (i = noverlays - 1; i >= 0 && NILP (help); --i)
7051 {
7052 overlay = overlay_vec[i];
7053 help = Foverlay_get (overlay, Qhelp_echo);
7054 } 7334 }
7055 7335 else if (STRINGP (object) && NILP (mouse_face))
7056 if (!NILP (help))
7057 { 7336 {
7058 help_echo = help; 7337 /* A string which doesn't have mouse-face, but
7059 help_echo_window = window; 7338 the text ``under'' it might have. */
7060 help_echo_object = overlay; 7339 struct glyph_row *r = MATRIX_ROW (w->current_matrix, vpos);
7061 help_echo_pos = pos; 7340 int start = MATRIX_ROW_START_CHARPOS (r);
7062 } 7341
7063 else 7342 pos = string_buffer_position (w, object, start);
7064 { 7343 if (pos > 0)
7065 /* Try text properties. */ 7344 mouse_face = get_char_property_and_overlay (make_number (pos),
7066 if ((STRINGP (glyph->object) 7345 Qmouse_face,
7067 && glyph->charpos >= 0 7346 w->buffer,
7068 && glyph->charpos < XSTRING (glyph->object)->size) 7347 &overlay);
7069 || (BUFFERP (glyph->object) 7348 if (!NILP (mouse_face) && !NILP (overlay))
7070 && glyph->charpos >= BEGV
7071 && glyph->charpos < ZV))
7072 help = Fget_text_property (make_number (glyph->charpos),
7073 Qhelp_echo, glyph->object);
7074
7075 if (!NILP (help))
7076 { 7349 {
7077 help_echo = help; 7350 Lisp_Object before = Foverlay_start (overlay);
7078 help_echo_window = window; 7351 Lisp_Object after = Foverlay_end (overlay);
7079 help_echo_object = glyph->object; 7352 int ignore;
7080 help_echo_pos = glyph->charpos; 7353
7354 /* Note that we might not be able to find position
7355 BEFORE in the glyph matrix if the overlay is
7356 entirely covered by a `display' property. In
7357 this case, we overshoot. So let's stop in
7358 the glyph matrix before glyphs for OBJECT. */
7359 fast_find_position (w, XFASTINT (before),
7360 &dpyinfo->mouse_face_beg_col,
7361 &dpyinfo->mouse_face_beg_row,
7362 &dpyinfo->mouse_face_beg_x,
7363 &dpyinfo->mouse_face_beg_y,
7364 object);
7365
7366 dpyinfo->mouse_face_past_end
7367 = !fast_find_position (w, XFASTINT (after),
7368 &dpyinfo->mouse_face_end_col,
7369 &dpyinfo->mouse_face_end_row,
7370 &dpyinfo->mouse_face_end_x,
7371 &dpyinfo->mouse_face_end_y,
7372 Qnil);
7373 dpyinfo->mouse_face_window = window;
7374 dpyinfo->mouse_face_face_id
7375 = face_at_buffer_position (w, pos, 0, 0,
7376 &ignore, pos + 1, 1);
7377
7378 /* Display it as active. */
7379 show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
7380 /* TODO: mouse cursor changes. */
7081 } 7381 }
7082 } 7382 }
7083 } 7383 }
7084 7384
7085 BEGV = obegv; 7385 check_help_echo:
7086 ZV = ozv; 7386
7087 current_buffer = obuf; 7387 /* Look for a `help-echo' property. */
7388 {
7389 Lisp_Object help, overlay;
7390
7391 /* Check overlays first. */
7392 help = overlay = Qnil;
7393 for (i = noverlays - 1; i >= 0 && NILP (help); --i)
7394 {
7395 overlay = overlay_vec[i];
7396 help = Foverlay_get (overlay, Qhelp_echo);
7397 }
7398
7399 if (!NILP (help))
7400 {
7401 help_echo = help;
7402 help_echo_window = window;
7403 help_echo_object = overlay;
7404 help_echo_pos = pos;
7405 }
7406 else
7407 {
7408 Lisp_Object object = glyph->object;
7409 int charpos = glyph->charpos;
7410
7411 /* Try text properties. */
7412 if (STRINGP (object)
7413 && charpos >= 0
7414 && charpos < XSTRING (object)->size)
7415 {
7416 help = Fget_text_property (make_number (charpos),
7417 Qhelp_echo, object);
7418 if (NILP (help))
7419 {
7420 /* If the string itself doesn't specify a help-echo,
7421 see if the buffer text ``under'' it does. */
7422 struct glyph_row *r
7423 = MATRIX_ROW (w->current_matrix, vpos);
7424 int start = MATRIX_ROW_START_CHARPOS (r);
7425 int pos = string_buffer_position (w, object, start);
7426 if (pos > 0)
7427 {
7428 help = Fget_char_property (make_number (pos),
7429 Qhelp_echo, w->buffer);
7430 if (!NILP (help))
7431 {
7432 charpos = pos;
7433 object = w->buffer;
7434 }
7435 }
7436 }
7437 }
7438 else if (BUFFERP (object)
7439 && charpos >= BEGV
7440 && charpos < ZV)
7441 help = Fget_text_property (make_number (charpos), Qhelp_echo,
7442 object);
7443
7444 if (!NILP (help))
7445 {
7446 help_echo = help;
7447 help_echo_window = window;
7448 help_echo_object = object;
7449 help_echo_pos = charpos;
7450 }
7451 }
7088 } 7452 }
7453
7454 BEGV = obegv;
7455 ZV = ozv;
7456 current_buffer = obuf;
7089 } 7457 }
7458
7459 set_cursor:
7460 /* TODO: mouse cursor changes. */
7461 ;
7090} 7462}
7091 7463
7092static void 7464static void
@@ -7136,7 +7508,7 @@ x_tool_bar_item (f, x, y, glyph, hpos, vpos, prop_idx)
7136 int area; 7508 int area;
7137 7509
7138 /* Find the glyph under X/Y. */ 7510 /* Find the glyph under X/Y. */
7139 *glyph = x_y_to_hpos_vpos (w, x, y, hpos, vpos, &area); 7511 *glyph = x_y_to_hpos_vpos (w, x, y, hpos, vpos, &area, 0);
7140 if (*glyph == NULL) 7512 if (*glyph == NULL)
7141 return -1; 7513 return -1;
7142 7514
@@ -7317,28 +7689,101 @@ note_tool_bar_highlight (f, x, y)
7317 7689
7318 7690
7319 7691
7320/* Find the glyph matrix position of buffer position POS in window W. 7692/* Find the glyph matrix position of buffer position CHARPOS in window
7321 *HPOS, *VPOS, *X, and *Y are set to the positions found. W's 7693 *W. HPOS, *VPOS, *X, and *Y are set to the positions found. W's
7322 current glyphs must be up to date. If POS is above window start 7694 current glyphs must be up to date. If CHARPOS is above window
7323 return (0, 0, 0, 0). If POS is after end of W, return end of 7695 start return (0, 0, 0, 0). If CHARPOS is after end of W, return end
7324 last line in W. */ 7696 of last line in W. In the row containing CHARPOS, stop before glyphs
7697 having STOP as object. */
7698
7699#if 0 /* This is a version of fast_find_position that's more correct
7700 in the presence of hscrolling, for example. I didn't install
7701 it right away because the problem fixed is minor, it failed
7702 in 20.x as well, and I think it's too risky to install
7703 so near the release of 21.1. 2001-09-25 gerd. */
7325 7704
7326static int 7705static int
7327fast_find_position (w, pos, hpos, vpos, x, y) 7706fast_find_position (w, charpos, hpos, vpos, x, y, stop)
7707 struct window *w;
7708 int charpos;
7709 int *hpos, *vpos, *x, *y;
7710 Lisp_Object stop;
7711{
7712 struct glyph_row *row, *first;
7713 struct glyph *glyph, *end;
7714 int i, past_end = 0;
7715
7716 first = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
7717 row = row_containing_pos (w, charpos, first, NULL, 0);
7718 if (row == NULL)
7719 {
7720 if (charpos < MATRIX_ROW_START_CHARPOS (first))
7721 {
7722 *x = *y = *hpos = *vpos = 0;
7723 return 0;
7724 }
7725 else
7726 {
7727 row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
7728 past_end = 1;
7729 }
7730 }
7731
7732 *x = row->x;
7733 *y = row->y;
7734 *vpos = MATRIX_ROW_VPOS (row, w->current_matrix);
7735
7736 glyph = row->glyphs[TEXT_AREA];
7737 end = glyph + row->used[TEXT_AREA];
7738
7739 /* Skip over glyphs not having an object at the start of the row.
7740 These are special glyphs like truncation marks on terminal
7741 frames. */
7742 if (row->displays_text_p)
7743 while (glyph < end
7744 && INTEGERP (glyph->object)
7745 && !EQ (stop, glyph->object)
7746 && glyph->charpos < 0)
7747 {
7748 *x += glyph->pixel_width;
7749 ++glyph;
7750 }
7751
7752 while (glyph < end
7753 && !INTEGERP (glyph->object)
7754 && !EQ (stop, glyph->object)
7755 && (!BUFFERP (glyph->object)
7756 || glyph->charpos < charpos))
7757 {
7758 *x += glyph->pixel_width;
7759 ++glyph;
7760 }
7761
7762 *hpos = glyph - row->glyphs[TEXT_AREA];
7763 return past_end;
7764}
7765
7766#else /* not 0 */
7767
7768static int
7769fast_find_position (w, pos, hpos, vpos, x, y, stop)
7328 struct window *w; 7770 struct window *w;
7329 int pos; 7771 int pos;
7330 int *hpos, *vpos, *x, *y; 7772 int *hpos, *vpos, *x, *y;
7773 Lisp_Object stop;
7331{ 7774{
7332 int i; 7775 int i;
7333 int lastcol; 7776 int lastcol;
7334 int maybe_next_line_p = 0; 7777 int maybe_next_line_p = 0;
7335 int line_start_position; 7778 int line_start_position;
7336 int yb = window_text_bottom_y (w); 7779 int yb = window_text_bottom_y (w);
7337 struct glyph_row *row = MATRIX_ROW (w->current_matrix, 0); 7780 struct glyph_row *row, *best_row;
7338 struct glyph_row *best_row = row; 7781 int row_vpos, best_row_vpos;
7339 int row_vpos = 0, best_row_vpos = 0;
7340 int current_x; 7782 int current_x;
7341 7783
7784 row = best_row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
7785 row_vpos = best_row_vpos = MATRIX_ROW_VPOS (row, w->current_matrix);
7786
7342 while (row->y < yb) 7787 while (row->y < yb)
7343 { 7788 {
7344 if (row->used[TEXT_AREA]) 7789 if (row->used[TEXT_AREA])
@@ -7351,46 +7796,50 @@ fast_find_position (w, pos, hpos, vpos, x, y)
7351 /* If the position sought is the end of the buffer, 7796 /* If the position sought is the end of the buffer,
7352 don't include the blank lines at the bottom of the window. */ 7797 don't include the blank lines at the bottom of the window. */
7353 else if (line_start_position == pos 7798 else if (line_start_position == pos
7354 && pos == BUF_ZV (XBUFFER (w->buffer))) 7799 && pos == BUF_ZV (XBUFFER (w->buffer)))
7355 { 7800 {
7356 maybe_next_line_p = 1; 7801 maybe_next_line_p = 1;
7357 break; 7802 break;
7358 } 7803 }
7359 else if (line_start_position > 0) 7804 else if (line_start_position > 0)
7360 { 7805 {
7361 best_row = row; 7806 best_row = row;
7362 best_row_vpos = row_vpos; 7807 best_row_vpos = row_vpos;
7363 } 7808 }
7364 7809
7365 if (row->y + row->height >= yb) 7810 if (row->y + row->height >= yb)
7366 break; 7811 break;
7367 7812
7368 ++row; 7813 ++row;
7369 ++row_vpos; 7814 ++row_vpos;
7370 } 7815 }
7371 7816
7372 /* Find the right column within BEST_ROW. */ 7817 /* Find the right column within BEST_ROW. */
7373 lastcol = 0; 7818 lastcol = 0;
7374 current_x = best_row->x; 7819 current_x = best_row->x;
7375 for (i = 0; i < best_row->used[TEXT_AREA]; i++) 7820 for (i = 0; i < best_row->used[TEXT_AREA]; i++)
7376 { 7821 {
7377 struct glyph *glyph = best_row->glyphs[TEXT_AREA] + i; 7822 struct glyph *glyph = best_row->glyphs[TEXT_AREA] + i;
7378 int charpos; 7823 int charpos = glyph->charpos;
7379 7824
7380 charpos = glyph->charpos; 7825 if (BUFFERP (glyph->object))
7381 if (charpos == pos)
7382 { 7826 {
7383 *hpos = i; 7827 if (charpos == pos)
7384 *vpos = best_row_vpos; 7828 {
7385 *x = current_x; 7829 *hpos = i;
7386 *y = best_row->y; 7830 *vpos = best_row_vpos;
7387 return 1; 7831 *x = current_x;
7832 *y = best_row->y;
7833 return 1;
7834 }
7835 else if (charpos > pos)
7836 break;
7388 } 7837 }
7389 else if (charpos > pos) 7838 else if (EQ (glyph->object, stop))
7390 break; 7839 break;
7391 else if (charpos > 0)
7392 lastcol = i;
7393 7840
7841 if (charpos > 0)
7842 lastcol = i;
7394 current_x += glyph->pixel_width; 7843 current_x += glyph->pixel_width;
7395 } 7844 }
7396 7845
@@ -7412,6 +7861,90 @@ fast_find_position (w, pos, hpos, vpos, x, y)
7412 return 0; 7861 return 0;
7413} 7862}
7414 7863
7864#endif /* not 0 */
7865
7866
7867/* Find the position of the glyph for position POS in OBJECT in
7868 window W's current matrix, and return in *X/*Y the pixel
7869 coordinates, and return in *HPOS/*VPOS the column/row of the glyph.
7870
7871 RIGHT_P non-zero means return the position of the right edge of the
7872 glyph, RIGHT_P zero means return the left edge position.
7873
7874 If no glyph for POS exists in the matrix, return the position of
7875 the glyph with the next smaller position that is in the matrix, if
7876 RIGHT_P is zero. If RIGHT_P is non-zero, and no glyph for POS
7877 exists in the matrix, return the position of the glyph with the
7878 next larger position in OBJECT.
7879
7880 Value is non-zero if a glyph was found. */
7881
7882static int
7883fast_find_string_pos (w, pos, object, hpos, vpos, x, y, right_p)
7884 struct window *w;
7885 int pos;
7886 Lisp_Object object;
7887 int *hpos, *vpos, *x, *y;
7888 int right_p;
7889{
7890 int yb = window_text_bottom_y (w);
7891 struct glyph_row *r;
7892 struct glyph *best_glyph = NULL;
7893 struct glyph_row *best_row = NULL;
7894 int best_x = 0;
7895
7896 for (r = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
7897 r->enabled_p && r->y < yb;
7898 ++r)
7899 {
7900 struct glyph *g = r->glyphs[TEXT_AREA];
7901 struct glyph *e = g + r->used[TEXT_AREA];
7902 int gx;
7903
7904 for (gx = r->x; g < e; gx += g->pixel_width, ++g)
7905 if (EQ (g->object, object))
7906 {
7907 if (g->charpos == pos)
7908 {
7909 best_glyph = g;
7910 best_x = gx;
7911 best_row = r;
7912 goto found;
7913 }
7914 else if (best_glyph == NULL
7915 || ((abs (g->charpos - pos)
7916 < abs (best_glyph->charpos - pos))
7917 && (right_p
7918 ? g->charpos < pos
7919 : g->charpos > pos)))
7920 {
7921 best_glyph = g;
7922 best_x = gx;
7923 best_row = r;
7924 }
7925 }
7926 }
7927
7928 found:
7929
7930 if (best_glyph)
7931 {
7932 *x = best_x;
7933 *hpos = best_glyph - best_row->glyphs[TEXT_AREA];
7934
7935 if (right_p)
7936 {
7937 *x += best_glyph->pixel_width;
7938 ++*hpos;
7939 }
7940
7941 *y = best_row->y;
7942 *vpos = best_row - w->current_matrix->rows;
7943 }
7944
7945 return best_glyph != NULL;
7946}
7947
7415 7948
7416/* Display the active region described by mouse_face_* 7949/* Display the active region described by mouse_face_*
7417 in its mouse-face if HL > 0, in its normal face if HL = 0. */ 7950 in its mouse-face if HL > 0, in its normal face if HL = 0. */
@@ -7423,81 +7956,61 @@ show_mouse_face (dpyinfo, draw)
7423{ 7956{
7424 struct window *w = XWINDOW (dpyinfo->mouse_face_window); 7957 struct window *w = XWINDOW (dpyinfo->mouse_face_window);
7425 struct frame *f = XFRAME (WINDOW_FRAME (w)); 7958 struct frame *f = XFRAME (WINDOW_FRAME (w));
7426 int i;
7427 int cursor_off_p = 0;
7428 struct cursor_pos saved_cursor;
7429
7430 saved_cursor = output_cursor;
7431 7959
7432 /* If window is in the process of being destroyed, don't bother 7960 if (/* If window is in the process of being destroyed, don't bother
7433 to do anything. */ 7961 to do anything. */
7434 if (w->current_matrix == NULL) 7962 w->current_matrix != NULL
7435 goto set_x_cursor; 7963 /* Don't update mouse highlight if hidden */
7436 7964 && (draw != DRAW_MOUSE_FACE || !dpyinfo->mouse_face_hidden)
7437 /* Recognize when we are called to operate on rows that don't exist 7965 /* Recognize when we are called to operate on rows that don't exist
7438 anymore. This can happen when a window is split. */ 7966 anymore. This can happen when a window is split. */
7439 if (dpyinfo->mouse_face_end_row >= w->current_matrix->nrows) 7967 && dpyinfo->mouse_face_end_row < w->current_matrix->nrows)
7440 goto set_x_cursor;
7441
7442 set_output_cursor (&w->phys_cursor);
7443
7444 /* Note that mouse_face_beg_row etc. are window relative. */
7445 for (i = dpyinfo->mouse_face_beg_row;
7446 i <= dpyinfo->mouse_face_end_row;
7447 i++)
7448 { 7968 {
7449 int start_hpos, end_hpos, start_x; 7969 int phys_cursor_on_p = w->phys_cursor_on_p;
7450 struct glyph_row *row = MATRIX_ROW (w->current_matrix, i); 7970 struct glyph_row *row, *first, *last;
7451 7971
7452 /* Don't do anything if row doesn't have valid contents. */ 7972 first = MATRIX_ROW (w->current_matrix, dpyinfo->mouse_face_beg_row);
7453 if (!row->enabled_p) 7973 last = MATRIX_ROW (w->current_matrix, dpyinfo->mouse_face_end_row);
7454 continue; 7974
7455 7975 for (row = first; row <= last && row->enabled_p; ++row)
7456 /* For all but the first row, the highlight starts at column 0. */
7457 if (i == dpyinfo->mouse_face_beg_row)
7458 {
7459 start_hpos = dpyinfo->mouse_face_beg_col;
7460 start_x = dpyinfo->mouse_face_beg_x;
7461 }
7462 else
7463 { 7976 {
7464 start_hpos = 0; 7977 int start_hpos, end_hpos, start_x;
7465 start_x = 0;
7466 }
7467 7978
7468 if (i == dpyinfo->mouse_face_end_row) 7979 /* For all but the first row, the highlight starts at column 0. */
7469 end_hpos = dpyinfo->mouse_face_end_col; 7980 if (row == first)
7470 else 7981 {
7471 end_hpos = row->used[TEXT_AREA]; 7982 start_hpos = dpyinfo->mouse_face_beg_col;
7983 start_x = dpyinfo->mouse_face_beg_x;
7984 }
7985 else
7986 {
7987 start_hpos = 0;
7988 start_x = 0;
7989 }
7472 7990
7473 /* If the cursor's in the text we are about to rewrite, turn the 7991 if (row == last)
7474 cursor off. */ 7992 end_hpos = dpyinfo->mouse_face_end_col;
7475 if (!w->pseudo_window_p 7993 else
7476 && i == output_cursor.vpos 7994 end_hpos = row->used[TEXT_AREA];
7477 && output_cursor.hpos >= start_hpos - 1
7478 && output_cursor.hpos <= end_hpos)
7479 {
7480 x_update_window_cursor (w, 0);
7481 cursor_off_p = 1;
7482 }
7483 7995
7484 if (end_hpos > start_hpos) 7996 if (end_hpos > start_hpos)
7485 { 7997 {
7486 row->mouse_face_p = draw == DRAW_MOUSE_FACE; 7998 x_draw_glyphs (w, start_x, row, TEXT_AREA,
7487 x_draw_glyphs (w, start_x, row, TEXT_AREA, 7999 start_hpos, end_hpos, draw, 0);
7488 start_hpos, end_hpos, draw, NULL, NULL, 0);
7489 }
7490 }
7491 8000
7492 /* If we turned the cursor off, turn it back on. */ 8001 row->mouse_face_p
7493 if (cursor_off_p) 8002 = draw == DRAW_MOUSE_FACE || draw == DRAW_IMAGE_RAISED;
7494 x_display_cursor (w, 1, 8003 }
7495 output_cursor.hpos, output_cursor.vpos, 8004 }
7496 output_cursor.x, output_cursor.y);
7497 8005
7498 output_cursor = saved_cursor; 8006 /* When we've written over the cursor, arrange for it to
8007 be displayed again. */
8008 if (phys_cursor_on_p && !w->phys_cursor_on_p)
8009 x_display_cursor (w, 1,
8010 w->phys_cursor.hpos, w->phys_cursor.vpos,
8011 w->phys_cursor.x, w->phys_cursor.y);
8012 }
7499 8013
7500 set_x_cursor:
7501#if 0 /* MAC_TODO: mouse cursor */ 8014#if 0 /* MAC_TODO: mouse cursor */
7502 /* Change the mouse cursor. */ 8015 /* Change the mouse cursor. */
7503 if (draw == DRAW_NORMAL_TEXT) 8016 if (draw == DRAW_NORMAL_TEXT)
@@ -7510,25 +8023,28 @@ show_mouse_face (dpyinfo, draw)
7510 XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 8023 XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
7511 f->output_data.x->nontext_cursor); 8024 f->output_data.x->nontext_cursor);
7512#endif 8025#endif
7513 ;
7514} 8026}
7515 8027
7516/* Clear out the mouse-highlighted active region. 8028/* Clear out the mouse-highlighted active region.
7517 Redraw it un-highlighted first. */ 8029 Redraw it un-highlighted first. */
7518 8030
7519void 8031static int
7520clear_mouse_face (dpyinfo) 8032clear_mouse_face (dpyinfo)
7521 struct mac_display_info *dpyinfo; 8033 struct mac_display_info *dpyinfo;
7522{ 8034{
7523 if (!NILP (tip_frame)) 8035 int cleared = 0;
7524 return; 8036
7525
7526 if (! NILP (dpyinfo->mouse_face_window)) 8037 if (! NILP (dpyinfo->mouse_face_window))
7527 show_mouse_face (dpyinfo, DRAW_NORMAL_TEXT); 8038 {
8039 show_mouse_face (dpyinfo, DRAW_NORMAL_TEXT);
8040 cleared = 1;
8041 }
7528 8042
7529 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; 8043 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
7530 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; 8044 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
7531 dpyinfo->mouse_face_window = Qnil; 8045 dpyinfo->mouse_face_window = Qnil;
8046 dpyinfo->mouse_face_overlay = Qnil;
8047 return cleared;
7532} 8048}
7533 8049
7534 8050
@@ -7536,23 +8052,25 @@ clear_mouse_face (dpyinfo)
7536 redisplay interface, and is called from try_window_id and similar 8052 redisplay interface, and is called from try_window_id and similar
7537 functions to ensure the mouse-highlight is off. */ 8053 functions to ensure the mouse-highlight is off. */
7538 8054
7539void 8055static void
7540x_clear_mouse_face (w) 8056x_clear_mouse_face (w)
7541 struct window *w; 8057 struct window *w;
7542{ 8058{
7543 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (XFRAME (w->frame)); 8059 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (XFRAME (w->frame));
7544 Lisp_Object window; 8060 Lisp_Object window;
7545 8061
8062 BLOCK_INPUT;
7546 XSETWINDOW (window, w); 8063 XSETWINDOW (window, w);
7547 if (EQ (window, dpyinfo->mouse_face_window)) 8064 if (EQ (window, dpyinfo->mouse_face_window))
7548 clear_mouse_face (dpyinfo); 8065 clear_mouse_face (dpyinfo);
8066 UNBLOCK_INPUT;
7549} 8067}
7550 8068
7551 8069
7552/* Just discard the mouse face information for frame F, if any. 8070/* Just discard the mouse face information for frame F, if any.
7553 This is used when the size of F is changed. */ 8071 This is used when the size of F is changed. */
7554 8072
7555static void 8073void
7556cancel_mouse_face (f) 8074cancel_mouse_face (f)
7557 FRAME_PTR f; 8075 FRAME_PTR f;
7558{ 8076{
@@ -7570,6 +8088,107 @@ cancel_mouse_face (f)
7570 8088
7571static struct scroll_bar *x_window_to_scroll_bar (); 8089static struct scroll_bar *x_window_to_scroll_bar ();
7572static void x_scroll_bar_report_motion (); 8090static void x_scroll_bar_report_motion ();
8091static void x_check_fullscreen P_ ((struct frame *));
8092static void x_check_fullscreen_move P_ ((struct frame *));
8093static int glyph_rect P_ ((struct frame *f, int, int, Rect *));
8094
8095
8096/* Try to determine frame pixel position and size of the glyph under
8097 frame pixel coordinates X/Y on frame F . Return the position and
8098 size in *RECT. Value is non-zero if we could compute these
8099 values. */
8100
8101static int
8102glyph_rect (f, x, y, rect)
8103 struct frame *f;
8104 int x, y;
8105 Rect *rect;
8106{
8107 Lisp_Object window;
8108 int part;
8109
8110 window = window_from_coordinates (f, x, y, &part, 0);
8111 if (!NILP (window))
8112 {
8113 struct window *w = XWINDOW (window);
8114 struct glyph_row *r = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
8115 struct glyph_row *end = r + w->current_matrix->nrows - 1;
8116
8117 frame_to_window_pixel_xy (w, &x, &y);
8118
8119 for (; r < end && r->enabled_p; ++r)
8120 if (r->y <= y && r->y + r->height > y)
8121 {
8122 /* Found the row at y. */
8123 struct glyph *g = r->glyphs[TEXT_AREA];
8124 struct glyph *end = g + r->used[TEXT_AREA];
8125 int gx;
8126
8127 rect->top = WINDOW_TO_FRAME_PIXEL_Y (w, r->y);
8128 rect->bottom = rect->top + r->height;
8129
8130 if (x < r->x)
8131 {
8132 /* x is to the left of the first glyph in the row. */
8133 rect->left = XINT (w->left);
8134 rect->right = WINDOW_TO_FRAME_PIXEL_X (w, r->x);
8135 return 1;
8136 }
8137
8138 for (gx = r->x; g < end; gx += g->pixel_width, ++g)
8139 if (gx <= x && gx + g->pixel_width > x)
8140 {
8141 /* x is on a glyph. */
8142 rect->left = WINDOW_TO_FRAME_PIXEL_X (w, gx);
8143 rect->right = rect->left + g->pixel_width;
8144 return 1;
8145 }
8146
8147 /* x is to the right of the last glyph in the row. */
8148 rect->left = WINDOW_TO_FRAME_PIXEL_X (w, gx);
8149 rect->right = XINT (w->left) + XINT (w->width);
8150 return 1;
8151 }
8152 }
8153
8154 /* The y is not on any row. */
8155 return 0;
8156}
8157
8158/* Record the position of the mouse in last_mouse_glyph. */
8159static void
8160remember_mouse_glyph (f1, gx, gy)
8161 struct frame * f1;
8162 int gx, gy;
8163{
8164 if (!glyph_rect (f1, gx, gy, &last_mouse_glyph))
8165 {
8166 int width = FRAME_SMALLEST_CHAR_WIDTH (f1);
8167 int height = FRAME_SMALLEST_FONT_HEIGHT (f1);
8168
8169 /* Arrange for the division in PIXEL_TO_CHAR_COL etc. to
8170 round down even for negative values. */
8171 if (gx < 0)
8172 gx -= width - 1;
8173 if (gy < 0)
8174 gy -= height - 1;
8175#if 0
8176 /* This was the original code from XTmouse_position, but it seems
8177 to give the position of the glyph diagonally next to the one
8178 the mouse is over. */
8179 gx = (gx + width - 1) / width * width;
8180 gy = (gy + height - 1) / height * height;
8181#else
8182 gx = gx / width * width;
8183 gy = gy / height * height;
8184#endif
8185
8186 last_mouse_glyph.left = gx;
8187 last_mouse_glyph.top = gy;
8188 last_mouse_glyph.right = gx + width;
8189 last_mouse_glyph.bottom = gy + height;
8190 }
8191}
7573 8192
7574/* Return the current position of the mouse. 8193/* Return the current position of the mouse.
7575 *fp should be a frame which indicates which display to ask about. 8194 *fp should be a frame which indicates which display to ask about.
@@ -7591,7 +8210,7 @@ static void x_scroll_bar_report_motion ();
7591 This clears the mouse_moved flag, so we can wait for the next mouse 8210 This clears the mouse_moved flag, so we can wait for the next mouse
7592 movement. */ 8211 movement. */
7593 8212
7594void 8213static void
7595XTmouse_position (fp, insist, bar_window, part, x, y, time) 8214XTmouse_position (fp, insist, bar_window, part, x, y, time)
7596 FRAME_PTR *fp; 8215 FRAME_PTR *fp;
7597 int insist; 8216 int insist;
@@ -7618,7 +8237,12 @@ XTmouse_position (fp, insist, bar_window, part, x, y, time)
7618 8237
7619 last_mouse_scroll_bar = Qnil; 8238 last_mouse_scroll_bar = Qnil;
7620 8239
8240#if TARGET_API_MAC_CARBON
8241 SetPort (GetWindowPort (wp));
8242#else
7621 SetPort (wp); 8243 SetPort (wp);
8244#endif
8245
7622 GetMouse (&mouse_pos); 8246 GetMouse (&mouse_pos);
7623 8247
7624 pixel_to_glyph_coords (f, mouse_pos.h, mouse_pos.v, &ignore1, &ignore2, 8248 pixel_to_glyph_coords (f, mouse_pos.h, mouse_pos.v, &ignore1, &ignore2,
@@ -7642,7 +8266,7 @@ XTmouse_position (fp, insist, bar_window, part, x, y, time)
7642 8266
7643/* Create a scroll bar and return the scroll bar vector for it. W is 8267/* Create a scroll bar and return the scroll bar vector for it. W is
7644 the Emacs window on which to create the scroll bar. TOP, LEFT, 8268 the Emacs window on which to create the scroll bar. TOP, LEFT,
7645 WIDTH and HEIGHT are.the pixel coordinates and dimensions of the 8269 WIDTH and HEIGHT are the pixel coordinates and dimensions of the
7646 scroll bar. */ 8270 scroll bar. */
7647 8271
7648static struct scroll_bar * 8272static struct scroll_bar *
@@ -7663,8 +8287,13 @@ x_scroll_bar_create (w, top, left, width, height, disp_top, disp_height)
7663 r.right = left + width; 8287 r.right = left + width;
7664 r.bottom = disp_top + disp_height; 8288 r.bottom = disp_top + disp_height;
7665 8289
8290#ifdef TARGET_API_MAC_CARBON
8291 ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", 1, 0, 0, 0,
8292 kControlScrollBarProc, 0L);
8293#else
7666 ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", 1, 0, 0, 0, scrollBarProc, 8294 ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", 1, 0, 0, 0, scrollBarProc,
7667 0L); 8295 0L);
8296#endif
7668 SET_SCROLL_BAR_CONTROL_HANDLE (bar, ch); 8297 SET_SCROLL_BAR_CONTROL_HANDLE (bar, ch);
7669 SetControlReference (ch, (long) bar); 8298 SetControlReference (ch, (long) bar);
7670 8299
@@ -7711,6 +8340,8 @@ x_scroll_bar_set_handle (bar, start, end, rebuild)
7711 int dragging = ! NILP (bar->dragging); 8340 int dragging = ! NILP (bar->dragging);
7712 ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar); 8341 ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar);
7713 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); 8342 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
8343 int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height));
8344 int length = end - start;
7714 8345
7715 /* If the display is already accurate, do nothing. */ 8346 /* If the display is already accurate, do nothing. */
7716 if (! rebuild 8347 if (! rebuild
@@ -7720,53 +8351,41 @@ x_scroll_bar_set_handle (bar, start, end, rebuild)
7720 8351
7721 BLOCK_INPUT; 8352 BLOCK_INPUT;
7722 8353
7723 { 8354 /* Make sure the values are reasonable, and try to preserve the
7724 int inside_width = VERTICAL_SCROLL_BAR_INSIDE_WIDTH (f, XINT (bar->width)); 8355 distance between start and end. */
7725 int inside_height = VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, XINT (bar->height)); 8356 if (start < 0)
7726 int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)); 8357 start = 0;
7727 8358 else if (start > top_range)
7728 /* Make sure the values are reasonable, and try to preserve 8359 start = top_range;
7729 the distance between start and end. */ 8360 end = start + length;
7730 { 8361
7731 int length = end - start; 8362 if (end < start)
7732 8363 end = start;
7733 if (start < 0) 8364 else if (end > top_range && ! dragging)
7734 start = 0; 8365 end = top_range;
7735 else if (start > top_range) 8366
7736 start = top_range; 8367 /* Store the adjusted setting in the scroll bar. */
7737 end = start + length; 8368 XSETINT (bar->start, start);
7738 8369 XSETINT (bar->end, end);
7739 if (end < start) 8370
7740 end = start; 8371 /* Clip the end position, just for display. */
7741 else if (end > top_range && ! dragging) 8372 if (end > top_range)
7742 end = top_range; 8373 end = top_range;
7743 } 8374
7744 8375 /* Draw bottom positions VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below
7745 /* Store the adjusted setting in the scroll bar. */ 8376 top positions, to make sure the handle is always at least that
7746 XSETINT (bar->start, start); 8377 many pixels tall. */
7747 XSETINT (bar->end, end); 8378 end += VERTICAL_SCROLL_BAR_MIN_HANDLE;
7748 8379
7749 /* Clip the end position, just for display. */ 8380 SetControlMinimum (ch, 0);
7750 if (end > top_range) 8381 /* Don't inadvertently activate deactivated scroll bars */
7751 end = top_range; 8382 if (GetControlMaximum (ch) != -1)
7752 8383 SetControlMaximum (ch, top_range + VERTICAL_SCROLL_BAR_MIN_HANDLE
7753 /* Draw bottom positions VERTICAL_SCROLL_BAR_MIN_HANDLE pixels 8384 - (end - start));
7754 below top positions, to make sure the handle is always at least 8385 SetControlValue (ch, start);
7755 that many pixels tall. */ 8386#if TARGET_API_MAC_CARBON
7756 end += VERTICAL_SCROLL_BAR_MIN_HANDLE; 8387 SetControlViewSize (ch, end - start);
7757
7758 SetControlMinimum (ch, 0);
7759 /* Don't inadvertently activate deactivated scroll bars */
7760 if (GetControlMaximum (ch) != -1)
7761 SetControlMaximum (ch,
7762 VERTICAL_SCROLL_BAR_TOP_RANGE (f,
7763 XINT (bar->height))
7764 - 1);
7765 SetControlValue (ch, start);
7766#if 0 /* MAC_TODO: detect Appearance Manager 1.1 before use. */
7767 SetControlViewSize (ch, end);
7768#endif 8388#endif
7769 }
7770 8389
7771 UNBLOCK_INPUT; 8390 UNBLOCK_INPUT;
7772} 8391}
@@ -7780,7 +8399,7 @@ x_scroll_bar_remove (bar)
7780 struct scroll_bar *bar; 8399 struct scroll_bar *bar;
7781{ 8400{
7782 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); 8401 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
7783 8402
7784 BLOCK_INPUT; 8403 BLOCK_INPUT;
7785 8404
7786 /* Destroy the Mac scroll bar control */ 8405 /* Destroy the Mac scroll bar control */
@@ -7792,12 +8411,10 @@ x_scroll_bar_remove (bar)
7792 UNBLOCK_INPUT; 8411 UNBLOCK_INPUT;
7793} 8412}
7794 8413
7795
7796/* Set the handle of the vertical scroll bar for WINDOW to indicate 8414/* Set the handle of the vertical scroll bar for WINDOW to indicate
7797 that we are displaying PORTION characters out of a total of WHOLE 8415 that we are displaying PORTION characters out of a total of WHOLE
7798 characters, starting at POSITION. If WINDOW has no scroll bar, 8416 characters, starting at POSITION. If WINDOW has no scroll bar,
7799 create one. */ 8417 create one. */
7800
7801static void 8418static void
7802XTset_vertical_scroll_bar (w, portion, whole, position) 8419XTset_vertical_scroll_bar (w, portion, whole, position)
7803 struct window *w; 8420 struct window *w;
@@ -7811,7 +8428,11 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
7811 /* Get window dimensions. */ 8428 /* Get window dimensions. */
7812 window_box (w, -1, &window_x, &window_y, &window_width, &window_height); 8429 window_box (w, -1, &window_x, &window_y, &window_width, &window_height);
7813 top = window_y; 8430 top = window_y;
8431#ifdef MAC_OSX
8432 width = 16;
8433#else
7814 width = FRAME_SCROLL_BAR_COLS (f) * CANON_X_UNIT (f); 8434 width = FRAME_SCROLL_BAR_COLS (f) * CANON_X_UNIT (f);
8435#endif
7815 height = window_height; 8436 height = window_height;
7816 8437
7817 /* Compute the left edge of the scroll bar area. */ 8438 /* Compute the left edge of the scroll bar area. */
@@ -7881,9 +8502,19 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
7881 Draw1Control (ch); 8502 Draw1Control (ch);
7882 else 8503 else
7883 { 8504 {
8505 /* Clear areas not covered by the scroll bar because it's not as
8506 wide as the area reserved for it . This makes sure a
8507 previous mode line display is cleared after C-x 2 C-x 1, for
8508 example. */
8509 int area_width = FRAME_SCROLL_BAR_COLS (f) * CANON_X_UNIT (f);
8510 XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
8511 left, top, area_width, height, 0);
8512
8513#if 0
7884 if (sb_left + sb_width >= PIXEL_WIDTH (f)) 8514 if (sb_left + sb_width >= PIXEL_WIDTH (f))
7885 XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), 8515 XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
7886 sb_left - 1, top, 1, height, 0); 8516 sb_left - 1, top, 1, height, 0);
8517#endif
7887 8518
7888 HideControl (ch); 8519 HideControl (ch);
7889 MoveControl (ch, sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, disp_top); 8520 MoveControl (ch, sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, disp_top);
@@ -7949,8 +8580,10 @@ XTcondemn_scroll_bars (frame)
7949 } 8580 }
7950} 8581}
7951 8582
8583
7952/* Un-mark WINDOW's scroll bar for deletion in this judgment cycle. 8584/* Un-mark WINDOW's scroll bar for deletion in this judgment cycle.
7953 Note that WINDOW isn't necessarily condemned at all. */ 8585 Note that WINDOW isn't necessarily condemned at all. */
8586
7954static void 8587static void
7955XTredeem_scroll_bar (window) 8588XTredeem_scroll_bar (window)
7956 struct window *window; 8589 struct window *window;
@@ -8037,11 +8670,14 @@ activate_scroll_bars (frame)
8037 while (! NILP (bar)) 8670 while (! NILP (bar))
8038 { 8671 {
8039 ch = SCROLL_BAR_CONTROL_HANDLE (XSCROLL_BAR (bar)); 8672 ch = SCROLL_BAR_CONTROL_HANDLE (XSCROLL_BAR (bar));
8673#ifdef TARGET_API_MAC_CARBON
8674 ActivateControl (ch);
8675#else
8040 SetControlMaximum (ch, 8676 SetControlMaximum (ch,
8041 VERTICAL_SCROLL_BAR_TOP_RANGE (frame, 8677 VERTICAL_SCROLL_BAR_TOP_RANGE (frame,
8042 XINT (XSCROLL_BAR (bar) 8678 XINT (XSCROLL_BAR (bar)
8043 ->height)) - 1); 8679 ->height)) - 1);
8044 8680#endif
8045 bar = XSCROLL_BAR (bar)->next; 8681 bar = XSCROLL_BAR (bar)->next;
8046 } 8682 }
8047} 8683}
@@ -8058,8 +8694,11 @@ deactivate_scroll_bars (frame)
8058 while (! NILP (bar)) 8694 while (! NILP (bar))
8059 { 8695 {
8060 ch = SCROLL_BAR_CONTROL_HANDLE (XSCROLL_BAR (bar)); 8696 ch = SCROLL_BAR_CONTROL_HANDLE (XSCROLL_BAR (bar));
8697#ifdef TARGET_API_MAC_CARBON
8698 DeactivateControl (ch);
8699#else
8061 SetControlMaximum (ch, XINT (-1)); 8700 SetControlMaximum (ch, XINT (-1));
8062 8701#endif
8063 bar = XSCROLL_BAR (bar)->next; 8702 bar = XSCROLL_BAR (bar)->next;
8064 } 8703 }
8065} 8704}
@@ -8100,7 +8739,11 @@ x_scroll_bar_handle_click (bar, part_code, er, bufp)
8100 case kControlPageDownPart: 8739 case kControlPageDownPart:
8101 bufp->part = scroll_bar_below_handle; 8740 bufp->part = scroll_bar_below_handle;
8102 break; 8741 break;
8742#ifdef TARGET_API_MAC_CARBON
8743 default:
8744#else
8103 case kControlIndicatorPart: 8745 case kControlIndicatorPart:
8746#endif
8104 if (er->what == mouseDown) 8747 if (er->what == mouseDown)
8105 bar->dragging = make_number (0); 8748 bar->dragging = make_number (0);
8106 XSETVECTOR (last_mouse_scroll_bar, bar); 8749 XSETVECTOR (last_mouse_scroll_bar, bar);
@@ -8161,7 +8804,12 @@ x_scroll_bar_report_motion (fp, bar_window, part, x, y, time)
8161 struct frame *f = ((mac_output *) GetWRefCon (wp))->mFP; 8804 struct frame *f = ((mac_output *) GetWRefCon (wp))->mFP;
8162 int win_y, top_range; 8805 int win_y, top_range;
8163 8806
8807#if TARGET_API_MAC_CARBON
8808 SetPort (GetWindowPort (wp));
8809#else
8164 SetPort (wp); 8810 SetPort (wp);
8811#endif
8812
8165 GetMouse (&mouse_pos); 8813 GetMouse (&mouse_pos);
8166 8814
8167 win_y = mouse_pos.v - XINT (bar->top); 8815 win_y = mouse_pos.v - XINT (bar->top);
@@ -8204,21 +8852,24 @@ x_scroll_bar_report_motion (fp, bar_window, part, x, y, time)
8204 Text Cursor 8852 Text Cursor
8205 ***********************************************************************/ 8853 ***********************************************************************/
8206 8854
8207/* Note if the text cursor of window W has been overwritten by a 8855/* Notice if the text cursor of window W has been overwritten by a
8208 drawing operation that outputs N glyphs starting at HPOS in the 8856 drawing operation that outputs glyphs starting at START_X and
8209 line given by output_cursor.vpos. N < 0 means all the rest of the 8857 ending at END_X in the line given by output_cursor.vpos.
8210 line after HPOS has been written. */ 8858 Coordinates are area-relative. END_X < 0 means all the rest
8859 of the line after START_X has been written. */
8211 8860
8212static void 8861static void
8213note_overwritten_text_cursor (w, hpos, n) 8862notice_overwritten_cursor (w, area, x0, x1, y0, y1)
8214 struct window *w; 8863 struct window *w;
8215 int hpos, n; 8864 enum glyph_row_area area;
8216{ 8865 int x0, x1, y0, y1;
8217 if (updated_area == TEXT_AREA 8866{
8218 && output_cursor.vpos == w->phys_cursor.vpos 8867 if (area == TEXT_AREA
8219 && hpos <= w->phys_cursor.hpos 8868 && w->phys_cursor_on_p
8220 && (n < 0 8869 && y0 <= w->phys_cursor.y
8221 || hpos + n > w->phys_cursor.hpos)) 8870 && y1 >= w->phys_cursor.y + w->phys_cursor_height
8871 && x0 <= w->phys_cursor.x
8872 && (x1 < 0 || x1 > w->phys_cursor.x))
8222 w->phys_cursor_on_p = 0; 8873 w->phys_cursor_on_p = 0;
8223} 8874}
8224 8875
@@ -8405,9 +9056,11 @@ x_draw_phys_cursor_glyph (w, row, hl)
8405 glyphs and mini-buffer. */ 9056 glyphs and mini-buffer. */
8406 if (w->phys_cursor.hpos < row->used[TEXT_AREA]) 9057 if (w->phys_cursor.hpos < row->used[TEXT_AREA])
8407 { 9058 {
9059 int on_p = w->phys_cursor_on_p;
8408 x_draw_glyphs (w, w->phys_cursor.x, row, TEXT_AREA, 9060 x_draw_glyphs (w, w->phys_cursor.x, row, TEXT_AREA,
8409 w->phys_cursor.hpos, w->phys_cursor.hpos + 1, 9061 w->phys_cursor.hpos, w->phys_cursor.hpos + 1,
8410 hl, 0, 0, 0); 9062 hl, 0);
9063 w->phys_cursor_on_p = on_p;
8411 9064
8412 /* When we erase the cursor, and ROW is overlapped by other 9065 /* When we erase the cursor, and ROW is overlapped by other
8413 rows, make sure that these overlapping parts of other rows 9066 rows, make sure that these overlapping parts of other rows
@@ -8459,7 +9112,7 @@ x_erase_phys_cursor (w)
8459 goto mark_cursor_off; 9112 goto mark_cursor_off;
8460 9113
8461 /* If row is completely invisible, don't attempt to delete a cursor which 9114 /* If row is completely invisible, don't attempt to delete a cursor which
8462 isn't there. This can happen if cursor is at top of a window, and 9115 isn't there. This may happen if cursor is at top of window, and
8463 we switch to a buffer with a header line in that window. */ 9116 we switch to a buffer with a header line in that window. */
8464 if (cursor_row->visible_height <= 0) 9117 if (cursor_row->visible_height <= 0)
8465 goto mark_cursor_off; 9118 goto mark_cursor_off;
@@ -8512,8 +9165,6 @@ x_erase_phys_cursor (w)
8512 /* Erase the cursor by redrawing the character underneath it. */ 9165 /* Erase the cursor by redrawing the character underneath it. */
8513 if (mouse_face_here_p) 9166 if (mouse_face_here_p)
8514 hl = DRAW_MOUSE_FACE; 9167 hl = DRAW_MOUSE_FACE;
8515 else if (cursor_row->inverse_p)
8516 hl = DRAW_INVERSE_VIDEO;
8517 else 9168 else
8518 hl = DRAW_NORMAL_TEXT; 9169 hl = DRAW_NORMAL_TEXT;
8519 x_draw_phys_cursor_glyph (w, cursor_row, hl); 9170 x_draw_phys_cursor_glyph (w, cursor_row, hl);
@@ -8524,6 +9175,36 @@ x_erase_phys_cursor (w)
8524} 9175}
8525 9176
8526 9177
9178/* Non-zero if physical cursor of window W is within mouse face. */
9179
9180static int
9181cursor_in_mouse_face_p (w)
9182 struct window *w;
9183{
9184 struct mac_display_info *dpyinfo
9185 = FRAME_MAC_DISPLAY_INFO (XFRAME (w->frame));
9186 int in_mouse_face = 0;
9187
9188 if (WINDOWP (dpyinfo->mouse_face_window)
9189 && XWINDOW (dpyinfo->mouse_face_window) == w)
9190 {
9191 int hpos = w->phys_cursor.hpos;
9192 int vpos = w->phys_cursor.vpos;
9193
9194 if (vpos >= dpyinfo->mouse_face_beg_row
9195 && vpos <= dpyinfo->mouse_face_end_row
9196 && (vpos > dpyinfo->mouse_face_beg_row
9197 || hpos >= dpyinfo->mouse_face_beg_col)
9198 && (vpos < dpyinfo->mouse_face_end_row
9199 || hpos < dpyinfo->mouse_face_end_col
9200 || dpyinfo->mouse_face_past_end))
9201 in_mouse_face = 1;
9202 }
9203
9204 return in_mouse_face;
9205}
9206
9207
8527/* Display or clear cursor of window W. If ON is zero, clear the 9208/* Display or clear cursor of window W. If ON is zero, clear the
8528 cursor. If it is non-zero, display the cursor. If ON is nonzero, 9209 cursor. If it is non-zero, display the cursor. If ON is nonzero,
8529 where to put the cursor is specified by HPOS, VPOS, X and Y. */ 9210 where to put the cursor is specified by HPOS, VPOS, X and Y. */
@@ -8539,6 +9220,8 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
8539 struct glyph_matrix *current_glyphs; 9220 struct glyph_matrix *current_glyphs;
8540 struct glyph_row *glyph_row; 9221 struct glyph_row *glyph_row;
8541 struct glyph *glyph; 9222 struct glyph *glyph;
9223 int cursor_non_selected;
9224 int active_cursor = 1;
8542 9225
8543 /* This is pointless on invisible frames, and dangerous on garbaged 9226 /* This is pointless on invisible frames, and dangerous on garbaged
8544 windows and frames; in the latter case, the frame or window may 9227 windows and frames; in the latter case, the frame or window may
@@ -8574,6 +9257,9 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
8574 the cursor type given by the frame parameter. If explicitly 9257 the cursor type given by the frame parameter. If explicitly
8575 marked off, draw no cursor. In all other cases, we want a hollow 9258 marked off, draw no cursor. In all other cases, we want a hollow
8576 box cursor. */ 9259 box cursor. */
9260 cursor_non_selected
9261 = !NILP (Fbuffer_local_value (Qcursor_in_non_selected_windows,
9262 w->buffer));
8577 new_cursor_width = -1; 9263 new_cursor_width = -1;
8578 if (cursor_in_echo_area 9264 if (cursor_in_echo_area
8579 && FRAME_HAS_MINIBUF_P (f) 9265 && FRAME_HAS_MINIBUF_P (f)
@@ -8582,31 +9268,46 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
8582 if (w == XWINDOW (echo_area_window)) 9268 if (w == XWINDOW (echo_area_window))
8583 new_cursor_type = FRAME_DESIRED_CURSOR (f); 9269 new_cursor_type = FRAME_DESIRED_CURSOR (f);
8584 else 9270 else
8585 new_cursor_type = HOLLOW_BOX_CURSOR;
8586 }
8587 else
8588 {
8589 if (w != XWINDOW (selected_window)
8590 || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame)
8591 { 9271 {
8592 extern int cursor_in_non_selected_windows; 9272 if (cursor_non_selected)
8593
8594 if (MINI_WINDOW_P (w) || !cursor_in_non_selected_windows)
8595 new_cursor_type = NO_CURSOR;
8596 else
8597 new_cursor_type = HOLLOW_BOX_CURSOR; 9273 new_cursor_type = HOLLOW_BOX_CURSOR;
9274 else
9275 new_cursor_type = NO_CURSOR;
9276 active_cursor = 0;
8598 } 9277 }
8599 else if (w->cursor_off_p) 9278 }
8600 new_cursor_type = NO_CURSOR; 9279 else
9280 {
9281 if (f != FRAME_MAC_DISPLAY_INFO (f)->x_highlight_frame
9282 || w != XWINDOW (f->selected_window))
9283 {
9284 active_cursor = 0;
9285
9286 if (MINI_WINDOW_P (w)
9287 || !cursor_non_selected
9288 || NILP (XBUFFER (w->buffer)->cursor_type))
9289 new_cursor_type = NO_CURSOR;
9290 else
9291 new_cursor_type = HOLLOW_BOX_CURSOR;
9292 }
8601 else 9293 else
8602 { 9294 {
8603 struct buffer *b = XBUFFER (w->buffer); 9295 struct buffer *b = XBUFFER (w->buffer);
8604 9296
8605 if (EQ (b->cursor_type, Qt)) 9297 if (EQ (b->cursor_type, Qt))
8606 new_cursor_type = FRAME_DESIRED_CURSOR (f); 9298 new_cursor_type = FRAME_DESIRED_CURSOR (f);
8607 else 9299 else
8608 new_cursor_type = x_specified_cursor_type (b->cursor_type, 9300 new_cursor_type = x_specified_cursor_type (b->cursor_type,
8609 &new_cursor_width); 9301 &new_cursor_width);
9302 if (w->cursor_off_p)
9303 {
9304 if (new_cursor_type == FILLED_BOX_CURSOR)
9305 new_cursor_type = HOLLOW_BOX_CURSOR;
9306 else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1)
9307 new_cursor_width = 1;
9308 else
9309 new_cursor_type = NO_CURSOR;
9310 }
8610 } 9311 }
8611 } 9312 }
8612 9313
@@ -8617,7 +9318,9 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
8617 && (!on 9318 && (!on
8618 || w->phys_cursor.x != x 9319 || w->phys_cursor.x != x
8619 || w->phys_cursor.y != y 9320 || w->phys_cursor.y != y
8620 || new_cursor_type != w->phys_cursor_type)) 9321 || new_cursor_type != w->phys_cursor_type
9322 || (new_cursor_type == BAR_CURSOR
9323 && new_cursor_width != w->phys_cursor_width)))
8621 x_erase_phys_cursor (w); 9324 x_erase_phys_cursor (w);
8622 9325
8623 /* If the cursor is now invisible and we want it to be visible, 9326 /* If the cursor is now invisible and we want it to be visible,
@@ -8634,6 +9337,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
8634 w->phys_cursor.hpos = hpos; 9337 w->phys_cursor.hpos = hpos;
8635 w->phys_cursor.vpos = vpos; 9338 w->phys_cursor.vpos = vpos;
8636 w->phys_cursor_type = new_cursor_type; 9339 w->phys_cursor_type = new_cursor_type;
9340 w->phys_cursor_width = new_cursor_width;
8637 w->phys_cursor_on_p = 1; 9341 w->phys_cursor_on_p = 1;
8638 9342
8639 switch (new_cursor_type) 9343 switch (new_cursor_type)
@@ -8656,18 +9360,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
8656 default: 9360 default:
8657 abort (); 9361 abort ();
8658 } 9362 }
8659
8660#ifdef HAVE_X_I18N
8661 if (w == XWINDOW (f->selected_window))
8662 if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMPreeditPosition))
8663 xic_set_preeditarea (w, x, y);
8664#endif
8665 } 9363 }
8666
8667#ifndef XFlush
8668 if (updating_frame != f)
8669 XFlush (FRAME_X_DISPLAY (f));
8670#endif
8671} 9364}
8672 9365
8673 9366
@@ -8694,6 +9387,7 @@ x_display_cursor (w, on, hpos, vpos, x, y)
8694void 9387void
8695x_update_cursor (f, on_p) 9388x_update_cursor (f, on_p)
8696 struct frame *f; 9389 struct frame *f;
9390 int on_p;
8697{ 9391{
8698 x_update_cursor_in_window_tree (XWINDOW (f->root_window), on_p); 9392 x_update_cursor_in_window_tree (XWINDOW (f->root_window), on_p);
8699} 9393}
@@ -8734,368 +9428,91 @@ x_update_window_cursor (w, on)
8734 if (w->current_matrix) 9428 if (w->current_matrix)
8735 { 9429 {
8736 BLOCK_INPUT; 9430 BLOCK_INPUT;
8737 x_display_and_set_cursor (w, on, w->phys_cursor.hpos, w->phys_cursor.vpos, 9431 x_display_and_set_cursor (w, on, w->phys_cursor.hpos,
8738 w->phys_cursor.x, w->phys_cursor.y); 9432 w->phys_cursor.vpos, w->phys_cursor.x,
9433 w->phys_cursor.y);
8739 UNBLOCK_INPUT; 9434 UNBLOCK_INPUT;
8740 } 9435 }
8741} 9436}
8742 9437
8743
8744#if 0 /* MAC_TODO: no icon and X error handling (?) */
8745/* Icons. */
8746 9438
8747/* Refresh bitmap kitchen sink icon for frame F
8748 when we get an expose event for it. */
8749 9439
8750void 9440
8751refreshicon (f) 9441/* Icons. */
8752 struct frame *f;
8753{
8754 /* Normally, the window manager handles this function. */
8755}
8756
8757/* Make the x-window of frame F use the gnu icon bitmap. */
8758 9442
9443#if 0 /* MAC_TODO: no icon support yet. */
8759int 9444int
8760x_bitmap_icon (f, file) 9445x_bitmap_icon (f, icon)
8761 struct frame *f; 9446 struct frame *f;
8762 Lisp_Object file; 9447 Lisp_Object icon;
8763{ 9448{
8764 int bitmap_id; 9449 HANDLE hicon;
8765 9450
8766 if (FRAME_X_WINDOW (f) == 0) 9451 if (FRAME_W32_WINDOW (f) == 0)
8767 return 1; 9452 return 1;
8768 9453
8769 /* Free up our existing icon bitmap if any. */ 9454 if (NILP (icon))
8770 if (f->output_data.x->icon_bitmap > 0) 9455 hicon = LoadIcon (hinst, EMACS_CLASS);
8771 x_destroy_bitmap (f, f->output_data.x->icon_bitmap); 9456 else if (STRINGP (icon))
8772 f->output_data.x->icon_bitmap = 0; 9457 hicon = LoadImage (NULL, (LPCTSTR) XSTRING (icon)->data, IMAGE_ICON, 0, 0,
8773 9458 LR_DEFAULTSIZE | LR_LOADFROMFILE);
8774 if (STRINGP (file)) 9459 else if (SYMBOLP (icon))
8775 bitmap_id = x_create_bitmap_from_file (f, file); 9460 {
8776 else 9461 LPCTSTR name;
8777 { 9462
8778 /* Create the GNU bitmap if necessary. */ 9463 if (EQ (icon, intern ("application")))
8779 if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0) 9464 name = (LPCTSTR) IDI_APPLICATION;
8780 FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id 9465 else if (EQ (icon, intern ("hand")))
8781 = x_create_bitmap_from_data (f, gnu_bits, 9466 name = (LPCTSTR) IDI_HAND;
8782 gnu_width, gnu_height); 9467 else if (EQ (icon, intern ("question")))
8783 9468 name = (LPCTSTR) IDI_QUESTION;
8784 /* The first time we create the GNU bitmap, 9469 else if (EQ (icon, intern ("exclamation")))
8785 this increments the ref-count one extra time. 9470 name = (LPCTSTR) IDI_EXCLAMATION;
8786 As a result, the GNU bitmap is never freed. 9471 else if (EQ (icon, intern ("asterisk")))
8787 That way, we don't have to worry about allocating it again. */ 9472 name = (LPCTSTR) IDI_ASTERISK;
8788 x_reference_bitmap (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id); 9473 else if (EQ (icon, intern ("winlogo")))
9474 name = (LPCTSTR) IDI_WINLOGO;
9475 else
9476 return 1;
8789 9477
8790 bitmap_id = FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id; 9478 hicon = LoadIcon (NULL, name);
8791 } 9479 }
8792 9480 else
8793 x_wm_set_icon_pixmap (f, bitmap_id);
8794 f->output_data.x->icon_bitmap = bitmap_id;
8795
8796 return 0;
8797}
8798
8799
8800/* Make the x-window of frame F use a rectangle with text.
8801 Use ICON_NAME as the text. */
8802
8803int
8804x_text_icon (f, icon_name)
8805 struct frame *f;
8806 char *icon_name;
8807{
8808 if (FRAME_X_WINDOW (f) == 0)
8809 return 1; 9481 return 1;
8810 9482
8811#ifdef HAVE_X11R4 9483 if (hicon == NULL)
8812 { 9484 return 1;
8813 XTextProperty text;
8814 text.value = (unsigned char *) icon_name;
8815 text.encoding = XA_STRING;
8816 text.format = 8;
8817 text.nitems = strlen (icon_name);
8818#ifdef USE_X_TOOLKIT
8819 XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget),
8820 &text);
8821#else /* not USE_X_TOOLKIT */
8822 XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text);
8823#endif /* not USE_X_TOOLKIT */
8824 }
8825#else /* not HAVE_X11R4 */
8826 XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), icon_name);
8827#endif /* not HAVE_X11R4 */
8828 9485
8829 if (f->output_data.x->icon_bitmap > 0) 9486 PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_BIG,
8830 x_destroy_bitmap (f, f->output_data.x->icon_bitmap); 9487 (LPARAM) hicon);
8831 f->output_data.x->icon_bitmap = 0;
8832 x_wm_set_icon_pixmap (f, 0);
8833 9488
8834 return 0; 9489 return 0;
8835} 9490}
9491#endif /* MAC_TODO */
8836 9492
8837#define X_ERROR_MESSAGE_SIZE 200 9493/************************************************************************
8838 9494 Handling X errors
8839/* If non-nil, this should be a string. 9495 ************************************************************************/
8840 It means catch X errors and store the error message in this string. */
8841
8842static Lisp_Object x_error_message_string;
8843 9496
8844/* An X error handler which stores the error message in 9497/* Display Error Handling functions not used on W32. Listing them here
8845 x_error_message_string. This is called from x_error_handler if 9498 helps diff stay in step when comparing w32term.c with xterm.c.
8846 x_catch_errors is in effect. */
8847 9499
8848static void
8849x_error_catcher (display, error) 9500x_error_catcher (display, error)
8850 Display *display;
8851 XErrorEvent *error;
8852{
8853 XGetErrorText (display, error->error_code,
8854 XSTRING (x_error_message_string)->data,
8855 X_ERROR_MESSAGE_SIZE);
8856}
8857
8858/* Begin trapping X errors for display DPY. Actually we trap X errors
8859 for all displays, but DPY should be the display you are actually
8860 operating on.
8861
8862 After calling this function, X protocol errors no longer cause
8863 Emacs to exit; instead, they are recorded in the string
8864 stored in x_error_message_string.
8865
8866 Calling x_check_errors signals an Emacs error if an X error has
8867 occurred since the last call to x_catch_errors or x_check_errors.
8868
8869 Calling x_uncatch_errors resumes the normal error handling. */
8870
8871void x_check_errors ();
8872static Lisp_Object x_catch_errors_unwind ();
8873
8874int
8875x_catch_errors (dpy) 9501x_catch_errors (dpy)
8876 Display *dpy;
8877{
8878 int count = specpdl_ptr - specpdl;
8879
8880 /* Make sure any errors from previous requests have been dealt with. */
8881 XSync (dpy, False);
8882
8883 record_unwind_protect (x_catch_errors_unwind, x_error_message_string);
8884
8885 x_error_message_string = make_uninit_string (X_ERROR_MESSAGE_SIZE);
8886 XSTRING (x_error_message_string)->data[0] = 0;
8887
8888 return count;
8889}
8890
8891/* Unbind the binding that we made to check for X errors. */
8892
8893static Lisp_Object
8894x_catch_errors_unwind (old_val) 9502x_catch_errors_unwind (old_val)
8895 Lisp_Object old_val;
8896{
8897 x_error_message_string = old_val;
8898 return Qnil;
8899}
8900
8901/* If any X protocol errors have arrived since the last call to
8902 x_catch_errors or x_check_errors, signal an Emacs error using
8903 sprintf (a buffer, FORMAT, the x error message text) as the text. */
8904
8905void
8906x_check_errors (dpy, format) 9503x_check_errors (dpy, format)
8907 Display *dpy;
8908 char *format;
8909{
8910 /* Make sure to catch any errors incurred so far. */
8911 XSync (dpy, False);
8912
8913 if (XSTRING (x_error_message_string)->data[0])
8914 error (format, XSTRING (x_error_message_string)->data);
8915}
8916
8917/* Nonzero if we had any X protocol errors
8918 since we did x_catch_errors on DPY. */
8919
8920int
8921x_had_errors_p (dpy) 9504x_had_errors_p (dpy)
8922 Display *dpy;
8923{
8924 /* Make sure to catch any errors incurred so far. */
8925 XSync (dpy, False);
8926
8927 return XSTRING (x_error_message_string)->data[0] != 0;
8928}
8929
8930/* Forget about any errors we have had, since we did x_catch_errors on DPY. */
8931
8932void
8933x_clear_errors (dpy) 9505x_clear_errors (dpy)
8934 Display *dpy;
8935{
8936 XSTRING (x_error_message_string)->data[0] = 0;
8937}
8938
8939/* Stop catching X protocol errors and let them make Emacs die.
8940 DPY should be the display that was passed to x_catch_errors.
8941 COUNT should be the value that was returned by
8942 the corresponding call to x_catch_errors. */
8943
8944void
8945x_uncatch_errors (dpy, count) 9506x_uncatch_errors (dpy, count)
8946 Display *dpy;
8947 int count;
8948{
8949 unbind_to (count, Qnil);
8950}
8951
8952#if 0
8953static unsigned int x_wire_count;
8954x_trace_wire () 9507x_trace_wire ()
8955{ 9508x_connection_signal (signalnum)
8956 fprintf (stderr, "Lib call: %d\n", ++x_wire_count); 9509x_connection_closed (dpy, error_message)
8957}
8958#endif /* ! 0 */
8959
8960
8961/* Handle SIGPIPE, which can happen when the connection to a server
8962 simply goes away. SIGPIPE is handled by x_connection_signal.
8963 Don't need to do anything, because the write which caused the
8964 SIGPIPE will fail, causing Xlib to invoke the X IO error handler,
8965 which will do the appropriate cleanup for us. */
8966
8967static SIGTYPE
8968x_connection_signal (signalnum) /* If we don't have an argument, */
8969 int signalnum; /* some compilers complain in signal calls. */
8970{
8971#ifdef USG
8972 /* USG systems forget handlers when they are used;
8973 must reestablish each time */
8974 signal (signalnum, x_connection_signal);
8975#endif /* USG */
8976}
8977
8978/* Handling X errors. */
8979
8980/* Handle the loss of connection to display DISPLAY. */
8981
8982static SIGTYPE
8983x_connection_closed (display, error_message)
8984 Display *display;
8985 char *error_message;
8986{
8987 struct x_display_info *dpyinfo = x_display_info_for_display (display);
8988 Lisp_Object frame, tail;
8989
8990 /* Indicate that this display is dead. */
8991
8992#if 0 /* Closing the display caused a bus error on OpenWindows. */
8993#ifdef USE_X_TOOLKIT
8994 XtCloseDisplay (display);
8995#endif
8996#endif
8997
8998 if (dpyinfo)
8999 dpyinfo->display = 0;
9000
9001 /* First delete frames whose mini-buffers are on frames
9002 that are on the dead display. */
9003 FOR_EACH_FRAME (tail, frame)
9004 {
9005 Lisp_Object minibuf_frame;
9006 minibuf_frame
9007 = WINDOW_FRAME (XWINDOW (FRAME_MINIBUF_WINDOW (XFRAME (frame))));
9008 if (FRAME_X_P (XFRAME (frame))
9009 && FRAME_X_P (XFRAME (minibuf_frame))
9010 && ! EQ (frame, minibuf_frame)
9011 && FRAME_X_DISPLAY_INFO (XFRAME (minibuf_frame)) == dpyinfo)
9012 Fdelete_frame (frame, Qt);
9013 }
9014
9015 /* Now delete all remaining frames on the dead display.
9016 We are now sure none of these is used as the mini-buffer
9017 for another frame that we need to delete. */
9018 FOR_EACH_FRAME (tail, frame)
9019 if (FRAME_X_P (XFRAME (frame))
9020 && FRAME_X_DISPLAY_INFO (XFRAME (frame)) == dpyinfo)
9021 {
9022 /* Set this to t so that Fdelete_frame won't get confused
9023 trying to find a replacement. */
9024 FRAME_KBOARD (XFRAME (frame))->Vdefault_minibuffer_frame = Qt;
9025 Fdelete_frame (frame, Qt);
9026 }
9027
9028 if (dpyinfo)
9029 x_delete_display (dpyinfo);
9030
9031 if (x_display_list == 0)
9032 {
9033 fprintf (stderr, "%s\n", error_message);
9034 shut_down_emacs (0, 0, Qnil);
9035 exit (70);
9036 }
9037
9038 /* Ordinary stack unwind doesn't deal with these. */
9039#ifdef SIGIO
9040 sigunblock (sigmask (SIGIO));
9041#endif
9042 sigunblock (sigmask (SIGALRM));
9043 TOTALLY_UNBLOCK_INPUT;
9044
9045 clear_waiting_for_input ();
9046 error ("%s", error_message);
9047}
9048
9049/* This is the usual handler for X protocol errors.
9050 It kills all frames on the display that we got the error for.
9051 If that was the only one, it prints an error message and kills Emacs. */
9052
9053static void
9054x_error_quitter (display, error) 9510x_error_quitter (display, error)
9055 Display *display;
9056 XErrorEvent *error;
9057{
9058 char buf[256], buf1[356];
9059
9060 /* Note that there is no real way portable across R3/R4 to get the
9061 original error handler. */
9062
9063 XGetErrorText (display, error->error_code, buf, sizeof (buf));
9064 sprintf (buf1, "X protocol error: %s on protocol request %d",
9065 buf, error->request_code);
9066 x_connection_closed (display, buf1);
9067}
9068
9069/* This is the first-level handler for X protocol errors.
9070 It calls x_error_quitter or x_error_catcher. */
9071
9072static int
9073x_error_handler (display, error) 9511x_error_handler (display, error)
9074 Display *display;
9075 XErrorEvent *error;
9076{
9077 if (! NILP (x_error_message_string))
9078 x_error_catcher (display, error);
9079 else
9080 x_error_quitter (display, error);
9081 return 0;
9082}
9083
9084/* This is the handler for X IO errors, always.
9085 It kills all frames on the display that we lost touch with.
9086 If that was the only one, it prints an error message and kills Emacs. */
9087
9088static int
9089x_io_error_quitter (display) 9512x_io_error_quitter (display)
9090 Display *display;
9091{
9092 char buf[256];
9093 9513
9094 sprintf (buf, "Connection lost to X server `%s'", DisplayString (display)); 9514 */
9095 x_connection_closed (display, buf); 9515
9096 return 0;
9097}
9098#endif
9099 9516
9100/* Changing the font of the frame. */ 9517/* Changing the font of the frame. */
9101 9518
@@ -9115,47 +9532,41 @@ x_new_font (f, fontname)
9115 if (!fontp) 9532 if (!fontp)
9116 return Qnil; 9533 return Qnil;
9117 9534
9118 f->output_data.mac->font = (XFontStruct *) (fontp->font); 9535 FRAME_FONT (f) = (XFontStruct *) (fontp->font);
9119 f->output_data.mac->baseline_offset = fontp->baseline_offset; 9536 FRAME_BASELINE_OFFSET (f) = fontp->baseline_offset;
9120 f->output_data.mac->fontset = -1; 9537 FRAME_FONTSET (f) = -1;
9121 9538
9122 /* Compute the scroll bar width in character columns. */ 9539 /* Compute the scroll bar width in character columns. */
9123 if (f->scroll_bar_pixel_width > 0) 9540 if (f->scroll_bar_pixel_width > 0)
9124 { 9541 {
9125 int wid = FONT_WIDTH (f->output_data.mac->font); 9542 int wid = FONT_WIDTH (FRAME_FONT (f));
9126 f->scroll_bar_cols = (f->scroll_bar_pixel_width + wid-1) / wid; 9543 f->scroll_bar_cols = (f->scroll_bar_pixel_width + wid-1) / wid;
9127 } 9544 }
9128 else 9545 else
9129 { 9546 {
9130 int wid = FONT_WIDTH (f->output_data.mac->font); 9547 int wid = FONT_WIDTH (FRAME_FONT (f));
9131 f->scroll_bar_cols = (14 + wid - 1) / wid; 9548 f->scroll_bar_cols = (14 + wid - 1) / wid;
9132 } 9549 }
9133 9550
9134 /* Now make the frame display the given font. */ 9551 /* Now make the frame display the given font. */
9135 if (FRAME_MAC_WINDOW (f) != 0) 9552 if (FRAME_MAC_WINDOW (f) != 0)
9136 { 9553 {
9137 XSetFont (FRAME_MAC_DISPLAY (f), f->output_data.mac->normal_gc,
9138 f->output_data.mac->font);
9139 XSetFont (FRAME_MAC_DISPLAY (f), f->output_data.mac->reverse_gc,
9140 f->output_data.mac->font);
9141 XSetFont (FRAME_MAC_DISPLAY (f), f->output_data.mac->cursor_gc,
9142 f->output_data.mac->font);
9143
9144 frame_update_line_height (f); 9554 frame_update_line_height (f);
9145 x_set_window_size (f, 0, f->width, f->height); 9555 if (NILP (tip_frame) || XFRAME (tip_frame) != f)
9556 x_set_window_size (f, 0, f->width, f->height);
9146 } 9557 }
9147 else 9558 else
9148 /* If we are setting a new frame's font for the first time, there 9559 /* If we are setting a new frame's font for the first time,
9149 are no faces yet, so this font's height is the line height. */ 9560 there are no faces yet, so this font's height is the line height. */
9150 f->output_data.mac->line_height = FONT_HEIGHT (f->output_data.mac->font); 9561 f->output_data.mac->line_height = FONT_HEIGHT (FRAME_FONT (f));
9151 9562
9152 return build_string (fontp->full_name); 9563 return build_string (fontp->full_name);
9153} 9564}
9154 9565
9155/* Give frame F the fontset named FONTSETNAME as its default font, and 9566/* Give frame F the fontset named FONTSETNAME as its default font, and
9156 return the full name of that fontset. FONTSETNAME may be a 9567 return the full name of that fontset. FONTSETNAME may be a wildcard
9157 wildcard pattern; in that case, we choose some fontset that fits 9568 pattern; in that case, we choose some fontset that fits the pattern.
9158 the pattern. The return value shows which fontset we chose. */ 9569 The return value shows which fontset we chose. */
9159 9570
9160Lisp_Object 9571Lisp_Object
9161x_new_fontset (f, fontsetname) 9572x_new_fontset (f, fontsetname)
@@ -9168,7 +9579,7 @@ x_new_fontset (f, fontsetname)
9168 if (fontset < 0) 9579 if (fontset < 0)
9169 return Qnil; 9580 return Qnil;
9170 9581
9171 if (f->output_data.mac->fontset == fontset) 9582 if (FRAME_FONTSET (f) == fontset)
9172 /* This fontset is already set in frame F. There's nothing more 9583 /* This fontset is already set in frame F. There's nothing more
9173 to do. */ 9584 to do. */
9174 return fontset_name (fontset); 9585 return fontset_name (fontset);
@@ -9179,16 +9590,9 @@ x_new_fontset (f, fontsetname)
9179 /* Can't load ASCII font. */ 9590 /* Can't load ASCII font. */
9180 return Qnil; 9591 return Qnil;
9181 9592
9182 /* Since x_new_font doesn't update any fontset information, do it 9593 /* Since x_new_font doesn't update any fontset information, do it now. */
9183 now. */ 9594 FRAME_FONTSET(f) = fontset;
9184 f->output_data.mac->fontset = fontset;
9185 9595
9186#ifdef HAVE_X_I18N
9187 if (FRAME_XIC (f)
9188 && (FRAME_XIC_STYLE (f) & (XIMPreeditPosition | XIMStatusArea)))
9189 xic_set_xfontset (f, XSTRING (fontset_ascii (fontset))->data);
9190#endif
9191
9192 return build_string (fontsetname); 9596 return build_string (fontsetname);
9193} 9597}
9194 9598
@@ -9277,215 +9681,25 @@ x_compute_fringe_widths (f, redraw)
9277 redraw_frame (f); 9681 redraw_frame (f);
9278} 9682}
9279 9683
9280#if 0 /* MAC_TODO: inline input methods for Mac */
9281/*********************************************************************** 9684/***********************************************************************
9282 X Input Methods 9685 TODO: W32 Input Methods
9283 ***********************************************************************/ 9686 ***********************************************************************/
9687/* Listing missing functions from xterm.c helps diff stay in step.
9284 9688
9285#ifdef HAVE_X_I18N
9286
9287#ifdef HAVE_X11R6
9288
9289/* XIM destroy callback function, which is called whenever the
9290 connection to input method XIM dies. CLIENT_DATA contains a
9291 pointer to the x_display_info structure corresponding to XIM. */
9292
9293static void
9294xim_destroy_callback (xim, client_data, call_data) 9689xim_destroy_callback (xim, client_data, call_data)
9295 XIM xim;
9296 XPointer client_data;
9297 XPointer call_data;
9298{
9299 struct x_display_info *dpyinfo = (struct x_display_info *) client_data;
9300 Lisp_Object frame, tail;
9301
9302 BLOCK_INPUT;
9303
9304 /* No need to call XDestroyIC.. */
9305 FOR_EACH_FRAME (tail, frame)
9306 {
9307 struct frame *f = XFRAME (frame);
9308 if (FRAME_X_DISPLAY_INFO (f) == dpyinfo)
9309 {
9310 FRAME_XIC (f) = NULL;
9311 if (FRAME_XIC_FONTSET (f))
9312 {
9313 XFreeFontSet (FRAME_X_DISPLAY (f), FRAME_XIC_FONTSET (f));
9314 FRAME_XIC_FONTSET (f) = NULL;
9315 }
9316 }
9317 }
9318
9319 /* No need to call XCloseIM. */
9320 dpyinfo->xim = NULL;
9321 XFree (dpyinfo->xim_styles);
9322 UNBLOCK_INPUT;
9323}
9324
9325#endif /* HAVE_X11R6 */
9326
9327/* Open the connection to the XIM server on display DPYINFO.
9328 RESOURCE_NAME is the resource name Emacs uses. */
9329
9330static void
9331xim_open_dpy (dpyinfo, resource_name) 9690xim_open_dpy (dpyinfo, resource_name)
9332 struct x_display_info *dpyinfo;
9333 char *resource_name;
9334{
9335#ifdef USE_XIM
9336 XIM xim;
9337
9338 xim = XOpenIM (dpyinfo->display, dpyinfo->xrdb, resource_name, EMACS_CLASS);
9339 dpyinfo->xim = xim;
9340
9341 if (xim)
9342 {
9343#ifdef HAVE_X11R6
9344 XIMCallback destroy;
9345#endif
9346
9347 /* Get supported styles and XIM values. */
9348 XGetIMValues (xim, XNQueryInputStyle, &dpyinfo->xim_styles, NULL);
9349
9350#ifdef HAVE_X11R6
9351 destroy.callback = xim_destroy_callback;
9352 destroy.client_data = (XPointer)dpyinfo;
9353 /* This isn't prototyped in OSF 5.0. */
9354 XSetIMValues (xim, XNDestroyCallback, &destroy, NULL);
9355#endif
9356 }
9357
9358#else /* not USE_XIM */
9359 dpyinfo->xim = NULL;
9360#endif /* not USE_XIM */
9361}
9362
9363
9364#ifdef HAVE_X11R6_XIM
9365
9366struct xim_inst_t 9691struct xim_inst_t
9367{
9368 struct x_display_info *dpyinfo;
9369 char *resource_name;
9370};
9371
9372/* XIM instantiate callback function, which is called whenever an XIM
9373 server is available. DISPLAY is teh display of the XIM.
9374 CLIENT_DATA contains a pointer to an xim_inst_t structure created
9375 when the callback was registered. */
9376
9377static void
9378xim_instantiate_callback (display, client_data, call_data) 9692xim_instantiate_callback (display, client_data, call_data)
9379 Display *display;
9380 XPointer client_data;
9381 XPointer call_data;
9382{
9383 struct xim_inst_t *xim_inst = (struct xim_inst_t *) client_data;
9384 struct x_display_info *dpyinfo = xim_inst->dpyinfo;
9385
9386 /* We don't support multiple XIM connections. */
9387 if (dpyinfo->xim)
9388 return;
9389
9390 xim_open_dpy (dpyinfo, xim_inst->resource_name);
9391
9392 /* Create XIC for the existing frames on the same display, as long
9393 as they have no XIC. */
9394 if (dpyinfo->xim && dpyinfo->reference_count > 0)
9395 {
9396 Lisp_Object tail, frame;
9397
9398 BLOCK_INPUT;
9399 FOR_EACH_FRAME (tail, frame)
9400 {
9401 struct frame *f = XFRAME (frame);
9402
9403 if (FRAME_X_DISPLAY_INFO (f) == xim_inst->dpyinfo)
9404 if (FRAME_XIC (f) == NULL)
9405 {
9406 create_frame_xic (f);
9407 if (FRAME_XIC_STYLE (f) & XIMStatusArea)
9408 xic_set_statusarea (f);
9409 if (FRAME_XIC_STYLE (f) & XIMPreeditPosition)
9410 {
9411 struct window *w = XWINDOW (f->selected_window);
9412 xic_set_preeditarea (w, w->cursor.x, w->cursor.y);
9413 }
9414 }
9415 }
9416
9417 UNBLOCK_INPUT;
9418 }
9419}
9420
9421#endif /* HAVE_X11R6_XIM */
9422
9423
9424/* Open a connection to the XIM server on display DPYINFO.
9425 RESOURCE_NAME is the resource name for Emacs. On X11R5, open the
9426 connection only at the first time. On X11R6, open the connection
9427 in the XIM instantiate callback function. */
9428
9429static void
9430xim_initialize (dpyinfo, resource_name) 9693xim_initialize (dpyinfo, resource_name)
9431 struct x_display_info *dpyinfo;
9432 char *resource_name;
9433{
9434#ifdef USE_XIM
9435#ifdef HAVE_X11R6_XIM
9436 struct xim_inst_t *xim_inst;
9437 int len;
9438
9439 dpyinfo->xim = NULL;
9440 xim_inst = (struct xim_inst_t *) xmalloc (sizeof (struct xim_inst_t));
9441 xim_inst->dpyinfo = dpyinfo;
9442 len = strlen (resource_name);
9443 xim_inst->resource_name = (char *) xmalloc (len + 1);
9444 bcopy (resource_name, xim_inst->resource_name, len + 1);
9445 XRegisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb,
9446 resource_name, EMACS_CLASS,
9447 xim_instantiate_callback,
9448 /* Fixme: This is XPointer in
9449 XFree86 but (XPointer *) on
9450 Tru64, at least. */
9451 (XPointer) xim_inst);
9452#else /* not HAVE_X11R6_XIM */
9453 dpyinfo->xim = NULL;
9454 xim_open_dpy (dpyinfo, resource_name);
9455#endif /* not HAVE_X11R6_XIM */
9456
9457#else /* not USE_XIM */
9458 dpyinfo->xim = NULL;
9459#endif /* not USE_XIM */
9460}
9461
9462
9463/* Close the connection to the XIM server on display DPYINFO. */
9464
9465static void
9466xim_close_dpy (dpyinfo) 9694xim_close_dpy (dpyinfo)
9467 struct x_display_info *dpyinfo;
9468{
9469#ifdef USE_XIM
9470#ifdef HAVE_X11R6_XIM
9471 XUnregisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb,
9472 NULL, EMACS_CLASS,
9473 xim_instantiate_callback, NULL);
9474#endif /* not HAVE_X11R6_XIM */
9475 XCloseIM (dpyinfo->xim);
9476 dpyinfo->xim = NULL;
9477 XFree (dpyinfo->xim_styles);
9478#endif /* USE_XIM */
9479}
9480 9695
9481#endif /* not HAVE_X11R6_XIM */ 9696 */
9482 9697
9483#endif
9484 9698
9485/* Calculate the absolute position in frame F 9699/* Calculate the absolute position in frame F
9486 from its current recorded position values and gravity. */ 9700 from its current recorded position values and gravity. */
9487 9701
9488static void 9702void
9489x_calc_absolute_position (f) 9703x_calc_absolute_position (f)
9490 struct frame *f; 9704 struct frame *f;
9491{ 9705{
@@ -9500,8 +9714,23 @@ x_calc_absolute_position (f)
9500 { 9714 {
9501 GrafPtr savePort; 9715 GrafPtr savePort;
9502 GetPort (&savePort); 9716 GetPort (&savePort);
9717
9718#if TARGET_API_MAC_CARBON
9719 SetPort (GetWindowPort (FRAME_MAC_WINDOW (f)));
9720#else
9503 SetPort (FRAME_MAC_WINDOW (f)); 9721 SetPort (FRAME_MAC_WINDOW (f));
9722#endif
9723
9724#if TARGET_API_MAC_CARBON
9725 {
9726 Rect r;
9727
9728 GetWindowPortBounds (FRAME_MAC_WINDOW (f), &r);
9729 SetPt(&pt, r.left, r.top);
9730 }
9731#else /* not TARGET_API_MAC_CARBON */
9504 SetPt(&pt, FRAME_MAC_WINDOW (f)->portRect.left, FRAME_MAC_WINDOW (f)->portRect.top); 9732 SetPt(&pt, FRAME_MAC_WINDOW (f)->portRect.left, FRAME_MAC_WINDOW (f)->portRect.top);
9733#endif /* not TARGET_API_MAC_CARBON */
9505 LocalToGlobal (&pt); 9734 LocalToGlobal (&pt);
9506 SetPort (savePort); 9735 SetPort (savePort);
9507 } 9736 }
@@ -9537,6 +9766,8 @@ x_set_offset (f, xoff, yoff, change_gravity)
9537 register int xoff, yoff; 9766 register int xoff, yoff;
9538 int change_gravity; 9767 int change_gravity;
9539{ 9768{
9769 int modified_top, modified_left;
9770
9540 if (change_gravity > 0) 9771 if (change_gravity > 0)
9541 { 9772 {
9542 f->output_data.mac->top_pos = yoff; 9773 f->output_data.mac->top_pos = yoff;
@@ -9553,7 +9784,11 @@ x_set_offset (f, xoff, yoff, change_gravity)
9553 BLOCK_INPUT; 9784 BLOCK_INPUT;
9554 x_wm_set_size_hint (f, (long) 0, 0); 9785 x_wm_set_size_hint (f, (long) 0, 0);
9555 9786
9556 MoveWindow (f->output_data.mac->mWP, xoff + 6, yoff + 42, false); 9787 modified_left = f->output_data.mac->left_pos;
9788 modified_top = f->output_data.mac->top_pos;
9789
9790 MoveWindow (f->output_data.mac->mWP, modified_left + 6,
9791 modified_top + 42, false);
9557 9792
9558 UNBLOCK_INPUT; 9793 UNBLOCK_INPUT;
9559} 9794}
@@ -9570,13 +9805,13 @@ x_set_window_size (f, change_gravity, cols, rows)
9570 int cols, rows; 9805 int cols, rows;
9571{ 9806{
9572 int pixelwidth, pixelheight; 9807 int pixelwidth, pixelheight;
9573 9808
9809 BLOCK_INPUT;
9810
9574 check_frame_size (f, &rows, &cols); 9811 check_frame_size (f, &rows, &cols);
9575 f->output_data.mac->vertical_scroll_bar_extra 9812 f->output_data.mac->vertical_scroll_bar_extra
9576 = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f) 9813 = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f)
9577 ? 0 9814 ? 0
9578 : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
9579 ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
9580 : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.mac->font))); 9815 : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.mac->font)));
9581 9816
9582 x_compute_fringe_widths (f, 0); 9817 x_compute_fringe_widths (f, 0);
@@ -9593,7 +9828,7 @@ x_set_window_size (f, change_gravity, cols, rows)
9593 but the window manager will get around to dealing with the size 9828 but the window manager will get around to dealing with the size
9594 change request eventually, and we'll hear how it went when the 9829 change request eventually, and we'll hear how it went when the
9595 ConfigureNotify event gets here. 9830 ConfigureNotify event gets here.
9596 9831
9597 We could just not bother storing any of this information here, 9832 We could just not bother storing any of this information here,
9598 and let the ConfigureNotify event set everything up, but that 9833 and let the ConfigureNotify event set everything up, but that
9599 might be kind of confusing to the Lisp code, since size changes 9834 might be kind of confusing to the Lisp code, since size changes
@@ -9622,6 +9857,8 @@ x_set_window_size (f, change_gravity, cols, rows)
9622 Actually checking whether it is outside is a pain in the neck, 9857 Actually checking whether it is outside is a pain in the neck,
9623 so don't try--just let the highlighting be done afresh with new size. */ 9858 so don't try--just let the highlighting be done afresh with new size. */
9624 cancel_mouse_face (f); 9859 cancel_mouse_face (f);
9860
9861 UNBLOCK_INPUT;
9625} 9862}
9626 9863
9627/* Mouse warping. */ 9864/* Mouse warping. */
@@ -9647,8 +9884,6 @@ x_set_mouse_position (f, x, y)
9647 x_set_mouse_pixel_position (f, pix_x, pix_y); 9884 x_set_mouse_pixel_position (f, pix_x, pix_y);
9648} 9885}
9649 9886
9650/* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F. */
9651
9652void 9887void
9653x_set_mouse_pixel_position (f, pix_x, pix_y) 9888x_set_mouse_pixel_position (f, pix_x, pix_y)
9654 struct frame *f; 9889 struct frame *f;
@@ -9662,10 +9897,11 @@ x_set_mouse_pixel_position (f, pix_x, pix_y)
9662 UNBLOCK_INPUT; 9897 UNBLOCK_INPUT;
9663#endif 9898#endif
9664} 9899}
9900
9665 9901
9666/* focus shifting, raising and lowering. */ 9902/* focus shifting, raising and lowering. */
9667 9903
9668static void 9904void
9669x_focus_on_frame (f) 9905x_focus_on_frame (f)
9670 struct frame *f; 9906 struct frame *f;
9671{ 9907{
@@ -9681,20 +9917,13 @@ x_focus_on_frame (f)
9681#endif /* ! 0 */ 9917#endif /* ! 0 */
9682} 9918}
9683 9919
9684static void 9920void
9685x_unfocus_frame (f) 9921x_unfocus_frame (f)
9686 struct frame *f; 9922 struct frame *f;
9687{ 9923{
9688#if 0
9689 /* Look at the remarks in x_focus_on_frame. */
9690 if (FRAME_X_DISPLAY_INFO (f)->x_focus_frame == f)
9691 XSetInputFocus (FRAME_X_DISPLAY (f), PointerRoot,
9692 RevertToPointerRoot, CurrentTime);
9693#endif /* ! 0 */
9694} 9924}
9695 9925
9696/* Raise frame F. */ 9926/* Raise frame F. */
9697
9698void 9927void
9699x_raise_frame (f) 9928x_raise_frame (f)
9700 struct frame *f; 9929 struct frame *f;
@@ -9704,7 +9933,6 @@ x_raise_frame (f)
9704} 9933}
9705 9934
9706/* Lower frame F. */ 9935/* Lower frame F. */
9707
9708void 9936void
9709x_lower_frame (f) 9937x_lower_frame (f)
9710 struct frame *f; 9938 struct frame *f;
@@ -9713,7 +9941,7 @@ x_lower_frame (f)
9713 SendBehind (FRAME_MAC_WINDOW (f), nil); 9941 SendBehind (FRAME_MAC_WINDOW (f), nil);
9714} 9942}
9715 9943
9716void 9944static void
9717XTframe_raise_lower (f, raise_flag) 9945XTframe_raise_lower (f, raise_flag)
9718 FRAME_PTR f; 9946 FRAME_PTR f;
9719 int raise_flag; 9947 int raise_flag;
@@ -9760,6 +9988,7 @@ x_make_frame_visible (f)
9760 9988
9761 XFlush (FRAME_MAC_DISPLAY (f)); 9989 XFlush (FRAME_MAC_DISPLAY (f));
9762 9990
9991#if 0 /* MAC_TODO */
9763 /* Synchronize to ensure Emacs knows the frame is visible 9992 /* Synchronize to ensure Emacs knows the frame is visible
9764 before we do anything else. We do this loop with input not blocked 9993 before we do anything else. We do this loop with input not blocked
9765 so that incoming events are handled. */ 9994 so that incoming events are handled. */
@@ -9803,6 +10032,7 @@ x_make_frame_visible (f)
9803 FRAME_SAMPLE_VISIBILITY (f); 10032 FRAME_SAMPLE_VISIBILITY (f);
9804 } 10033 }
9805 } 10034 }
10035#endif /* MAC_TODO */
9806} 10036}
9807 10037
9808/* Change from mapped state to withdrawn state. */ 10038/* Change from mapped state to withdrawn state. */
@@ -9941,8 +10171,9 @@ x_iconify_frame (f)
9941 XFlush (FRAME_X_DISPLAY (f)); 10171 XFlush (FRAME_X_DISPLAY (f));
9942 UNBLOCK_INPUT; 10172 UNBLOCK_INPUT;
9943#endif /* not USE_X_TOOLKIT */ 10173#endif /* not USE_X_TOOLKIT */
9944#endif 10174#endif /* MAC_TODO */
9945} 10175}
10176
9946 10177
9947/* Destroy the X window of frame F. */ 10178/* Destroy the X window of frame F. */
9948 10179
@@ -9991,7 +10222,6 @@ x_destroy_window (f)
9991 that the window now has. 10222 that the window now has.
9992 If USER_POSITION is nonzero, we set the USPosition 10223 If USER_POSITION is nonzero, we set the USPosition
9993 flag (this is useful when FLAGS is 0). */ 10224 flag (this is useful when FLAGS is 0). */
9994
9995void 10225void
9996x_wm_set_size_hint (f, flags, user_position) 10226x_wm_set_size_hint (f, flags, user_position)
9997 struct frame *f; 10227 struct frame *f;
@@ -10134,10 +10364,10 @@ x_wm_set_size_hint (f, flags, user_position)
10134#else 10364#else
10135 XSetNormalHints (FRAME_X_DISPLAY (f), window, &size_hints); 10365 XSetNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
10136#endif 10366#endif
10137#endif /* MACTODO */ 10367#endif /* MAC_TODO */
10138} 10368}
10139 10369
10140#if 0 /* MACTODO: hide application instead of iconify? */ 10370#if 0 /* MAC_TODO: hide application instead of iconify? */
10141/* Used for IconicState or NormalState */ 10371/* Used for IconicState or NormalState */
10142 10372
10143void 10373void
@@ -10208,7 +10438,7 @@ x_wm_set_icon_pixmap (f, pixmap_id)
10208#endif /* not USE_X_TOOLKIT */ 10438#endif /* not USE_X_TOOLKIT */
10209} 10439}
10210 10440
10211#endif 10441#endif /* MAC_TODO */
10212 10442
10213void 10443void
10214x_wm_set_icon_position (f, icon_x, icon_y) 10444x_wm_set_icon_position (f, icon_x, icon_y)
@@ -10227,7 +10457,7 @@ x_wm_set_icon_position (f, icon_x, icon_y)
10227 f->output_data.x->wm_hints.icon_y = icon_y; 10457 f->output_data.x->wm_hints.icon_y = icon_y;
10228 10458
10229 XSetWMHints (FRAME_X_DISPLAY (f), window, &f->output_data.x->wm_hints); 10459 XSetWMHints (FRAME_X_DISPLAY (f), window, &f->output_data.x->wm_hints);
10230#endif 10460#endif /* MAC_TODO */
10231} 10461}
10232 10462
10233 10463
@@ -10421,92 +10651,165 @@ x_font_name_to_mac_font_name (char *xf, char *mf)
10421static void 10651static void
10422init_font_name_table () 10652init_font_name_table ()
10423{ 10653{
10424 GrafPtr port; 10654#if TARGET_API_MAC_CARBON
10425 SInt16 fontnum, old_fontnum; 10655 SInt32 sv;
10426 int num_mac_fonts = CountResources('FOND'); 10656
10427 int i, j; 10657 if (Gestalt (gestaltSystemVersion, &sv) == noErr && sv >= 0x1000)
10428 Handle font_handle, font_handle_2; 10658 {
10429 short id, scriptcode; 10659 FMFontFamilyIterator ffi;
10430 ResType type; 10660 FMFontFamilyInstanceIterator ffii;
10431 Str32 name; 10661 FMFontFamily ff;
10432 struct FontAssoc *fat;
10433 struct AsscEntry *assc_entry;
10434 10662
10435 GetPort (&port); /* save the current font number used */ 10663 /* Create a dummy instance iterator here to avoid creating and
10436 old_fontnum = port->txFont; 10664 destroying it in the loop. */
10665 if (FMCreateFontFamilyInstanceIterator (0, &ffii) != noErr)
10666 return;
10667 /* Create an iterator to enumerate the font families. */
10668 if (FMCreateFontFamilyIterator (NULL, NULL, kFMDefaultOptions, &ffi)
10669 != noErr)
10670 {
10671 FMDisposeFontFamilyInstanceIterator (&ffii);
10672 return;
10673 }
10437 10674
10438 for (i = 1; i <= num_mac_fonts; i++) /* loop to get all available fonts */ 10675 while (FMGetNextFontFamily (&ffi, &ff) == noErr)
10676 {
10677 Str255 name;
10678 FMFont font;
10679 FMFontStyle style;
10680 FMFontSize size;
10681 SInt16 sc;
10682
10683 if (FMGetFontFamilyName (ff, name) != noErr)
10684 break;
10685 p2cstr (name);
10686
10687 sc = FontToScript (ff);
10688
10689 /* Point the instance iterator at the current font family. */
10690 if (FMResetFontFamilyInstanceIterator(ff, &ffii) != noErr)
10691 break;
10692
10693 while (FMGetNextFontFamilyInstance (&ffii, &font, &style, &size)
10694 == noErr)
10695 {
10696 if (font_name_table_size == 0)
10697 {
10698 font_name_table_size = 16;
10699 font_name_table = (char **)
10700 xmalloc (font_name_table_size * sizeof (char *));
10701 }
10702 else if (font_name_count + 1 >= font_name_table_size)
10703 {
10704 font_name_table_size += 16;
10705 font_name_table = (char **)
10706 xrealloc (font_name_table,
10707 font_name_table_size * sizeof (char *));
10708 }
10709 font_name_table[font_name_count++]
10710 = mac_to_x_fontname (name, size, style, sc);
10711 }
10712 }
10713
10714 /* Dispose of the iterators. */
10715 FMDisposeFontFamilyIterator (&ffi);
10716 FMDisposeFontFamilyInstanceIterator (&ffii);
10717 }
10718 else
10439 { 10719 {
10440 font_handle = GetIndResource ('FOND', i); 10720#endif /* TARGET_API_MAC_CARBON */
10441 if (!font_handle) 10721 GrafPtr port;
10442 continue; 10722 SInt16 fontnum, old_fontnum;
10443 10723 int num_mac_fonts = CountResources('FOND');
10444 GetResInfo (font_handle, &id, &type, name); 10724 int i, j;
10445 GetFNum (name, &fontnum); 10725 Handle font_handle, font_handle_2;
10446 p2cstr (name); 10726 short id, scriptcode;
10447 if (fontnum == 0) 10727 ResType type;
10448 continue; 10728 Str32 name;
10729 struct FontAssoc *fat;
10730 struct AsscEntry *assc_entry;
10449 10731
10450 TextFont (fontnum); 10732 GetPort (&port); /* save the current font number used */
10451 scriptcode = FontToScript (fontnum); 10733#if TARGET_API_MAC_CARBON
10452 do 10734 old_fontnum = GetPortTextFont (port);
10453 { 10735#else
10454 HLock (font_handle); 10736 old_fontnum = port->txFont;
10455 10737#endif
10456 if (GetResourceSizeOnDisk (font_handle) >= sizeof (struct FamRec)) 10738
10457 { 10739 for (i = 1; i <= num_mac_fonts; i++) /* get all available fonts */
10458 fat = (struct FontAssoc *) (*font_handle 10740 {
10459 + sizeof (struct FamRec)); 10741 font_handle = GetIndResource ('FOND', i);
10460 assc_entry = (struct AsscEntry *) (*font_handle 10742 if (!font_handle)
10461 + sizeof (struct FamRec) 10743 continue;
10462 + sizeof (struct FontAssoc)); 10744
10463 10745 GetResInfo (font_handle, &id, &type, name);
10464 for (j = 0; j <= fat->numAssoc; j++, assc_entry++) 10746 GetFNum (name, &fontnum);
10465 { 10747 p2cstr (name);
10466 if (font_name_table_size == 0) 10748 if (fontnum == 0)
10467 { 10749 continue;
10468 font_name_table_size = 16; 10750
10469 font_name_table = (char **) 10751 TextFont (fontnum);
10470 xmalloc (font_name_table_size * sizeof (char *)); 10752 scriptcode = FontToScript (fontnum);
10471 } 10753 do
10472 else if (font_name_count >= font_name_table_size || 10754 {
10473 /* fonts in Japanese scripts require two 10755 HLock (font_handle);
10474 entries. */ 10756
10475 scriptcode == smJapanese && 10757 if (GetResourceSizeOnDisk (font_handle)
10476 font_name_count + 1 >= font_name_table_size) 10758 >= sizeof (struct FamRec))
10477 { 10759 {
10478 font_name_table_size += 16; 10760 fat = (struct FontAssoc *) (*font_handle
10479 font_name_table = (char **) 10761 + sizeof (struct FamRec));
10480 xrealloc (font_name_table, 10762 assc_entry
10481 font_name_table_size * sizeof (char *)); 10763 = (struct AsscEntry *) (*font_handle
10482 } 10764 + sizeof (struct FamRec)
10483 font_name_table[font_name_count++] 10765 + sizeof (struct FontAssoc));
10484 = mac_to_x_fontname (name, 10766
10485 assc_entry->fontSize, 10767 for (j = 0; j <= fat->numAssoc; j++, assc_entry++)
10486 assc_entry->fontStyle,
10487 scriptcode);
10488 /* Both jisx0208.1983-sjis and jisx0201.1976-0 parts
10489 are contained in Apple Japanese (SJIS) font. */
10490 if (smJapanese == scriptcode)
10491 { 10768 {
10769 if (font_name_table_size == 0)
10770 {
10771 font_name_table_size = 16;
10772 font_name_table = (char **)
10773 xmalloc (font_name_table_size * sizeof (char *));
10774 }
10775 else if (font_name_count >= font_name_table_size)
10776 {
10777 font_name_table_size += 16;
10778 font_name_table = (char **)
10779 xrealloc (font_name_table,
10780 font_name_table_size * sizeof (char *));
10781 }
10492 font_name_table[font_name_count++] 10782 font_name_table[font_name_count++]
10493 = mac_to_x_fontname (name, 10783 = mac_to_x_fontname (name,
10494 assc_entry->fontSize, 10784 assc_entry->fontSize,
10495 assc_entry->fontStyle, 10785 assc_entry->fontStyle,
10496 -smJapanese); 10786 scriptcode);
10787 /* Both jisx0208.1983-sjis and
10788 jisx0201.1976-sjis parts are contained in
10789 Apple Japanese (SJIS) font. */
10790 if (smJapanese == scriptcode)
10791 {
10792 font_name_table[font_name_count++]
10793 = mac_to_x_fontname (name,
10794 assc_entry->fontSize,
10795 assc_entry->fontStyle,
10796 smRoman);
10797 }
10497 } 10798 }
10498 } 10799 }
10499 } 10800
10500 10801 HUnlock (font_handle);
10501 HUnlock (font_handle); 10802 font_handle_2 = GetNextFOND (font_handle);
10502 font_handle_2 = GetNextFOND (font_handle); 10803 ReleaseResource (font_handle);
10503 ReleaseResource (font_handle); 10804 font_handle = font_handle_2;
10504 font_handle = font_handle_2; 10805 }
10505 } 10806 while (ResError () == noErr && font_handle);
10506 while (ResError () == noErr && font_handle); 10807 }
10808
10809 TextFont (old_fontnum);
10810#if TARGET_API_MAC_CARBON
10507 } 10811 }
10508 10812#endif /* TARGET_API_MAC_CARBON */
10509 TextFont (old_fontnum);
10510} 10813}
10511 10814
10512 10815
@@ -10559,8 +10862,8 @@ x_list_fonts (struct frame *f,
10559 10862
10560#if GLYPH_DEBUG 10863#if GLYPH_DEBUG
10561 10864
10562/* Check that FONT is valid on frame F. It is if it can be found in 10865/* Check that FONT is valid on frame F. It is if it can be found in F's
10563 F's font table. */ 10866 font table. */
10564 10867
10565static void 10868static void
10566x_check_font (f, font) 10869x_check_font (f, font)
@@ -10582,7 +10885,6 @@ x_check_font (f, font)
10582 10885
10583#endif /* GLYPH_DEBUG != 0 */ 10886#endif /* GLYPH_DEBUG != 0 */
10584 10887
10585
10586/* Set *W to the minimum width, *H to the minimum font height of FONT. 10888/* Set *W to the minimum width, *H to the minimum font height of FONT.
10587 Note: There are (broken) X fonts out there with invalid XFontStruct 10889 Note: There are (broken) X fonts out there with invalid XFontStruct
10588 min_bounds contents. For example, handa@etl.go.jp reports that 10890 min_bounds contents. For example, handa@etl.go.jp reports that
@@ -10594,14 +10896,12 @@ x_font_min_bounds (font, w, h)
10594 MacFontStruct *font; 10896 MacFontStruct *font;
10595 int *w, *h; 10897 int *w, *h;
10596{ 10898{
10899 /*
10900 * TODO: Windows does not appear to offer min bound, only
10901 * average and maximum width, and maximum height.
10902 */
10597 *h = FONT_HEIGHT (font); 10903 *h = FONT_HEIGHT (font);
10598 *w = font->min_bounds.width; 10904 *w = FONT_WIDTH (font);
10599
10600 /* Try to handle the case where FONT->min_bounds has invalid
10601 contents. Since the only font known to have invalid min_bounds
10602 is fixed-width, use max_bounds if min_bounds seems to be invalid. */
10603 if (*w <= 0)
10604 *w = font->max_bounds.width;
10605} 10905}
10606 10906
10607 10907
@@ -10611,7 +10911,7 @@ x_font_min_bounds (font, w, h)
10611 the values computed. Value is non-zero if smallest_font_height or 10911 the values computed. Value is non-zero if smallest_font_height or
10612 smallest_char_width become smaller than they were before. */ 10912 smallest_char_width become smaller than they were before. */
10613 10913
10614static int 10914int
10615x_compute_min_glyph_bounds (f) 10915x_compute_min_glyph_bounds (f)
10616 struct frame *f; 10916 struct frame *f;
10617{ 10917{
@@ -10682,12 +10982,11 @@ is_fully_specified_xlfd (char *p)
10682const int kDefaultFontSize = 9; 10982const int kDefaultFontSize = 9;
10683 10983
10684 10984
10685/* MacLoadQueryFont creates and returns an internal representation for 10985/* XLoadQueryFont creates and returns an internal representation for a
10686 a font in a MacFontStruct struct (similar in function to 10986 font in a MacFontStruct struct. There is really no concept
10687 XLoadQueryFont in X). There is really no concept corresponding to 10987 corresponding to "loading" a font on the Mac. But we check its
10688 "loading" a font on the Mac. But we check its existence and find 10988 existence and find the font number and all other information for it
10689 the font number and all other information for it and store them in 10989 and store them in the returned MacFontStruct. */
10690 the returned MacFontStruct. */
10691 10990
10692static MacFontStruct * 10991static MacFontStruct *
10693XLoadQueryFont (Display *dpy, char *fontname) 10992XLoadQueryFont (Display *dpy, char *fontname)
@@ -10719,9 +11018,15 @@ XLoadQueryFont (Display *dpy, char *fontname)
10719 } 11018 }
10720 11019
10721 GetPort (&port); /* save the current font number used */ 11020 GetPort (&port); /* save the current font number used */
11021#if TARGET_API_MAC_CARBON
11022 old_fontnum = GetPortTextFont (port);
11023 old_fontsize = GetPortTextSize (port);
11024 old_fontface = GetPortTextFace (port);
11025#else
10722 old_fontnum = port->txFont; 11026 old_fontnum = port->txFont;
10723 old_fontsize = port->txSize; 11027 old_fontsize = port->txSize;
10724 old_fontface = port->txFace; 11028 old_fontface = port->txFace;
11029#endif
10725 11030
10726 if (sscanf (name, "-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]--%d-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%*s", &size) != 1) 11031 if (sscanf (name, "-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]--%d-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%*s", &size) != 1)
10727 size = kDefaultFontSize; 11032 size = kDefaultFontSize;
@@ -10752,7 +11057,7 @@ XLoadQueryFont (Display *dpy, char *fontname)
10752 11057
10753 /* Apple Japanese (SJIS) font is listed as both 11058 /* Apple Japanese (SJIS) font is listed as both
10754 "*-jisx0208.1983-sjis" (Japanese script) and "*-jisx0201.1976-0" 11059 "*-jisx0208.1983-sjis" (Japanese script) and "*-jisx0201.1976-0"
10755 (Roman script) in init_font_name_table(). The latter should be 11060 (Roman script) in init_font_name_table (). The latter should be
10756 treated as a one-byte font. */ 11061 treated as a one-byte font. */
10757 { 11062 {
10758 char cs[32]; 11063 char cs[32];
@@ -10760,7 +11065,7 @@ XLoadQueryFont (Display *dpy, char *fontname)
10760 if (sscanf (name, 11065 if (sscanf (name,
10761 "-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]--%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%31s", 11066 "-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]--%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%31s",
10762 cs) == 1 11067 cs) == 1
10763 && 0 == strcmp (cs, "jisx0201.1976-0")) 11068 && 0 == strcmp (cs, "mac-roman"))
10764 font->mac_scriptcode = smRoman; 11069 font->mac_scriptcode = smRoman;
10765 } 11070 }
10766 11071
@@ -11127,43 +11432,10 @@ same_x_server (name1, name2)
11127} 11432}
11128#endif 11433#endif
11129 11434
11130struct mac_display_info *
11131x_term_init (display_name, xrm_option, resource_name)
11132 Lisp_Object display_name;
11133 char *xrm_option;
11134 char *resource_name;
11135{
11136 if (!x_initialized)
11137 {
11138 x_initialize ();
11139 x_initialized = 1;
11140 }
11141
11142 return &one_mac_display_info;
11143}
11144
11145/* Set up use of X before we make the first connection. */
11146
11147static struct redisplay_interface x_redisplay_interface =
11148{
11149 x_produce_glyphs,
11150 x_write_glyphs,
11151 x_insert_glyphs,
11152 x_clear_end_of_line,
11153 x_scroll_run,
11154 x_after_update_window_line,
11155 x_update_window_begin,
11156 x_update_window_end,
11157 XTcursor_to,
11158 x_flush,
11159 x_clear_mouse_face,
11160 x_get_glyph_overhangs,
11161 x_fix_overlapping_area
11162};
11163
11164 11435
11165/* The Mac Event loop code */ 11436/* The Mac Event loop code */
11166 11437
11438#ifndef MAC_OSX
11167#include <Events.h> 11439#include <Events.h>
11168#include <Quickdraw.h> 11440#include <Quickdraw.h>
11169#include <Balloons.h> 11441#include <Balloons.h>
@@ -11177,7 +11449,6 @@ static struct redisplay_interface x_redisplay_interface =
11177#include <TextUtils.h> 11449#include <TextUtils.h>
11178#include <Dialogs.h> 11450#include <Dialogs.h>
11179#include <Script.h> 11451#include <Script.h>
11180#include <Scrap.h>
11181#include <Types.h> 11452#include <Types.h>
11182#include <TextEncodingConverter.h> 11453#include <TextEncodingConverter.h>
11183#include <Resources.h> 11454#include <Resources.h>
@@ -11185,6 +11456,7 @@ static struct redisplay_interface x_redisplay_interface =
11185#if __MWERKS__ 11456#if __MWERKS__
11186#include <unix.h> 11457#include <unix.h>
11187#endif 11458#endif
11459#endif /* ! MAC_OSX */
11188 11460
11189#define M_APPLE 128 11461#define M_APPLE 128
11190#define I_ABOUT 1 11462#define I_ABOUT 1
@@ -11240,8 +11512,10 @@ Point saved_menu_event_location;
11240 11512
11241/* Apple Events */ 11513/* Apple Events */
11242static void init_required_apple_events(void); 11514static void init_required_apple_events(void);
11243static pascal OSErr do_ae_open_application(const AppleEvent *, AppleEvent *, long); 11515static pascal OSErr
11244static pascal OSErr do_ae_print_documents(const AppleEvent *, AppleEvent *, long); 11516do_ae_open_application(const AppleEvent *, AppleEvent *, long);
11517static pascal OSErr
11518do_ae_print_documents(const AppleEvent *, AppleEvent *, long);
11245static pascal OSErr do_ae_open_documents(AppleEvent *, AppleEvent *, long); 11519static pascal OSErr do_ae_open_documents(AppleEvent *, AppleEvent *, long);
11246static pascal OSErr do_ae_quit_application(AppleEvent *, AppleEvent *, long); 11520static pascal OSErr do_ae_quit_application(AppleEvent *, AppleEvent *, long);
11247 11521
@@ -11276,6 +11550,7 @@ do_get_menus (void)
11276static void 11550static void
11277do_init_managers (void) 11551do_init_managers (void)
11278{ 11552{
11553#if !TARGET_API_MAC_CARBON
11279 InitGraf (&qd.thePort); 11554 InitGraf (&qd.thePort);
11280 InitFonts (); 11555 InitFonts ();
11281 FlushEvents (everyEvent, 0); 11556 FlushEvents (everyEvent, 0);
@@ -11283,8 +11558,10 @@ do_init_managers (void)
11283 InitMenus (); 11558 InitMenus ();
11284 TEInit (); 11559 TEInit ();
11285 InitDialogs (NULL); 11560 InitDialogs (NULL);
11286 InitCursor (); 11561#endif /* !TARGET_API_MAC_CARBON */
11562 InitCursor ();
11287 11563
11564#if !TARGET_API_MAC_CARBON
11288 /* set up some extra stack space for use by emacs */ 11565 /* set up some extra stack space for use by emacs */
11289 SetApplLimit ((Ptr) ((long) GetApplLimit () - EXTRA_STACK_ALLOC)); 11566 SetApplLimit ((Ptr) ((long) GetApplLimit () - EXTRA_STACK_ALLOC));
11290 11567
@@ -11292,9 +11569,9 @@ do_init_managers (void)
11292 complicated scripts */ 11569 complicated scripts */
11293 MaxApplZone (); 11570 MaxApplZone ();
11294 MoreMasters (); 11571 MoreMasters ();
11572#endif /* !TARGET_API_MAC_CARBON */
11295} 11573}
11296 11574
11297
11298static void 11575static void
11299do_check_ram_size (void) 11576do_check_ram_size (void)
11300{ 11577{
@@ -11310,7 +11587,6 @@ do_check_ram_size (void)
11310 } 11587 }
11311} 11588}
11312 11589
11313
11314static void 11590static void
11315do_window_update (WindowPtr win) 11591do_window_update (WindowPtr win)
11316{ 11592{
@@ -11345,44 +11621,78 @@ do_window_update (WindowPtr win)
11345 } 11621 }
11346} 11622}
11347 11623
11624static int
11625is_emacs_window (WindowPtr win)
11626{
11627 Lisp_Object tail, frame;
11628
11629 if (!win)
11630 return 0;
11631
11632 FOR_EACH_FRAME (tail, frame)
11633 if (FRAME_MAC_P (XFRAME (frame)))
11634 if (FRAME_MAC_WINDOW (XFRAME (frame)) == win)
11635 return 1;
11636
11637 return 0;
11638}
11639
11348static void 11640static void
11349do_window_activate (WindowPtr win) 11641do_window_activate (WindowPtr win)
11350{ 11642{
11351 mac_output *mwp = (mac_output *) GetWRefCon (win); 11643 mac_output *mwp;
11352 struct frame *f = mwp->mFP; 11644 struct frame *f;
11353 11645
11354 if (f) 11646 if (is_emacs_window (win))
11355 { 11647 {
11356 x_new_focus_frame (FRAME_MAC_DISPLAY_INFO (f), f); 11648 mwp = (mac_output *) GetWRefCon (win);
11357 activate_scroll_bars (f); 11649 f = mwp->mFP;
11650
11651 if (f)
11652 {
11653 x_new_focus_frame (FRAME_MAC_DISPLAY_INFO (f), f);
11654 activate_scroll_bars (f);
11655 }
11358 } 11656 }
11359} 11657}
11360 11658
11361static void 11659static void
11362do_window_deactivate (WindowPtr win) 11660do_window_deactivate (WindowPtr win)
11363{ 11661{
11364 mac_output *mwp = (mac_output *) GetWRefCon (win); 11662 mac_output *mwp;
11365 struct frame *f = mwp->mFP; 11663 struct frame *f;
11366 11664
11367 if (f == FRAME_MAC_DISPLAY_INFO (f)->x_focus_frame) 11665 if (is_emacs_window (win))
11368 { 11666 {
11369 x_new_focus_frame (FRAME_MAC_DISPLAY_INFO (f), 0); 11667 mwp = (mac_output *) GetWRefCon (win);
11370 deactivate_scroll_bars (f); 11668 f = mwp->mFP;
11669
11670 if (f == FRAME_MAC_DISPLAY_INFO (f)->x_focus_frame)
11671 {
11672 x_new_focus_frame (FRAME_MAC_DISPLAY_INFO (f), 0);
11673 deactivate_scroll_bars (f);
11674 }
11371 } 11675 }
11372} 11676}
11373 11677
11374static void 11678static void
11375do_app_resume () 11679do_app_resume ()
11376{ 11680{
11377 mac_output *mwp = (mac_output *) GetWRefCon (FrontWindow ()); 11681 WindowPtr wp;
11378 struct frame *f = mwp->mFP; 11682 mac_output *mwp;
11379 11683 struct frame *f;
11380 SetCursor (&qd.arrow);
11381 11684
11382 if (f) 11685 wp = FrontWindow();
11686 if (is_emacs_window (wp))
11383 { 11687 {
11384 x_new_focus_frame (FRAME_MAC_DISPLAY_INFO (f), f); 11688 mwp = (mac_output *) GetWRefCon (wp);
11385 activate_scroll_bars (f); 11689 f = mwp->mFP;
11690
11691 if (f)
11692 {
11693 x_new_focus_frame (FRAME_MAC_DISPLAY_INFO (f), f);
11694 activate_scroll_bars (f);
11695 }
11386 } 11696 }
11387 11697
11388 app_is_suspended = false; 11698 app_is_suspended = false;
@@ -11392,13 +11702,21 @@ do_app_resume ()
11392static void 11702static void
11393do_app_suspend () 11703do_app_suspend ()
11394{ 11704{
11395 mac_output *mwp = (mac_output *) GetWRefCon (FrontWindow ()); 11705 WindowPtr wp;
11396 struct frame *f = mwp->mFP; 11706 mac_output *mwp;
11707 struct frame *f;
11397 11708
11398 if (f == FRAME_MAC_DISPLAY_INFO (f)->x_focus_frame) 11709 wp = FrontWindow();
11710 if (is_emacs_window (wp))
11399 { 11711 {
11400 x_new_focus_frame (FRAME_MAC_DISPLAY_INFO (f), 0); 11712 mwp = (mac_output *) GetWRefCon (wp);
11401 deactivate_scroll_bars (f); 11713 f = mwp->mFP;
11714
11715 if (f == FRAME_MAC_DISPLAY_INFO (f)->x_focus_frame)
11716 {
11717 x_new_focus_frame (FRAME_MAC_DISPLAY_INFO (f), 0);
11718 deactivate_scroll_bars (f);
11719 }
11402 } 11720 }
11403 11721
11404 app_is_suspended = true; 11722 app_is_suspended = true;
@@ -11412,7 +11730,12 @@ do_mouse_moved (Point mouse_pos)
11412 WindowPtr wp = FrontWindow (); 11730 WindowPtr wp = FrontWindow ();
11413 struct frame *f = ((mac_output *) GetWRefCon (wp))->mFP; 11731 struct frame *f = ((mac_output *) GetWRefCon (wp))->mFP;
11414 11732
11415 SetPort (wp); 11733#if TARGET_API_MAC_CARBON
11734 SetPort (GetWindowPort (wp));
11735#else
11736 SetPort (wp);
11737#endif
11738
11416 GlobalToLocal (&mouse_pos); 11739 GlobalToLocal (&mouse_pos);
11417 11740
11418 note_mouse_movement (f, &mouse_pos); 11741 note_mouse_movement (f, &mouse_pos);
@@ -11431,7 +11754,7 @@ do_os_event (EventRecord *erp)
11431 do_app_suspend (); 11754 do_app_suspend ();
11432 break; 11755 break;
11433 11756
11434 case mouseMovedMessage: /* never reached */ 11757 case mouseMovedMessage:
11435 do_mouse_moved (erp->where); 11758 do_mouse_moved (erp->where);
11436 break; 11759 break;
11437 } 11760 }
@@ -11462,6 +11785,7 @@ do_events (EventRecord *erp)
11462static void 11785static void
11463do_apple_menu (SInt16 menu_item) 11786do_apple_menu (SInt16 menu_item)
11464{ 11787{
11788#if !TARGET_API_MAC_CARBON
11465 Str255 item_name; 11789 Str255 item_name;
11466 SInt16 da_driver_refnum; 11790 SInt16 da_driver_refnum;
11467 11791
@@ -11472,6 +11796,7 @@ do_apple_menu (SInt16 menu_item)
11472 GetMenuItemText (GetMenuHandle (M_APPLE), menu_item, item_name); 11796 GetMenuItemText (GetMenuHandle (M_APPLE), menu_item, item_name);
11473 da_driver_refnum = OpenDeskAcc (item_name); 11797 da_driver_refnum = OpenDeskAcc (item_name);
11474 } 11798 }
11799#endif /* !TARGET_API_MAC_CARBON */
11475} 11800}
11476 11801
11477void 11802void
@@ -11553,16 +11878,50 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out)
11553 struct frame *f = mwp->mFP; 11878 struct frame *f = mwp->mFP;
11554 11879
11555 GetPort (&save_port); 11880 GetPort (&save_port);
11881
11882#if TARGET_API_MAC_CARBON
11883 SetPort (GetWindowPort (w));
11884#else
11556 SetPort (w); 11885 SetPort (w);
11557 EraseRect (&(w->portRect)); /* erase to avoid flicker */ 11886#endif
11887
11888 /* Clear window to avoid flicker. */
11889#if TARGET_API_MAC_CARBON
11890 {
11891 Rect r;
11892 BitMap bm;
11893
11894 GetWindowPortBounds (w, &r);
11895 EraseRect (&r);
11896
11897 if (zoom_in_or_out == inZoomOut)
11898 {
11899 /* calculate height of window's title bar (hard card it for now). */
11900 w_title_height = 20 + GetMBarHeight ();
11901
11902 /* get maximum height of window into zoom_rect.bottom -
11903 zoom_rect.top */
11904 GetQDGlobalsScreenBits (&bm);
11905 zoom_rect = bm.bounds;
11906 zoom_rect.top += w_title_height;
11907 InsetRect (&zoom_rect, 8, 4); /* not too tight */
11908
11909 zoom_rect.right = zoom_rect.left
11910 + CHAR_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS);
11911
11912 SetWindowStandardState (w, &zoom_rect);
11913 }
11914 }
11915#else /* not TARGET_API_MAC_CARBON */
11916 EraseRect (&(w->portRect));
11558 if (zoom_in_or_out == inZoomOut) 11917 if (zoom_in_or_out == inZoomOut)
11559 { 11918 {
11560 SetPt(&top_left, w->portRect.left, w->portRect.top); 11919 SetPt (&top_left, w->portRect.left, w->portRect.top);
11561 LocalToGlobal (&top_left); 11920 LocalToGlobal (&top_left);
11562 11921
11563 /* calculate height of window's title bar */ 11922 /* calculate height of window's title bar */
11564 w_title_height = top_left.v - 1 11923 w_title_height = top_left.v - 1
11565 - (**((WindowPeek) w)->strucRgn).rgnBBox.top + GetMBarHeight(); 11924 - (**((WindowPeek) w)->strucRgn).rgnBBox.top + GetMBarHeight ();
11566 11925
11567 /* get maximum height of window into zoom_rect.bottom - zoom_rect.top */ 11926 /* get maximum height of window into zoom_rect.bottom - zoom_rect.top */
11568 zoom_rect = qd.screenBits.bounds; 11927 zoom_rect = qd.screenBits.bounds;
@@ -11572,13 +11931,19 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out)
11572 zoom_rect.right = zoom_rect.left 11931 zoom_rect.right = zoom_rect.left
11573 + CHAR_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); 11932 + CHAR_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS);
11574 11933
11575 (**((WStateDataHandle) ((WindowPeek) w)->dataHandle)).stdState = zoom_rect; 11934 (**((WStateDataHandle) ((WindowPeek) w)->dataHandle)).stdState
11935 = zoom_rect;
11576 } 11936 }
11937#endif /* not TARGET_API_MAC_CARBON */
11577 11938
11578 ZoomWindow (w, zoom_in_or_out, w == FrontWindow()); 11939 ZoomWindow (w, zoom_in_or_out, w == FrontWindow ());
11579 11940
11580 /* retrieve window size and update application values */ 11941 /* retrieve window size and update application values */
11942#if TARGET_API_MAC_CARBON
11943 GetWindowPortBounds (w, &port_rect);
11944#else
11581 port_rect = w->portRect; 11945 port_rect = w->portRect;
11946#endif
11582 rows = PIXEL_TO_CHAR_HEIGHT (f, port_rect.bottom - port_rect.top); 11947 rows = PIXEL_TO_CHAR_HEIGHT (f, port_rect.bottom - port_rect.top);
11583 columns = PIXEL_TO_CHAR_WIDTH (f, port_rect.right - port_rect.left); 11948 columns = PIXEL_TO_CHAR_WIDTH (f, port_rect.right - port_rect.left);
11584 x_set_window_size (mwp->mFP, 0, columns, rows); 11949 x_set_window_size (mwp->mFP, 0, columns, rows);
@@ -11602,27 +11967,59 @@ init_required_apple_events ()
11602 if (!(result & (1 << gestaltAppleEventsPresent))) 11967 if (!(result & (1 << gestaltAppleEventsPresent)))
11603 abort (); 11968 abort ();
11604 11969
11970#if TARGET_API_MAC_CARBON
11971 err = AEInstallEventHandler(kCoreEventClass, kAEOpenApplication,
11972 NewAEEventHandlerUPP
11973 ((AEEventHandlerProcPtr) do_ae_open_application),
11974 0L, false);
11975#else
11605 err = AEInstallEventHandler(kCoreEventClass, kAEOpenApplication, 11976 err = AEInstallEventHandler(kCoreEventClass, kAEOpenApplication,
11606 NewAEEventHandlerProc ((AEEventHandlerProcPtr) do_ae_open_application), 11977 NewAEEventHandlerProc
11978 ((AEEventHandlerProcPtr) do_ae_open_application),
11607 0L, false); 11979 0L, false);
11980#endif
11608 if (err != noErr) 11981 if (err != noErr)
11609 abort (); 11982 abort ();
11610 11983
11984#if TARGET_API_MAC_CARBON
11611 err = AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, 11985 err = AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments,
11612 NewAEEventHandlerProc ((AEEventHandlerProcPtr) do_ae_open_documents), 11986 NewAEEventHandlerUPP
11987 ((AEEventHandlerProcPtr) do_ae_open_documents),
11613 0L, false); 11988 0L, false);
11989#else
11990 err = AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments,
11991 NewAEEventHandlerProc
11992 ((AEEventHandlerProcPtr) do_ae_open_documents),
11993 0L, false);
11994#endif
11614 if (err != noErr) 11995 if (err != noErr)
11615 abort (); 11996 abort ();
11616 11997
11998#if TARGET_API_MAC_CARBON
11617 err = AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments, 11999 err = AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments,
11618 NewAEEventHandlerProc ((AEEventHandlerProcPtr) do_ae_print_documents), 12000 NewAEEventHandlerUPP
12001 ((AEEventHandlerProcPtr) do_ae_print_documents),
11619 0L, false); 12002 0L, false);
12003#else
12004 err = AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments,
12005 NewAEEventHandlerProc
12006 ((AEEventHandlerProcPtr) do_ae_print_documents),
12007 0L, false);
12008#endif
11620 if (err != noErr) 12009 if (err != noErr)
11621 abort (); 12010 abort ();
11622 12011
12012#if TARGET_API_MAC_CARBON
12013 err = AEInstallEventHandler(kCoreEventClass, kAEQuitApplication,
12014 NewAEEventHandlerUPP
12015 ((AEEventHandlerProcPtr) do_ae_quit_application),
12016 0L, false);
12017#else
11623 err = AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, 12018 err = AEInstallEventHandler(kCoreEventClass, kAEQuitApplication,
11624 NewAEEventHandlerProc ((AEEventHandlerProcPtr) do_ae_quit_application), 12019 NewAEEventHandlerProc
12020 ((AEEventHandlerProcPtr) do_ae_quit_application),
11625 0L, false); 12021 0L, false);
12022#endif
11626 if (err != noErr) 12023 if (err != noErr)
11627 abort (); 12024 abort ();
11628} 12025}
@@ -11761,6 +12158,7 @@ profiler_exit_proc ()
11761 hints and prompts in the minibuffer after the user stops typing for 12158 hints and prompts in the minibuffer after the user stops typing for
11762 a wait, etc. */ 12159 a wait, etc. */
11763 12160
12161#if !TARGET_API_MAC_CARBON
11764#undef main 12162#undef main
11765int 12163int
11766main (void) 12164main (void)
@@ -11813,7 +12211,7 @@ main (void)
11813 /* Never reached - real exit in Fkill_emacs */ 12211 /* Never reached - real exit in Fkill_emacs */
11814 return 0; 12212 return 0;
11815} 12213}
11816 12214#endif
11817 12215
11818/* Table for translating Mac keycode to X keysym values. Contributed 12216/* Table for translating Mac keycode to X keysym values. Contributed
11819 by Sudhir Shenoy. */ 12217 by Sudhir Shenoy. */
@@ -11824,25 +12222,25 @@ static unsigned char keycode_to_xkeysym_table[] = {
11824 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12222 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11825 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12223 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11826/* 0x40 */ 12224/* 0x40 */
11827 0, '\xae' /* kp. */, 0, '\xaa' /* kp* */, 12225 0, '\xae' /* kp. */, 0, '\xaa' /* kp* */,
11828 0, '\xab' /* kp+ */, 0, '\x7f' /* kp_clr */, 12226 0, '\xab' /* kp+ */, 0, '\x7f' /* kp_clr */,
11829 0, 0, 0, '\xaf' /* kp/ */, 12227 0, 0, 0, '\xaf' /* kp/ */,
11830 '\x8d' /* kp_ent */, 0, '\xad' /* kp- */, 0, 12228 '\x8d' /* kp_ent */, 0, '\xad' /* kp- */, 0,
11831/* 0x50 */ 12229/* 0x50 */
11832 0, '\xbd' /* kp= */, '\xb0' /* kp0 */, '\xb1' /* kp1 */, 12230 0, '\xbd' /* kp= */, '\xb0' /* kp0 */, '\xb1' /* kp1 */,
11833 '\xb2' /* kp2 */, '\xb3' /* kp3 */, '\xb4' /* kp4 */, '\xb5' /* kp5 */, 12231 '\xb2' /* kp2 */, '\xb3' /* kp3 */, '\xb4' /* kp4 */, '\xb5' /* kp5 */,
11834 '\xb6' /* kp6 */, '\xb7' /* kp7 */, 0, '\xb8' /* kp8 */, 12232 '\xb6' /* kp6 */, '\xb7' /* kp7 */, 0, '\xb8' /* kp8 */,
11835 '\xb9' /* kp9 */, 0, 0, 0, 12233 '\xb9' /* kp9 */, 0, 0, 0,
11836/* 0x60 */ 12234/* 0x60 */
11837 '\xc2' /* F5 */, '\xc3' /* F6 */, '\xc4' /* F7 */, '\xc0' /* F3 */, 12235 '\xc2' /* F5 */, '\xc3' /* F6 */, '\xc4' /* F7 */, '\xc0' /* F3 */,
11838 '\xc5' /* F8 */, '\xc6' /* F9 */, 0, '\xc8' /* F11 */, 12236 '\xc5' /* F8 */, '\xc6' /* F9 */, 0, '\xc8' /* F11 */,
11839 0, '\xca' /* F13 */, 0, '\xcb' /* F14 */, 12237 0, '\xca' /* F13 */, 0, '\xcb' /* F14 */,
11840 0, '\xc7' /* F10 */, 0, '\xc9' /* F12 */, 12238 0, '\xc7' /* F10 */, 0, '\xc9' /* F12 */,
11841/* 0x70 */ 12239/* 0x70 */
11842 0, '\xcc' /* F15 */, '\x9e' /* ins */, '\x95' /* home */, 12240 0, '\xcc' /* F15 */, '\x9e' /* ins */, '\x95' /* home */,
11843 '\x9a' /* pgup */, '\x9f' /* del */, '\xc1' /* F4 */, '\x9c' /* end */, 12241 '\x9a' /* pgup */, '\x9f' /* del */, '\xc1' /* F4 */, '\x9c' /* end */,
11844 '\xbf' /* F2 */, '\x9b' /* pgdown */, '\xbe' /* F1 */, '\x51' /* left */, 12242 '\xbf' /* F2 */, '\x9b' /* pgdown */, '\xbe' /* F1 */, '\x51' /* left */,
11845 '\x53' /* right */, '\x54' /* down */, '\x52' /* up */, 0 12243 '\x53' /* right */, '\x54' /* down */, '\x52' /* up */, 0
11846}; 12244};
11847 12245
11848static int 12246static int
@@ -11862,11 +12260,13 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
11862 int the_modifiers; 12260 int the_modifiers;
11863 EventMask event_mask; 12261 EventMask event_mask;
11864 12262
12263#if 0
11865 if (interrupt_input_blocked) 12264 if (interrupt_input_blocked)
11866 { 12265 {
11867 interrupt_input_pending = 1; 12266 interrupt_input_pending = 1;
11868 return -1; 12267 return -1;
11869 } 12268 }
12269#endif
11870 12270
11871 interrupt_input_pending = 0; 12271 interrupt_input_pending = 0;
11872 BLOCK_INPUT; 12272 BLOCK_INPUT;
@@ -11917,7 +12317,12 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
11917 Point mouse_loc = er.where; 12317 Point mouse_loc = er.where;
11918 12318
11919 /* Convert to local coordinates of new window. */ 12319 /* Convert to local coordinates of new window. */
11920 SetPort (window_ptr); 12320#if TARGET_API_MAC_CARBON
12321 SetPort (GetWindowPort (window_ptr));
12322#else
12323 SetPort (window_ptr);
12324#endif
12325
11921 GlobalToLocal (&mouse_loc); 12326 GlobalToLocal (&mouse_loc);
11922 12327
11923 bufp->code = 0; /* only one mouse button */ 12328 bufp->code = 0; /* only one mouse button */
@@ -11961,24 +12366,37 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
11961 SelectWindow (window_ptr); 12366 SelectWindow (window_ptr);
11962 else 12367 else
11963 { 12368 {
11964 int control_part_code; 12369 SInt16 control_part_code;
11965 ControlHandle ch; 12370 ControlHandle ch;
11966 struct mac_output *mwp = (mac_output *) 12371 struct mac_output *mwp = (mac_output *)
11967 GetWRefCon (window_ptr); 12372 GetWRefCon (window_ptr);
11968 Point mouse_loc = er.where; 12373 Point mouse_loc = er.where;
11969 12374
11970 /* convert to local coordinates of new window */ 12375 /* convert to local coordinates of new window */
11971 SetPort (window_ptr); 12376#if TARGET_API_MAC_CARBON
12377 SetPort (GetWindowPort (window_ptr));
12378#else
12379 SetPort (window_ptr);
12380#endif
12381
11972 GlobalToLocal (&mouse_loc); 12382 GlobalToLocal (&mouse_loc);
12383#if TARGET_API_MAC_CARBON
12384 ch = FindControlUnderMouse (mouse_loc, window_ptr,
12385 &control_part_code);
12386#else
11973 control_part_code = FindControl (mouse_loc, window_ptr, &ch); 12387 control_part_code = FindControl (mouse_loc, window_ptr, &ch);
11974 12388#endif
11975 bufp->code = 0; /* only one mouse button */ 12389 bufp->code = 0; /* only one mouse button */
11976 XSETINT (bufp->x, mouse_loc.h); 12390 XSETINT (bufp->x, mouse_loc.h);
11977 XSETINT (bufp->y, mouse_loc.v); 12391 XSETINT (bufp->y, mouse_loc.v);
11978 bufp->timestamp = er.when * (1000 / 60); 12392 bufp->timestamp = er.when * (1000 / 60);
11979 /* ticks to milliseconds */ 12393 /* ticks to milliseconds */
11980 12394
12395#if TARGET_API_MAC_CARBON
12396 if (ch != 0)
12397#else
11981 if (control_part_code != 0) 12398 if (control_part_code != 0)
12399#endif
11982 { 12400 {
11983 struct scroll_bar *bar = (struct scroll_bar *) 12401 struct scroll_bar *bar = (struct scroll_bar *)
11984 GetControlReference (ch); 12402 GetControlReference (ch);
@@ -11987,7 +12405,8 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
11987 if (er.what == mouseDown 12405 if (er.what == mouseDown
11988 && control_part_code == kControlIndicatorPart) 12406 && control_part_code == kControlIndicatorPart)
11989 { 12407 {
11990 mouse_tracking_in_progress = mouse_tracking_scroll_bar; 12408 mouse_tracking_in_progress
12409 = mouse_tracking_scroll_bar;
11991 tracked_scroll_bar = bar; 12410 tracked_scroll_bar = bar;
11992 } 12411 }
11993 else 12412 else
@@ -12001,9 +12420,10 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12001 bufp->kind = mouse_click; 12420 bufp->kind = mouse_click;
12002 XSETFRAME (bufp->frame_or_window, mwp->mFP); 12421 XSETFRAME (bufp->frame_or_window, mwp->mFP);
12003 if (er.what == mouseDown) 12422 if (er.what == mouseDown)
12004 mouse_tracking_in_progress = mouse_tracking_mouse_movement; 12423 mouse_tracking_in_progress
12424 = mouse_tracking_mouse_movement;
12005 else 12425 else
12006 mouse_tracking_in_progress = mouse_tracking_none; 12426 mouse_tracking_in_progress = mouse_tracking_none;
12007 } 12427 }
12008 12428
12009 switch (er.what) 12429 switch (er.what)
@@ -12023,7 +12443,16 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12023 break; 12443 break;
12024 12444
12025 case inDrag: 12445 case inDrag:
12446#if TARGET_API_MAC_CARBON
12447 {
12448 BitMap bm;
12449
12450 GetQDGlobalsScreenBits (&bm);
12451 DragWindow (window_ptr, er.where, &bm.bounds);
12452 }
12453#else /* not TARGET_API_MAC_CARBON */
12026 DragWindow (window_ptr, er.where, &qd.screenBits.bounds); 12454 DragWindow (window_ptr, er.where, &qd.screenBits.bounds);
12455#endif /* not TARGET_API_MAC_CARBON */
12027 break; 12456 break;
12028 12457
12029 case inGoAway: 12458 case inGoAway:
@@ -12121,9 +12550,11 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12121 the_err = TECCreateConverter (&converter, 12550 the_err = TECCreateConverter (&converter,
12122 kTextEncodingMacRoman, 12551 kTextEncodingMacRoman,
12123 mac_keyboard_text_encoding); 12552 mac_keyboard_text_encoding);
12124 current_mac_keyboard_text_encoding = mac_keyboard_text_encoding; 12553 current_mac_keyboard_text_encoding
12554 = mac_keyboard_text_encoding;
12125 } 12555 }
12126 else if (mac_keyboard_text_encoding != current_mac_keyboard_text_encoding) 12556 else if (mac_keyboard_text_encoding
12557 != current_mac_keyboard_text_encoding)
12127 { 12558 {
12128 /* Free the converter for the current encoding before 12559 /* Free the converter for the current encoding before
12129 creating a new one. */ 12560 creating a new one. */
@@ -12131,7 +12562,8 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12131 the_err = TECCreateConverter (&converter, 12562 the_err = TECCreateConverter (&converter,
12132 kTextEncodingMacRoman, 12563 kTextEncodingMacRoman,
12133 mac_keyboard_text_encoding); 12564 mac_keyboard_text_encoding);
12134 current_mac_keyboard_text_encoding = mac_keyboard_text_encoding; 12565 current_mac_keyboard_text_encoding
12566 = mac_keyboard_text_encoding;
12135 } 12567 }
12136 12568
12137 if (the_err == noErr) 12569 if (the_err == noErr)
@@ -12211,7 +12643,16 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12211 Otherwise parts of the screen can be left in an 12643 Otherwise parts of the screen can be left in an
12212 inconsistent state. */ 12644 inconsistent state. */
12213 if (wp) 12645 if (wp)
12646#if TARGET_API_MAC_CARBON
12647 {
12648 Rect r;
12649
12650 GetWindowPortBounds (wp, &r);
12651 InvalWindowRect (wp, &r);
12652 }
12653#else /* not TARGET_API_MAC_CARBON */
12214 InvalRect (&(wp->portRect)); 12654 InvalRect (&(wp->portRect));
12655#endif /* not TARGET_API_MAC_CARBON */
12215 12656
12216 count++; 12657 count++;
12217 bufp++; 12658 bufp++;
@@ -12231,7 +12672,9 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12231 pending_autoraise_frame = 0; 12672 pending_autoraise_frame = 0;
12232 } 12673 }
12233 12674
12675#if !TARGET_API_MAC_CARBON
12234 check_alarm (); /* simulate the handling of a SIGALRM */ 12676 check_alarm (); /* simulate the handling of a SIGALRM */
12677#endif
12235 12678
12236 { 12679 {
12237 static Point old_mouse_pos = { -1, -1 }; 12680 static Point old_mouse_pos = { -1, -1 };
@@ -12244,27 +12687,38 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12244 else 12687 else
12245 { 12688 {
12246 Point mouse_pos; 12689 Point mouse_pos;
12247 WindowPtr wp = FrontWindow (); 12690 WindowPtr wp;
12248 struct frame *f = ((mac_output *) GetWRefCon (wp))->mFP; 12691 struct frame *f;
12249 Lisp_Object bar; 12692 Lisp_Object bar;
12250 struct scroll_bar *sb; 12693 struct scroll_bar *sb;
12251 12694
12252 SetPort (wp); 12695 wp = FrontWindow ();
12253 GetMouse (&mouse_pos); 12696 if (is_emacs_window (wp))
12697 {
12698 f = ((mac_output *) GetWRefCon (wp))->mFP;
12254 12699
12255 if (!EqualPt (mouse_pos, old_mouse_pos)) 12700#if TARGET_API_MAC_CARBON
12256 { 12701 SetPort (GetWindowPort (wp));
12257 if (mouse_tracking_in_progress == mouse_tracking_scroll_bar 12702#else
12258 && tracked_scroll_bar) 12703 SetPort (wp);
12259 x_scroll_bar_note_movement (tracked_scroll_bar, 12704#endif
12260 mouse_pos.v 12705
12261 - XINT (tracked_scroll_bar->top), 12706 GetMouse (&mouse_pos);
12262 TickCount() * (1000 / 60)); 12707
12263 else 12708 if (!EqualPt (mouse_pos, old_mouse_pos))
12264 note_mouse_movement (f, &mouse_pos); 12709 {
12265 12710 if (mouse_tracking_in_progress == mouse_tracking_scroll_bar
12266 old_mouse_pos = mouse_pos; 12711 && tracked_scroll_bar)
12267 } 12712 x_scroll_bar_note_movement (tracked_scroll_bar,
12713 mouse_pos.v
12714 - XINT (tracked_scroll_bar->top),
12715 TickCount() * (1000 / 60));
12716 else
12717 note_mouse_movement (f, &mouse_pos);
12718
12719 old_mouse_pos = mouse_pos;
12720 }
12721 }
12268 } 12722 }
12269 } 12723 }
12270 12724
@@ -12300,7 +12754,11 @@ void
12300NewMacWindow (FRAME_PTR fp) 12754NewMacWindow (FRAME_PTR fp)
12301{ 12755{
12302 mac_output *mwp; 12756 mac_output *mwp;
12757#if TARGET_API_MAC_CARBON
12758 static int making_terminal_window = 0;
12759#else
12303 static int making_terminal_window = 1; 12760 static int making_terminal_window = 1;
12761#endif
12304 12762
12305 mwp = fp->output_data.mac; 12763 mwp = fp->output_data.mac;
12306 12764
@@ -12320,7 +12778,11 @@ NewMacWindow (FRAME_PTR fp)
12320 /* so that update events can find this mac_output struct */ 12778 /* so that update events can find this mac_output struct */
12321 mwp->mFP = fp; /* point back to emacs frame */ 12779 mwp->mFP = fp; /* point back to emacs frame */
12322 12780
12781#if TARGET_API_MAC_CARBON
12782 SetPort (GetWindowPort (mwp->mWP));
12783#else
12323 SetPort (mwp->mWP); 12784 SetPort (mwp->mWP);
12785#endif
12324 12786
12325 mwp->fontset = -1; 12787 mwp->fontset = -1;
12326 12788
@@ -12336,8 +12798,8 @@ void make_mac_frame (struct frame *f)
12336 FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_right; 12798 FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_right;
12337 12799
12338 NewMacWindow(f); 12800 NewMacWindow(f);
12339 f->output_data.mac->background_pixel = 0xffffff; 12801 FRAME_BACKGROUND_PIXEL (f) = 0xffffff;
12340 f->output_data.mac->foreground_pixel = 0; 12802 FRAME_FOREGROUND_PIXEL (f) = 0;
12341 12803
12342 f->output_data.mac->cursor_pixel = 0; 12804 f->output_data.mac->cursor_pixel = 0;
12343 f->output_data.mac->border_pixel = 0x00ff00; 12805 f->output_data.mac->border_pixel = 0x00ff00;
@@ -12385,7 +12847,12 @@ void make_mac_terminal_frame (struct frame *f)
12385 f->height = 4; 12847 f->height = 4;
12386 12848
12387 make_mac_frame (f); 12849 make_mac_frame (f);
12850
12851 x_make_gc (f);
12388 12852
12853 /* Need to be initialized for unshow_buffer in window.c. */
12854 selected_window = f->selected_window;
12855
12389 Fmodify_frame_parameters (frame, 12856 Fmodify_frame_parameters (frame,
12390 Fcons (Fcons (Qfont, 12857 Fcons (Fcons (Qfont,
12391 build_string ("-*-monaco-medium-r-*--*-90-*-*-*-*-mac-roman")), Qnil)); 12858 build_string ("-*-monaco-medium-r-*--*-90-*-*-*-*-mac-roman")), Qnil));
@@ -12397,6 +12864,81 @@ void make_mac_terminal_frame (struct frame *f)
12397 build_string ("white")), Qnil)); 12864 build_string ("white")), Qnil));
12398} 12865}
12399 12866
12867
12868/***********************************************************************
12869 Initialization
12870 ***********************************************************************/
12871
12872#ifdef USE_X_TOOLKIT
12873static XrmOptionDescRec emacs_options[] = {
12874 {"-geometry", ".geometry", XrmoptionSepArg, NULL},
12875 {"-iconic", ".iconic", XrmoptionNoArg, (XtPointer) "yes"},
12876
12877 {"-internal-border-width", "*EmacsScreen.internalBorderWidth",
12878 XrmoptionSepArg, NULL},
12879 {"-ib", "*EmacsScreen.internalBorderWidth", XrmoptionSepArg, NULL},
12880
12881 {"-T", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL},
12882 {"-wn", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL},
12883 {"-title", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL},
12884 {"-iconname", "*EmacsShell.iconName", XrmoptionSepArg, (XtPointer) NULL},
12885 {"-in", "*EmacsShell.iconName", XrmoptionSepArg, (XtPointer) NULL},
12886 {"-mc", "*pointerColor", XrmoptionSepArg, (XtPointer) NULL},
12887 {"-cr", "*cursorColor", XrmoptionSepArg, (XtPointer) NULL}
12888};
12889#endif /* USE_X_TOOLKIT */
12890
12891#ifdef MULTI_KBOARD
12892/* Test whether two display-name strings agree up to the dot that separates
12893 the screen number from the server number. */
12894static int
12895same_x_server (name1, name2)
12896 char *name1, *name2;
12897{
12898 int seen_colon = 0;
12899 unsigned char *system_name = XSTRING (Vsystem_name)->data;
12900 int system_name_length = strlen (system_name);
12901 int length_until_period = 0;
12902
12903 while (system_name[length_until_period] != 0
12904 && system_name[length_until_period] != '.')
12905 length_until_period++;
12906
12907 /* Treat `unix' like an empty host name. */
12908 if (! strncmp (name1, "unix:", 5))
12909 name1 += 4;
12910 if (! strncmp (name2, "unix:", 5))
12911 name2 += 4;
12912 /* Treat this host's name like an empty host name. */
12913 if (! strncmp (name1, system_name, system_name_length)
12914 && name1[system_name_length] == ':')
12915 name1 += system_name_length;
12916 if (! strncmp (name2, system_name, system_name_length)
12917 && name2[system_name_length] == ':')
12918 name2 += system_name_length;
12919 /* Treat this host's domainless name like an empty host name. */
12920 if (! strncmp (name1, system_name, length_until_period)
12921 && name1[length_until_period] == ':')
12922 name1 += length_until_period;
12923 if (! strncmp (name2, system_name, length_until_period)
12924 && name2[length_until_period] == ':')
12925 name2 += length_until_period;
12926
12927 for (; *name1 != '\0' && *name1 == *name2; name1++, name2++)
12928 {
12929 if (*name1 == ':')
12930 seen_colon++;
12931 if (seen_colon && *name1 == '.')
12932 return 1;
12933 }
12934 return (seen_colon
12935 && (*name1 == '.' || *name1 == '\0')
12936 && (*name2 == '.' || *name2 == '\0'));
12937}
12938#endif
12939
12940int mac_initialized = 0;
12941
12400void 12942void
12401mac_initialize_display_info () 12943mac_initialize_display_info ()
12402{ 12944{
@@ -12410,6 +12952,18 @@ mac_initialize_display_info ()
12410 x_display_name_list); 12952 x_display_name_list);
12411 dpyinfo->name_list_element = XCAR (x_display_name_list); 12953 dpyinfo->name_list_element = XCAR (x_display_name_list);
12412 12954
12955#if 0
12956 dpyinfo->mac_id_name
12957 = (char *) xmalloc (XSTRING (Vinvocation_name)->size
12958 + XSTRING (Vsystem_name)->size
12959 + 2);
12960 sprintf (dpyinfo->mac_id_name, "%s@%s",
12961 XSTRING (Vinvocation_name)->data, XSTRING (Vsystem_name)->data);
12962#else
12963 dpyinfo->mac_id_name = (char *) xmalloc (strlen ("Mac Display") + 1);
12964 strcpy (dpyinfo->mac_id_name, "Mac Display");
12965#endif
12966
12413 main_device_handle = LMGetMainDevice(); 12967 main_device_handle = LMGetMainDevice();
12414 12968
12415 dpyinfo->reference_count = 0; 12969 dpyinfo->reference_count = 0;
@@ -12426,17 +12980,61 @@ mac_initialize_display_info ()
12426 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; 12980 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
12427 dpyinfo->mouse_face_face_id = DEFAULT_FACE_ID; 12981 dpyinfo->mouse_face_face_id = DEFAULT_FACE_ID;
12428 dpyinfo->mouse_face_window = Qnil; 12982 dpyinfo->mouse_face_window = Qnil;
12983}
12429 12984
12985struct mac_display_info *
12986mac_term_init (display_name, xrm_option, resource_name)
12987 Lisp_Object display_name;
12988 char *xrm_option;
12989 char *resource_name;
12990{
12991 struct mac_display_info *dpyinfo;
12992 GDHandle main_device_handle;
12993
12994 if (!mac_initialized)
12995 {
12996 mac_initialize ();
12997 mac_initialized = 1;
12998 }
12999
13000 mac_initialize_display_info (display_name);
13001
13002 dpyinfo = &one_mac_display_info;
13003
13004 main_device_handle = LMGetMainDevice();
13005
13006 dpyinfo->height = (**main_device_handle).gdRect.bottom;
13007 dpyinfo->width = (**main_device_handle).gdRect.right;
13008
13009 return dpyinfo;
12430} 13010}
13011
13012/* Set up use of X before we make the first connection. */
13013
13014static struct redisplay_interface x_redisplay_interface =
13015{
13016 x_produce_glyphs,
13017 x_write_glyphs,
13018 x_insert_glyphs,
13019 x_clear_end_of_line,
13020 x_scroll_run,
13021 x_after_update_window_line,
13022 x_update_window_begin,
13023 x_update_window_end,
13024 XTcursor_to,
13025 x_flush,
13026 x_clear_mouse_face,
13027 x_get_glyph_overhangs,
13028 x_fix_overlapping_area
13029};
12431 13030
12432void 13031void
12433x_initialize () 13032mac_initialize ()
12434{ 13033{
12435 rif = &x_redisplay_interface; 13034 rif = &x_redisplay_interface;
12436 13035
12437 clear_frame_hook = x_clear_frame; 13036 clear_frame_hook = x_clear_frame;
12438 ins_del_lines_hook = x_ins_del_lines; 13037 ins_del_lines_hook = x_ins_del_lines;
12439 change_line_highlight_hook = x_change_line_highlight;
12440 delete_glyphs_hook = x_delete_glyphs; 13038 delete_glyphs_hook = x_delete_glyphs;
12441 ring_bell_hook = XTring_bell; 13039 ring_bell_hook = XTring_bell;
12442 reset_terminal_modes_hook = XTreset_terminal_modes; 13040 reset_terminal_modes_hook = XTreset_terminal_modes;
@@ -12446,7 +13044,6 @@ x_initialize ()
12446 set_terminal_window_hook = XTset_terminal_window; 13044 set_terminal_window_hook = XTset_terminal_window;
12447 read_socket_hook = XTread_socket; 13045 read_socket_hook = XTread_socket;
12448 frame_up_to_date_hook = XTframe_up_to_date; 13046 frame_up_to_date_hook = XTframe_up_to_date;
12449 reassert_line_highlight_hook = XTreassert_line_highlight;
12450 mouse_position_hook = XTmouse_position; 13047 mouse_position_hook = XTmouse_position;
12451 frame_rehighlight_hook = XTframe_rehighlight; 13048 frame_rehighlight_hook = XTframe_rehighlight;
12452 frame_raise_lower_hook = XTframe_raise_lower; 13049 frame_raise_lower_hook = XTframe_raise_lower;
@@ -12458,11 +13055,11 @@ x_initialize ()
12458 13055
12459 estimate_mode_line_height_hook = x_estimate_mode_line_height; 13056 estimate_mode_line_height_hook = x_estimate_mode_line_height;
12460 13057
12461 scroll_region_ok = 1; /* we'll scroll partial frames */ 13058 scroll_region_ok = 1; /* we'll scroll partial frames */
12462 char_ins_del_ok = 0; /* just as fast to write the line */ 13059 char_ins_del_ok = 1;
12463 line_ins_del_ok = 1; /* we'll just blt 'em */ 13060 line_ins_del_ok = 1; /* we'll just blt 'em */
12464 fast_clear_end_of_line = 1; /* X does this well */ 13061 fast_clear_end_of_line = 1; /* X does this well */
12465 memory_below_frame = 0; /* we don't remember what scrolls 13062 memory_below_frame = 0; /* we don't remember what scrolls
12466 off the bottom */ 13063 off the bottom */
12467 baud_rate = 19200; 13064 baud_rate = 19200;
12468 13065
@@ -12546,40 +13143,50 @@ syms_of_macterm ()
12546 staticpro (&previous_help_echo); 13143 staticpro (&previous_help_echo);
12547 help_echo_pos = -1; 13144 help_echo_pos = -1;
12548 13145
13146 DEFVAR_BOOL ("x-autoselect-window", &x_autoselect_window_p,
13147 doc: /* *Non-nil means autoselect window with mouse pointer. */);
13148 x_autoselect_window_p = 0;
13149
12549 DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p, 13150 DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p,
12550 "*Non-nil means draw block cursor as wide as the glyph under it.\n\ 13151 doc: /* *Non-nil means draw block cursor as wide as the glyph under it.
12551For example, if a block cursor is over a tab, it will be drawn as\n\ 13152For example, if a block cursor is over a tab, it will be drawn as
12552wide as that tab on the display."); 13153wide as that tab on the display. */);
12553 x_stretch_cursor_p = 0; 13154 x_stretch_cursor_p = 0;
12554 13155
12555 DEFVAR_BOOL ("x-toolkit-scroll-bars-p", &x_toolkit_scroll_bars_p, 13156#if 0 /* TODO: Setting underline position from font properties. */
12556 "If not nil, Emacs uses toolkit scroll bars."); 13157 DEFVAR_BOOL ("x-use-underline-position-properties",
12557#if USE_TOOLKIT_SCROLL_BARS 13158 &x_use_underline_position_properties,
12558 x_toolkit_scroll_bars_p = 1; 13159 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties.
12559#else 13160nil means ignore them. If you encounter fonts with bogus
12560 x_toolkit_scroll_bars_p = 0; 13161UNDERLINE_POSITION font properties, for example 7x13 on XFree prior
13162to 4.1, set this to nil. */);
13163 x_use_underline_position_properties = 1;
12561#endif 13164#endif
12562 13165
13166 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
13167 doc: /* If not nil, Emacs uses toolkit scroll bars. */);
13168 Vx_toolkit_scroll_bars = Qt;
13169
12563 staticpro (&last_mouse_motion_frame); 13170 staticpro (&last_mouse_motion_frame);
12564 last_mouse_motion_frame = Qnil; 13171 last_mouse_motion_frame = Qnil;
12565 13172
12566 DEFVAR_LISP ("mac-command-key-is-meta", &Vmac_command_key_is_meta, 13173 DEFVAR_LISP ("mac-command-key-is-meta", &Vmac_command_key_is_meta,
12567 "Non-nil means that the command key is used as the Emacs meta key.\n\ 13174 doc: /* Non-nil means that the command key is used as the Emacs meta key.
12568Otherwise the option key is used."); 13175Otherwise the option key is used. */);
12569 Vmac_command_key_is_meta = Qt; 13176 Vmac_command_key_is_meta = Qt;
12570 13177
12571 DEFVAR_INT ("mac-keyboard-text-encoding", &mac_keyboard_text_encoding, 13178 DEFVAR_INT ("mac-keyboard-text-encoding", &mac_keyboard_text_encoding,
12572 "One of the Text Encoding Base constant values defined in the\n\ 13179 doc: /* One of the Text Encoding Base constant values defined in the
12573Basic Text Constants section of Inside Macintosh - Text Encoding\n\ 13180Basic Text Constants section of Inside Macintosh - Text Encoding
12574Conversion Manager. Its value determines the encoding characters\n\ 13181Conversion Manager. Its value determines the encoding characters
12575typed at the Mac keyboard (presumed to be in the MacRoman encoding)\n\ 13182typed at the Mac keyboard (presumed to be in the MacRoman encoding)
12576will convert into. E.g., if it is set to kTextEncodingMacRoman (0),\n\ 13183will convert into. E.g., if it is set to kTextEncodingMacRoman (0),
12577its default value, no conversion takes place. If it is set to\n\ 13184its default value, no conversion takes place. If it is set to
12578kTextEncodingISOLatin1 (0x201) or kTextEncodingISOLatin2 (0x202),\n\ 13185kTextEncodingISOLatin1 (0x201) or kTextEncodingISOLatin2 (0x202),
12579characters typed on Mac keyboard are first converted into the\n\ 13186characters typed on Mac keyboard are first converted into the
12580ISO Latin-1 or ISO Latin-2 encoding, respectively before being\n\ 13187ISO Latin-1 or ISO Latin-2 encoding, respectively before being
12581passed to Emacs. Together with Emacs's set-keyboard-coding-system\n\ 13188passed to Emacs. Together with Emacs's set-keyboard-coding-system
12582command, this enables the Mac keyboard to be used to enter non-ASCII\n\ 13189command, this enables the Mac keyboard to be used to enter non-ASCII
12583characters directly."); 13190characters directly. */);
12584 mac_keyboard_text_encoding = kTextEncodingMacRoman; 13191 mac_keyboard_text_encoding = kTextEncodingMacRoman;
12585} 13192}
diff --git a/mac/inc/macterm.h b/src/macterm.h
index 340be4e35f3..578a6ec2a4f 100644
--- a/mac/inc/macterm.h
+++ b/src/macterm.h
@@ -1,5 +1,5 @@
1/* Display module for Mac OS. 1/* Display module for Mac OS.
2 Copyright (C) 2000 Free Software Foundation, Inc. 2 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */ 21/* Contributed by Andrew Choi (akochoi@mac.com). */
22 22
23#include "macgui.h" 23#include "macgui.h"
24#include "frame.h" 24#include "frame.h"
@@ -103,7 +103,7 @@ struct mac_display_info
103 Window root_window; 103 Window root_window;
104 104
105 /* The cursor to use for vertical scroll bars. */ 105 /* The cursor to use for vertical scroll bars. */
106 Cursor vertical_scroll_bar_cursor; 106 struct Cursor *vertical_scroll_bar_cursor;
107 107
108#if 0 108#if 0
109 /* color palette information. */ 109 /* color palette information. */
@@ -151,10 +151,9 @@ struct mac_display_info
151 int mouse_face_end_row, mouse_face_end_col; 151 int mouse_face_end_row, mouse_face_end_col;
152 int mouse_face_end_x, mouse_face_end_y; 152 int mouse_face_end_x, mouse_face_end_y;
153 int mouse_face_past_end; 153 int mouse_face_past_end;
154
155 Lisp_Object mouse_face_window; 154 Lisp_Object mouse_face_window;
156
157 int mouse_face_face_id; 155 int mouse_face_face_id;
156 Lisp_Object mouse_face_overlay;
158 157
159 /* 1 if a mouse motion event came and we didn't handle it right away because 158 /* 1 if a mouse motion event came and we didn't handle it right away because
160 gc was in progress. */ 159 gc was in progress. */
@@ -169,6 +168,9 @@ struct mac_display_info
169 /* Nonzero means defer mouse-motion highlighting. */ 168 /* Nonzero means defer mouse-motion highlighting. */
170 int mouse_face_defer; 169 int mouse_face_defer;
171 170
171 /* Nonzero means that the mouse highlight should not be shown. */
172 int mouse_face_hidden;
173
172 int mouse_face_image_state; 174 int mouse_face_image_state;
173 175
174 char *mac_id_name; 176 char *mac_id_name;
@@ -208,12 +210,12 @@ struct mac_display_info
208 210
209#define x_display_info mac_display_info 211#define x_display_info mac_display_info
210 212
211/* This is a chain of structures for all the displays currently in use. */
212extern struct mac_display_info one_mac_display_info;
213
214/* This is a chain of structures for all the X displays currently in use. */ 213/* This is a chain of structures for all the X displays currently in use. */
215extern struct x_display_info *x_display_list; 214extern struct x_display_info *x_display_list;
216 215
216/* This is a chain of structures for all the displays currently in use. */
217extern struct mac_display_info one_mac_display_info;
218
217/* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE), 219/* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE),
218 one for each element of x_display_list and in the same order. 220 one for each element of x_display_list and in the same order.
219 NAME is the name of the frame. 221 NAME is the name of the frame.
@@ -228,10 +230,24 @@ extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object));
228 230
229extern struct mac_display_info *mac_term_init (); 231extern struct mac_display_info *mac_term_init ();
230 232
231/* The collection of data describing a window on the Mac. Functions 233/* When Emacs uses a tty window, tty_display in frame.c points to an
232 defined in macterm.c */ 234 x_output struct . */
235struct x_output
236{
237 unsigned long background_pixel;
238 unsigned long foreground_pixel;
239};
240
241/* The collection of data describing a window on the Mac. */
233struct mac_output { 242struct mac_output {
234 WindowPtr mWP; /* pointer to QuickDraw window */ 243 /* Placeholder for things accessed through output_data.x. Must
244 appear first. */
245 struct x_output x_compatible;
246
247 /* Menubar "widget" handle. */
248 int menubar_widget;
249
250 Window mWP; /* pointer to QuickDraw window */
235 FRAME_PTR mFP; /* points back to the frame struct */ 251 FRAME_PTR mFP; /* points back to the frame struct */
236 252
237#if 0 253#if 0
@@ -239,11 +255,15 @@ struct mac_output {
239 int mNumRows; /* number of characters per row */ 255 int mNumRows; /* number of characters per row */
240 int mLineHeight; /* height of one line of text in pixels */ 256 int mLineHeight; /* height of one line of text in pixels */
241 int mCharWidth; /* width of one character in pixels */ 257 int mCharWidth; /* width of one character in pixels */
242 int mHomeX; /* X pixel coordinate of lower left corner of character at (0, 0) */ 258 int mHomeX; /* X pixel coordinate of lower left
243 int mHomeY; /* Y pixel coordinate of lower left corner of character at (0, 0) */ 259 corner of character at (0, 0) */
260 int mHomeY; /* Y pixel coordinate of lower left
261 corner of character at (0, 0) */
244 int mHighlight; /* current highlight state (0 = off). */ 262 int mHighlight; /* current highlight state (0 = off). */
245 int mTermWinSize; /* num of lines from top of window affected by ins_del_lines; set by set_terminal_window. */ 263 int mTermWinSize; /* num of lines from top of window
246#endif 264 affected by ins_del_lines; set by
265 set_terminal_window. */
266#endif /* 0 */
247 267
248#if 0 268#if 0
249 /* stuffs used by xfaces.c */ 269 /* stuffs used by xfaces.c */
@@ -254,9 +274,6 @@ struct mac_output {
254 int size_computed_faces; 274 int size_computed_faces;
255#endif 275#endif
256 276
257 unsigned long background_pixel;
258 unsigned long foreground_pixel;
259
260 /* Position of the Mac window (x and y offsets in global coordinates). */ 277 /* Position of the Mac window (x and y offsets in global coordinates). */
261 int left_pos; 278 int left_pos;
262 int top_pos; 279 int top_pos;
@@ -318,11 +335,11 @@ struct mac_output {
318 unsigned long scroll_bar_background_pixel; 335 unsigned long scroll_bar_background_pixel;
319 336
320 /* Descriptor for the cursor in use for this window. */ 337 /* Descriptor for the cursor in use for this window. */
321 Cursor text_cursor; 338 struct Cursor *text_cursor;
322 Cursor nontext_cursor; 339 struct Cursor *nontext_cursor;
323 Cursor modeline_cursor; 340 struct Cursor *modeline_cursor;
324 Cursor cross_cursor; 341 struct Cursor *cross_cursor;
325 Cursor hourglass_cursor; 342 struct Cursor *hourglass_cursor;
326#if 0 343#if 0
327 /* Window whose cursor is hourglass_cursor. This window is temporarily 344 /* Window whose cursor is hourglass_cursor. This window is temporarily
328 mapped to display a hourglass-cursor. */ 345 mapped to display a hourglass-cursor. */
@@ -380,15 +397,13 @@ struct mac_output {
380 /* Nonzero means menubar is currently active. */ 397 /* Nonzero means menubar is currently active. */
381 char menubar_active; 398 char menubar_active;
382 399
383 /* Always contains NULL on the Mac OS because the menu bar is shared. */ 400 /* Nonzero means a menu command is being processed. */
384 int menubar_widget; 401 char menu_command_in_progress;
385 402
386#if 0
387 /* Nonzero means menubar is about to become active, but should be 403 /* Nonzero means menubar is about to become active, but should be
388 brought up to date first. */ 404 brought up to date first. */
389 volatile char pending_menu_activation; 405 volatile char pending_menu_activation;
390 406
391#endif
392 /* Relief GCs, colors etc. */ 407 /* Relief GCs, colors etc. */
393 struct relief 408 struct relief
394 { 409 {
@@ -408,13 +423,15 @@ typedef struct mac_output mac_output;
408/* Return the Mac window used for displaying data in frame F. */ 423/* Return the Mac window used for displaying data in frame F. */
409#define FRAME_MAC_WINDOW(f) ((f)->output_data.mac->mWP) 424#define FRAME_MAC_WINDOW(f) ((f)->output_data.mac->mWP)
410 425
411#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.mac->foreground_pixel) 426#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)
412#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.mac->background_pixel) 427#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
413 428
414#define FRAME_FONT(f) ((f)->output_data.mac->font) 429#define FRAME_FONT(f) ((f)->output_data.mac->font)
415#define FRAME_FONTSET(f) ((f)->output_data.mac->fontset) 430#define FRAME_FONTSET(f) ((f)->output_data.mac->fontset)
416 431
417#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.mac->internal_border_width) 432#undef FRAME_INTERNAL_BORDER_WIDTH
433#define FRAME_INTERNAL_BORDER_WIDTH(f) \
434 ((f)->output_data.mac->internal_border_width)
418#define FRAME_LINE_HEIGHT(f) ((f)->output_data.mac->line_height) 435#define FRAME_LINE_HEIGHT(f) ((f)->output_data.mac->line_height)
419/* Width of the default font of frame F. Must be defined by each 436/* Width of the default font of frame F. Must be defined by each
420 terminal specific header. */ 437 terminal specific header. */
@@ -469,6 +486,7 @@ typedef struct mac_output mac_output;
469#define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.mac->left_fringe_width) 486#define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.mac->left_fringe_width)
470#define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.mac->right_fringe_width) 487#define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.mac->right_fringe_width)
471 488
489
472 490
473/* Mac-specific scroll bar stuff. */ 491/* Mac-specific scroll bar stuff. */
474 492
@@ -539,13 +557,16 @@ struct scroll_bar {
539 XSETINT ((high), ((int32) >> 16) & 0xffff)) 557 XSETINT ((high), ((int32) >> 16) & 0xffff))
540 558
541 559
542/* Extract the Mac control handle of the scroll bar from a struct scroll_bar. */ 560/* Extract the Mac control handle of the scroll bar from a struct
561 scroll_bar. */
543#define SCROLL_BAR_CONTROL_HANDLE(ptr) \ 562#define SCROLL_BAR_CONTROL_HANDLE(ptr) \
544 ((ControlHandle) SCROLL_BAR_PACK ((ptr)->control_handle_low, (ptr)->control_handle_high)) 563 ((ControlHandle) SCROLL_BAR_PACK ((ptr)->control_handle_low, \
564 (ptr)->control_handle_high))
545 565
546/* Store a Mac control handle in a struct scroll_bar. */ 566/* Store a Mac control handle in a struct scroll_bar. */
547#define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, id) \ 567#define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, id) \
548 (SCROLL_BAR_UNPACK ((ptr)->control_handle_low, (ptr)->control_handle_high, (int) id)) 568 (SCROLL_BAR_UNPACK ((ptr)->control_handle_low, \
569 (ptr)->control_handle_high, (int) id))
549 570
550/* Return the inside width of a vertical scroll bar, given the outside 571/* Return the inside width of a vertical scroll bar, given the outside
551 width. */ 572 width. */
@@ -563,12 +584,14 @@ struct scroll_bar {
563 scaling buffer positions to scroll bar positions, we use this, not 584 scaling buffer positions to scroll bar positions, we use this, not
564 VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */ 585 VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */
565#define VERTICAL_SCROLL_BAR_TOP_RANGE(f,height) \ 586#define VERTICAL_SCROLL_BAR_TOP_RANGE(f,height) \
566 (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, height) - VERTICAL_SCROLL_BAR_MIN_HANDLE - UP_AND_DOWN_ARROWS) 587 (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, height) \
588 - VERTICAL_SCROLL_BAR_MIN_HANDLE - UP_AND_DOWN_ARROWS)
567 589
568/* Return the inside height of vertical scroll bar, given the outside 590/* Return the inside height of vertical scroll bar, given the outside
569 height. See VERTICAL_SCROLL_BAR_TOP_RANGE too. */ 591 height. See VERTICAL_SCROLL_BAR_TOP_RANGE too. */
570#define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(f,height) \ 592#define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(f,height) \
571 ((height) - VERTICAL_SCROLL_BAR_TOP_BORDER - VERTICAL_SCROLL_BAR_BOTTOM_BORDER) 593 ((height) - VERTICAL_SCROLL_BAR_TOP_BORDER \
594 - VERTICAL_SCROLL_BAR_BOTTOM_BORDER)
572 595
573 596
574/* Border widths for scroll bars. 597/* Border widths for scroll bars.
@@ -645,8 +668,3 @@ struct scroll_bar {
645 668
646struct frame * check_x_frame (Lisp_Object); 669struct frame * check_x_frame (Lisp_Object);
647 670
648/* Dummy entry for defining tty_display in frame.c. */
649struct x_output
650{
651 char _dummy;
652};
diff --git a/src/process.c b/src/process.c
index 06e931af9b6..a62b13c3f38 100644
--- a/src/process.c
+++ b/src/process.c
@@ -137,6 +137,11 @@ extern Lisp_Object QCfamily, QCfilter;
137 137
138/* Qexit is declared and initialized in eval.c. */ 138/* Qexit is declared and initialized in eval.c. */
139 139
140/* QCfamily is defined in xfaces.c. */
141extern Lisp_Object QCfamily;
142/* QCfilter is defined in keyboard.c. */
143extern Lisp_Object QCfilter;
144
140/* a process object is a network connection when its childp field is neither 145/* a process object is a network connection when its childp field is neither
141 Qt nor Qnil but is instead a cons cell (HOSTNAME PORTNUM). */ 146 Qt nor Qnil but is instead a cons cell (HOSTNAME PORTNUM). */
142 147
@@ -3750,6 +3755,14 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
3750 SELECT_TYPE Atemp, Ctemp; 3755 SELECT_TYPE Atemp, Ctemp;
3751 3756
3752 Atemp = input_wait_mask; 3757 Atemp = input_wait_mask;
3758#ifdef MAC_OSX
3759 /* On Mac OS X, the SELECT system call always says input is
3760 present (for reading) at stdin, even when none is. This
3761 causes the the call to SELECT below to return 1 and
3762 status_notify not to be called. As a result output of
3763 subprocesses are incorrectly discarded. */
3764 FD_CLR (0, &Atemp);
3765#endif
3753 Ctemp = connect_wait_mask; 3766 Ctemp = connect_wait_mask;
3754 EMACS_SET_SECS_USECS (timeout, 0, 0); 3767 EMACS_SET_SECS_USECS (timeout, 0, 0);
3755 if ((select (max (max_process_desc, max_keyboard_desc) + 1, 3768 if ((select (max (max_process_desc, max_keyboard_desc) + 1,
diff --git a/src/s/darwin.h b/src/s/darwin.h
new file mode 100644
index 00000000000..214b55b4429
--- /dev/null
+++ b/src/s/darwin.h
@@ -0,0 +1,291 @@
1/* System description header file for Darwin (Mac OS X).
2 Copyright (C) 2001 Free Software Foundation, Inc.
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21
22/*
23 * Define symbols to identify the version of Unix this is.
24 * Define all the symbols that apply correctly.
25 */
26
27/* #define UNIPLUS */
28/* #define USG5 */
29/* #define USG */
30/* #define HPUX */
31/* #define UMAX */
32/* #define BSD4_1 */
33#define BSD4_2
34/* BSD4_3 and BSD4_4 are already defined in sys/param.h */
35/* #define BSD4_3 */
36/* #define BSD4_4 */
37#define BSD_SYSTEM
38/* #define VMS */
39
40/* MAC_OS is used to conditionally compile code common to both MAC_OS8
41 and MAC_OSX. */
42#ifdef MAC_OSX
43#define MAC_OS
44#endif
45
46/* SYSTEM_TYPE should indicate the kind of system you are using.
47 It sets the Lisp variable system-type. */
48
49#define SYSTEM_TYPE "darwin"
50
51/* NOMULTIPLEJOBS should be defined if your system's shell
52 does not have "job control" (the ability to stop a program,
53 run some other program, then continue the first one). */
54
55/* #define NOMULTIPLEJOBS */
56
57/* Emacs can read input using SIGIO and buffering characters itself,
58 or using CBREAK mode and making C-g cause SIGINT.
59 The choice is controlled by the variable interrupt_input.
60
61 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
62
63 Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros
64 to indicate whether or not signal-driven I/O is possible. It uses
65 INTERRUPT_INPUT to decide whether to use it by default.
66
67 SIGIO can be used only on systems that implement it (4.2 and 4.3).
68 CBREAK mode has two disadvantages
69 1) At least in 4.2, it is impossible to handle the Meta key properly.
70 I hear that in system V this problem does not exist.
71 2) Control-G causes output to be discarded.
72 I do not know whether this can be fixed in system V.
73
74 Another method of doing input is planned but not implemented.
75 It would have Emacs fork off a separate process
76 to read the input and send it to the true Emacs process
77 through a pipe. */
78
79#define INTERRUPT_INPUT
80
81/* Letter to use in finding device name of first pty,
82 if system supports pty's. 'a' means it is /dev/ptya0 */
83
84#define FIRST_PTY_LETTER 'p'
85
86/*
87 * Define HAVE_TERMIOS if the system provides POSIX-style
88 * functions and macros for terminal control.
89 *
90 * Define HAVE_TERMIO if the system provides sysV-style ioctls
91 * for terminal control.
92 *
93 * Do not define both. HAVE_TERMIOS is preferred, if it is
94 * supported on your system.
95 */
96
97#define HAVE_TERMIOS
98/* #define HAVE_TERMIO */
99
100#define NO_TERMIO
101
102/*
103 * Define HAVE_PTYS if the system supports pty devices.
104 */
105
106#define HAVE_PTYS
107
108/*
109 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
110 * The 4.2 opendir, etc., library functions.
111 */
112
113/* #define NONSYSTEM_DIR_LIBRARY */
114
115/* Define this symbol if your system has the functions bcopy, etc. */
116
117#define BSTRING
118
119/* subprocesses should be defined if you want to
120 have code for asynchronous subprocesses
121 (as used in M-x compile and M-x shell).
122 This is generally OS dependent, and not supported
123 under most USG systems. */
124
125#define subprocesses
126
127/* If your system uses COFF (Common Object File Format) then define the
128 preprocessor symbol "COFF". */
129
130/* #define COFF */
131
132/* define MAIL_USE_FLOCK if the mailer uses flock
133 to interlock access to /usr/spool/mail/$USER.
134 The alternative is that a lock file named
135 /usr/spool/mail/$USER.lock. */
136
137#define MAIL_USE_FLOCK
138
139/* Define CLASH_DETECTION if you want lock files to be written
140 so that Emacs can tell instantly when you try to modify
141 a file that someone else has modified in his Emacs. */
142
143#define CLASH_DETECTION
144
145/* Define this if your operating system declares signal handlers to
146 have a type other than the usual. `The usual' is `void' for ANSI C
147 systems (i.e. when the __STDC__ macro is defined), and `int' for
148 pre-ANSI systems. If you're using GCC on an older system, __STDC__
149 will be defined, but the system's include files will still say that
150 signal returns int or whatever; in situations like that, define
151 this to be what the system's include files want. */
152/* #define SIGTYPE int */
153
154/* If the character used to separate elements of the executable path
155 is not ':', #define this to be the appropriate character constant. */
156/* #define SEPCHAR ':' */
157
158/* Define this if the system can use mmap for buffer text allocation. */
159/* #define USE_MMAP_FOR_BUFFERS 1 */
160
161/* ============================================================ */
162
163/* Here, add any special hacks needed
164 to make Emacs work on this system. For example,
165 you might define certain system call names that don't
166 exist on your system, or that do different things on
167 your system and must be used only through an encapsulation
168 (Which you should place, by convention, in sysdep.c). */
169
170/* Some compilers tend to put everything declared static
171 into the initialized data area, which becomes pure after dumping Emacs.
172 On these systems, you must #define static as nothing to foil this.
173 Note that emacs carefully avoids static vars inside functions. */
174
175/* #define static */
176
177/* If the system's imake configuration file defines `NeedWidePrototypes'
178 as `NO', we must define NARROWPROTO manually. Such a define is
179 generated in the Makefile generated by `xmkmf'. If we don't
180 define NARROWPROTO, we will see the wrong function prototypes
181 for X functions taking float or double parameters. */
182
183/* #define NARROWPROTO 1 */
184
185/* ============================================================ */
186
187/* After adding support for a new system, modify the large case
188 statement in the `configure' script to recognize reasonable
189 configuration names, and add a description of the system to
190 `etc/MACHINES'.
191
192 If you've just fixed a problem in an existing configuration file,
193 you should also check `etc/MACHINES' to make sure its descriptions
194 of known problems in that configuration should be updated. */
195
196
197/* Avoid the use of the name init_process (process.c) because it is
198 also the name of a Mach system call. */
199#define init_process emacs_init_process
200
201/* Fix compilation problem for regex.c. */
202#define __restrict
203
204/* Fix compilation problem for md5.c. */
205#define __attribute__(x)
206
207/* Used in dispnew.c. Copied from freebsd.h. */
208#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
209
210/* Darwin provides POSIX-style getpgrp. */
211#define GETPGRP_NO_ARG
212
213/* System uses OXTABS instead of the expected TAB3. (Copied from
214 bsd386.h.) */
215#define TAB3 OXTABS
216
217/* Darwin ld insists on the use of malloc routines in the System
218 framework. */
219#define SYSTEM_MALLOC
220
221/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
222#define HAVE_SOCKETS
223
224/* Extra initialization calls in main for Mac OS X system type. */
225#define SYMS_SYSTEM syms_of_mac()
226
227/* Definitions for how to dump. Copied from nextstep.h. */
228
229#define UNEXEC unexmacosx.o
230
231#define START_FILES pre-crt0.o
232
233/* start_of_text isn't actually used, so make it compile without error. */
234#define TEXT_START (0)
235
236/* This seems to be right for end_of_text, but it may not be used anyway. */
237#define TEXT_END get_etext()
238
239/* This seems to be right for end_of_data, but it may not be used anyway. */
240#define DATA_END get_edata()
241
242/* Definitions for how to compile & link. */
243
244/* Indicate that we are compiling for Mac OS X and where to find Mac
245 specific headers. */
246#define C_SWITCH_SYSTEM -fpascal-strings -fno-common -DMAC_OSX -I../mac/src
247
248/* Link in the Carbon lib. The -headerpad option tells ld (see man
249 page) to leave room at the end of the header for adding load
250 commands. Needed for dumping. 0x690 is the total size of 30
251 segment load commands (at 56 each). */
252#define LD_SWITCH_SYSTEM_TEMACS -prebind -framework Carbon -lstdc++ -Xlinker -headerpad -Xlinker 690
253
254#define C_SWITCH_SYSTEM_TEMACS -Dtemacs
255
256/* Link this program just by running cc. */
257#define ORDINARY_LINK
258
259/* We don't have a g library, so override the -lg LIBS_DEBUG switch. */
260#define LIBS_DEBUG
261
262/* Adding -lm confuses the dynamic linker, so omit it. */
263#define LIB_MATH
264
265/* Tell src/Makefile.in to create files in the Mac OS X application
266 bundle mac/Emacs.app. */
267#define OTHER_FILES macosx-app
268
269
270/* Define the following so emacs symbols will not conflict with those
271 in the System framework. Otherwise -prebind will not work. */
272
273/* Do not define abort in emacs.c. */
274#define NO_ABORT
275
276/* Do not define matherr in floatfns.c. */
277#define NO_MATHERR
278
279
280/* This prevents a compilation error in xfaces.c: struct kboard * is
281 used in a function protocol the first time this type appears in the
282 file, since MULTI_KBOARD is undefined for the Mac OS X build. */
283#ifndef NOT_C_CODE
284struct kboard;
285#endif
286
287#ifdef temacs
288#define malloc unexec_malloc
289#define realloc unexec_realloc
290#define free unexec_free
291#endif
diff --git a/src/sysdep.c b/src/sysdep.c
index 75d929e54ca..c7e4aba3a82 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -48,7 +48,7 @@ extern void srandom P_ ((unsigned int));
48#include "blockinput.h" 48#include "blockinput.h"
49#undef NULL 49#undef NULL
50 50
51#ifdef macintosh 51#ifdef MAC_OS8
52/* It is essential to include stdlib.h so that this file picks up 52/* It is essential to include stdlib.h so that this file picks up
53 the correct definitions of rand, srand, and RAND_MAX. 53 the correct definitions of rand, srand, and RAND_MAX.
54 Otherwise random numbers will not work correctly. */ 54 Otherwise random numbers will not work correctly. */
@@ -58,7 +58,7 @@ extern void srandom P_ ((unsigned int));
58/* Nonzero means delete a process right away if it exits (process.c). */ 58/* Nonzero means delete a process right away if it exits (process.c). */
59static int delete_exited_processes; 59static int delete_exited_processes;
60#endif 60#endif
61#endif /* macintosh */ 61#endif /* MAC_OS8 */
62 62
63#ifdef WINDOWSNT 63#ifdef WINDOWSNT
64#define read sys_read 64#define read sys_read
@@ -759,7 +759,7 @@ sys_suspend ()
759 759
760/* Fork a subshell. */ 760/* Fork a subshell. */
761 761
762#ifndef macintosh 762#ifndef MAC_OS8
763void 763void
764sys_subshell () 764sys_subshell ()
765{ 765{
@@ -895,7 +895,7 @@ sys_subshell ()
895 synch_process_alive = 0; 895 synch_process_alive = 0;
896#endif /* !VMS */ 896#endif /* !VMS */
897} 897}
898#endif /* !macintosh */ 898#endif /* !MAC_OS8 */
899 899
900static void 900static void
901save_signal_handlers (saved_handlers) 901save_signal_handlers (saved_handlers)
@@ -1305,7 +1305,7 @@ init_sys_modes ()
1305{ 1305{
1306 struct emacs_tty tty; 1306 struct emacs_tty tty;
1307 1307
1308#ifdef macintosh 1308#ifdef MAC_OS8
1309/* cus-start.el complains if delete-exited-processes is not defined */ 1309/* cus-start.el complains if delete-exited-processes is not defined */
1310#ifndef subprocesses 1310#ifndef subprocesses
1311 DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes, 1311 DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes,
@@ -1313,7 +1313,7 @@ init_sys_modes ()
1313nil means don't delete them until `list-processes' is run. */); 1313nil means don't delete them until `list-processes' is run. */);
1314 delete_exited_processes = 0; 1314 delete_exited_processes = 0;
1315#endif 1315#endif
1316#endif /* not macintosh */ 1316#endif /* MAC_OS8 */
1317 1317
1318#ifdef VMS 1318#ifdef VMS
1319#if 0 1319#if 0
diff --git a/src/term.c b/src/term.c
index 66f1c54ffd9..c2bac22d60c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -56,7 +56,7 @@ extern int tgetnum P_ ((char *id));
56#ifdef HAVE_X_WINDOWS 56#ifdef HAVE_X_WINDOWS
57#include "xterm.h" 57#include "xterm.h"
58#endif 58#endif
59#ifdef macintosh 59#ifdef MAC_OS
60#include "macterm.h" 60#include "macterm.h"
61#endif 61#endif
62 62
diff --git a/src/termcap.c b/src/termcap.c
index b87fee48e87..8918f06d244 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -144,6 +144,9 @@ find_capability (bp, cap)
144 return NULL; 144 return NULL;
145} 145}
146 146
147/* These are already defined in the System framework in Mac OS X and
148 cause prebinding to fail. */
149#ifndef MAC_OSX
147int 150int
148tgetnum (cap) 151tgetnum (cap)
149 char *cap; 152 char *cap;
@@ -177,6 +180,7 @@ tgetstr (cap, area)
177 return NULL; 180 return NULL;
178 return tgetst1 (ptr, area); 181 return tgetst1 (ptr, area);
179} 182}
183#endif /* MAC_OSX */
180 184
181#ifdef IS_EBCDIC_HOST 185#ifdef IS_EBCDIC_HOST
182/* Table, indexed by a character in range 0200 to 0300 with 0200 subtracted, 186/* Table, indexed by a character in range 0200 to 0300 with 0200 subtracted,
@@ -294,7 +298,12 @@ short ospeed;
294/* If OSPEED is 0, we use this as the actual baud rate. */ 298/* If OSPEED is 0, we use this as the actual baud rate. */
295int tputs_baud_rate; 299int tputs_baud_rate;
296#endif 300#endif
301
302/* Already defined in the System framework in Mac OS X and causes
303 prebinding to fail. */
304#ifndef MAC_OSX
297char PC; 305char PC;
306#endif /* MAC_OSX */
298 307
299#ifndef emacs 308#ifndef emacs
300/* Actual baud rate if positive; 309/* Actual baud rate if positive;
@@ -313,6 +322,9 @@ static int speeds[] =
313 322
314#endif /* not emacs */ 323#endif /* not emacs */
315 324
325/* Already defined in the System framework in Mac OS X and causes
326 prebinding to fail. */
327#ifndef MAC_OSX
316void 328void
317tputs (str, nlines, outfun) 329tputs (str, nlines, outfun)
318 register char *str; 330 register char *str;
@@ -375,6 +387,7 @@ tputs (str, nlines, outfun)
375 while (padcount-- > 0) 387 while (padcount-- > 0)
376 (*outfun) (PC); 388 (*outfun) (PC);
377} 389}
390#endif /* MAC_OSX */
378 391
379/* Finding the termcap entry in the termcap data base. */ 392/* Finding the termcap entry in the termcap data base. */
380 393
@@ -445,6 +458,9 @@ valid_filename_p (fn)
445 0 if the data base is accessible but the type NAME is not defined 458 0 if the data base is accessible but the type NAME is not defined
446 in it, and some other value otherwise. */ 459 in it, and some other value otherwise. */
447 460
461/* Already defined in the System framework in Mac OS X and causes
462 prebinding to fail. */
463#ifndef MAC_OSX
448int 464int
449tgetent (bp, name) 465tgetent (bp, name)
450 char *bp, *name; 466 char *bp, *name;
@@ -603,6 +619,7 @@ tgetent (bp, name)
603 term_entry = bp; 619 term_entry = bp;
604 return 1; 620 return 1;
605} 621}
622#endif /* MAC_OSX */
606 623
607/* Given file open on FD and buffer BUFP, 624/* Given file open on FD and buffer BUFP,
608 scan the file from the beginning until a line is found 625 scan the file from the beginning until a line is found
diff --git a/src/tparam.c b/src/tparam.c
index 5a9809aab47..844e5f6f175 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -107,6 +107,9 @@ tparam (string, outstring, len, arg0, arg1, arg2, arg3)
107 return tparam1 (string, outstring, len, NULL, NULL, arg); 107 return tparam1 (string, outstring, len, NULL, NULL, arg);
108} 108}
109 109
110/* These are already defined in the System framework in Mac OS X and
111 cause prebinding to fail. */
112#ifndef MAC_OSX
110char *BC; 113char *BC;
111char *UP; 114char *UP;
112 115
@@ -124,6 +127,7 @@ tgoto (cm, hpos, vpos)
124 args[1] = hpos; 127 args[1] = hpos;
125 return tparam1 (cm, tgoto_buf, 50, UP, BC, args); 128 return tparam1 (cm, tgoto_buf, 50, UP, BC, args);
126} 129}
130#endif
127 131
128static char * 132static char *
129tparam1 (string, outstring, len, up, left, argp) 133tparam1 (string, outstring, len, up, left, argp)
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
new file mode 100644
index 00000000000..da4b82b6ca9
--- /dev/null
+++ b/src/unexmacosx.c
@@ -0,0 +1,914 @@
1/* Dump Emacs in Mach-O format for use on Mac OS X.
2 Copyright (C) 2001, 2002 Free Software Foundation, Inc.
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21/* Contributed by Andrew Choi (akochoi@mac.com). */
22
23/* Documentation note.
24
25 Consult the following documents/files for a description of the
26 Mach-O format: the file loader.h, man pages for Mach-O and ld, old
27 NEXTSTEP documents of the Mach-O format. The tool otool dumps the
28 mach header (-h option) and the load commands (-l option) in a
29 Mach-O file. The tool nm on Mac OS X displays the symbol table in
30 a Mach-O file. For examples of unexec for the Mach-O format, see
31 the file unexnext.c in the GNU Emacs distribution, the file
32 unexdyld.c in the Darwin port of GNU Emacs 20.7, and unexdyld.c in
33 the Darwin port of XEmacs 21.1. Also the Darwin Libc source
34 contains the source code for malloc_freezedry and malloc_jumpstart.
35 Read that to see what they do. This file was written completely
36 from scratch, making use of information from the above sources. */
37
38/* The Mac OS X implementation of unexec makes use of Darwin's `zone'
39 memory allocator. All calls to malloc, realloc, and free in Emacs
40 are redirected to unexec_malloc, unexec_realloc, and unexec_free in
41 this file. When temacs is run, all memory requests are handled in
42 the zone EmacsZone. The Darwin memory allocator library calls
43 maintain the data structures to manage this zone. Dumping writes
44 its contents to data segments of the executable file. When emacs
45 is run, the loader recreates the contents of the zone in memory.
46 However since the initialization routine of the zone memory
47 allocator is run again, this `zone' can no longer be used as a
48 heap. That is why emacs uses the ordinary malloc system call to
49 allocate memory. Also, when a block of memory needs to be
50 reallocated and the new size is larger than the old one, a new
51 block must be obtained by malloc and the old contents copied to
52 it. */
53
54/* Peculiarity of the Mach-O files generated by ld in Mac OS X
55 (possible causes of future bugs if changed).
56
57 The file offset of the start of the __TEXT segment is zero. Since
58 the Mach header and load commands are located at the beginning of a
59 Mach-O file, copying the contents of the __TEXT segment from the
60 input file overwrites them in the output file. Despite this,
61 unexec works fine as written below because the segment load command
62 for __TEXT appears, and is therefore processed, before all other
63 load commands except the segment load command for __PAGEZERO, which
64 remains unchanged.
65
66 Although the file offset of the start of the __TEXT segment is
67 zero, none of the sections it contains actually start there. In
68 fact, the earliest one starts a few hundred bytes beyond the end of
69 the last load command. The linker option -headerpad controls the
70 minimum size of this padding. Its setting can be changed in
71 s/darwin.h. A value of 0x300, e.g., leaves room for about 15
72 additional load commands for the newly created __DATA segments (at
73 56 bytes each). Unexec fails if there is not enough room for these
74 new segments.
75
76 The __TEXT segment contains the sections __text, __cstring,
77 __picsymbol_stub, and __const and the __DATA segment contains the
78 sections __data, __la_symbol_ptr, __nl_symbol_ptr, __dyld, __bss,
79 and __common. The other segments do not contain any sections.
80 These sections are copied from the input file to the output file,
81 except for __data, __bss, and __common, which are dumped from
82 memory. The types of the sections __bss and __common are changed
83 from S_ZEROFILL to S_REGULAR. Note that the number of sections and
84 their relative order in the input and output files remain
85 unchanged. Otherwise all n_sect fields in the nlist records in the
86 symbol table (specified by the LC_SYMTAB load command) will have to
87 be changed accordingly.
88*/
89
90#include <stdio.h>
91#include <stdlib.h>
92#include <fcntl.h>
93#include <stdarg.h>
94#include <sys/types.h>
95#include <unistd.h>
96#include <mach/mach.h>
97#include <mach-o/loader.h>
98#include <objc/malloc.h>
99
100#define VERBOSE 1
101
102/* Size of buffer used to copy data from the input file to the output
103 file in function unexec_copy. */
104#define UNEXEC_COPY_BUFSZ 1024
105
106/* Regions with memory addresses above this value are assumed to be
107 mapped to dynamically loaded libraries and will not be dumped. */
108#define VM_DATA_TOP (20 * 1024 * 1024)
109
110/* Used by malloc_freezedry and malloc_jumpstart. */
111int malloc_cookie;
112
113/* Type of an element on the list of regions to be dumped. */
114struct region_t {
115 vm_address_t address;
116 vm_size_t size;
117 vm_prot_t protection;
118 vm_prot_t max_protection;
119
120 struct region_t *next;
121};
122
123/* Head and tail of the list of regions to be dumped. */
124struct region_t *region_list_head = 0;
125struct region_t *region_list_tail = 0;
126
127/* Pointer to array of load commands. */
128struct load_command **lca;
129
130/* Number of load commands. */
131int nlc;
132
133/* The highest VM address of segments loaded by the input file.
134 Regions with addresses beyond this are assumed to be allocated
135 dynamically and thus require dumping. */
136vm_address_t infile_lc_highest_addr = 0;
137
138/* The lowest file offset used by the all sections in the __TEXT
139 segments. This leaves room at the beginning of the file to store
140 the Mach-O header. Check this value against header size to ensure
141 the added load commands for the new __DATA segments did not
142 overwrite any of the sections in the __TEXT segment. */
143unsigned long text_seg_lowest_offset = 0x10000000;
144
145/* Mach header. */
146struct mach_header mh;
147
148/* Offset at which the next load command should be written. */
149unsigned long curr_header_offset = sizeof (struct mach_header);
150
151/* Current adjustment that needs to be made to offset values because
152 of additional data segments. */
153unsigned long delta = 0;
154
155int infd, outfd;
156
157int in_dumped_exec = 0;
158
159malloc_zone_t *emacs_zone;
160
161/* Read n bytes from infd into memory starting at address dest.
162 Return true if successful, false otherwise. */
163static int
164unexec_read (void *dest, size_t n)
165{
166 return n == read (infd, dest, n);
167}
168
169/* Write n bytes from memory starting at address src to outfd starting
170 at offset dest. Return true if successful, false otherwise. */
171static int
172unexec_write (off_t dest, const void *src, size_t count)
173{
174 if (lseek (outfd, dest, SEEK_SET) != dest)
175 return 0;
176
177 return write (outfd, src, count) == count;
178}
179
180/* Copy n bytes from starting offset src in infd to starting offset
181 dest in outfd. Return true if successful, false otherwise. */
182static int
183unexec_copy (off_t dest, off_t src, ssize_t count)
184{
185 ssize_t bytes_read;
186
187 char buf[UNEXEC_COPY_BUFSZ];
188
189 if (lseek (infd, src, SEEK_SET) != src)
190 return 0;
191
192 if (lseek (outfd, dest, SEEK_SET) != dest)
193 return 0;
194
195 while (count > 0)
196 {
197 bytes_read = read (infd, buf, UNEXEC_COPY_BUFSZ);
198 if (bytes_read <= 0)
199 return 0;
200 if (write (outfd, buf, bytes_read) != bytes_read)
201 return 0;
202 count -= bytes_read;
203 }
204
205 return 1;
206}
207
208/* Debugging and informational messages routines. */
209
210static void
211unexec_error (char *format, ...)
212{
213 va_list ap;
214
215 va_start (ap, format);
216 fprintf (stderr, "unexec: ");
217 vfprintf (stderr, format, ap);
218 fprintf (stderr, "\n");
219 va_end (ap);
220 exit (1);
221}
222
223static void
224print_prot (vm_prot_t prot)
225{
226 if (prot == VM_PROT_NONE)
227 printf ("none");
228 else
229 {
230 putchar (prot & VM_PROT_READ ? 'r' : ' ');
231 putchar (prot & VM_PROT_WRITE ? 'w' : ' ');
232 putchar (prot & VM_PROT_EXECUTE ? 'x' : ' ');
233 putchar (' ');
234 }
235}
236
237static void
238print_region (vm_address_t address, vm_size_t size, vm_prot_t prot,
239 vm_prot_t max_prot)
240{
241 printf ("%#10x %#8x ", address, size);
242 print_prot (prot);
243 putchar (' ');
244 print_prot (max_prot);
245 putchar ('\n');
246}
247
248static void
249print_region_list ()
250{
251 struct region_t *r;
252
253 printf (" address size prot maxp\n");
254
255 for (r = region_list_head; r; r = r->next)
256 print_region (r->address, r->size, r->protection, r->max_protection);
257}
258
259void
260print_regions ()
261{
262 task_t target_task = mach_task_self ();
263 vm_address_t address = (vm_address_t) 0;
264 vm_size_t size;
265 struct vm_region_basic_info info;
266 mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT;
267 mach_port_t object_name;
268
269 printf (" address size prot maxp\n");
270
271 while (vm_region (target_task, &address, &size, VM_REGION_BASIC_INFO,
272 (vm_region_info_t) &info, &info_count, &object_name)
273 == KERN_SUCCESS && info_count == VM_REGION_BASIC_INFO_COUNT)
274 {
275 print_region (address, size, info.protection, info.max_protection);
276
277 if (object_name != MACH_PORT_NULL)
278 mach_port_deallocate (target_task, object_name);
279
280 address += size;
281 }
282}
283
284/* Build the list of regions that need to be dumped. Regions with
285 addresses above VM_DATA_TOP are omitted. Adjacent regions with
286 identical protection are merged. Note that non-writable regions
287 cannot be omitted because they some regions created at run time are
288 read-only. */
289static void
290build_region_list ()
291{
292 task_t target_task = mach_task_self ();
293 vm_address_t address = (vm_address_t) 0;
294 vm_size_t size;
295 struct vm_region_basic_info info;
296 mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT;
297 mach_port_t object_name;
298 struct region_t *r;
299
300#if VERBOSE
301 printf ("--- List of All Regions ---\n");
302 printf (" address size prot maxp\n");
303#endif
304
305 while (vm_region (target_task, &address, &size, VM_REGION_BASIC_INFO,
306 (vm_region_info_t) &info, &info_count, &object_name)
307 == KERN_SUCCESS && info_count == VM_REGION_BASIC_INFO_COUNT)
308 {
309 /* Done when we reach addresses of shared libraries, which are
310 loaded in high memory. */
311 if (address >= VM_DATA_TOP)
312 break;
313
314#if VERBOSE
315 print_region (address, size, info.protection, info.max_protection);
316#endif
317
318 /* If a region immediately follows the previous one (the one
319 most recently added to the list) and has identical
320 protection, merge it with the latter. Otherwise create a
321 new list element for it. */
322 if (region_list_tail
323 && info.protection == region_list_tail->protection
324 && info.max_protection == region_list_tail->max_protection
325 && region_list_tail->address + region_list_tail->size == address)
326 {
327 region_list_tail->size += size;
328 }
329 else
330 {
331 r = (struct region_t *) malloc (sizeof (struct region_t));
332
333 if (!r)
334 unexec_error ("cannot allocate region structure");
335
336 r->address = address;
337 r->size = size;
338 r->protection = info.protection;
339 r->max_protection = info.max_protection;
340
341 r->next = 0;
342 if (region_list_head == 0)
343 {
344 region_list_head = r;
345 region_list_tail = r;
346 }
347 else
348 {
349 region_list_tail->next = r;
350 region_list_tail = r;
351 }
352
353 /* Deallocate (unused) object name returned by
354 vm_region. */
355 if (object_name != MACH_PORT_NULL)
356 mach_port_deallocate (target_task, object_name);
357 }
358
359 address += size;
360 }
361
362 printf ("--- List of Regions to be Dumped ---\n");
363 print_region_list ();
364}
365
366
367#define MAX_UNEXEC_REGIONS 30
368
369int num_unexec_regions;
370vm_range_t unexec_regions[MAX_UNEXEC_REGIONS];
371
372static void
373unexec_regions_recorder (task_t task, void *rr, unsigned type,
374 vm_range_t *ranges, unsigned num)
375{
376 while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
377 {
378 unexec_regions[num_unexec_regions++] = *ranges;
379 printf ("%#8x (sz: %#8x)\n", ranges->address, ranges->size);
380 ranges++; num--;
381 }
382 if (num_unexec_regions == MAX_UNEXEC_REGIONS)
383 fprintf (stderr, "malloc_freezedry_recorder: too many regions\n");
384}
385
386static kern_return_t
387unexec_reader (task_t task, vm_address_t address, vm_size_t size, void **ptr)
388{
389 *ptr = (void *) address;
390 return KERN_SUCCESS;
391}
392
393void
394find_emacs_zone_regions ()
395{
396 num_unexec_regions = 0;
397
398 emacs_zone->introspect->enumerator (mach_task_self(), 0,
399 MALLOC_PTR_REGION_RANGE_TYPE
400 | MALLOC_ADMIN_REGION_RANGE_TYPE,
401 (vm_address_t) emacs_zone,
402 unexec_reader,
403 unexec_regions_recorder);
404}
405
406
407/* More informational messages routines. */
408
409static void
410print_load_command_name (int lc)
411{
412 switch (lc)
413 {
414 case LC_SEGMENT:
415 printf ("LC_SEGMENT ");
416 break;
417 case LC_LOAD_DYLINKER:
418 printf ("LC_LOAD_DYLINKER ");
419 break;
420 case LC_LOAD_DYLIB:
421 printf ("LC_LOAD_DYLIB ");
422 break;
423 case LC_SYMTAB:
424 printf ("LC_SYMTAB ");
425 break;
426 case LC_DYSYMTAB:
427 printf ("LC_DYSYMTAB ");
428 break;
429 case LC_UNIXTHREAD:
430 printf ("LC_UNIXTHREAD ");
431 break;
432 case LC_PREBOUND_DYLIB:
433 printf ("LC_PREBOUND_DYLIB");
434 break;
435 case LC_TWOLEVEL_HINTS:
436 printf ("LC_TWOLEVEL_HINTS");
437 break;
438 default:
439 printf ("unknown ");
440 }
441}
442
443static void
444print_load_command (struct load_command *lc)
445{
446 print_load_command_name (lc->cmd);
447 printf ("%8d", lc->cmdsize);
448
449 if (lc->cmd == LC_SEGMENT)
450 {
451 struct segment_command *scp;
452 struct section *sectp;
453 int j;
454
455 scp = (struct segment_command *) lc;
456 printf (" %-16.16s %#10x %#8x\n",
457 scp->segname, scp->vmaddr, scp->vmsize);
458
459 sectp = (struct section *) (scp + 1);
460 for (j = 0; j < scp->nsects; j++)
461 {
462 printf (" %-16.16s %#10x %#8x\n",
463 sectp->sectname, sectp->addr, sectp->size);
464 sectp++;
465 }
466 }
467 else
468 printf ("\n");
469}
470
471/* Read header and load commands from input file. Store the latter in
472 the global array lca. Store the total number of load commands in
473 global variable nlc. */
474static void
475read_load_commands ()
476{
477 int n, i, j;
478
479 if (!unexec_read (&mh, sizeof (struct mach_header)))
480 unexec_error ("cannot read mach-o header");
481
482 if (mh.magic != MH_MAGIC)
483 unexec_error ("input file not in Mach-O format");
484
485 if (mh.filetype != MH_EXECUTE)
486 unexec_error ("input Mach-O file is not an executable object file");
487
488#if VERBOSE
489 printf ("--- Header Information ---\n");
490 printf ("Magic = 0x%08x\n", mh.magic);
491 printf ("CPUType = %d\n", mh.cputype);
492 printf ("CPUSubType = %d\n", mh.cpusubtype);
493 printf ("FileType = 0x%x\n", mh.filetype);
494 printf ("NCmds = %d\n", mh.ncmds);
495 printf ("SizeOfCmds = %d\n", mh.sizeofcmds);
496 printf ("Flags = 0x%08x\n", mh.flags);
497#endif
498
499 nlc = mh.ncmds;
500 lca = (struct load_command **) malloc (nlc * sizeof (struct load_command *));
501
502 for (i = 0; i < nlc; i++)
503 {
504 struct load_command lc;
505 /* Load commands are variable-size: so read the command type and
506 size first and then read the rest. */
507 if (!unexec_read (&lc, sizeof (struct load_command)))
508 unexec_error ("cannot read load command");
509 lca[i] = (struct load_command *) malloc (lc.cmdsize);
510 memcpy (lca[i], &lc, sizeof (struct load_command));
511 if (!unexec_read (lca[i] + 1, lc.cmdsize - sizeof (struct load_command)))
512 unexec_error ("cannot read content of load command");
513 if (lc.cmd == LC_SEGMENT)
514 {
515 struct segment_command *scp = (struct segment_command *) lca[i];
516
517 if (scp->vmaddr + scp->vmsize > infile_lc_highest_addr)
518 infile_lc_highest_addr = scp->vmaddr + scp->vmsize;
519
520 if (strncmp (scp->segname, SEG_TEXT, 16) == 0)
521 {
522 struct section *sectp = (struct section *) (scp + 1);
523 int j;
524
525 for (j = 0; j < scp->nsects; j++)
526 if (sectp->offset < text_seg_lowest_offset)
527 text_seg_lowest_offset = sectp->offset;
528 }
529 }
530 }
531
532 printf ("Highest address of load commands in input file: %#8x\n",
533 infile_lc_highest_addr);
534
535 printf ("Lowest offset of all sections in __TEXT segment: %#8x\n",
536 text_seg_lowest_offset);
537
538 printf ("--- List of Load Commands in Input File ---\n");
539 printf ("# cmd cmdsize name address size\n");
540
541 for (i = 0; i < nlc; i++)
542 {
543 printf ("%1d ", i);
544 print_load_command (lca[i]);
545 }
546}
547
548/* Copy a LC_SEGMENT load command other than the __DATA segment from
549 the input file to the output file, adjusting the file offset of the
550 segment and the file offsets of sections contained in it. */
551static void
552copy_segment (struct load_command *lc)
553{
554 struct segment_command *scp = (struct segment_command *) lc;
555 unsigned long old_fileoff = scp->fileoff;
556 struct section *sectp;
557 int j;
558
559 scp->fileoff += delta;
560
561 sectp = (struct section *) (scp + 1);
562 for (j = 0; j < scp->nsects; j++)
563 {
564 sectp->offset += delta;
565 sectp++;
566 }
567
568 printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
569 scp->segname, scp->fileoff, scp->fileoff + scp->filesize,
570 scp->filesize);
571
572 if (!unexec_copy (scp->fileoff, old_fileoff, scp->filesize))
573 unexec_error ("cannot copy segment from input to output file");
574 if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
575 unexec_error ("cannot write load command to header");
576
577 curr_header_offset += lc->cmdsize;
578}
579
580/* Copy a LC_SEGMENT load command for the __DATA segment in the input
581 file to the output file. We assume that only one such segment load
582 command exists in the input file and it contains the sections
583 __data, __bss, __common, __la_symbol_ptr, __nl_symbol_ptr, and
584 __dyld. The first three of these should be dumped from memory and
585 the rest should be copied from the input file. Note that the
586 sections __bss and __common contain no data in the input file
587 because their flag fields have the value S_ZEROFILL. Dumping these
588 from memory makes it necessary to adjust file offset fields in
589 subsequently dumped load commands. Then, create new __DATA segment
590 load commands for regions on the region list other than the one
591 corresponding to the __DATA segment in the input file. */
592static void
593copy_data_segment (struct load_command *lc)
594{
595 struct segment_command *scp = (struct segment_command *) lc;
596 struct section *sectp;
597 int j;
598 unsigned long header_offset, file_offset, old_file_offset;
599 struct region_t *r;
600
601 printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
602 scp->segname, scp->fileoff, scp->fileoff + scp->filesize,
603 scp->filesize);
604
605 if (delta != 0)
606 unexec_error ("cannot handle multiple DATA segments in input file");
607
608 /* Offsets in the output file for writing the next section structure
609 and segment data block, respectively. */
610 header_offset = curr_header_offset + sizeof (struct segment_command);
611
612 sectp = (struct section *) (scp + 1);
613 for (j = 0; j < scp->nsects; j++)
614 {
615 old_file_offset = sectp->offset;
616 sectp->offset = sectp->addr - scp->vmaddr + scp->fileoff;
617 /* The __data section is dumped from memory. The __bss and
618 __common sections are also dumped from memory but their flag
619 fields require changing (from S_ZEROFILL to S_REGULAR). The
620 other three kinds of sections are just copied from the input
621 file. */
622 if (strncmp (sectp->sectname, SECT_DATA, 16) == 0)
623 {
624 if (!unexec_write (sectp->offset, (void *) sectp->addr, sectp->size))
625 unexec_error ("cannot write section %s", SECT_DATA);
626 if (!unexec_write (header_offset, sectp, sizeof (struct section)))
627 unexec_error ("cannot write section %s's header", SECT_DATA);
628 }
629 else if (strncmp (sectp->sectname, SECT_BSS, 16) == 0
630 || strncmp (sectp->sectname, SECT_COMMON, 16) == 0)
631 {
632 sectp->flags = S_REGULAR;
633 if (!unexec_write (sectp->offset, (void *) sectp->addr, sectp->size))
634 unexec_error ("cannot write section %s", SECT_DATA);
635 if (!unexec_write (header_offset, sectp, sizeof (struct section)))
636 unexec_error ("cannot write section %s's header", SECT_DATA);
637 }
638 else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0
639 || strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0
640 || strncmp (sectp->sectname, "__dyld", 16) == 0
641 || strncmp (sectp->sectname, "__const", 16) == 0)
642 {
643 if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))
644 unexec_error ("cannot copy section %s", sectp->sectname);
645 if (!unexec_write (header_offset, sectp, sizeof (struct section)))
646 unexec_error ("cannot write section %s's header", sectp->sectname);
647 }
648 else
649 unexec_error ("unrecognized section name in __DATA segment");
650
651 printf (" section %-16.16s at %#8x - %#8x (sz: %#8x)\n",
652 sectp->sectname, sectp->offset, sectp->offset + sectp->size,
653 sectp->size);
654
655 header_offset += sizeof (struct section);
656 sectp++;
657 }
658
659 /* The new filesize of the segment is set to its vmsize because data
660 blocks for segments must start at region boundaries. Note that
661 this may leave unused locations at the end of the segment data
662 block because the total of the sizes of all sections in the
663 segment is generally smaller than vmsize. */
664 delta = scp->vmsize - scp->filesize;
665 scp->filesize = scp->vmsize;
666 if (!unexec_write (curr_header_offset, scp, sizeof (struct segment_command)))
667 unexec_error ("cannot write header of __DATA segment");
668 curr_header_offset += lc->cmdsize;
669
670 /* Create new __DATA segment load commands for regions on the region
671 list that do not corresponding to any segment load commands in
672 the input file.
673 */
674 file_offset = scp->fileoff + scp->filesize;
675 for (j = 0; j < num_unexec_regions; j++)
676 {
677 struct segment_command sc;
678
679 sc.cmd = LC_SEGMENT;
680 sc.cmdsize = sizeof (struct segment_command);
681 strncpy (sc.segname, SEG_DATA, 16);
682 sc.vmaddr = unexec_regions[j].address;
683 sc.vmsize = unexec_regions[j].size;
684 sc.fileoff = file_offset;
685 sc.filesize = unexec_regions[j].size;
686 sc.maxprot = VM_PROT_READ | VM_PROT_WRITE;
687 sc.initprot = VM_PROT_READ | VM_PROT_WRITE;
688 sc.nsects = 0;
689 sc.flags = 0;
690
691 printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
692 sc.segname, sc.fileoff, sc.fileoff + sc.filesize,
693 sc.filesize);
694
695 if (!unexec_write (sc.fileoff, (void *) sc.vmaddr, sc.vmsize))
696 unexec_error ("cannot write new __DATA segment");
697 delta += sc.filesize;
698 file_offset += sc.filesize;
699
700 if (!unexec_write (curr_header_offset, &sc, sc.cmdsize))
701 unexec_error ("cannot write new __DATA segment's header");
702 curr_header_offset += sc.cmdsize;
703 mh.ncmds++;
704 }
705}
706
707/* Copy a LC_SYMTAB load command from the input file to the output
708 file, adjusting the file offset fields. */
709static void
710copy_symtab (struct load_command *lc)
711{
712 struct symtab_command *stp = (struct symtab_command *) lc;
713
714 stp->symoff += delta;
715 stp->stroff += delta;
716
717 printf ("Writing LC_SYMTAB command\n");
718
719 if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
720 unexec_error ("cannot write symtab command to header");
721
722 curr_header_offset += lc->cmdsize;
723}
724
725/* Copy a LC_DYSYMTAB load command from the input file to the output
726 file, adjusting the file offset fields. */
727static void
728copy_dysymtab (struct load_command *lc)
729{
730 struct dysymtab_command *dstp = (struct dysymtab_command *) lc;
731
732 /* If Mach-O executable is not prebound, relocation entries need
733 fixing up. This is not supported currently. */
734 if (!(mh.flags & MH_PREBOUND) && (dstp->nextrel != 0 || dstp->nlocrel != 0))
735 unexec_error ("cannot handle LC_DYSYMTAB with relocation entries");
736
737 if (dstp->nextrel > 0) {
738 dstp->extreloff += delta;
739 }
740
741 if (dstp->nlocrel > 0) {
742 dstp->locreloff += delta;
743 }
744
745 if (dstp->nindirectsyms > 0)
746 dstp->indirectsymoff += delta;
747
748 printf ("Writing LC_DYSYMTAB command\n");
749
750 if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
751 unexec_error ("cannot write symtab command to header");
752
753 curr_header_offset += lc->cmdsize;
754}
755
756/* Copy other kinds of load commands from the input file to the output
757 file, ones that do not require adjustments of file offsets. */
758static void
759copy_other (struct load_command *lc)
760{
761 printf ("Writing ");
762 print_load_command_name (lc->cmd);
763 printf (" command\n");
764
765 if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
766 unexec_error ("cannot write symtab command to header");
767
768 curr_header_offset += lc->cmdsize;
769}
770
771/* Loop through all load commands and dump them. Then write the Mach
772 header. */
773static void
774dump_it ()
775{
776 int i;
777
778 printf ("--- Load Commands written to Output File ---\n");
779
780 for (i = 0; i < nlc; i++)
781 switch (lca[i]->cmd)
782 {
783 case LC_SEGMENT:
784 {
785 struct segment_command *scp = (struct segment_command *) lca[i];
786 if (strncmp (scp->segname, SEG_DATA, 16) == 0)
787 {
788 copy_data_segment (lca[i]);
789 }
790 else
791 {
792 copy_segment (lca[i]);
793 }
794 }
795 break;
796 case LC_SYMTAB:
797 copy_symtab (lca[i]);
798 break;
799 case LC_DYSYMTAB:
800 copy_dysymtab (lca[i]);
801 break;
802 default:
803 copy_other (lca[i]);
804 break;
805 }
806
807 if (curr_header_offset > text_seg_lowest_offset)
808 unexec_error ("not enough room for load commands for new __DATA segments");
809
810 printf ("%d unused bytes follow Mach-O header\n",
811 text_seg_lowest_offset - curr_header_offset);
812
813 mh.sizeofcmds = curr_header_offset - sizeof (struct mach_header);
814 if (!unexec_write (0, &mh, sizeof (struct mach_header)))
815 unexec_error ("cannot write final header contents");
816}
817
818/* Take a snapshot of Emacs and make a Mach-O format executable file
819 from it. The file names of the output and input files are outfile
820 and infile, respectively. The three other parameters are
821 ignored. */
822void
823unexec (char *outfile, char *infile, void *start_data, void *start_bss,
824 void *entry_address)
825{
826 infd = open (infile, O_RDONLY, 0);
827 if (infd < 0)
828 {
829 unexec_error ("cannot open input file `%s'", infile);
830 }
831
832 outfd = open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0755);
833 if (outfd < 0)
834 {
835 close (infd);
836 unexec_error ("cannot open output file `%s'", outfile);
837 }
838
839 build_region_list ();
840 read_load_commands ();
841
842 find_emacs_zone_regions ();
843
844 in_dumped_exec = 1;
845
846 dump_it ();
847
848 close (outfd);
849}
850
851
852void
853unexec_init_emacs_zone ()
854{
855 emacs_zone = malloc_create_zone (0, 0);
856 malloc_set_zone_name (emacs_zone, "EmacsZone");
857}
858
859int
860ptr_in_unexec_regions (void *ptr)
861{
862 int i;
863
864 for (i = 0; i < num_unexec_regions; i++)
865 if ((vm_address_t) ptr - unexec_regions[i].address
866 < unexec_regions[i].size)
867 return 1;
868
869 return 0;
870}
871
872void *
873unexec_malloc (size_t size)
874{
875 if (in_dumped_exec)
876 return malloc (size);
877 else
878 return malloc_zone_malloc (emacs_zone, size);
879}
880
881void *
882unexec_realloc (void *old_ptr, size_t new_size)
883{
884 if (in_dumped_exec)
885 if (ptr_in_unexec_regions (old_ptr))
886 {
887 char *p = malloc (new_size);
888 /* 2002-04-15 T. Ikegami <ikegami@adam.uprr.pr>. The original
889 code to get size failed to reallocate read_buffer
890 (lread.c). */
891 int old_size = emacs_zone->size (emacs_zone, old_ptr);
892 int size = new_size > old_size ? old_size : new_size;
893
894 if (size)
895 memcpy (p, old_ptr, size);
896 return p;
897 }
898 else
899 return realloc (old_ptr, new_size);
900 else
901 return malloc_zone_realloc (emacs_zone, old_ptr, new_size);
902}
903
904void
905unexec_free (void *ptr)
906{
907 if (in_dumped_exec)
908 {
909 if (!ptr_in_unexec_regions (ptr))
910 free (ptr);
911 }
912 else
913 malloc_zone_free (emacs_zone, ptr);
914}
diff --git a/src/window.c b/src/window.c
index 4dc8329baf1..24a95dc53a1 100644
--- a/src/window.c
+++ b/src/window.c
@@ -44,7 +44,7 @@ Boston, MA 02111-1307, USA. */
44#ifdef MSDOS 44#ifdef MSDOS
45#include "msdos.h" 45#include "msdos.h"
46#endif 46#endif
47#ifdef macintosh 47#ifdef MAC_OS
48#include "macterm.h" 48#include "macterm.h"
49#endif 49#endif
50 50
diff --git a/src/xdisp.c b/src/xdisp.c
index 4764bfb90a6..5eaf8330797 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -194,13 +194,13 @@ Boston, MA 02111-1307, USA. */
194#ifdef WINDOWSNT 194#ifdef WINDOWSNT
195#include "w32term.h" 195#include "w32term.h"
196#endif 196#endif
197#ifdef macintosh 197#ifdef MAC_OS
198#include "macterm.h" 198#include "macterm.h"
199#endif 199#endif
200 200
201#define INFINITY 10000000 201#define INFINITY 10000000
202 202
203#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh) 203#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
204extern void set_frame_menubar P_ ((struct frame *f, int, int)); 204extern void set_frame_menubar P_ ((struct frame *f, int, int));
205extern int pending_menu_activation; 205extern int pending_menu_activation;
206#endif 206#endif
@@ -7077,7 +7077,7 @@ echo_area_display (update_frame_p)
7077 return 0; 7077 return 0;
7078 7078
7079/* The terminal frame is used as the first Emacs frame on the Mac OS. */ 7079/* The terminal frame is used as the first Emacs frame on the Mac OS. */
7080#ifndef macintosh 7080#ifndef MAC_OS8
7081#ifdef HAVE_WINDOW_SYSTEM 7081#ifdef HAVE_WINDOW_SYSTEM
7082 /* When Emacs starts, selected_frame may be a visible terminal 7082 /* When Emacs starts, selected_frame may be a visible terminal
7083 frame, even if we run under a window system. If we let this 7083 frame, even if we run under a window system. If we let this
@@ -7450,7 +7450,7 @@ update_menu_bar (f, save_match_data)
7450 7450
7451 if (FRAME_WINDOW_P (f) 7451 if (FRAME_WINDOW_P (f)
7452 ? 7452 ?
7453#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh) 7453#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
7454 FRAME_EXTERNAL_MENU_BAR (f) 7454 FRAME_EXTERNAL_MENU_BAR (f)
7455#else 7455#else
7456 FRAME_MENU_BAR_LINES (f) > 0 7456 FRAME_MENU_BAR_LINES (f) > 0
@@ -7501,9 +7501,9 @@ update_menu_bar (f, save_match_data)
7501 FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f)); 7501 FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f));
7502 7502
7503 /* Redisplay the menu bar in case we changed it. */ 7503 /* Redisplay the menu bar in case we changed it. */
7504#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh) 7504#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
7505 if (FRAME_WINDOW_P (f) 7505 if (FRAME_WINDOW_P (f)
7506#if defined (macintosh) 7506#if defined (MAC_OS)
7507 /* All frames on Mac OS share the same menubar. So only the 7507 /* All frames on Mac OS share the same menubar. So only the
7508 selected frame should be allowed to set it. */ 7508 selected frame should be allowed to set it. */
7509 && f == SELECTED_FRAME () 7509 && f == SELECTED_FRAME ()
@@ -10647,7 +10647,7 @@ redisplay_window (window, just_this_one_p)
10647 10647
10648 if (FRAME_WINDOW_P (f)) 10648 if (FRAME_WINDOW_P (f))
10649 { 10649 {
10650#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh) 10650#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
10651 redisplay_menu_p = FRAME_EXTERNAL_MENU_BAR (f); 10651 redisplay_menu_p = FRAME_EXTERNAL_MENU_BAR (f);
10652#else 10652#else
10653 redisplay_menu_p = FRAME_MENU_BAR_LINES (f) > 0; 10653 redisplay_menu_p = FRAME_MENU_BAR_LINES (f) > 0;
@@ -13379,7 +13379,7 @@ display_menu_bar (w)
13379 if (FRAME_X_P (f)) 13379 if (FRAME_X_P (f))
13380 return; 13380 return;
13381#endif 13381#endif
13382#ifdef macintosh 13382#ifdef MAC_OS
13383 if (FRAME_MAC_P (f)) 13383 if (FRAME_MAC_P (f))
13384 return; 13384 return;
13385#endif 13385#endif
diff --git a/src/xfaces.c b/src/xfaces.c
index 256bb3a656d..9e37f096321 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -234,32 +234,11 @@ Boston, MA 02111-1307, USA. */
234#define FONT_WIDTH FONT_MAX_WIDTH 234#define FONT_WIDTH FONT_MAX_WIDTH
235#endif /* WINDOWSNT */ 235#endif /* WINDOWSNT */
236 236
237#ifdef macintosh 237#ifdef MAC_OS
238#include "macterm.h" 238#include "macterm.h"
239#define x_display_info mac_display_info 239#define x_display_info mac_display_info
240#define check_x check_mac 240#define check_x check_mac
241 241#endif /* MAC_OS */
242extern XGCValues *XCreateGC (void *, WindowPtr, unsigned long, XGCValues *);
243
244static INLINE GC
245x_create_gc (f, mask, xgcv)
246 struct frame *f;
247 unsigned long mask;
248 XGCValues *xgcv;
249{
250 GC gc;
251 gc = XCreateGC (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), mask, xgcv);
252 return gc;
253}
254
255static INLINE void
256x_free_gc (f, gc)
257 struct frame *f;
258 GC gc;
259{
260 XFreeGC (FRAME_MAC_DISPLAY (f), gc);
261}
262#endif
263 242
264#include "buffer.h" 243#include "buffer.h"
265#include "dispextern.h" 244#include "dispextern.h"
@@ -814,6 +793,32 @@ x_free_gc (f, gc)
814 793
815#endif /* WINDOWSNT */ 794#endif /* WINDOWSNT */
816 795
796#ifdef MAC_OS
797/* Mac OS emulation of GCs */
798
799extern XGCValues *XCreateGC (void *, Window, unsigned long, XGCValues *);
800
801static INLINE GC
802x_create_gc (f, mask, xgcv)
803 struct frame *f;
804 unsigned long mask;
805 XGCValues *xgcv;
806{
807 GC gc;
808 gc = XCreateGC (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), mask, xgcv);
809 return gc;
810}
811
812static INLINE void
813x_free_gc (f, gc)
814 struct frame *f;
815 GC gc;
816{
817 XFreeGC (FRAME_MAC_DISPLAY (f), gc);
818}
819
820#endif /* MAC_OS */
821
817/* Like stricmp. Used to compare parts of font names which are in 822/* Like stricmp. Used to compare parts of font names which are in
818 ISO8859-1. */ 823 ISO8859-1. */
819 824
@@ -1382,7 +1387,7 @@ defined_color (f, color_name, color_def, alloc)
1382 else if (FRAME_W32_P (f)) 1387 else if (FRAME_W32_P (f))
1383 return w32_defined_color (f, color_name, color_def, alloc); 1388 return w32_defined_color (f, color_name, color_def, alloc);
1384#endif 1389#endif
1385#ifdef macintosh 1390#ifdef MAC_OS
1386 else if (FRAME_MAC_P (f)) 1391 else if (FRAME_MAC_P (f))
1387 return mac_defined_color (f, color_name, color_def, alloc); 1392 return mac_defined_color (f, color_name, color_def, alloc);
1388#endif 1393#endif
@@ -1889,7 +1894,7 @@ static struct frame *font_frame;
1889 font height, then for weight, then for slant.' This variable can be 1894 font height, then for weight, then for slant.' This variable can be
1890 set via set-face-font-sort-order. */ 1895 set via set-face-font-sort-order. */
1891 1896
1892#ifdef macintosh 1897#ifdef MAC_OS
1893static int font_sort_order[4] = { 1898static int font_sort_order[4] = {
1894 XLFD_SWIDTH, XLFD_POINT_SIZE, XLFD_WEIGHT, XLFD_SLANT 1899 XLFD_SWIDTH, XLFD_POINT_SIZE, XLFD_WEIGHT, XLFD_SLANT
1895}; 1900};
@@ -4341,7 +4346,7 @@ DEFUN ("internal-face-x-get-resource", Finternal_face_x_get_resource,
4341{ 4346{
4342 Lisp_Object value = Qnil; 4347 Lisp_Object value = Qnil;
4343#ifndef WINDOWSNT 4348#ifndef WINDOWSNT
4344#ifndef macintosh 4349#ifndef MAC_OS
4345 CHECK_STRING (resource); 4350 CHECK_STRING (resource);
4346 CHECK_STRING (class); 4351 CHECK_STRING (class);
4347 CHECK_LIVE_FRAME (frame); 4352 CHECK_LIVE_FRAME (frame);
@@ -4349,7 +4354,7 @@ DEFUN ("internal-face-x-get-resource", Finternal_face_x_get_resource,
4349 value = display_x_get_resource (FRAME_X_DISPLAY_INFO (XFRAME (frame)), 4354 value = display_x_get_resource (FRAME_X_DISPLAY_INFO (XFRAME (frame)),
4350 resource, class, Qnil, Qnil); 4355 resource, class, Qnil, Qnil);
4351 UNBLOCK_INPUT; 4356 UNBLOCK_INPUT;
4352#endif /* not macintosh */ 4357#endif /* not MAC_OS */
4353#endif /* not WINDOWSNT */ 4358#endif /* not WINDOWSNT */
4354 return value; 4359 return value;
4355} 4360}
@@ -4997,7 +5002,7 @@ prepare_face_for_display (f, face)
4997#ifdef WINDOWSNT 5002#ifdef WINDOWSNT
4998 xgcv.font = face->font; 5003 xgcv.font = face->font;
4999#endif 5004#endif
5000#ifdef macintosh 5005#ifdef MAC_OS
5001 xgcv.font = face->font; 5006 xgcv.font = face->font;
5002#endif 5007#endif
5003 mask |= GCFont; 5008 mask |= GCFont;
@@ -6428,7 +6433,7 @@ realize_x_face (cache, attrs, c, base_face)
6428 face->fontset = make_fontset_for_ascii_face (f, fontset); 6433 face->fontset = make_fontset_for_ascii_face (f, fontset);
6429 face->font = NULL; /* to force realize_face to load font */ 6434 face->font = NULL; /* to force realize_face to load font */
6430 6435
6431#ifdef macintosh 6436#ifdef MAC_OS
6432 /* Load the font if it is specified in ATTRS. This fixes 6437 /* Load the font if it is specified in ATTRS. This fixes
6433 changing frame font on the Mac. */ 6438 changing frame font on the Mac. */
6434 if (STRINGP (attrs[LFACE_FONT_INDEX])) 6439 if (STRINGP (attrs[LFACE_FONT_INDEX]))