Mercurial > hg > xemacs-beta
changeset 211:78478c60bfcd r20-4b4
Import from CVS: tag r20-4b4
line wrap: on
line diff
--- a/CHANGES-beta Mon Aug 13 10:05:01 2007 +0200 +++ b/CHANGES-beta Mon Aug 13 10:05:51 2007 +0200 @@ -1,4 +1,15 @@ -*- indented-text -*- +to 20.4 beta4 "American Cashmere" +-- Major changes in portable dumping/Lisp_Object code courtesy of Kyle Jones +-- Miscellaneous patches from Kyle Jones, Hrvoje Niksic +-- various build tweaks +-- help-macro ported from Emacs 20 courtesy of Hrvoje Niksic +-- Fix compiler warnings +-- MS Windows patches from Marc Paquette and Darryl Okahata +-- Change pointer glyph over custom buttons courtesy of Hrvoje Niksic +-- New Lisp variable: last-command-event-time courtesy of Kyle Jones +-- miscellaneous bug fixes + to 20.4 beta3 "Altai Mountain" -- query-replace and query-replace-regexp will only replace the region if the zmacs region is active.
--- a/ChangeLog Mon Aug 13 10:05:01 2007 +0200 +++ b/ChangeLog Mon Aug 13 10:05:51 2007 +0200 @@ -1,3 +1,10 @@ +1997-11-10 SL Baur <steve@altair.xemacs.org> + + * info/dir: remove packaged entries. + From Glynn Clements <glynn@sensei.co.uk> + + * configure.in: Puke and die if NAS sound is selected without X. + 1997-11-08 SL Baur <steve@altair.xemacs.org> * XEmacs 20.4-beta3 is released.
--- a/configure Mon Aug 13 10:05:01 2007 +0200 +++ b/configure Mon Aug 13 10:05:51 2007 +0200 @@ -6556,6 +6556,12 @@ test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"gui-x.o\"" fi +else + if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then + echo "Attempt to Build NAS sound without X" + echo "Please remove NAS configuration or build with X" + exit 1 + fi fi @@ -6570,7 +6576,7 @@ if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:6574: checking for Mule-related features" >&5 +echo "configure:6580: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -6587,15 +6593,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6591: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6594 "configure" +echo "configure:6597: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6600 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6626,12 +6632,12 @@ echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:6630: checking for strerror in -lintl" >&5 +echo "configure:6636: checking for strerror in -lintl" >&5 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'` xe_check_libs=" -lintl " cat > conftest.$ac_ext <<EOF -#line 6635 "configure" +#line 6641 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6642,7 +6648,7 @@ strerror() ; return 0; } EOF -if { (eval echo configure:6646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6675,19 +6681,19 @@ echo "checking for Mule input methods" 1>&6 -echo "configure:6679: checking for Mule input methods" >&5 +echo "configure:6685: checking for Mule input methods" >&5 test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:6683: checking for XIM" >&5 +echo "configure:6689: checking for XIM" >&5 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:6686: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:6692: checking for XmImMbLookupString in -lXm" >&5 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <<EOF -#line 6691 "configure" +#line 6697 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6698,7 +6704,7 @@ XmImMbLookupString() ; return 0; } EOF -if { (eval echo configure:6702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6761,15 +6767,15 @@ fi else case "$with_xfs" in "yes" ) echo "checking for XFontSet" 1>&6 -echo "configure:6765: checking for XFontSet" >&5 +echo "configure:6771: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:6768: checking for XmbDrawString in -lX11" >&5 +echo "configure:6774: checking for XmbDrawString in -lX11" >&5 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <<EOF -#line 6773 "configure" +#line 6779 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6780,7 +6786,7 @@ XmbDrawString() ; return 0; } EOF -if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6819,15 +6825,15 @@ test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6 -echo "configure:6823: checking for wnn/jllib.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6826 "configure" +echo "configure:6829: checking for wnn/jllib.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6832 "configure" #include "confdefs.h" #include <wnn/jllib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6852,10 +6858,10 @@ for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6856: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6859 "configure" +echo "configure:6862: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6865 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6878,7 +6884,7 @@ ; return 0; } EOF -if { (eval echo configure:6882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6907,12 +6913,12 @@ test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:6911: checking for crypt in -lcrypt" >&5 +echo "configure:6917: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` xe_check_libs=" -lcrypt " cat > conftest.$ac_ext <<EOF -#line 6916 "configure" +#line 6922 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6923,7 +6929,7 @@ crypt() ; return 0; } EOF -if { (eval echo configure:6927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6957,12 +6963,12 @@ fi test -z "$with_wnn" && { echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 -echo "configure:6961: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:6967: checking for jl_dic_list_e in -lwnn" >&5 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn " cat > conftest.$ac_ext <<EOF -#line 6966 "configure" +#line 6972 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6973,7 +6979,7 @@ jl_dic_list_e() ; return 0; } EOF -if { (eval echo configure:6977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7010,12 +7016,12 @@ fi echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6 -echo "configure:7014: checking for jl_fi_dic_list in -lwnn" >&5 +echo "configure:7020: checking for jl_fi_dic_list in -lwnn" >&5 ac_lib_var=`echo wnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn " cat > conftest.$ac_ext <<EOF -#line 7019 "configure" +#line 7025 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7026,7 +7032,7 @@ jl_fi_dic_list() ; return 0; } EOF -if { (eval echo configure:7030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7058,15 +7064,15 @@ test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6 -echo "configure:7062: checking for canna/RK.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7065 "configure" +echo "configure:7068: checking for canna/RK.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7071 "configure" #include "confdefs.h" #include <canna/RK.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7089,12 +7095,12 @@ } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:7093: checking for RkBgnBun in -lRKC" >&5 +echo "configure:7099: checking for RkBgnBun in -lRKC" >&5 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'` xe_check_libs=" -lRKC " cat > conftest.$ac_ext <<EOF -#line 7098 "configure" +#line 7104 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7105,7 +7111,7 @@ RkBgnBun() ; return 0; } EOF -if { (eval echo configure:7109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7128,12 +7134,12 @@ } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:7132: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:7138: checking for jrKanjiControl in -lcanna" >&5 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'` xe_check_libs=" -lcanna " cat > conftest.$ac_ext <<EOF -#line 7137 "configure" +#line 7143 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7144,7 +7150,7 @@ jrKanjiControl() ; return 0; } EOF -if { (eval echo configure:7148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7193,12 +7199,12 @@ libs_x="-lXm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXm\" to \$libs_x"; fi echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6 -echo "configure:7197: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:7203: checking for layout_object_getvalue in -li18n" >&5 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'` xe_check_libs=" -li18n " cat > conftest.$ac_ext <<EOF -#line 7202 "configure" +#line 7208 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7209,7 +7215,7 @@ layout_object_getvalue() ; return 0; } EOF -if { (eval echo configure:7213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7282,10 +7288,10 @@ for ac_func in acosh asinh atanh cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask strcasecmp strerror tzset ulimit usleep utimes waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7286: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7289 "configure" +echo "configure:7292: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7295 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7308,7 +7314,7 @@ ; return 0; } EOF -if { (eval echo configure:7312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7345,10 +7351,10 @@ for ac_func in realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7349: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7352 "configure" +echo "configure:7355: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7358 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7371,7 +7377,7 @@ ; return 0; } EOF -if { (eval echo configure:7375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7404,16 +7410,16 @@ esac echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:7408: checking whether netdb declares h_errno" >&5 -cat > conftest.$ac_ext <<EOF -#line 7410 "configure" +echo "configure:7414: checking whether netdb declares h_errno" >&5 +cat > conftest.$ac_ext <<EOF +#line 7416 "configure" #include "confdefs.h" #include <netdb.h> int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:7417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -7433,16 +7439,16 @@ rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:7437: checking for sigsetjmp" >&5 -cat > conftest.$ac_ext <<EOF -#line 7439 "configure" +echo "configure:7443: checking for sigsetjmp" >&5 +cat > conftest.$ac_ext <<EOF +#line 7445 "configure" #include "confdefs.h" #include <setjmp.h> int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:7446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -7462,11 +7468,11 @@ rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:7466: checking whether localtime caches TZ" >&5 +echo "configure:7472: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext <<EOF -#line 7470 "configure" +#line 7476 "configure" #include "confdefs.h" #include <time.h> #if STDC_HEADERS @@ -7501,7 +7507,7 @@ exit (0); } EOF -if { (eval echo configure:7505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then emacs_cv_localtime_cache=no else @@ -7530,9 +7536,9 @@ if test "$HAVE_TIMEVAL" = "yes"; then echo $ac_n "checking whether gettimeofday cannot accept two arguments""... $ac_c" 1>&6 -echo "configure:7534: checking whether gettimeofday cannot accept two arguments" >&5 -cat > conftest.$ac_ext <<EOF -#line 7536 "configure" +echo "configure:7540: checking whether gettimeofday cannot accept two arguments" >&5 +cat > conftest.$ac_ext <<EOF +#line 7542 "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME @@ -7554,7 +7560,7 @@ ; return 0; } EOF -if { (eval echo configure:7558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -7575,9 +7581,9 @@ fi echo $ac_n "checking whether the timezone variable is already declared""... $ac_c" 1>&6 -echo "configure:7579: checking whether the timezone variable is already declared" >&5 -cat > conftest.$ac_ext <<EOF -#line 7581 "configure" +echo "configure:7585: checking whether the timezone variable is already declared" >&5 +cat > conftest.$ac_ext <<EOF +#line 7587 "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME @@ -7597,7 +7603,7 @@ ; return 0; } EOF -if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -7619,19 +7625,19 @@ echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:7623: checking for inline" >&5 +echo "configure:7629: checking for inline" >&5 ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 7628 "configure" +#line 7634 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:7635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -7681,17 +7687,17 @@ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:7685: checking for working alloca.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7688 "configure" +echo "configure:7691: checking for working alloca.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7694 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:7695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -7715,10 +7721,10 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:7719: checking for alloca" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7722 "configure" +echo "configure:7725: checking for alloca" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7728 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -7741,7 +7747,7 @@ char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:7745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -7780,10 +7786,10 @@ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:7784: checking whether alloca needs Cray hooks" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7787 "configure" +echo "configure:7790: checking whether alloca needs Cray hooks" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7793 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -7807,10 +7813,10 @@ if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7811: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7814 "configure" +echo "configure:7817: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7820 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7833,7 +7839,7 @@ ; return 0; } EOF -if { (eval echo configure:7837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7863,10 +7869,10 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:7867: checking stack direction for C alloca" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7870 "configure" +echo "configure:7873: checking stack direction for C alloca" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7876 "configure" #include "confdefs.h" find_stack_direction () { @@ -7885,7 +7891,7 @@ exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:7889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:7895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_c_stack_direction=1 else @@ -7913,15 +7919,15 @@ ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:7917: checking for vfork.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7920 "configure" +echo "configure:7923: checking for vfork.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7926 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7949,10 +7955,10 @@ fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:7953: checking for working vfork" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7956 "configure" +echo "configure:7959: checking for working vfork" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7962 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -8047,7 +8053,7 @@ } } EOF -if { (eval echo configure:8051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_func_vfork_works=yes else @@ -8072,10 +8078,10 @@ echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:8076: checking for working strcoll" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8079 "configure" +echo "configure:8082: checking for working strcoll" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8085 "configure" #include "confdefs.h" #include <string.h> main () @@ -8085,7 +8091,7 @@ strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:8089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -8112,10 +8118,10 @@ for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8116: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8119 "configure" +echo "configure:8122: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8125 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8138,7 +8144,7 @@ ; return 0; } EOF -if { (eval echo configure:8142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8166,10 +8172,10 @@ done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:8170: checking whether getpgrp takes no argument" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8173 "configure" +echo "configure:8176: checking whether getpgrp takes no argument" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8179 "configure" #include "confdefs.h" /* @@ -8224,7 +8230,7 @@ } EOF -if { (eval echo configure:8228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -8250,10 +8256,10 @@ echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:8254: checking for working mmap" >&5 +echo "configure:8260: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext <<EOF -#line 8257 "configure" +#line 8263 "configure" #include "confdefs.h" #include <stdio.h> #include <unistd.h> @@ -8286,7 +8292,7 @@ return 1; } EOF -if { (eval echo configure:8290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then have_mmap=yes else @@ -8320,15 +8326,15 @@ ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:8324: checking for termios.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8327 "configure" +echo "configure:8330: checking for termios.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8333 "configure" #include "confdefs.h" #include <termios.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8371,15 +8377,15 @@ echo "$ac_t""no" 1>&6 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termio.h""... $ac_c" 1>&6 -echo "configure:8375: checking for termio.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8378 "configure" +echo "configure:8381: checking for termio.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8384 "configure" #include "confdefs.h" #include <termio.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8411,10 +8417,10 @@ echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:8415: checking for socket" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8418 "configure" +echo "configure:8421: checking for socket" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8424 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char socket(); below. */ @@ -8437,7 +8443,7 @@ ; return 0; } EOF -if { (eval echo configure:8441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -8452,15 +8458,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6 -echo "configure:8456: checking for netinet/in.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8459 "configure" +echo "configure:8462: checking for netinet/in.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8465 "configure" #include "confdefs.h" #include <netinet/in.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8477,15 +8483,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6 -echo "configure:8481: checking for arpa/inet.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8484 "configure" +echo "configure:8487: checking for arpa/inet.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8490 "configure" #include "confdefs.h" #include <arpa/inet.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8510,9 +8516,9 @@ } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:8514: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:8520: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext <<EOF -#line 8516 "configure" +#line 8522 "configure" #include "confdefs.h" #include <sys/types.h> @@ -8523,7 +8529,7 @@ static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:8527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SOCKADDR_SUN_LEN @@ -8554,10 +8560,10 @@ echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:8558: checking for msgget" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8561 "configure" +echo "configure:8564: checking for msgget" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8567 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char msgget(); below. */ @@ -8580,7 +8586,7 @@ ; return 0; } EOF -if { (eval echo configure:8584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_msgget=yes" else @@ -8595,15 +8601,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 -echo "configure:8599: checking for sys/ipc.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8602 "configure" +echo "configure:8605: checking for sys/ipc.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8608 "configure" #include "confdefs.h" #include <sys/ipc.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8620,15 +8626,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 -echo "configure:8624: checking for sys/msg.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8627 "configure" +echo "configure:8630: checking for sys/msg.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8633 "configure" #include "confdefs.h" #include <sys/msg.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8666,15 +8672,15 @@ ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:8670: checking for dirent.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8673 "configure" +echo "configure:8676: checking for dirent.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8679 "configure" #include "confdefs.h" #include <dirent.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8701,15 +8707,15 @@ echo "$ac_t""no" 1>&6 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6 -echo "configure:8705: checking for sys/dir.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8708 "configure" +echo "configure:8711: checking for sys/dir.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8714 "configure" #include "confdefs.h" #include <sys/dir.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8742,15 +8748,15 @@ ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:8746: checking for nlist.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8749 "configure" +echo "configure:8752: checking for nlist.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8755 "configure" #include "confdefs.h" #include <nlist.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8780,7 +8786,7 @@ echo "checking "for sound support"" 1>&6 -echo "configure:8784: checking "for sound support"" >&5 +echo "configure:8790: checking "for sound support"" >&5 case "$with_sound" in native | both ) with_native_sound=yes;; nas | no ) with_native_sound=no;; @@ -8791,15 +8797,15 @@ if test -n "$native_sound_lib"; then ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6 -echo "configure:8795: checking for multimedia/audio_device.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8798 "configure" +echo "configure:8801: checking for multimedia/audio_device.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8804 "configure" #include "confdefs.h" #include <multimedia/audio_device.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8847,12 +8853,12 @@ if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:8851: checking for ALopenport in -laudio" >&5 +echo "configure:8857: checking for ALopenport in -laudio" >&5 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <<EOF -#line 8856 "configure" +#line 8862 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8863,7 +8869,7 @@ ALopenport() ; return 0; } EOF -if { (eval echo configure:8867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8894,12 +8900,12 @@ if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:8898: checking for AOpenAudio in -lAlib" >&5 +echo "configure:8904: checking for AOpenAudio in -lAlib" >&5 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'` xe_check_libs=" -lAlib " cat > conftest.$ac_ext <<EOF -#line 8903 "configure" +#line 8909 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8910,7 +8916,7 @@ AOpenAudio() ; return 0; } EOF -if { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8948,15 +8954,15 @@ for dir in "machine" "sys" "linux"; do ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6 -echo "configure:8952: checking for ${dir}/soundcard.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8955 "configure" +echo "configure:8958: checking for ${dir}/soundcard.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8961 "configure" #include "confdefs.h" #include <${dir}/soundcard.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9026,7 +9032,7 @@ fi libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi cat > conftest.$ac_ext <<EOF -#line 9030 "configure" +#line 9036 "configure" #include "confdefs.h" #include <audio/Xtutil.h> EOF @@ -9053,7 +9059,7 @@ if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:9057: checking for TTY-related features" >&5 +echo "configure:9063: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -9069,12 +9075,12 @@ if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:9073: checking for tgetent in -lncurses" >&5 +echo "configure:9079: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lncurses " cat > conftest.$ac_ext <<EOF -#line 9078 "configure" +#line 9084 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9085,7 +9091,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:9089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9118,15 +9124,15 @@ ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:9122: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9125 "configure" +echo "configure:9128: checking for ncurses/curses.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9131 "configure" #include "confdefs.h" #include <ncurses/curses.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9148,15 +9154,15 @@ ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:9152: checking for ncurses/term.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9155 "configure" +echo "configure:9158: checking for ncurses/term.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9161 "configure" #include "confdefs.h" #include <ncurses/term.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9186,15 +9192,15 @@ c_switch_site="$c_switch_site -I/usr/include/ncurses" ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:9190: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9193 "configure" +echo "configure:9196: checking for ncurses/curses.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9199 "configure" #include "confdefs.h" #include <ncurses/curses.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9229,12 +9235,12 @@ for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:9233: checking for tgetent in -l$lib" >&5 +echo "configure:9239: checking for tgetent in -l$lib" >&5 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -l$lib " cat > conftest.$ac_ext <<EOF -#line 9238 "configure" +#line 9244 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9245,7 +9251,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:9249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9276,12 +9282,12 @@ else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:9280: checking for tgetent in -lcurses" >&5 +echo "configure:9286: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lcurses " cat > conftest.$ac_ext <<EOF -#line 9285 "configure" +#line 9291 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9292,7 +9298,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:9296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9310,12 +9316,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:9314: checking for tgetent in -ltermcap" >&5 +echo "configure:9320: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -ltermcap " cat > conftest.$ac_ext <<EOF -#line 9319 "configure" +#line 9325 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9326,7 +9332,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:9330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9374,15 +9380,15 @@ test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gpm.h""... $ac_c" 1>&6 -echo "configure:9378: checking for gpm.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9381 "configure" +echo "configure:9384: checking for gpm.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9387 "configure" #include "confdefs.h" #include <gpm.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9405,12 +9411,12 @@ } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:9409: checking for Gpm_Open in -lgpm" >&5 +echo "configure:9415: checking for Gpm_Open in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgpm " cat > conftest.$ac_ext <<EOF -#line 9414 "configure" +#line 9420 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9421,7 +9427,7 @@ Gpm_Open() ; return 0; } EOF -if { (eval echo configure:9425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9470,17 +9476,17 @@ echo "checking for database support" 1>&6 -echo "configure:9474: checking for database support" >&5 +echo "configure:9480: checking for database support" >&5 if test "$with_database_gnudbm" != "no"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:9479: checking for dbm_open in -lgdbm" >&5 +echo "configure:9485: checking for dbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdbm " cat > conftest.$ac_ext <<EOF -#line 9484 "configure" +#line 9490 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9491,7 +9497,7 @@ dbm_open() ; return 0; } EOF -if { (eval echo configure:9495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9513,10 +9519,10 @@ if test "$with_database_gnudbm" != "yes"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:9517: checking for dbm_open" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9520 "configure" +echo "configure:9523: checking for dbm_open" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9526 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dbm_open(); below. */ @@ -9539,7 +9545,7 @@ ; return 0; } EOF -if { (eval echo configure:9543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -9575,10 +9581,10 @@ if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:9579: checking for dbm_open" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9582 "configure" +echo "configure:9585: checking for dbm_open" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9588 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dbm_open(); below. */ @@ -9601,7 +9607,7 @@ ; return 0; } EOF -if { (eval echo configure:9605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -9622,12 +9628,12 @@ if test "$need_libdbm" != "no"; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:9626: checking for dbm_open in -ldbm" >&5 +echo "configure:9632: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -ldbm " cat > conftest.$ac_ext <<EOF -#line 9631 "configure" +#line 9637 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9638,7 +9644,7 @@ dbm_open() ; return 0; } EOF -if { (eval echo configure:9642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9675,10 +9681,10 @@ if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:9679: checking for dbopen" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9682 "configure" +echo "configure:9685: checking for dbopen" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9688 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dbopen(); below. */ @@ -9701,7 +9707,7 @@ ; return 0; } EOF -if { (eval echo configure:9705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -9722,12 +9728,12 @@ if test "$need_libdb" != "no"; then echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:9726: checking for dbopen in -ldb" >&5 +echo "configure:9732: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` xe_check_libs=" -ldb " cat > conftest.$ac_ext <<EOF -#line 9731 "configure" +#line 9737 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9738,7 +9744,7 @@ dbopen() ; return 0; } EOF -if { (eval echo configure:9742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9762,7 +9768,7 @@ if test "$with_database_berkdb" = "yes"; then for path in "db/db.h" "db.h"; do cat > conftest.$ac_ext <<EOF -#line 9766 "configure" +#line 9772 "configure" #include "confdefs.h" #ifdef HAVE_INTTYPES_H #define __BIT_TYPES_DEFINED__ @@ -9780,7 +9786,7 @@ ; return 0; } EOF -if { (eval echo configure:9784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_path="$path"; break else @@ -9832,12 +9838,12 @@ if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:9836: checking for SOCKSinit in -lsocks" >&5 +echo "configure:9842: checking for SOCKSinit in -lsocks" >&5 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocks " cat > conftest.$ac_ext <<EOF -#line 9841 "configure" +#line 9847 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9848,7 +9854,7 @@ SOCKSinit() ; return 0; } EOF -if { (eval echo configure:9852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else
--- a/configure.in Mon Aug 13 10:05:01 2007 +0200 +++ b/configure.in Mon Aug 13 10:05:51 2007 +0200 @@ -2707,6 +2707,12 @@ test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-x.o) test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-x.o) test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui-x.o) +else + if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then + echo "Attempt to Build NAS sound without X" + echo "Please remove NAS configuration or build with X" + exit 1 + fi fi dnl ----------------------
--- a/info/dir Mon Aug 13 10:05:01 2007 +0200 +++ b/info/dir Mon Aug 13 10:05:51 2007 +0200 @@ -50,24 +50,14 @@ Local Packages: -* CC-MODE:: Mode for editing C, C++, and Objective-C code. * CL:: A Common Lisp compatibility package for Emacs-Lisp. * Custom:: Customization Library for Emacs -* Ediff:: A Visual Interface to Unix Diff and Patch Utilities. -* EFS:: Transparent remote file access via FTP * External-Widget:: Use XEmacs as a text widget inside of another program. * Forms:: A package for editing databases by filling in forms. -* HM--HTML-Mode:: HTML Editing Mode. -* Hyperbole:: A programmable information management and hypertext system. -* ILISP:: Multi-dialect inferior LISP interface. * Ispell:: Interactive spelling corrector. -* Mailcrypt:: Emacs interface to cryptographic functions for mail and news. * OO-Browser:: The Multi-Language Object-Oriented Browser. -* PCL-CVS:: An XEmacs-based front end to CVS. * PH:: Client interface to the CCSO white pages directory system -* PSGML:: A powerful mode for HTML and other SGML documents. -* PSGML-API:: PSGML, the API documentation. * Standards:: The GNU coding standards. * Supercite:: Lets you cite parts of messages you're replying to. * Term:: ANSI-compatible terminal emulator. @@ -75,16 +65,6 @@ to handle all types of character-display terminals. * Texinfo:: With one source file, make either a printed manual (through TeX) or an Info file (through texinfo). -* Viper:: A VI Plan for Emacs Rescue and a venomous VI PERil. * Vhdl-mode:: A major mode for editing VHDL files. * Widget:: An Emacs Lisp widget library -* tm-en:: Tools for Mime (English version) -* tm-mh-e-en:: Tools for Mime for MH-E (English version) -* gnus-mime-en:: - Tools for Mime for Gnus (English version) -* tm-vm-en:: Tools for Mime for VM -* tm-ja:: Tools for Mime (Japanese version) -* tm-mh-e-ja:: Tools for Mime for MH-E (Japanese version) -* gnus-mime-ja:: - Tools for Mime for Gnus (Japanese version) * Locals:
--- a/lisp/ChangeLog Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/ChangeLog Mon Aug 13 10:05:51 2007 +0200 @@ -1,3 +1,77 @@ +1997-11-12 Hrvoje Niksic <hniksic@srce.hr> + + * help.el (help-for-help): Use `make-help-screen'. + * help-macro.el: New file. + +1997-11-10 SL Baur <steve@altair.xemacs.org> + + * x-menubar.el (options-menu-saved-forms): + `current-language-environment' is a variable now. + + * packages/add-log.el (TopLevel): Require 'fortran only if it is + available. + + * modes/lazy-shot.el (lazy-shot-unstall): Add guard on removing + the timer because the timer may not have been installed first. + +1997-11-10 Hrvoje Niksic <hniksic@srce.hr> + + * prim/frame.el (default-deselect-frame-hook): Dehighlight the + currently highlighted extent. + +1997-11-09 Hrvoje Niksic <hniksic@srce.hr> + + * prim/help.el (describe-variable): Add proper spacing. + +1997-11-10 SL Baur <steve@altair.xemacs.org> + + * utils/browse-url.el (TopLevel): Guard against term not being in + the load path. + (browse-url-lynx-emacs): Attach guards against term not being in + the load path. + +1997-11-09 SL Baur <steve@altair.xemacs.org> + + * packages/autoinsert.el: Fix bottom of lisp file template. + +1997-11-09 Kyle Jones <kyle_jones@wonderworks.com> + + * gui.el: For gui-button-face, set + foreground/background colors only on X devices. + Previously they were set for all devices. + +1997-11-09 Hrvoje Niksic <hniksic@srce.hr> + + * prim/extents.el (extent-keymap): New function. + +1997-11-09 Kyle Jones <kyle_jones@wonderworks.com> + + * specifier.el: Define specifier tags for the + device types that do not have compiled in support. + This allows device type specific properties to be set + in specifiers even if the device type isn't supported + in the current binary. + +1997-11-07 Hrvoje Niksic <hniksic@srce.hr> + + * custom/wid-edit.el (widget-glyph-pointer-glyph): New variable. + (widget-glyph-insert-glyph): Use it. + +1997-11-09 SL Baur <steve@altair.xemacs.org> + + * files.el (find-file-noselect): Guard against dired not being + available. + +1997-11-09 Kyle Jones <kyle_jones@wonderworks.com> + + * gui.el: Set the reverse-p property on + gui-button-face so that it will likely look different + than the default face on ttys. + +1997-11-09 SL Baur <steve@altair.xemacs.org> + + * x-menubar.el (default-menubar): Strokes has been packaged. + 1997-11-08 SL Baur <steve@altair.xemacs.org> * prim/about.el (about-hackers): New entries.
--- a/lisp/emulators/crisp.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/emulators/crisp.el Mon Aug 13 10:05:51 2007 +0200 @@ -2,10 +2,28 @@ ;; Author: Gary D. Foster <Gary.Foster@corp.sun.com> ;; Created: 01 Mar 1996 -;; Version: 1.21 +;; Version: $Revision: 1.7 $ ;; Keywords: emulations brief crisp ;; X-Modified-by: -;; crisp.el,v +;; $Log: crisp.el,v $ +;; Revision 1.7 1997/11/12 07:09:59 steve +;; Patches to beta4 +;; +;; Revision 1.23 1997/11/11 19:47:02 gfoster +;; Merged changes suggested by Hrvoje Niksic +;; make crisp-mode-map a sparse keymap parented from current-global-map +;; don't copy the keymap in (crisp-mode-original-keymap) +;; declare last-last-command to shut up the byte-compiler +;; make (crisp-mode) honor ARG +;; +;; Revision 1.22 1997/11/11 19:37:44 gfoster +;; kp-add/minus now copy/kill the current line if there is no highlighted +;; region. These also honor the universal prefix argument conventions. +;; +;; Revision 1.21 1997/10/16 18:52:54 gfoster +;; Fixed bogus XEmacs/Lucid string-match checking +;; made modeline entry mouse2-able +;; ;; Revision 1.20 1997/08/22 18:49:11 gfoster ;; Added next-buffer/previous-buffer keybindings (bound to M-n/M-p) ;; Added crisp-unbury-buffer function @@ -69,11 +87,13 @@ ;; local variables -(defgroup emulations-crisp nil +(defgroup crisp nil "CRiSP emulator customizable settings." :group 'emulations) -(defvar crisp-mode-map (copy-keymap (current-global-map)) +(defvar crisp-mode-map (let ((map (make-sparse-keymap))) + (set-keymap-parent map (current-global-map)) + map) "Local keymap for CRiSP emulation mode. All the bindings are done here instead of globally to try and be nice to the world.") @@ -81,9 +101,9 @@ (defcustom crisp-mode-modeline-string " *CRiSP*" "*String to display in the modeline when CRiSP emulation mode is enabled." :type 'string - :group 'emulations-crisp) + :group 'crisp) -(defvar crisp-mode-original-keymap (copy-keymap (current-global-map)) +(defvar crisp-mode-original-keymap (current-global-map) "The original keymap before CRiSP emulation mode remaps anything. This keymap is restored when CRiSP emulation mode is disabled.") @@ -98,7 +118,7 @@ provides the usual M-x functionality on the F10 key. If this variable is non-nil, M-x will exit Emacs." :type 'boolean - :group 'emulations-crisp) + :group 'crisp) (defvar crisp-load-scroll-lock nil "Controls loading of the Scroll Lock in the CRiSP emulator. @@ -111,9 +131,12 @@ (defvar crisp-load-hook nil "Hooks to run after loading the CRiSP emulator package.") -(defconst crisp-version "crisp.el release 1.1/1.21" +(defconst crisp-version "crisp.el release 1.1/$Revision: 1.7 $" "The release number and RCS version for the CRiSP emulator.") +;; Silence the byte-compiler. +(defvar last-last-command) + ;; and now the keymap defines (define-key crisp-mode-map [(f1)] 'other-window) @@ -147,8 +170,8 @@ (define-key crisp-mode-map [(meta f10)] 'compile) (define-key crisp-mode-map [(SunF37)] 'kill-buffer) -(define-key crisp-mode-map [(kp-add)] 'x-copy-primary-selection) -(define-key crisp-mode-map [(kp-subtract)] 'x-kill-primary-selection) +(define-key crisp-mode-map [(kp-add)] 'crisp-copy-line) +(define-key crisp-mode-map [(kp-subtract)] 'crisp-kill-line) (define-key crisp-mode-map [(insert)] 'x-yank-clipboard-selection) (define-key crisp-mode-map [(f16)] 'x-copy-primary-selection) ; copy on Sun5 kbd (define-key crisp-mode-map [(f20)] 'x-kill-primary-selection) ; cut on Sun5 kbd @@ -187,6 +210,34 @@ (define-key crisp-mode-map [(home)] 'crisp-home) (define-key crisp-mode-map [(end)] 'crisp-end) +(defun crisp-mark-line (arg) + "Put mark at the end of line. Arg works as in `end-of-line'." + (interactive "p") + (mark-something 'crisp-mark-line 'end-of-line arg)) + +(defun crisp-kill-line (arg) + "Mark and kill line(s). +Marks the entire current line (honoring prefix arguments), copies the +region to the kill ring and clipboard, and then deletes it." + (interactive "*p") + (if zmacs-region-active-p + (x-kill-primary-selection) + (beginning-of-line) + (crisp-mark-line arg) + (x-kill-primary-selection))) + +(defun crisp-copy-line (arg) + "Mark and copy entire current line (honoring prefix arguments), copies the +region to the kill ring and clipboard, and then deactivates the region." + (interactive "*p") + (let ((curpos (point))) + (if zmacs-region-active-p + (x-copy-primary-selection) + (beginning-of-line) + (crisp-mark-line arg) + (x-copy-primary-selection) + (goto-char curpos)))) + (defun crisp-home () "\"Home\" the point, the way CRiSP would do it. The first use moves point to beginning of the line. Second @@ -235,10 +286,13 @@ ;; Now enable the mode -(defun crisp-mode () - "Toggle CRiSP emulation minor mode." - (interactive nil) - (setq crisp-mode-enabled (not crisp-mode-enabled)) +(defun crisp-mode (&optional arg) + "Toggle CRiSP emulation minor mode. +With ARG, turn CRiSP mode on if ARG is positive, off otherwise." + (interactive "P") + (setq crisp-mode-enabled (if (null arg) + (not crisp-mode-enabled) + (> (prefix-numeric-value arg) 0))) (cond ((eq crisp-mode-enabled 't) (use-global-map crisp-mode-map) @@ -250,7 +304,7 @@ ((eq crisp-mode-enabled 'nil) (use-global-map crisp-mode-original-keymap)))) -(if (string-match "\\(XEmacs\\|Lucid\\)" emacs-version) +(if (fboundp 'add-minor-mode) (add-minor-mode 'crisp-mode-enabled 'crisp-mode-modeline-string nil nil 'crisp-mode) (or (assq 'crisp-mode-enabled minor-mode-alist)
--- a/lisp/emulators/custom-load.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/emulators/custom-load.el Mon Aug 13 10:05:51 2007 +0200 @@ -3,7 +3,7 @@ ;;; Code: +(custom-add-loads 'crisp '("crisp")) (custom-add-loads 'emulations '("crisp")) -(custom-add-loads 'emulations-crisp '("crisp")) ;;; custom-load.el ends here
--- a/lisp/extents.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/extents.el Mon Aug 13 10:05:51 2007 +0200 @@ -95,4 +95,8 @@ "Set EXTENT's `keymap' property to KEYMAP." (set-extent-property extent 'keymap keymap)) +(defun extent-keymap (extent) + "Return EXTENT's `keymap' property." + (extent-property extent 'keymap)) + ;;; extents.el ends here
--- a/lisp/files.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/files.el Mon Aug 13 10:05:51 2007 +0200 @@ -964,7 +964,7 @@ problems will be suppressed." (setq filename (abbreviate-file-name (expand-file-name filename))) (if (file-directory-p filename) - (if find-file-run-dired + (if (and (fboundp 'dired-noselect) find-file-run-dired) (dired-noselect (if find-file-use-truenames (abbreviate-file-name (file-truename filename)) filename))
--- a/lisp/frame.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/frame.el Mon Aug 13 10:05:51 2007 +0200 @@ -813,7 +813,8 @@ (defun default-deselect-frame-hook () "Implements the `auto-lower-frame' variable. For use as the value of `deselect-frame-hook'." - (if auto-lower-frame (lower-frame (selected-frame)))) + (if auto-lower-frame (lower-frame (selected-frame))) + (highlight-extent nil nil)) (or select-frame-hook (add-hook 'select-frame-hook 'default-select-frame-hook))
--- a/lisp/gui.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/gui.el Mon Aug 13 10:05:51 2007 +0200 @@ -89,8 +89,9 @@ (make-face 'gui-button-face "Face used for gui buttons") (if (not (face-differs-from-default-p 'gui-button-face)) (progn - (set-face-background 'gui-button-face "grey75") - (set-face-foreground 'gui-button-face "black"))) + (set-face-reverse-p 'gui-button-face t) + (set-face-background 'gui-button-face "grey75" nil '(x color)) + (set-face-foreground 'gui-button-face "black" nil '(x color)))) (defun make-gui-button (string &optional action user-data) "Make a GUI button whose label is STRING and whose action is ACTION.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/help-macro.el Mon Aug 13 10:05:51 2007 +0200 @@ -0,0 +1,172 @@ +;;; help-macro.el --- Makes command line help such as help-for-help + +;; Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. + +;; Author: Lynn Slater <lrs@indetech.com> +;; Maintainer: FSF +;; Created: : Mon Oct 1 11:42:39 1990 +;; Adapted-By: ESR + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;;; Synched up with: FSF 20.2. + +;; This file supplies the macro make-help-screen which constructs +;; single character dispatching with browsable help such as that provided +;; by help-for-help. This can be used to make many modes easier to use; for +;; example, the Gnu Emacs Empire Tool uses this for every "nested" mode map +;; called from the main mode map. + +;; The name of this package was changed from help-screen.el to +;; help-macro.el in order to fit in a 14-character limit. + +;;-> *********************** Example of use ********************************* + +;;->(make-help-screen help-for-empire-redistribute-map +;;-> "c:civ m:mil p:population f:food ?" +;;-> "You have discovered the GEET redistribution commands +;;-> From here, you can use the following options: +;;-> +;;->c Redistribute civs from overfull sectors into connected underfull ones +;;-> The functions typically named by empire-ideal-civ-fcn control +;;-> based in part on empire-sector-civ-threshold +;;->m Redistribute military using levels given by empire-ideal-mil-fcn +;;->p Redistribute excess population to highways for max pop growth +;;-> Excess is any sector so full babies will not be born. +;;->f Even out food on highways to highway min and leave levels +;;-> This is good to pump max food to all warehouses/dist pts +;;-> +;;-> +;;->Use \\[help-for-empire-redistribute-map] for help on redistribution. +;;->Use \\[help-for-empire-extract-map] for help on data extraction. +;;->Please use \\[describe-key] to find out more about any of the other keys." +;;-> empire-shell-redistribute-map) + +;;-> (define-key c-mp "\C-h" 'help-for-empire-redistribute-map) +;;-> (define-key c-mp help-character 'help-for-empire-redistribute-map) + +;;; Code: + +(provide 'help-macro) + +;;;###autoload +(defcustom three-step-help t + "*Non-nil means give more info about Help command in three steps. +The three steps are simple prompt, prompt with all options, +and window listing and describing the options. +A value of nil means skip the middle step, so that +\\[help-command] \\[help-command] gives the window that lists the options." + :type 'boolean + :group 'help-appearance) + +(defun help-read-key (prompt) + (let (events) + (while (not (key-press-event-p + (aref (setq events (read-key-sequence prompt)) 0))) + ;; Mouse clicks are not part of the help feature, so reexecute + ;; them in the standard environment. + (mapc 'dispatch-event events)) + (let ((key (nconc (event-modifiers (aref events 0)) + (list (event-key (aref events 0)))))) + ;; Make the HELP key translate to C-h. + (when (lookup-key function-key-map key) + (setq key (lookup-key function-key-map key))) + (if (eq (length key) 1) + (car key) + key)))) + +(defmacro make-help-screen (fname help-line help-text helped-map) + "Construct help-menu function name FNAME. +When invoked, FNAME shows HELP-LINE and reads a command using HELPED-MAP. +If the command is the help character, FNAME displays HELP-TEXT +and continues trying to read a command using HELPED-MAP. +When FNAME finally does get a command, it executes that command +and then returns." + `(defun ,fname () + ,help-text + (interactive) + (let ((line-prompt + (substitute-command-keys ,help-line))) + (when three-step-help + (message "%s" line-prompt)) + (let* ((help-screen (documentation (quote ,fname))) + ;; We bind overriding-local-map for very small + ;; sections, *excluding* where we switch buffers + ;; and where we execute the chosen help command. + (local-map (make-sparse-keymap)) + (minor-mode-map-alist nil) + (prev-frame (selected-frame)) + config new-frame key) + (unwind-protect + (progn + (set-keymap-parents local-map (list ,helped-map)) + (cond (three-step-help + (let* ((overriding-local-map local-map)) + (setq key (help-read-key nil)))) + (t + (setq key ??))) + (when (or (equal key ??) + (equal key (list help-char))) + (setq config (current-window-configuration)) + (switch-to-buffer-other-window "*Help*") + (and (not (eq (window-frame (selected-window)) + prev-frame)) + (setq new-frame (window-frame (selected-window)) + config nil)) + (setq buffer-read-only nil) + (erase-buffer) + (insert help-screen) + (help-mode) + (goto-char (point-min)) + (while (member key `((,help-char) ?? (control v) space ?\177 + delete backspace (meta v))) + (ignore-errors + (cond ((member key '((control v) space)) + (scroll-up)) + ((member key '(?\177 delete (meta v) backspace)) + (scroll-down)))) + (let ((cursor-in-echo-area t) + (overriding-local-map local-map)) + (setq key (help-read-key + (format "Type one of the options listed%s: " + (if (pos-visible-in-window-p + (point-max)) + "" " or Space to scroll"))))))) + ;; We don't need the prompt any more. + (message nil) + (let ((defn (lookup-key local-map key))) + (cond (defn + (when config + (set-window-configuration config) + (setq config nil)) + (when new-frame + (iconify-frame new-frame) + (setq new-frame nil)) + (call-interactively defn)) + (t + (ding))))) + (and (get-buffer "*Help*") + (bury-buffer "*Help*")) + (and new-frame (iconify-frame new-frame)) + (and config + (set-window-configuration config))))))) + +;;; help-macro.el +
--- a/lisp/help.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/help.el Mon Aug 13 10:05:51 2007 +0200 @@ -36,10 +36,9 @@ ;;; Code: -;#### FSFmacs ;; Get the macro make-help-screen when this is compiled, ;; or run interpreted, but not when the compiled code is loaded. -;(eval-when-compile (require 'help-macro)) +(eval-when-compile (require 'help-macro)) (defgroup help-appearance nil "Appearance of help buffers" @@ -684,9 +683,10 @@ (setq count (1+ count)))))))) (define-function 'help 'help-for-help) -;; #### FSF calls `make-help-screen' here. We need to port `help-macro.el'. -(defun help-for-help () - "You have typed \\[help-for-help], the help character. Type a Help option: + +(make-help-screen help-for-help + "A B C F I K L M N P S T V W C-c C-d C-f C-i C-k C-n C-w; ? for more help:" + "Type a Help option: \(Use SPC or DEL to scroll through this text. Type \\<help-map>\\[help-quit] to exit the Help command.) \\[hyper-apropos] Type a substring; it shows a hypertext list of @@ -697,6 +697,7 @@ \\[describe-bindings] Table of all key bindings. \\[describe-key-briefly] Type a command key sequence; it displays the function name that sequence runs. +\\[customize] Customize Emacs options. \\[Info-goto-emacs-command-node] Type a function name; it displays the Info node for that command. \\[describe-function] Type a function name; it shows its documentation. \\[Info-elisp-ref] Type a function name; it jumps to the full documentation @@ -719,55 +720,8 @@ \\[where-is] Type a command name; it displays which keystrokes invoke that command. \\[describe-distribution] XEmacs ordering information. \\[describe-no-warranty] Information on absence of warranty for XEmacs. -\\[describe-copying] XEmacs copying permission (General Public License)." - (interactive) - (let ((help-key (copy-event last-command-event)) - event char) - (message (gettext "A B C F I K L M N P S T V W C-c C-d C-n C-w. Type %s again for more help: ") - ;; arrgh, no room for "C-i C-k C-f" !! - (single-key-description help-key)) - (setq event (next-command-event) - char (event-to-character event)) - (if (or (equal event help-key) - (eq char ??) - (eq 'help-command (key-binding event))) - (save-window-excursion - (switch-to-buffer "*Help*") - ;; #### I18N3 should mark buffer as output-translating - (delete-other-windows) - (let ((buffer-read-only nil)) - (erase-buffer) - (insert (documentation 'help-for-help))) - (goto-char (point-min)) - (while (or (equal event help-key) - (eq char ??) - (eq 'help-command (key-binding event)) - (eq char ?\ ) - (eq 'scroll-up (key-binding event)) - (eq char ?\177) - (and (not (eq char ?b)) - (eq 'scroll-down (key-binding event)))) - (if (or (eq char ?\ ) - (eq 'scroll-up (key-binding event))) - (scroll-up)) - (if (or (eq char ?\177) - (and (not (eq char ?b)) - (eq 'scroll-down (key-binding event)))) - (scroll-down)) - ;; write this way for I18N3 snarfing - (if (pos-visible-in-window-p (point-max)) - (message "A B C F I K L M N P S T V W C-c C-d C-n C-w C-i C-k C-f: ") - (message "A B C F I K L M N P S T V W C-c C-d C-n C-w C-i C-k C-f or Space to scroll: ")) - (let ((cursor-in-echo-area t)) - (setq event (next-command-event event) - char (or (event-to-character event) event)))))) - (let ((defn (or (lookup-key help-map (vector event)) - (and (numberp char) - (lookup-key help-map (make-string 1 (downcase char))))))) - (message nil) - (if defn - (call-interactively defn) - (ding))))) +\\[describe-copying] XEmacs copying permission (General Public License)." + help-map) (defun function-called-at-point () "Return the function which is called by the list containing point. @@ -1146,10 +1100,10 @@ ;; I18N3 Need gettext due to concat (setq aliases (concat aliases - (format "\n which is an alias for `%s'," + (format "\n which is an alias for `%s', " (symbol-name newvar)))) (setq aliases - (format "an alias for `%s'," + (format "an alias for `%s', " (symbol-name newvar)))) (setq variable newvar))) (if aliases
--- a/lisp/modes/auto-autoloads.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/modes/auto-autoloads.el Mon Aug 13 10:05:51 2007 +0200 @@ -1,109 +1,6 @@ ;;; DO NOT MODIFY THIS FILE (if (featurep 'modes-autoloads) (error "Already loaded")) -;;;### (autoloads nil "abbrev" "modes/abbrev.el") - -;;;*** - -;;;### (autoloads (ada-make-filename-from-adaname ada-mode) "ada-mode" "modes/ada-mode.el") - -(autoload 'ada-mode "ada-mode" "\ -Ada mode is the major mode for editing Ada code. - -Bindings are as follows: (Note: 'LFD' is control-j.) - - Indent line '\\[ada-tab]' - Indent line, insert newline and indent the new line. '\\[newline-and-indent]' - - Re-format the parameter-list point is in '\\[ada-format-paramlist]' - Indent all lines in region '\\[ada-indent-region]' - Call external pretty printer program '\\[ada-call-pretty-printer]' - - Adjust case of identifiers and keywords in region '\\[ada-adjust-case-region]' - Adjust case of identifiers and keywords in buffer '\\[ada-adjust-case-buffer]' - - Call EXTERNAL pretty printer (if you have one) '\\[ada-call-pretty-printer]' - - Fill comment paragraph '\\[ada-fill-comment-paragraph]' - Fill comment paragraph and justify each line '\\[ada-fill-comment-paragraph-justify]' - Fill comment paragraph, justify and append postfix '\\[ada-fill-comment-paragraph-postfix]' - - Next func/proc/task '\\[ada-next-procedure]' Previous func/proc/task '\\[ada-previous-procedure]' - Next package '\\[ada-next-package]' Previous package '\\[ada-previous-package]' - - Goto matching start of current 'end ...;' '\\[ada-move-to-start]' - Goto end of current block '\\[ada-move-to-end]' - -Comments are handled using standard GNU Emacs conventions, including: - Start a comment '\\[indent-for-comment]' - Comment region '\\[comment-region]' - Uncomment region '\\[ada-uncomment-region]' - Continue comment on next line '\\[indent-new-comment-line]' - -If you use imenu.el: - Display index-menu of functions & procedures '\\[imenu]' - -If you use find-file.el: - Switch to other file (Body <-> Spec) '\\[ff-find-other-file]' - or '\\[ff-mouse-find-other-file] - Switch to other file in other window '\\[ada-ff-other-window]' - or '\\[ff-mouse-find-other-file-other-window] - If you use this function in a spec and no body is available, it gets created - with body stubs. - -If you use ada-xref.el: - Goto declaration: '\\[ada-point-and-xref]' on the identifier - or '\\[ada-goto-declaration]' with point on the identifier - Complete identifier: '\\[ada-complete-identifier]' - Execute Gnatf: '\\[ada-gnatf-current]'" t nil) - -(autoload 'ada-make-filename-from-adaname "ada-mode" "\ -Determine the filename of a package/procedure from its own Ada name." t nil) - -;;;*** - -;;;### (autoloads (archive-mode) "arc-mode" "modes/arc-mode.el") - -(autoload 'archive-mode "arc-mode" "\ -Major mode for viewing an archive file in a dired-like way. -You can move around using the usual cursor motion commands. -Letters no longer insert themselves. -Type `e' to pull a file out of the archive and into its own buffer; -or click mouse-2 on the file's line in the archive mode buffer. - -If you edit a sub-file of this archive (as with the `e' command) and -save it, the contents of that buffer will be saved back into the -archive. - -\\{archive-mode-map}" nil nil) - -;;;*** - -;;;### (autoloads (asm-mode) "asm-mode" "modes/asm-mode.el") - -(autoload 'asm-mode "asm-mode" "\ -Major mode for editing typical assembler code. -Features a private abbrev table and the following bindings: - -\\[asm-colon] outdent a preceding label, tab to next tab stop. -\\[tab-to-tab-stop] tab to next tab stop. -\\[asm-newline] newline, then tab to next tab stop. -\\[asm-comment] smart placement of assembler comments. - -The character used for making comments is set by the variable -`asm-comment-char' (which defaults to `?;'). - -Alternatively, you may set this variable in `asm-mode-set-comment-hook', -which is called near the beginning of mode initialization. - -Turning on Asm mode runs the hook `asm-mode-hook' at the end of initialization. - -Special commands: -\\{asm-mode-map} -" t nil) - -;;;*** - ;;;### (autoloads (autoconf-mode) "autoconf-mode" "modes/autoconf-mode.el") (autoload 'autoconf-mode "autoconf-mode" "\ @@ -469,146 +366,6 @@ ;;;*** -;;;### (autoloads (f90-mode) "f90" "modes/f90.el") - -(autoload 'f90-mode "f90" "\ -Major mode for editing Fortran 90 code in free format. - -\\[f90-indent-new-line] corrects current indentation and creates new indented line. -\\[f90-indent-line] indents the current line correctly. -\\[f90-indent-subprogram] indents the current subprogram. - -Type `? or `\\[help-command] to display a list of built-in abbrevs for F90 keywords. - -Key definitions: -\\{f90-mode-map} - -Variables controlling indentation style and extra features: - - f90-do-indent - Extra indentation within do blocks. (default 3) - f90-if-indent - Extra indentation within if/select case/where/forall blocks. (default 3) - f90-type-indent - Extra indentation within type/interface/block-data blocks. (default 3) - f90-program-indent - Extra indentation within program/module/subroutine/function blocks. - (default 2) - f90-continuation-indent - Extra indentation applied to continuation lines. (default 5) - f90-comment-region - String inserted by \\[f90-comment-region] at start of each line in - region. (default \"!!!$\") - f90-indented-comment-re - Regexp determining the type of comment to be intended like code. - (default \"!\") - f90-directive-comment-re - Regexp of comment-like directive like \"!HPF\\\\$\", not to be indented. - (default \"!hpf\\\\$\") - f90-break-delimiters - Regexp holding list of delimiters at which lines may be broken. - (default \"[-+*/><=,% \\t]\") - f90-break-before-delimiters - Non-nil causes `f90-do-auto-fill' to break lines before delimiters. - (default t) - f90-beginning-ampersand - Automatic insertion of & at beginning of continuation lines. (default t) - f90-smart-end - From an END statement, check and fill the end using matching block start. - Allowed values are 'blink, 'no-blink, and nil, which determine - whether to blink the matching beginning.) (default 'blink) - f90-auto-keyword-case - Automatic change of case of keywords. (default nil) - The possibilities are 'downcase-word, 'upcase-word, 'capitalize-word. - f90-leave-line-no - Do not left-justify line numbers. (default nil) - f90-startup-message - Set to nil to inhibit message first time F90 mode is used. (default t) - f90-keywords-re - List of keywords used for highlighting/upcase-keywords etc. - -Turning on F90 mode calls the value of the variable `f90-mode-hook' -with no args, if that value is non-nil." t nil) - -;;;*** - -;;;### (autoloads (fortran-mode) "fortran" "modes/fortran.el") - -(defcustom fortran-tab-mode-default nil "*Default tabbing/carriage control style for empty files in Fortran mode.\nA value of t specifies tab-digit style of continuation control.\nA value of nil specifies that continuation lines are marked\nwith a character in column 6." :type 'boolean :group 'fortran-indent) - -(autoload 'fortran-mode "fortran" "\ -Major mode for editing Fortran code. -\\[fortran-indent-line] indents the current Fortran line correctly. -DO statements must not share a common CONTINUE. - -Type ;? or ;\\[help-command] to display a list of built-in abbrevs for Fortran keywords. - -Key definitions: -\\{fortran-mode-map} - -Variables controlling indentation style and extra features: - - comment-start - Normally nil in Fortran mode. If you want to use comments - starting with `!', set this to the string \"!\". - fortran-do-indent - Extra indentation within do blocks. (default 3) - fortran-if-indent - Extra indentation within if blocks. (default 3) - fortran-structure-indent - Extra indentation within structure, union, map and interface blocks. - (default 3) - fortran-continuation-indent - Extra indentation applied to continuation statements. (default 5) - fortran-comment-line-extra-indent - Amount of extra indentation for text within full-line comments. (default 0) - fortran-comment-indent-style - nil means don't change indentation of text in full-line comments, - fixed means indent that text at `fortran-comment-line-extra-indent' beyond - the value of `fortran-minimum-statement-indent-fixed' (for fixed - format continuation style) or `fortran-minimum-statement-indent-tab' - (for TAB format continuation style). - relative means indent at `fortran-comment-line-extra-indent' beyond the - indentation for a line of code. - (default 'fixed) - fortran-comment-indent-char - Single-character string to be inserted instead of space for - full-line comment indentation. (default \" \") - fortran-minimum-statement-indent-fixed - Minimum indentation for Fortran statements in fixed format mode. (def.6) - fortran-minimum-statement-indent-tab - Minimum indentation for Fortran statements in TAB format mode. (default 9) - fortran-line-number-indent - Maximum indentation for line numbers. A line number will get - less than this much indentation if necessary to avoid reaching - column 5. (default 1) - fortran-check-all-num-for-matching-do - Non-nil causes all numbered lines to be treated as possible \"continue\" - statements. (default nil) - fortran-blink-matching-if - Non-nil causes \\[fortran-indent-line] on an ENDIF statement to blink on - matching IF. Also, from an ENDDO statement, blink on matching DO [WHILE] - statement. (default nil) - fortran-continuation-string - Single-character string to be inserted in column 5 of a continuation - line. (default \"$\") - fortran-comment-region - String inserted by \\[fortran-comment-region] at start of each line in - region. (default \"c$$$\") - fortran-electric-line-number - Non-nil causes line number digits to be moved to the correct column - as typed. (default t) - fortran-break-before-delimiters - Non-nil causes `fortran-fill' breaks lines before delimiters. - (default t) - fortran-startup-message - Set to nil to inhibit message first time Fortran mode is used. - -Turning on Fortran mode calls the value of the variable `fortran-mode-hook' -with no args, if that value is non-nil." t nil) - -;;;*** - ;;;### (autoloads (hide-ifdef-mode) "hideif" "modes/hideif.el") (add-minor-mode 'hide-ifdef-mode " Ifdef" 'hide-ifdef-mode-map) @@ -740,120 +497,6 @@ ;;;*** -;;;### (autoloads (ksh-mode) "ksh-mode" "modes/ksh-mode.el") - -(autoload 'ksh-mode "ksh-mode" "\ -ksh-mode $Revision: 1.13 $ - Major mode for editing (Bourne, Korn or Bourne again) -shell scripts. -Special key bindings and commands: -\\{ksh-mode-map} -Variables controlling indentation style: -ksh-indent - Indentation of ksh statements with respect to containing block. - Default value is 2. -ksh-case-indent - Additional indentation for statements under case items. - Default value is nil which will align the statements one position - past the \")\" of the pattern. -ksh-case-item-offset - Additional indentation for case items within a case statement. - Default value is 2. -ksh-group-offset - Additional indentation for keywords \"do\" and \"then\". - Default value is -2. -ksh-brace-offset - Additional indentation of \"{\" under functions or brace groupings. - Default value is 0. -ksh-multiline-offset - Additional indentation of line that is preceded of a line ending with a - \\ to make it continue on next line. -ksh-tab-always-indent - Controls the operation of the TAB key. If t (the default), always - reindent the current line. If nil, indent the current line only if - point is at the left margin or in the line's indentation; otherwise - insert a tab. -ksh-match-and-tell - If non-nil echo in the minibuffer the matching compound command - for the \"done\", \"}\", \"fi\", or \"esac\". Default value is t. - -ksh-align-to-keyword - Controls whether nested constructs align from the keyword or - the current indentation. If non-nil, indentation will be relative to - the column the keyword starts. If nil, indentation will be relative to - the current indentation of the line the keyword is on. - The default value is non-nil. - -ksh-comment-regexp - Regular expression used to recognize comments. Customize to support - ksh-like languages. Default value is \"\\s *#\". - -Style Guide. - By setting - (setq ksh-indent default-tab-width) - (setq ksh-group-offset 0) - - The following style is obtained: - - if [ -z $foo ] - then - bar # <-- ksh-group-offset is additive to ksh-indent - foo - fi - - By setting - (setq ksh-indent default-tab-width) - (setq ksh-group-offset (- 0 ksh-indent)) - - The following style is obtained: - - if [ -z $foo ] - then - bar - foo - fi - - By setting - (setq ksh-case-item-offset 1) - (setq ksh-case-indent nil) - - The following style is obtained: - - case x in * - foo) bar # <-- ksh-case-item-offset - baz;; # <-- ksh-case-indent aligns with \")\" - foobar) foo - bar;; - esac - - By setting - (setq ksh-case-item-offset 1) - (setq ksh-case-indent 6) - - The following style is obtained: - - case x in * - foo) bar # <-- ksh-case-item-offset - baz;; # <-- ksh-case-indent - foobar) foo - bar;; - esac - - -Installation: - - (setq ksh-mode-hook - (function (lambda () - (font-lock-mode 1) ;; font-lock the buffer - (setq ksh-indent 8) - (setq ksh-group-offset -8) - (setq ksh-brace-offset -8) - (setq ksh-tab-always-indent t) - (setq ksh-match-and-tell t) - (setq ksh-align-to-keyword t) ;; Turn on keyword alignment - )))" t nil) - -;;;*** - ;;;### (autoloads (turn-on-lazy-shot lazy-shot-mode) "lazy-shot" "modes/lazy-shot.el") (autoload 'lazy-shot-mode "lazy-shot" "\ @@ -1617,186 +1260,6 @@ ;;;*** -;;;### (autoloads (sh-mode) "sh-script" "modes/sh-script.el") - -(put 'sh-mode 'mode-class 'special) - -(autoload 'sh-mode "sh-script" "\ -Major mode for editing shell scripts. -This mode works for many shells, since they all have roughly the same syntax, -as far as commands, arguments, variables, pipes, comments etc. are concerned. -Unless the file's magic number indicates the shell, your usual shell is -assumed. Since filenames rarely give a clue, they are not further analyzed. - -This mode adapts to the variations between shells (see `sh-set-shell') by -means of an inheritance based feature lookup (see `sh-feature'). This -mechanism applies to all variables (including skeletons) that pertain to -shell-specific features. - -The default style of this mode is that of Rosenblatt's Korn shell book. -The syntax of the statements varies with the shell being used. The -following commands are available, based on the current shell's syntax: - -\\[sh-case] case statement -\\[sh-for] for loop -\\[sh-function] function definition -\\[sh-if] if statement -\\[sh-indexed-loop] indexed loop from 1 to n -\\[sh-while-getopts] while getopts loop -\\[sh-repeat] repeat loop -\\[sh-select] select loop -\\[sh-until] until loop -\\[sh-while] while loop - -\\[backward-delete-char-untabify] Delete backward one position, even if it was a tab. -\\[sh-newline-and-indent] Delete unquoted space and indent new line same as this one. -\\[sh-end-of-command] Go to end of successive commands. -\\[sh-beginning-of-command] Go to beginning of successive commands. -\\[sh-set-shell] Set this buffer's shell, and maybe its magic number. -\\[sh-execute-region] Have optional header and region be executed in a subshell. - -\\[sh-maybe-here-document] Without prefix, following an unquoted < inserts here document. -{, (, [, ', \", ` - Unless quoted with \\, insert the pairs {}, (), [], or '', \"\", ``. - -If you generally program a shell different from your login shell you can -set `sh-shell-file' accordingly. If your shell's file name doesn't correctly -indicate what shell it is use `sh-alias-alist' to translate. - -If your shell gives error messages with line numbers, you can use \\[executable-interpret] -with your script for an edit-interpret-debug cycle." t nil) - -(defalias 'shell-script-mode 'sh-mode) - -;;;*** - -;;;### (autoloads (strokes-compose-complex-stroke strokes-decode-buffer strokes-mode strokes-list-strokes strokes-load-user-strokes strokes-help strokes-describe-stroke strokes-do-complex-stroke strokes-do-stroke strokes-read-stroke strokes-global-set-stroke) "strokes" "modes/strokes.el") - -(defcustom strokes-mode nil "Non-nil when `strokes' is globally enabled." :type 'boolean :set (lambda (symbol value) (strokes-mode (or value 0))) :initialize 'custom-initialize-default :require 'strokes :group 'strokes) - -(autoload 'strokes-global-set-stroke "strokes" "\ -Interactively give STROKE the global binding as COMMAND. -Operated just like `global-set-key', except for strokes. -COMMAND is a symbol naming an interactively-callable function. STROKE -is a list of sampled positions on the stroke grid as described in the -documentation for the `strokes-define-stroke' function." t nil) - -(defalias 'global-set-stroke 'strokes-global-set-stroke) - -(autoload 'strokes-read-stroke "strokes" "\ -Read a simple stroke (interactively) and return the stroke. -Optional PROMPT in minibuffer displays before and during stroke reading. -This function will display the stroke interactively as it is being -entered in the strokes buffer if the variable -`strokes-use-strokes-buffer' is non-nil. -Optional EVENT is acceptable as the starting event of the stroke" nil nil) - -(autoload 'strokes-do-stroke "strokes" "\ -Read a simple stroke from the user and then exectute its command. -This must be bound to a mouse event." t nil) - -(autoload 'strokes-do-complex-stroke "strokes" "\ -Read a complex stroke from the user and then exectute its command. -This must be bound to a mouse event." t nil) - -(autoload 'strokes-describe-stroke "strokes" "\ -Displays the command which STROKE maps to, reading STROKE interactively." t nil) - -(defalias 'describe-stroke 'strokes-describe-stroke) - -(autoload 'strokes-help "strokes" "\ -Get instructional help on using the the `strokes' package." t nil) - -(autoload 'strokes-load-user-strokes "strokes" "\ -Load user-defined strokes from file named by `strokes-file'." t nil) - -(defalias 'load-user-strokes 'strokes-load-user-strokes) - -(autoload 'strokes-list-strokes "strokes" "\ -Pop up a buffer containing an alphabetical listing of strokes in STROKES-MAP. -With CHRONOLOGICAL prefix arg (\\[universal-argument]) list strokes -chronologically by command name. -If STROKES-MAP is not given, `strokes-global-map' will be used instead." t nil) - -(defalias 'list-strokes 'strokes-list-strokes) - -(autoload 'strokes-mode "strokes" "\ -Toggle strokes being enabled. -With ARG, turn strokes on if and only if ARG is positive or true. -Note that `strokes-mode' is a global mode. Think of it as a minor -mode in all buffers when activated. -By default, strokes are invoked with mouse button-2. You can define -new strokes with - -> M-x global-set-stroke - -To use strokes for pictographic editing, such as Chinese/Japanese, use -Sh-button-2, which draws strokes and inserts them. Encode/decode your -strokes with - -> M-x strokes-encode-buffer -> M-x strokes-decode-buffer" t nil) - -(autoload 'strokes-decode-buffer "strokes" "\ -Decode stroke strings in BUFFER and display their corresponding glyphs. -Optional BUFFER defaults to the current buffer. -Optional FORCE non-nil will ignore the buffer's read-only status." t nil) - -(autoload 'strokes-compose-complex-stroke "strokes" "\ -Read a complex stroke and insert its glyph into the current buffer." t nil) - -;;;*** - -;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl" "modes/tcl.el") - -(autoload 'tcl-mode "tcl" "\ -Major mode for editing Tcl code. -Expression and list commands understand all Tcl brackets. -Tab indents for Tcl code. -Paragraphs are separated by blank lines only. -Delete converts tabs to spaces as it moves back. - -Variables controlling indentation style: - tcl-indent-level - Indentation of Tcl statements within surrounding block. - tcl-continued-indent-level - Indentation of continuation line relative to first line of command. - -Variables controlling user interaction with mode (see variable -documentation for details): - tcl-tab-always-indent - Controls action of TAB key. - tcl-auto-newline - Non-nil means automatically newline before and after braces, brackets, - and semicolons inserted in Tcl code. - tcl-electric-hash-style - Controls action of `#' key. - tcl-use-hairy-comment-detector - If t, use more complicated, but slower, comment detector. - This variable is only used in GNU Emacs 19. - tcl-use-smart-word-finder - If not nil, use a smarter, Tcl-specific way to find the current - word when looking up help on a Tcl command. - -Turning on Tcl mode calls the value of the variable `tcl-mode-hook' -with no args, if that value is non-nil. Read the documentation for -`tcl-mode-hook' to see what kinds of interesting hook functions -already exist. - -Commands: -\\{tcl-mode-map}" t nil) - -(autoload 'inferior-tcl "tcl" "\ -Run inferior Tcl process. -Prefix arg means enter program name interactively. -See documentation for function `inferior-tcl-mode' for more information." t nil) - -(autoload 'tcl-help-on-word "tcl" "\ -Get help on Tcl command. Default is word at point. -Prefix argument means invert sense of `tcl-use-smart-word-finder'." t nil) - -;;;*** - ;;;### (autoloads (latex-mode plain-tex-mode tex-mode) "tex-mode" "modes/tex-mode.el") (autoload 'tex-mode "tex-mode" "\ @@ -1968,85 +1431,11 @@ ;;;*** -;;;### (autoloads (verilog-mode) "verilog-mode" "modes/verilog-mode.el") - -(autoload 'verilog-mode "verilog-mode" "\ -Major mode for editing Verilog code. \\<verilog-mode-map> -NEWLINE, TAB indents for Verilog code. -Delete converts tabs to spaces as it moves back. -Supports highlighting. - -Variables controlling indentation/edit style: - - verilog-indent-level (default 3) - Indentation of Verilog statements with respect to containing block. - verilog-indent-level-module (default 3) - Absolute indentation of Module level Verilog statements. - Set to 0 to get initial and always statements lined up - on the left side of your screen. - verilog-indent-level-declaration (default 3) - Indentation of declarations with respect to containing block. - Set to 0 to get them list right under containing block. - verilog-indent-level-behavorial (default 3) - Indentation of first begin in a task or function block - Set to 0 to get such code to linedup underneath the task or function keyword - verilog-cexp-indent (default 1) - Indentation of Verilog statements broken across lines. - verilog-case-indent (default 2) - Indentation for case statements. - verilog-auto-newline (default nil) - Non-nil means automatically newline after semicolons and the punctation - mark after an end. - verilog-auto-indent-on-newline (default t) - Non-nil means automatically indent line after newline - verilog-tab-always-indent (default t) - Non-nil means TAB in Verilog mode should always reindent the current line, - regardless of where in the line point is when the TAB command is used. - verilog-indent-begin-after-if (default t) - Non-nil means to indent begin statements following a preceding - if, else, while, for and repeat statements, if any. otherwise, - the begin is lined up with the preceding token. If t, you get: - if (a) - begin - otherwise you get: - if (a) - begin - verilog-auto-endcomments (default t) - Non-nil means a comment /* ... */ is set after the ends which ends - cases, tasks, functions and modules. - The type and name of the object will be set between the braces. - verilog-minimum-comment-distance (default 40) - Minimum distance between begin and end required before a comment - will be inserted. Setting this variable to zero results in every - end aquiring a comment; the default avoids too many redundanet - comments in tight quarters. - verilog-auto-lineup (default `(all)) - List of contexts where auto lineup of :'s or ='s should be done. - -Turning on Verilog mode calls the value of the variable verilog-mode-hook with -no args, if that value is non-nil. -Other useful functions are: -\\[verilog-complete-word] -complete word with appropriate possibilities - (functions, verilog keywords...) -\\[verilog-comment-region] - Put marked area in a comment, fixing - nested comments. -\\[verilog-uncomment-region] - Uncomment an area commented with \\[verilog-comment-region]. -\\[verilog-insert-block] - insert begin ... end; -\\[verilog-star-comment] - insert /* ... */ -\\[verilog-mark-defun] - Mark function. -\\[verilog-beg-of-defun] - Move to beginning of current function. -\\[verilog-end-of-defun] - Move to end of current function. -\\[verilog-label-be] - Label matching begin ... end, fork ... join - and case ... endcase statements; -" t nil) - -;;;*** - ;;;### (autoloads (vhdl-mode) "vhdl-mode" "modes/vhdl-mode.el") (autoload 'vhdl-mode "vhdl-mode" "\ Major mode for editing VHDL code. -vhdl-mode $Revision: 1.13 $ +vhdl-mode $Revision: 1.14 $ To submit a problem report, enter `\\[vhdl-submit-bug-report]' from a vhdl-mode buffer. This automatically sets up a mail buffer with version information already added. You just need to add a description of the @@ -2131,71 +1520,5 @@ This is meant to be added to `find-file-hooks'." nil nil) ;;;*** - -;;;### (autoloads (vrml-mode) "vrml-mode" "modes/vrml-mode.el") - -(autoload 'vrml-mode "vrml-mode" "\ -Major mode for editing VRML code. -Expression and list commands understand all VRML brackets. -Tab indents for VRML code. -Paragraphs are separated by blank lines only. -Delete converts tabs to spaces as it moves back. - -Variables controlling indentation style: - vrml-indent-level - Indentation of VRML statements within surrounding block. - -Variables controlling user interaction with mode (see variable -documentation for details): - vrml-tab-always-indent - Controls action of TAB key. - vrml-auto-newline - Non-nil means automatically newline before and after braces - inserted in VRML code. - -Turning on VRML mode calls the value of the variable `vrml-mode-hook' -with no args, if that value is non-nil. Read the documentation for -`vrml-mode-hook' to see what kinds of interesting hook functions -already exist. - -Commands: -\\{vrml-mode-map}" t nil) - -;;;*** - -;;;### (autoloads (winmgr-mode) "winmgr-mode" "modes/winmgr-mode.el") - -(autoload 'winmgr-mode "winmgr-mode" "\ -Major mode for editing winmgr config files." t nil) - -;;;*** - -;;;### (autoloads (xpm-mode) "xpm-mode" "modes/xpm-mode.el") - -(autoload 'xpm-mode "xpm-mode" "\ -Treat the current buffer as an xpm file and colorize it. - - Shift-button-1 lets you paint by dragging the mouse. Shift-button-1 on a -color definition line will change the current painting color to that line's -value. - - Characters inserted from the keyboard will NOT be colored properly yet. -Use the mouse, or do xpm-init (\\[xpm-init]) after making changes. - -\\[xpm-add-color] Add a new color, prompting for character and value -\\[xpm-show-image] show the current image at the top of the buffer -\\[xpm-parse-color] parse the current line's color definition and add - it to the color table. Provided as a means of changing colors. -XPM minor mode bindings: -\\{xpm-mode-map}" t nil) - -;;;*** - -;;;### (autoloads (xrdb-mode) "xrdb-mode" "modes/xrdb-mode.el") - -(autoload 'xrdb-mode "xrdb-mode" "\ -Major mode for editing xrdb config files" t nil) - -;;;*** (provide 'modes-autoloads)
--- a/lisp/modes/custom-load.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/modes/custom-load.el Mon Aug 13 10:05:51 2007 +0200 @@ -3,53 +3,33 @@ ;;; Code: -(custom-add-loads 'extensions '("strokes")) (custom-add-loads 'message '("sendmail")) (custom-add-loads 'prolog '("prolog")) -(custom-add-loads 'mouse '("outl-mouse" "strokes")) +(custom-add-loads 'mouse '("outl-mouse")) (custom-add-loads 'mail-abbrevs '("mail-abbrevs")) (custom-add-loads 'pascal '("pascal")) (custom-add-loads 'tex '("reftex" "texinfo")) -(custom-add-loads 'tcl '("tcl")) (custom-add-loads 'icon '("icon")) (custom-add-loads 'texinfo '("texinfo")) -(custom-add-loads 'xrdb '("xrdb-mode")) (custom-add-loads 'mail '("mail-abbrevs")) -(custom-add-loads 'fortran-indent '("fortran")) (custom-add-loads 'docs '("texinfo")) (custom-add-loads 'lisp-indent '("cl-indent")) (custom-add-loads 'tools '("hideshow" "lazy-shot" "make-mode")) -(custom-add-loads 'lisp '("cl-indent" "strokes")) +(custom-add-loads 'lisp '("cl-indent")) (custom-add-loads 'reftex '("reftex")) -(custom-add-loads 'outlines '("hideshow" "outl-mouse" "whitespace-mode")) -(custom-add-loads 'f90 '("f90")) +(custom-add-loads 'outlines '("hideshow" "outl-mouse")) (custom-add-loads 'perl '("cperl-mode")) -(custom-add-loads 'asm '("asm-mode")) -(custom-add-loads 'ada '("ada-mode")) (custom-add-loads 'reftex-label-support '("reftex")) -(custom-add-loads 'data '("arc-mode" "xrdb-mode")) -(custom-add-loads 'fortran-comment '("fortran")) (custom-add-loads 'outl-mouse '("outl-mouse")) (custom-add-loads 'frames '("rsz-minibuf")) (custom-add-loads 'cperl-electric '("cperl-mode")) -(custom-add-loads 'verilog '("verilog-mode")) -(custom-add-loads 'f90-indent '("f90")) -(custom-add-loads 'strokes '("strokes")) (custom-add-loads 'lazy-shot '("lazy-shot")) -(custom-add-loads 'archive-lzh '("arc-mode")) (custom-add-loads 'scribe '("scribe")) -(custom-add-loads 'archive '("arc-mode")) (custom-add-loads 'c-macro '("cmacexp")) -(custom-add-loads 'vrml '("vrml-mode")) -(custom-add-loads 'simula '("simula")) -(custom-add-loads 'archive-arc '("arc-mode")) -(custom-add-loads 'fortran '("f90" "fortran")) (custom-add-loads 'cperl-faces '("cperl-mode")) (custom-add-loads 'resize-minibuffer '("rsz-minibuf")) -(custom-add-loads 'languages '("ada-mode" "asm-mode" "cperl-mode" "fortran" "icon" "pascal" "prolog" "rexx-mode" "sh-script" "simula" "tcl" "verilog-mode" "vhdl-mode" "vrml-mode" "winmgr-mode" "xrdb-mode")) +(custom-add-loads 'languages '("cperl-mode" "icon" "pascal" "prolog" "rexx-mode" "vhdl-mode")) (custom-add-loads 'cperl-indent '("cperl-mode")) -(custom-add-loads 'archive-zoo '("arc-mode")) -(custom-add-loads 'archive-zip '("arc-mode")) (custom-add-loads 'faces '("cperl-mode" "lazy-shot")) (custom-add-loads 'hideshow '("hideshow")) (custom-add-loads 'vhdl '("vhdl-mode")) @@ -58,12 +38,7 @@ (custom-add-loads 'rexx '("rexx-mode")) (custom-add-loads 'executable '("executable")) (custom-add-loads 'wp '("enriched" "scribe" "texinfo")) -(custom-add-loads 'sh '("sh-script")) (custom-add-loads 'makefile-mode '("make-mode")) -(custom-add-loads 'whitespace '("whitespace-mode")) -(custom-add-loads 'matching '("whitespace-mode")) -(custom-add-loads 'winmgr '("winmgr-mode")) -(custom-add-loads 'unix '("sh-script")) (custom-add-loads 'c '("cmacexp")) ;;; custom-load.el ends here
--- a/lisp/modes/lazy-shot.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/modes/lazy-shot.el Mon Aug 13 10:05:51 2007 +0200 @@ -260,7 +260,7 @@ (defun lazy-shot-unstall (&optional no-fontify) ;; Stop the timer - (when lazy-shot-stealth-timer + (when (and (boundp 'lazy-shot-stealth-timer) lazy-shot-stealth-timer) (delete-itimer lazy-shot-stealth-timer) (setq lazy-shot-stealth-timer nil)) ;; Remove the extents.
--- a/lisp/packages/add-log.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/packages/add-log.el Mon Aug 13 10:05:51 2007 +0200 @@ -30,8 +30,10 @@ ;;; Code: ;; XEmacs: the byte-compiler warns on `beginning-of-fortran-subprogram'. -(eval-when-compile - (require 'fortran)) +(condition-case nil + (eval-when-compile + (require 'fortran)) + (t nil)) (defgroup change-log nil "Change log maintenance"
--- a/lisp/packages/auto-autoloads.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/packages/auto-autoloads.el Mon Aug 13 10:05:51 2007 +0200 @@ -404,14 +404,6 @@ ;;;*** -;;;### (autoloads nil "buff-menu" "packages/buff-menu.el") - -(defvar list-buffers-directory nil) - -(make-variable-buffer-local 'list-buffers-directory) - -;;;*** - ;;;### (autoloads (command-history-mode list-command-history repeat-matching-complex-command) "chistory" "packages/chistory.el") (autoload 'repeat-matching-complex-command "chistory" "\
--- a/lisp/packages/autoinsert.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/packages/autoinsert.el Mon Aug 13 10:05:51 2007 +0200 @@ -177,9 +177,11 @@ ;;; Code: -(provide ' " (file-name-nondirectory (buffer-file-name)) ") +(provide '" (file-name-sans-extension (file-name-nondirectory +(buffer-file-name))) ") -;;; " (file-name-nondirectory (buffer-file-name)) " ends here")) +;;; " (file-name-nondirectory (buffer-file-name)) " ends here +")) "A list specifying text to insert by default into a new file. Elements look like (CONDITION . ACTION) or ((CONDITION . DESCRIPTION) . ACTION). CONDITION maybe a regexp that must match the new file's name, or it may be
--- a/lisp/paragraphs.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/paragraphs.el Mon Aug 13 10:05:51 2007 +0200 @@ -346,6 +346,12 @@ ; nil t)) (mark-something 'mark-end-of-sentence 'forward-sentence arg)) +(defun mark-end-of-line (arg) + "Put mark at end of line. Arg works as in `end-of-line'." + (interactive "p") + (mark-something 'mark-end-of-line 'end-of-line arg)) + + (defun transpose-sentences (arg) "Interchange this (next) and previous sentence." (interactive "*p")
--- a/lisp/prim/about.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/prim/about.el Mon Aug 13 10:05:51 2007 +0200 @@ -65,6 +65,7 @@ (hniksic "Hrvoje Niksic" "hniksic@srce.hr") (jareth "Jareth Hein" "jhod@camelot-soft.com") (jens "Jens Lautenbacher" "jens@lemcbed.lem.uni-karlsruhe.de") + (juhp "Jens-Ulrik Holger Petersen" "petersen@kurims.kyoto-u.ac.jp") (jwz "Jamie Zawinski" "jwz@netscape.com") (kazz "IENAGA Kazuyuki" "ienaga@jsys.co.jp") (kyle "Kyle Jones" "kyle_jones@wonderworks.com") @@ -99,6 +100,7 @@ (cc-mode . "http://www.python.org/ftp/emacs/") (dkindred . "http://www.cs.cmu.edu/People/dkindred/me.html") (dmoore . "http://oj.egbt.org/dmoore/") + (juhp . "http://www.kurims.kyoto-u.ac.jp/~petersen/") (jwz . "http://people.netscape.com/jwz/") (kazz . "http://www.imasy.or.jp/~kazz/") (kyle . "http://www.wonderworks.com/kyle/") @@ -942,6 +944,24 @@ To see some of these have a look at ") (about-url-link 'ograf "one of my homepages") (widget-insert ".\n")) + (juhp + (widget-insert "\ +I started using XEmacs-20 as my work-environment in June 1997. I +became a beta developer shortly after that (\"it seems like a good +idea at the time...\" :-), so far contributing mainly bug fixes, +\"find-func.el\" and improvements to \"help.el\". + +My current dreams for XEmacs: move to using guile as the Lisp engine +and gtk as the default X toolkit. + +I have been a postdoctoral researcher at the Research Institute for +Mathematical Sciences, Kyoto University, since August 1994, doing +research in mathematical physics (representation theory of quantum +groups). Though now I seem to be heading for other things. + +My homepage is ") + (about-url-link 'juhp "Visit Jens' homepage") + (widget-insert ".\n")) )) @@ -997,8 +1017,8 @@ (widget-insert "\n Like most free software, XEmacs is a collaborative effort. These are -some of the contributors we have no doubt forgotten someone; we -apologize! You can see some of our faces further below.\n\n") +some of the contributors. We have no doubt forgotten someone; we +apologize! You can see some of our faces under the links.\n\n") (about-show-linked-info 'vladimir "\ Former technical lead for XEmacs at Sun Microsystems. He is now with Microtec Research Inc., working on embedded systems development tools.\n") @@ -1136,6 +1156,8 @@ (about-show-linked-info 'ograf "\ Is currently working on the integration of OffiX and CDE drag-and-drop into the event system of XEmacs.\n") + (about-show-linked-info 'juhp "\ +Author of \"find-func.el\".\n") (flet ((print-short (name addr &optional shortinfo) (concat (about-with-face name 'italic) (about-tabs name) @@ -1335,7 +1357,6 @@ (print-short "Achim Oppelt" "aoppelt@theorie3.physik.uni-erlangen.de") (print-short "Rebecca Ore" "rebecca.ore@op.net") (print-short "Sudeep Kumar Palat" "palat@idt.unit.no") - (print-short "Jens-U H Petersen" "petersen@kurims.kyoto-u.ac.jp") (print-short "Joel Peterson" "tarzan@aosi.com") (print-short "Thomas A. Peterson" "tap@src.honeywell.com") (print-short "Tibor Polgar" "tlp00@eng.amdahl.com")
--- a/lisp/prim/auto-autoloads.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/prim/auto-autoloads.el Mon Aug 13 10:05:51 2007 +0200 @@ -170,14 +170,6 @@ ;;;*** -;;;### (autoloads nil "itimer-autosave" "prim/itimer-autosave.el") - -;;;*** - -;;;### (autoloads nil "loaddefs" "prim/loaddefs.el") - -;;;*** - ;;;### (autoloads (apply-macro-to-region-lines kbd-macro-query insert-kbd-macro name-last-kbd-macro) "macros" "prim/macros.el") (autoload 'name-last-kbd-macro "macros" "\
--- a/lisp/specifier.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/specifier.el Mon Aug 13 10:05:51 2007 +0200 @@ -405,4 +405,20 @@ (define-specifier-tag 'win 'device-on-window-system-p) +;; Add tags for device types that don't have support compiled +;; into the binary that we're about to dump. This will prevent +;; code like +;; +;; (set-face-foreground 'default "black" nil '(x color)) +;; +;; from producing an error if no X support was compiled in. + +(or (valid-specifier-tag-p 'x) + (define-specifier-tag 'x (lambda (dev) (eq (device-type dev) 'x)))) +(or (valid-specifier-tag-p 'tty) + (define-specifier-tag 'tty (lambda (dev) (eq (device-type dev) 'tty)))) +(or (valid-specifier-tag-p 'mswindows) + (define-specifier-tag 'mswindows (lambda (dev) + (eq (device-type dev) 'mswindows)))) + ;;; specifier.el ends here
--- a/lisp/utils/auto-autoloads.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/utils/auto-autoloads.el Mon Aug 13 10:05:51 2007 +0200 @@ -233,10 +233,6 @@ ;;;*** -;;;### (autoloads nil "easymenu" "utils/easymenu.el") - -;;;*** - ;;;### (autoloads (edit-toolbar) "edit-toolbar" "utils/edit-toolbar.el") (autoload 'edit-toolbar "edit-toolbar" "\
--- a/lisp/utils/browse-url.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/utils/browse-url.el Mon Aug 13 10:05:51 2007 +0200 @@ -843,7 +843,9 @@ (interactive (browse-url-interactive-arg "Lynx URL: ")) (start-process (concat "lynx" url) nil "xterm" "-e" "lynx" url)) -(eval-when-compile (require 'term)) +(condition-case nil + (eval-when-compile (require 'term)) + (t nil)) ;; --- Lynx in an Emacs "term" window --- @@ -855,13 +857,15 @@ an Emacs buffer." (interactive (browse-url-interactive-arg "Lynx URL: ")) (let ((system-uses-terminfo t)) ; Lynx uses terminfo - (if (fboundp 'make-term) - (let ((term-term-name "vt100")) - (set-buffer (make-term "browse-url" "lynx" nil url)) - (term-mode) - (term-char-mode) - (switch-to-buffer "*browse-url*")) - (terminal-emulator "*browse-url*" "lynx" (list url))))) + (cond ((fboundp 'make-term) + (let ((term-term-name "vt100")) + (set-buffer (make-term "browse-url" "lynx" nil url)) + (term-mode) + (term-char-mode) + (switch-to-buffer "*browse-url*"))) + ((fboundp 'terminal-emulator) + (terminal-emulator "*browse-url*" "lynx" (list url))) + (t (error "No terminal emulation in this XEmacs"))))) (provide 'browse-url)
--- a/lisp/wid-edit.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/wid-edit.el Mon Aug 13 10:05:51 2007 +0200 @@ -632,6 +632,11 @@ (repeat :tag "Suffixes" (string :format "%v"))))) +(defvar widget-glyph-pointer-glyph + (make-pointer-glyph [cursor-font :data "hand2"]) + "Glyph to be used as the mouse pointer shape over glyphs. +Use `set-glyph-image' to change this.") + (defvar widget-glyph-cache nil "Cache of glyphs associated with strings (files).") @@ -740,6 +745,7 @@ (set-extent-property extent 'start-open t) (set-extent-property extent 'end-open t) (set-extent-property extent 'keymap map) + (set-extent-property extent 'pointer widget-glyph-pointer-glyph) (set-extent-end-glyph extent glyph) (unless (or (stringp help-echo) (null help-echo)) (setq help-echo 'widget-mouse-help))
--- a/lisp/x-menubar.el Mon Aug 13 10:05:01 2007 +0200 +++ b/lisp/x-menubar.el Mon Aug 13 10:05:51 2007 +0200 @@ -579,7 +579,9 @@ (strokes-mode) (beep) (message "This option requires a window system.")) - :style toggle :selected (and strokes-mode window-system)]) + :style toggle :selected (and (fboundp strokes-mode) + strokes-mode + window-system)]) ("Open URLs With" ["Emacs-W3" (setq browse-url-browser-function 'browse-url-w3) :style radio @@ -1293,7 +1295,7 @@ ;; Mule-specific: (if (featurep 'mule) `(if (featurep 'mule) - (set-language-environment ',(current-language-environment)))) + (set-language-environment ',current-language-environment))) )) "The variables to save; or forms to evaluate to get forms to write out. This is used by `save-options-menu-settings' and should mirror the
--- a/man/ChangeLog Mon Aug 13 10:05:01 2007 +0200 +++ b/man/ChangeLog Mon Aug 13 10:05:51 2007 +0200 @@ -1,3 +1,8 @@ +1997-11-09 Hrvoje Niksic <hniksic@srce.hr> + + * lispref/extents.texi (Intro to Extents): Minor correction. + (Extent Properties): Document `extent-keymap'. + 1997-11-03 MORIOKA Tomohiko <morioka@jaist.ac.jp> * xemacs/mule.texi (Mule): Modify description about supported
--- a/man/lispref/extents.texi Mon Aug 13 10:05:01 2007 +0200 +++ b/man/lispref/extents.texi Mon Aug 13 10:05:51 2007 +0200 @@ -85,13 +85,13 @@ over it. @xref{Extents and Events}. An extent can optionally have a @dfn{begin-glyph} or @dfn{end-glyph} -(but not both at one time) associated with it. A begin-glyph or -end-glyph is a pixmap or string that will be displayed either at the -start or end of an extent or in the margin of the line that the start -or end of the extent lies in, depending on the extent's layout policy. -Begin-glyphs and end-glyphs are used to implement annotations, and you -should use the annotation API functions in preference to the -lower-level extent functions. For more information, @xref{Annotations}. +associated with it. A begin-glyph or end-glyph is a pixmap or string +that will be displayed either at the start or end of an extent or in the +margin of the line that the start or end of the extent lies in, +depending on the extent's layout policy. Begin-glyphs and end-glyphs +are used to implement annotations, and you should use the annotation API +functions in preference to the lower-level extent functions. For more +information, @xref{Annotations}. If an extent has its @code{detachable} property set, it will become @dfn{detached} (i.e. no longer in the buffer) when all its text its @@ -638,6 +638,10 @@ This function returns the @code{priority} property of @var{extent}. @end defun +@defun extent-keymap extent +This function returns the @code{keymap} property of @var{extent}. +@end defun + @defun extent-begin-glyph-layout extent This function returns the @code{begin-glyph-layout} property of @var{extent}, i.e. the layout policy associated with the @var{extent}'s
--- a/src/ChangeLog Mon Aug 13 10:05:01 2007 +0200 +++ b/src/ChangeLog Mon Aug 13 10:05:51 2007 +0200 @@ -1,3 +1,128 @@ +1997-11-10 Hrvoje Niksic <hniksic@srce.hr> + + * event-stream.c: Make echo_keystrokes a Lisp_Object. + (maybe_echo_keys): Adapt to that. + +1997-11-11 SL Baur <steve@altair.xemacs.org> + + * eval.c (throw_or_bomb_out): Remove abort. + Suggested by: Kyle Jones <kyle_jones@wonderworks.com> + +1997-11-11 Kyle Jones <kyle_jones@wonderworks.com> + + * Added support for referencing lrecord_implementations + via an index in an lrecord_header rather than a raw + pointer. Also added a mark bit and a pure bit. + + * alloc.c: Made lrecord_type_index() and + lrecord_implementations_table[] global, previously they + were static. Used new XRECORD_LHEADER_IMPLEMENTATION + and LHEADER_IMPLEMENTATION macros to access + lrecord_implementations found in Lisp_Objects and + lrecord_headers instead of referencing ->implementation. + + (gc_record_type_p): For USE_INDEXED_LRECORD_IMPLEMENTATION, + there's no need to check for equality to type or type + 1. + lrecords are no longer marked by incrementing the + implementation pointer. + + (init_alloc_once_early): Initialized subr and + symbol_value_forward lrecord indexes early so that the + staticly defined subrs and symbol_value_forward object + indexes match the lrecord_implementations_table. + + * buffer.c: Used symbol_value_forward_lheader_initializer in + various DEFVAR* macros. Used new XRECORD_LHEADER_IMPLEMENTATION + macro. + + * elhash.c: Used new XRECORD_LHEADER_IMPLEMENTATION + macro. + + * fns.c: Used new XRECORD_LHEADER_IMPLEMENTATION macro. + + * lisp.h: Defined subr_lheader_initializer macro, used it in + DEFUN macro. + + * lrecord.h: For USE_INDEXED_LRECORD_IMPLEMENTATION, + changed lrecord_header to contain an index into + lrecord_implementations_table[], plus a mark bit and a pure + bit. Added support code for this. Defined new + XRECORD_LHEADER_IMPLEMENTATION and LHEADER_IMPLEMENTATION + macros to be used to find the lrecord_implementation + of a Lisp_Object. + + * print.c: Used new XRECORD_LHEADER_IMPLEMENTATION and + LHEADER_IMPLEMENTATION macros. + + * symbols.c: Used symbol_value_forward_lheader_initializer in + definition of guts_of_unbound_marker. + + * symeval.h: Defined symbol_value_forward_lheader_initializer + macro. Used symbol_value_forward_lheader_initializer in various + macros. Used new XRECORD_LHEADER_IMPLEMENTATION macro. + + +1997-11-10 SL Baur <steve@altair.xemacs.org> + + * window.c (set_window_pixsize): Remove unused variable. + + * extents.c (print_extent_1): Fix type check error in sprintf. + + * doc.c (Fsnarf_documentation): Remove unused label weird_function. + + * symsinit.h: Restore declaration of vars_of_dialog_x. + + * database.c (Fopen_database): Fix unused variable message. + + * sysdep.c (sys_subshell): vfork() is a demented, obsolete hack. + + * offix.c (struct): Make ImageData, MaskData be unsigned char *. + + * event-Xt.c (x_event_to_emacs_event): Clean up typecasting. + * frame-x.c (Foffix_start_drag_internal): Ditto. + +1997-11-09 Kyle Jones <kyle_jones@wonderworks.com> + + * extents.c (print_extent_1): Use %lx instead of %p + to get the same output on all compilers. + +1997-11-09 Hrvoje Niksic <hniksic@srce.hr> + + * line-number.c: Use markers. + + * redisplay.c (window_line_number): Restored. + + * line-number.c (allocate_line_number_cache): Account for + narrowing. + (buffer_line_number): New function. + + * line-number.c (get_nearest_line_number): New function. + (window_line_number): Use it. + (narrow_line_number_cache): New function. + (invalidate_line_number_cache): Ditto. + (insert_invalidate_line_number_cache): Ditto. + (delete_invalidate_line_number_cache): Ditto. + (add_line_number): Ditto. + + * editfns.c (widen_buffer): Update line number cache. + (Fnarrow_to_region): Ditto. + (save_restriction_restore): Ditto. + + * insdel.c (buffer_insert_string_1): Invalidate cache for + insertion. + (buffer_delete_range): Invalidate cache for deletion. + + * line-number.c: New file. + (window_line_number): Moved from redisplay.c. + + * print.c (debug_print): Print a carriage return, too. + + * bufslots.h: New slot `line_number_cache'. + +1997-11-09 Kyle Jones <kyle_jones@wonderworks.com> + + * event-stream.c: New Lisp variable: last-command-event-time. + 1997-11-08 SL Baur <steve@altair.xemacs.org> * lread.c (init_lread): start from lisp, not lisp/prim.
--- a/src/Makefile.in.in Mon Aug 13 10:05:01 2007 +0200 +++ b/src/Makefile.in.in Mon Aug 13 10:05:51 2007 +0200 @@ -171,7 +171,7 @@ fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o font-lock.o\ frame.o general.o getloadavg.o glyphs.o\ $(gui_objs) hash.o indent.o insdel.o intl.o\ - keymap.o $(RTC_patch_objs) lread.o lstream.o\ + keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\ macros.o marker.o md5.o minibuf.o objects.o opaque.o\ print.o process.o profile.o pure.o\ rangetab.o redisplay.o redisplay-output.o regex.o\
--- a/src/alloc.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/alloc.c Mon Aug 13 10:05:51 2007 +0200 @@ -505,6 +505,8 @@ */ static struct lcrecord_header *all_lcrecords; +int lrecord_type_index (CONST struct lrecord_implementation *implementation); + void * alloc_lcrecord (int size, CONST struct lrecord_implementation *implementation) { @@ -520,7 +522,7 @@ abort (); lcheader = (struct lcrecord_header *) allocate_lisp_storage (size); - lcheader->lheader.implementation = implementation; + set_lheader_implementation(&(lcheader->lheader), implementation); lcheader->next = all_lcrecords; #if 1 /* mly prefers to see small ID numbers */ lcheader->uid = lrecord_uid_counter++; @@ -579,8 +581,10 @@ for (header = all_lcrecords; header; header = header->next) { - if (header->lheader.implementation->finalizer && !header->free) - ((header->lheader.implementation->finalizer) (header, 1)); + if (LHEADER_IMPLEMENTATION(&header->lheader)->finalizer && + !header->free) + ((LHEADER_IMPLEMENTATION(&header->lheader)->finalizer) + (header, 1)); } } @@ -611,9 +615,14 @@ int gc_record_type_p (Lisp_Object frob, CONST struct lrecord_implementation *type) { +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION + return (XGCTYPE (frob) == Lisp_Type_Record + && XRECORD_LHEADER_IMPLEMENTATION (frob) == type); +#else return (XGCTYPE (frob) == Lisp_Type_Record && (XRECORD_LHEADER (frob)->implementation == type || XRECORD_LHEADER (frob)->implementation == type + 1)); +#endif } @@ -1159,7 +1168,7 @@ struct Lisp_Float *f; ALLOCATE_FIXED_TYPE (float, struct Lisp_Float, f); - f->lheader.implementation = lrecord_float; + set_lheader_implementation (&(f->lheader), lrecord_float); float_next (f) = ((struct Lisp_Float *) -1); float_data (f) = float_value; XSETFLOAT (val, f); @@ -1559,6 +1568,9 @@ { b = (struct Lisp_Compiled_Function *) (PUREBEG + pureptr); set_lheader_implementation (&(b->lheader), lrecord_compiled_function); +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION + b->lheader.pure = 1; +#endif pureptr += size; bump_purestat (&purestat_bytecode, size); } @@ -2364,7 +2376,7 @@ #ifdef ERROR_CHECK_GC CONST struct lrecord_implementation *implementation - = lheader->implementation; + = LHEADER_IMPLEMENTATION(lheader); /* There should be no other pointers to the free list. */ assert (!MARKED_RECORD_HEADER_P (lheader)); @@ -2415,7 +2427,7 @@ struct lrecord_header *lheader = (struct lrecord_header *) free_header; CONST struct lrecord_implementation *implementation - = lheader->implementation; + = LHEADER_IMPLEMENTATION (lheader); /* There should be no other pointers to the free list. */ assert (!MARKED_RECORD_HEADER_P (lheader)); @@ -2452,7 +2464,7 @@ struct lrecord_header *lheader = (struct lrecord_header *) free_header; CONST struct lrecord_implementation *implementation - = lheader->implementation; + = LHEADER_IMPLEMENTATION (lheader); #ifdef ERROR_CHECK_GC /* Make sure the size is correct. This will catch, for example, @@ -2509,6 +2521,9 @@ s = (struct Lisp_String *) (PUREBEG + pureptr); #ifdef LRECORD_STRING set_lheader_implementation (&(s->lheader), lrecord_string); +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION + s->lheader.pure = 1; +#endif #endif set_string_length (s, length); if (no_need_to_copy_data) @@ -2565,6 +2580,9 @@ c = (struct Lisp_Cons *) (PUREBEG + pureptr); #ifdef LRECORD_CONS set_lheader_implementation (&(c->lheader), lrecord_cons); +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION + c->lheader.pure = 1; +#endif #endif pureptr += sizeof (struct Lisp_Cons); bump_purestat (&purestat_cons, sizeof (struct Lisp_Cons)); @@ -2625,6 +2643,9 @@ f = (struct Lisp_Float *) (PUREBEG + pureptr); set_lheader_implementation (&(f->lheader), lrecord_float); +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION + f->lheader.pure = 1; +#endif pureptr += sizeof (struct Lisp_Float); bump_purestat (&purestat_float, sizeof (struct Lisp_Float)); @@ -2652,6 +2673,9 @@ v = (struct Lisp_Vector *) (PUREBEG + pureptr); #ifdef LRECORD_VECTOR set_lheader_implementation (&(v->header.lheader), lrecord_vector); +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION + v->header.lheader.pure = 1; +#endif #endif pureptr += size; bump_purestat (&purestat_vector_all, size); @@ -3002,7 +3026,7 @@ { struct lrecord_header *lheader = XRECORD_LHEADER (obj); CONST struct lrecord_implementation *implementation - = lheader->implementation; + = LHEADER_IMPLEMENTATION (lheader); if (! MARKED_RECORD_HEADER_P (lheader) && ! UNMARKABLE_RECORD_HEADER_P (lheader)) @@ -3209,7 +3233,7 @@ { struct lrecord_header *lheader = XRECORD_LHEADER (obj); CONST struct lrecord_implementation *implementation - = lheader->implementation; + = LHEADER_IMPLEMENTATION (lheader); #ifdef LRECORD_STRING if (STRINGP (obj)) @@ -3293,10 +3317,10 @@ /* This will be used more extensively In The Future */ static int last_lrecord_type_index_assigned; -static CONST struct lrecord_implementation *lrecord_implementations_table[128]; +CONST struct lrecord_implementation *lrecord_implementations_table[128]; #define max_lrecord_type (countof (lrecord_implementations_table) - 1) -static int +int lrecord_type_index (CONST struct lrecord_implementation *implementation) { int type_index = *(implementation->lrecord_type_index); @@ -3344,7 +3368,8 @@ static void tick_lcrecord_stats (CONST struct lrecord_header *h, int free_p) { - CONST struct lrecord_implementation *implementation = h->implementation; + CONST struct lrecord_implementation *implementation = + LHEADER_IMPLEMENTATION (h); int type_index = lrecord_type_index (implementation); if (((struct lcrecord_header *) h)->free) @@ -3396,8 +3421,8 @@ struct lrecord_header *h = &(header->lheader); if (!MARKED_RECORD_HEADER_P (h) && ! (header->free)) { - if (h->implementation->finalizer) - ((h->implementation->finalizer) (h, 0)); + if (LHEADER_IMPLEMENTATION (h)->finalizer) + ((LHEADER_IMPLEMENTATION (h)->finalizer) (h, 0)); } } @@ -4805,6 +4830,24 @@ lrecord_implementations_table[iii] = 0; } +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION + /* + * If USE_INDEXED_LRECORD_IMPLEMENTATION is defined, all the staticly + * defined subr lrecords were initialized with lheader->type == 0. + * See subr_lheader_initializer in lisp.h. Force type index 0 to be + * assigned to lrecord_subr so that those predefined indexes match + * reality. + */ + (void) lrecord_type_index (lrecord_subr); + assert (*(lrecord_subr[0].lrecord_type_index) == 0); + /* + * The same is true for symbol_value_forward objects, except the + * type is 1. + */ + (void) lrecord_type_index (lrecord_symbol_value_forward); + assert (*(lrecord_symbol_value_forward[0].lrecord_type_index) == 1); +#endif + symbols_initialized = 0; gc_generation_number[0] = 0;
--- a/src/buffer.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/buffer.c Mon Aug 13 10:05:51 2007 +0200 @@ -2097,7 +2097,7 @@ makes debugging unbelievably more bearable) */ #define DEFVAR_BUFFER_LOCAL(lname, field_name) do { \ static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ - = { { { { lrecord_symbol_value_forward }, \ + = { { { symbol_value_forward_lheader_initializer, \ (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \ SYMVAL_CURRENT_BUFFER_FORWARD }, 0 }; \ defvar_buffer_local ((lname), &I_hate_C); \ @@ -2105,7 +2105,7 @@ #define DEFVAR_BUFFER_LOCAL_MAGIC(lname, field_name, magicfun) do { \ static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ - = { { { { lrecord_symbol_value_forward }, \ + = { { { symbol_value_forward_lheader_initializer, \ (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \ SYMVAL_CURRENT_BUFFER_FORWARD }, magicfun }; \ defvar_buffer_local ((lname), &I_hate_C); \ @@ -2113,7 +2113,7 @@ #define DEFVAR_CONST_BUFFER_LOCAL(lname, field_name) do { \ static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ - = { { { { lrecord_symbol_value_forward }, \ + = { { { symbol_value_forward_lheader_initializer, \ (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \ SYMVAL_CONST_CURRENT_BUFFER_FORWARD }, 0 }; \ defvar_buffer_local ((lname), &I_hate_C); \ @@ -2121,7 +2121,7 @@ #define DEFVAR_CONST_BUFFER_LOCAL_MAGIC(lname, field_name, magicfun) do{\ static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ - = { { { { lrecord_symbol_value_forward }, \ + = { { { symbol_value_forward_lheader_initializer, \ (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \ SYMVAL_CONST_CURRENT_BUFFER_FORWARD }, magicfun }; \ defvar_buffer_local ((lname), &I_hate_C); \ @@ -2144,7 +2144,7 @@ * by make-docfile */ #define DEFVAR_BUFFER_DEFAULTS(lname, field_name) do { \ static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ - = { { { { lrecord_symbol_value_forward }, \ + = { { { symbol_value_forward_lheader_initializer, \ (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \ SYMVAL_DEFAULT_BUFFER_FORWARD }, 0 }; \ defvar_mumble ((lname), &I_hate_C, sizeof (I_hate_C)); \ @@ -2152,7 +2152,7 @@ #define DEFVAR_BUFFER_DEFAULTS_MAGIC(lname, field_name, magicfun) do { \ static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ - = { { { { lrecord_symbol_value_forward }, \ + = { { { symbol_value_forward_lheader_initializer, \ (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \ SYMVAL_DEFAULT_BUFFER_FORWARD }, magicfun }; \ defvar_mumble ((lname), &I_hate_C, sizeof (I_hate_C)); \
--- a/src/bufslots.h Mon Aug 13 10:05:01 2007 +0200 +++ b/src/bufslots.h Mon Aug 13 10:05:51 2007 +0200 @@ -245,3 +245,7 @@ the next few times we add a new slot. */ MARKED_SLOT (extra1, extra2, extra3); #endif + /* The cache of positions for whilch line number has last been + calculated. See line-number.c. */ + MARKED_SLOT (line_number_cache); +
--- a/src/data.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/data.c Mon Aug 13 10:05:51 2007 +0200 @@ -592,7 +592,7 @@ if (VECTORP (object)) return Qvector; assert (LRECORDP (object)); - return intern (XRECORD_LHEADER (object)->implementation->name); + return intern (XRECORD_LHEADER_IMPLEMENTATION (object)->name); }
--- a/src/database.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/database.c Mon Aug 13 10:05:51 2007 +0200 @@ -649,8 +649,10 @@ { DBTYPE real_subtype; DB *db; +#if DB_VERSION_MAJOR != 1 int status; - +#endif + if (EQ (subtype, Qhash) || NILP (subtype)) real_subtype = DB_HASH; else if (EQ (subtype, Qbtree))
--- a/src/doc.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/doc.c Mon Aug 13 10:05:51 2007 +0200 @@ -607,7 +607,6 @@ { /* Otherwise the function is undefined or otherwise weird. Ignore it. */ - weird_function: weird_doc (sym, GETTEXT ("weird function"), GETTEXT ("function"), pos); goto weird;
--- a/src/editfns.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/editfns.c Mon Aug 13 10:05:51 2007 +0200 @@ -36,6 +36,7 @@ #include "frame.h" #include "insdel.h" #include "window.h" +#include "line-number.h" #include "systime.h" #include "sysdep.h" @@ -1740,6 +1741,7 @@ /* Changing the buffer bounds invalidates any recorded current column. */ invalidate_current_column (); + narrow_line_number_cache (b); } } @@ -1786,6 +1788,7 @@ MARK_CLIP_CHANGED; /* Changing the buffer bounds invalidates any recorded current column. */ invalidate_current_column (); + narrow_line_number_cache (buf); zmacs_region_stays = 0; return Qnil; } @@ -1844,6 +1847,7 @@ { local_clip_changed = 1; SET_BOTH_BUF_BEGV (buf, start, bi_start); + narrow_line_number_cache (buf); } if (BUF_ZV (buf) != end) {
--- a/src/elhash.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/elhash.c Mon Aug 13 10:05:51 2007 +0200 @@ -850,7 +850,7 @@ else if (LRECORDP (obj)) { CONST struct lrecord_implementation - *imp = XRECORD_LHEADER (obj)->implementation; + *imp = XRECORD_LHEADER_IMPLEMENTATION (obj); if (imp->hash) return (imp->hash) (obj, depth); }
--- a/src/eval.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/eval.c Mon Aug 13 10:05:51 2007 +0200 @@ -1447,9 +1447,11 @@ throw_or_bomb_out (Lisp_Object tag, Lisp_Object val, int bomb_out_p, Lisp_Object sig, Lisp_Object data) { +#if 0 /* die if we recurse more than is reasonable */ if (++throw_level > 20) abort(); +#endif /* If bomb_out_p is t, this is being called from Fsignal as a "last resort" when there is no handler for this error and
--- a/src/event-Xt.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/event-Xt.c Mon Aug 13 10:05:51 2007 +0200 @@ -1,5 +1,5 @@ /* The event_stream interface for X11 with Xt, and/or tty frames. - Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. + Copyright (C) 1991-5, 1997 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. Copyright (C) 1996 Ben Wing. @@ -1101,7 +1101,7 @@ { unsigned int state, modifiers = 0, button=0; struct frame *frame = x_any_window_to_frame (d, ev->window); - unsigned char *data; + Extbyte *data; unsigned long size, dtype; Lisp_Object l_type = Qnil, l_data = Qnil; Lisp_Object l_dndlist = Qnil, l_item = Qnil; @@ -1149,7 +1149,7 @@ while (*data) { len = strlen ((char*) data); - l_item = make_ext_string ((char*) data, len, + l_item = make_ext_string (data, len, FORMAT_FILENAME); /* order is irrelevant */ l_dndlist = Fcons (l_item, l_dndlist); @@ -1160,7 +1160,7 @@ case DndText: case DndMIME: /* is there a better way to format this ? */ - l_dndlist = make_ext_string ((char*) data, strlen(data), + l_dndlist = make_ext_string (data, strlen((char *)data), FORMAT_BINARY); break; case DndFile: @@ -1168,15 +1168,15 @@ case DndLink: case DndExe: case DndURL: /* this could also break with FORMAT_FILENAME */ - l_dndlist = make_ext_string ((char*) data, strlen(data), + l_dndlist = make_ext_string (data, strlen((char *)data), FORMAT_FILENAME); break; default: /* Unknown, RawData and any other type */ - l_dndlist = make_ext_string ((char*) data, size, + l_dndlist = make_ext_string (data, size, FORMAT_BINARY); break; } - + l_type=make_int(dtype); emacs_event->event.dnd_drop.data = Fcons (l_type, Fcons (l_dndlist, Qnil));
--- a/src/event-stream.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/event-stream.c Mon Aug 13 10:05:51 2007 +0200 @@ -180,6 +180,10 @@ /* A (16bit . 16bit) representation of the time of the last-command-event. */ Lisp_Object Vlast_input_time; +/* A (16bit 16bit usec) representation of the time + of the last-command-event. */ +Lisp_Object Vlast_command_event_time; + /* Character to recognize as the help char. */ Lisp_Object Vhelp_char; @@ -347,7 +351,7 @@ static Lisp_Object command_event_queue_tail; /* Nonzero means echo unfinished commands after this many seconds of pause. */ -static int echo_keystrokes; +static Lisp_Object Vecho_keystrokes; /* The number of keystrokes since the last auto-save. */ static int keystrokes_since_auto_save; @@ -702,20 +706,26 @@ maybe_echo_keys (struct command_builder *command_builder, int no_snooze) { /* This function can GC */ + double echo_keystrokes; struct frame *f = selected_frame (); /* Message turns off echoing unless more keystrokes turn it on again. */ if (echo_area_active (f) && !EQ (Qcommand, echo_area_status (f))) return; + if (INTP (Vecho_keystrokes) || FLOATP (Vecho_keystrokes)) + echo_keystrokes = extract_float (Vecho_keystrokes); + else + echo_keystrokes = 0; + if (minibuf_level == 0 - && echo_keystrokes > 0 + && echo_keystrokes > 0.0 && !lw_menu_active) { if (!no_snooze) { /* #### C-g here will cause QUIT. Setting dont_check_for_quit doesn't work. See check_quit. */ - if (NILP (Fsit_for (make_int (echo_keystrokes), Qnil))) + if (NILP (Fsit_for (Vecho_keystrokes, Qnil))) /* input came in, so don't echo. */ return; } @@ -2217,6 +2227,14 @@ Vlast_input_time = Fcons (Qnil, Qnil); XCAR (Vlast_input_time) = make_int ((EMACS_SECS (t) >> 16) & 0xffff); XCDR (Vlast_input_time) = make_int ((EMACS_SECS (t) >> 0) & 0xffff); + if (!CONSP (Vlast_command_event_time)) + Vlast_command_event_time = list3 (Qnil, Qnil, Qnil); + XCAR (Vlast_command_event_time) = + make_int ((EMACS_SECS (t) >> 16) & 0xffff); + XCAR (XCDR (Vlast_command_event_time)) = + make_int ((EMACS_SECS (t) >> 0) & 0xffff); + XCAR (XCDR (XCDR (Vlast_command_event_time))) + = make_int (EMACS_USECS (t)); } /* If this key came from the keyboard or from a keyboard macro, then @@ -4918,10 +4936,10 @@ recursive_sit_for = Qnil; - DEFVAR_INT ("echo-keystrokes", &echo_keystrokes /* + DEFVAR_LISP ("echo-keystrokes", &Vecho_keystrokes /* *Nonzero means echo unfinished commands after this many seconds of pause. */ ); - echo_keystrokes = 1; + Vecho_keystrokes = make_int (1); DEFVAR_INT ("auto-save-interval", &auto_save_interval /* *Number of keyboard input characters between auto-saves. @@ -5050,6 +5068,17 @@ */ ); Vlast_input_time = Qnil; + DEFVAR_LISP ("last-command-event-time", &Vlast_command_event_time /* +The time (in seconds since Jan 1, 1970) of the last-command-event, +represented as a list of three integers. The first integer contains +the most significant 16 bits of the number of seconds, and the second +integer contains the least significant 16 bits. The third integer +contains the remainder number of microseconds, if the current system +supports microsecond clock resolution. This list is destructively +modified, so copy it if you want to keep it. +*/ ); + Vlast_command_event_time = Qnil; + DEFVAR_LISP ("unread-command-events", &Vunread_command_events /* List of event objects to be read as next command input events. This can be used to simulate the receipt of events from the user.
--- a/src/extents.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/extents.c Mon Aug 13 10:05:51 2007 +0200 @@ -3006,7 +3006,7 @@ write_c_string (" ", printcharfun); } - sprintf (buf, "0x%p", ext); + sprintf (buf, "0x%lx", (unsigned long int) ext); write_c_string (buf, printcharfun); }
--- a/src/fileio.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/fileio.c Mon Aug 13 10:05:51 2007 +0200 @@ -20,6 +20,7 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Mule 2.0, FSF 19.30. */ +/* More syncing: FSF Emacs 19.34.6 by Marc Paquette <marcpa@cam.org> */ #include <config.h> #include "lisp.h" @@ -49,8 +50,34 @@ #include <netio.h> #ifdef HPUX_PRE_8_0 #include <errnet.h> +#endif /* HPUX_PRE_8_0 */ +#endif /* HPUX */ + +#ifdef WINDOWSNT +#define NOMINMAX 1 +#include <windows.h> +#include <stdlib.h> +#include <fcntl.h> +#endif /* not WINDOWSNT */ + +#ifdef DOS_NT +#define CORRECT_DIR_SEPS(s) \ + do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \ + else unixtodos_filename (s); \ + } while (0) +/* On Windows, drive letters must be alphabetic - on DOS, the Netware + redirector allows the six letters between 'Z' and 'a' as well. */ +#ifdef MSDOS +#define IS_DRIVE(x) ((x) >= 'A' && (x) <= 'z') #endif -#endif /* HPUX */ +#ifdef WINDOWSNT +#define IS_DRIVE(x) isalpha (x) +#endif +/* Need to lower-case the drive letter, or else expanded + filenames will sometimes compare inequal, because + `expand-file-name' doesn't always down-case the drive letter. */ +#define DRIVE_LETTER(x) (tolower (x)) +#endif /* DOS_NT */ /* Nonzero during writing of auto-save files */ static int auto_saving; @@ -86,6 +113,26 @@ Lisp_Object Qfile_name_handler_alist; +#ifdef DOS_NT +/* Until we can figure out how to deal with the functions in this file in + a civilized fashion, this will remain #ifdef'ed out. -slb */ +/* Syncing with FSF 19.34.6 note: although labelled as NT-specific, these + two lisp variables are compiled in even when not defined(DOS_NT). + Need to check if we should bracket them between #ifdef's. + --marcpa */ +/* On NT, specifies the directory separator character, used (eg.) when + expanding file names. This can be bound to / or \. + + This needs to be initialized statically, because file name functions + are called during initialization. */ +Lisp_Object Vdirectory_sep_char = '/'; + +/* For the benefit of backwards compatability with earlier versions of + Emacs on DOS_NT, provide a way to disable the REPLACE option support + in insert-file-contents. */ +Lisp_Object Vinsert_file_contents_allow_replace; +#endif /* DOS_NT */ + /* These variables describe handlers that have "already" had a chance to handle the current operation. @@ -415,8 +462,12 @@ beg = XSTRING_DATA (file); p = beg + XSTRING_LENGTH (file); - while (p != beg && !IS_ANY_SEP (p[-1])) - p--; + while (p != beg && !IS_ANY_SEP (p[-1]) +#ifdef DOS_NT + /* only recognise drive specifier at beginning */ + && !(p[-1] == ':' && p == beg + 2) +#endif + ) p--; if (p == beg) return Qnil; @@ -425,29 +476,17 @@ /* (NT does the right thing.) */ if (p == beg + 2 && beg[1] == ':') { - int drive = (*beg) - 'a'; /* MAXPATHLEN+1 is guaranteed to be enough space for getdefdir. */ - Bufbyte *res = (Bufbyte *) alloca (MAXPATHLEN + 5); - unsigned char *res1; -#ifdef WINDOWSNT - res1 = res; - /* The NT version places the drive letter at the beginning already. */ -#else /* not WINDOWSNT */ - /* On MSDOG we must put the drive letter in by hand. */ - res1 = res + 2; -#endif /* not WINDOWSNT */ - if (getdefdir (drive + 1, res)) + Bufbyte *res = alloca (MAXPATHLEN + 1); + if (getdefdir (toupper (*beg) - 'A' + 1, res)) { -#ifdef MSDOS - res[0] = drive + 'a'; - res[1] = ':'; -#endif /* MSDOS */ - if (IS_DIRECTORY_SEP (res[strlen ((char *) res) - 1])) + if (!IS_DIRECTORY_SEP (res[strlen ((char *) res) - 1])) strcat ((char *) res, "/"); beg = res; p = beg + strlen ((char *) beg); } } + CORRECT_DIR_SEPS (beg); #endif /* DOS_NT */ return make_string (beg, p - beg); } @@ -475,8 +514,12 @@ beg = XSTRING_DATA (file); end = p = beg + XSTRING_LENGTH (file); - while (p != beg && !IS_ANY_SEP (p[-1])) - p--; + while (p != beg && !IS_ANY_SEP (p[-1]) +#ifdef DOS_NT + /* only recognise drive specifier at beginning */ + && !(p[-1] == ':' && p == beg + 2) +#endif + ) p--; return make_string (p, end - p); } @@ -551,7 +594,7 @@ /* * Convert from directory name to filename. - * On UNIX, it's simple: just make sure there is a terminating / + * On UNIX, it's simple: just make sure there isn't a terminating / * Value is nonzero if the string output is different from the input. */ @@ -575,10 +618,13 @@ && IS_DIRECTORY_SEP (dst[slen - 1]) #ifdef DOS_NT && !IS_ANY_SEP (dst[slen - 2]) -#endif +#endif /* DOS_NT */ ) dst[slen - 1] = 0; -#endif +#endif /* APOLLO */ +#ifdef DOS_NT + CORRECT_DIR_SEPS (dst); +#endif /* DOS_NT */ return 1; } @@ -633,6 +679,9 @@ /* !!#### does mktemp() Mule-encapsulate? */ mktemp ((char *) data); +#ifdef DOS_NT + CORRECT_DIR_SEPS (XSTRING_DATA (val)); +#endif /* DOS_NT */ return val; } @@ -659,10 +708,9 @@ Bufbyte *target; struct passwd *pw; #ifdef DOS_NT - /* Demacs 1.1.2 91/10/20 Manabu Higashida */ - int drive = -1; - int relpath = 0; - Bufbyte *tmp, *defdir; + int drive = 0; + int collapse_newdir = 1; + int length; #endif /* DOS_NT */ Lisp_Object handler; @@ -712,10 +760,28 @@ The EQ test avoids infinite recursion. */ if (! NILP(default_) && !EQ (default_, name) - /* This saves time in a common case. */ + /* Save time in some common cases - as long as default_directory + is not relative, it can be canonicalized with name below (if it + is needed at all) without requiring it to be expanded now. */ && ! (XSTRING_LENGTH (default_) >= 3 +#ifdef DOS_NT + /* Detect MSDOS file names with drive specifiers. */ + && (IS_DRIVE (XSTRING_BYTE (default_, 0)) + && (IS_DEVICE_SEP (XSTRING_BYTE (default_, 1)) + IS_DIRECTORY_SEP (XSTRING_BYTE (default_, 2))))) +#ifdef WINDOWSNT + /* Detect Windows file names in UNC format. */ + && ! (XSTRING_LENGTH (default_) >= 2 + && IS_DIRECTORY_SEP (XSTRING_BYTE (default_, 0)) + && IS_DIRECTORY_SEP (XSTRING_BYTE (default_, 1))) +#endif +#else /* not DOS_NT */ + /* Detect Unix absolute file names (/... alone is not absolute on + DOS or Windows). */ && (IS_DIRECTORY_SEP (XSTRING_BYTE (default_, 0)) - || IS_DEVICE_SEP (XSTRING_BYTE (default_, 1))))) + || IS_DEVICE_SEP (XSTRING_BYTE (default_, 1)))) +#endif /* not DOS_NT */ + ) { struct gcpro gcpro1; @@ -732,29 +798,45 @@ pointing into name should be safe during all of this, though. */ nm = XSTRING_DATA (name); -#ifdef MSDOS - /* First map all backslashes to slashes. */ - dostounix_filename (nm = strcpy (alloca (strlen (nm) + 1), nm)); -#endif - #ifdef DOS_NT - /* Now strip drive name. */ + /* We will force directory separators to be either all \ or /, so make + a local copy to modify, even if there ends up being no change. */ + nm = strcpy (alloca (strlen (nm) + 1), nm); + + /* Find and remove drive specifier if present; this makes nm absolute + even if the rest of the name appears to be relative. */ { Bufbyte *colon = strrchr (nm, ':'); if (colon) + /* Only recognize colon as part of drive specifier if there is a + single alphabetic character preceeding the colon (and if the + character before the drive letter, if present, is a directory + separator); this is to support the remote system syntax used by + ange-ftp, and the "po:username" syntax for POP mailboxes. */ + look_again: if (nm == colon) nm++; - else + else if (IS_DRIVE (colon[-1]) + && (colon == nm + 1 || IS_DIRECTORY_SEP (colon[-2]))) { drive = colon[-1]; nm = colon + 1; - if (!IS_DIRECTORY_SEP (*nm)) - { - defdir = alloca (MAXPATHLEN + 1); - relpath = getdefdir (tolower (drive) - 'a' + 1, defdir); - } + } + else + { + while (--colon >= nm) + if (colon[0] == ':') + goto look_again; } } + +#ifdef WINDOWSNT + /* If we see "c://somedir", we want to strip the first slash after the + colon when stripping the drive letter. Otherwise, this expands to + "//somedir". */ + if (drive && IS_DIRECTORY_SEP (nm[0]) && IS_DIRECTORY_SEP (nm[1])) + nm++; +#endif /* WINDOWSNT */ #endif /* DOS_NT */ /* We *don't* want to handle // and /~ that way. */ @@ -784,11 +866,25 @@ p++; } + +#endif /* 0 */ + +#ifdef WINDOWSNT + /* Discard any previous drive specifier if nm is now in UNC format. */ + if (IS_DIRECTORY_SEP (nm[0]) && IS_DIRECTORY_SEP (nm[1])) + { + drive = 0; + } +#endif /* WINDOWSNT */ + + /* If nm is absolute, look for /./ or /../ sequences; if none are + found, we can probably return right away. We will avoid allocating + a new string if name is already fully expanded. */ + if (IS_DIRECTORY_SEP (nm[0]) +#ifdef WINDOWSNT + && (drive || IS_DIRECTORY_SEP (nm[1])) #endif - - /* If nm is absolute, flush ...// and detect /./ and /../. - If no /./ or /../ we can return right away. */ - if (IS_DIRECTORY_SEP (nm[0])) + ) { /* If it turns out that the filename we want to return is just a suffix of FILENAME, we don't need to go through and edit @@ -816,15 +912,51 @@ } if (!lose) { -#ifndef DOS_NT +#ifdef DOS_NT + /* Make sure directories are all separated with / or \ as + desired, but avoid allocation of a new string when not + required. */ + CORRECT_DIR_SEPS (nm); +#ifdef WINDOWSNT + if (IS_DIRECTORY_SEP (nm[1])) + { + if (strcmp (nm, XSTRING_DATA (name)) != 0) + name = build_string (nm); + } + else +#endif + /* drive must be set, so this is okay */ + if (strcmp (nm - 2, XSTRING_DATA (name)) != 0) + { + name = make_string (nm - 2, p - nm + 2); + XSTRING_DATA (name)[0] = DRIVE_LETTER (drive); + XSTRING_DATA (name)[1] = ':'; + } + return name; +#else /* not DOS_NT */ + /* Unix */ if (nm == XSTRING_DATA (name)) return name; return build_string ((char *) nm); -#endif /* not DOS_NT */ +#endif /* DOS_NT */ } } - /* Now determine directory to start with and put it in newdir */ + /* At this point, nm might or might not be an absolute file name. We + need to expand ~ or ~user if present, otherwise prefix nm with + default_directory if nm is not absolute, and finally collapse /./ + and /foo/../ sequences. + + We set newdir to be the appropriate prefix if one is needed: + - the relevant user directory if nm starts with ~ or ~user + - the specified drive's working dir (DOS/NT only) if nm does not + start with / + - the value of default_directory. + + Note that these prefixes are not guaranteed to be absolute (except + for the working dir of a drive). Therefore, to ensure we always + return an absolute name, if the final prefix is not absolute we + append it to the current working directory. */ newdir = 0; @@ -835,6 +967,10 @@ { if (!(newdir = (Bufbyte *) egetenv ("HOME"))) newdir = (Bufbyte *) ""; +/* Syncing with FSF 19.34.6 note: this is not in FSF. Since it is dated 1995, + I doubt it is coming from XEmacs. I (#if 0) it but let the code + stay there just in case. --marcpa */ +#if 0 #ifdef DOS_NT /* Problem when expanding "~\" if HOME is not on current drive. Ulrich Leodolter, Wed Jan 11 10:20:35 1995 */ @@ -842,7 +978,11 @@ drive = newdir[0]; dostounix_filename (newdir); #endif /* DOS_NT */ +#endif /* 0 */ nm++; +#ifdef DOS_NT + collapse_newdir = 0; +#endif /* DOS_NT */ } else /* ~user/filename */ { @@ -851,6 +991,12 @@ memcpy (o, (char *) nm, p - nm); o [p - nm] = 0; +/* Syncing with FSF 19.34.6 note: FSF uses getpwnam even on NT, which does + not work. The following works only if ~USER names the user who runs + this instance of XEmacs. While NT is single-user (for the moment) you + still can have multiple user profiles users defined, each with its + HOME. Therefore, the following should be reworked to handle this case. + --marcpa */ #ifdef WINDOWSNT /* ** Now if the file given is "~foo/file" and HOME="c:/", then we @@ -858,7 +1004,7 @@ ** The variable o has "~foo", so we can use the length of ** that string to offset nm. August Hill, 31 Aug 1998. */ - newdir = (unsigned char *) egetenv ("HOME"); + newdir = (Bufbyte *) egetenv ("HOME"); dostounix_filename (newdir); nm += strlen(o) + 1; #else /* not WINDOWSNT */ @@ -879,10 +1025,39 @@ } } - if (!IS_ANY_SEP (nm[0]) #ifdef DOS_NT - && drive == -1 + /* On DOS and Windows, nm is absolute if a drive name was specified; + use the drive's current directory as the prefix if needed. */ + if (!newdir && drive) + { + /* Get default directory if needed to make nm absolute. */ + if (!IS_DIRECTORY_SEP (nm[0])) + { + newdir = alloca (MAXPATHLEN + 1); + if (!getdefdir (toupper (drive) - 'A' + 1, newdir)) + newdir = NULL; + } + if (!newdir) + { + /* Either nm starts with /, or drive isn't mounted. */ + newdir = alloca (4); + newdir[0] = DRIVE_LETTER (drive); + newdir[1] = ':'; + newdir[2] = '/'; + newdir[3] = 0; + } + } #endif /* DOS_NT */ + + /* Finally, if no prefix has been specified and nm is not absolute, + then it must be expanded relative to default_directory. */ + if (1 +#ifndef DOS_NT + && !IS_ANY_SEP (nm[0]) +#endif /* not DOS_NT */ +#ifdef WINDOWSNT + && !(IS_DIRECTORY_SEP (nm[0]) && IS_DIRECTORY_SEP (nm[1])) +#endif && !newdir && STRINGP (default_)) { @@ -890,20 +1065,88 @@ } #ifdef DOS_NT - if (newdir == 0 && relpath) - newdir = defdir; + if (newdir) + { + /* First ensure newdir is an absolute name. */ + if ( + /* Detect MSDOS file names with drive specifiers. */ + ! (IS_DRIVE (newdir[0]) + && IS_DEVICE_SEP (newdir[1]) && IS_DIRECTORY_SEP (newdir[2])) +#ifdef WINDOWSNT + /* Detect Windows file names in UNC format. */ + && ! (IS_DIRECTORY_SEP (newdir[0]) && IS_DIRECTORY_SEP (newdir[1])) +#endif + ) + { + /* Effectively, let newdir be (expand-file-name newdir cwd). + Because of the admonition against calling expand-file-name + when we have pointers into lisp strings, we accomplish this + indirectly by prepending newdir to nm if necessary, and using + cwd (or the wd of newdir's drive) as the new newdir. */ + + if (IS_DRIVE (newdir[0]) && newdir[1] == ':') + { + drive = newdir[0]; + newdir += 2; + } + if (!IS_DIRECTORY_SEP (nm[0])) + { + char * tmp = alloca (strlen (newdir) + strlen (nm) + 2); + file_name_as_directory (tmp, newdir); + strcat (tmp, nm); + nm = tmp; + } + newdir = alloca (MAXPATHLEN + 1); + if (drive) + { + if (!getdefdir (toupper (drive) - 'A' + 1, newdir)) + newdir = "/"; + } + else + getwd (newdir); + } + + /* Strip off drive name from prefix, if present. */ + if (IS_DRIVE (newdir[0]) && newdir[1] == ':') + { + drive = newdir[0]; + newdir += 2; + } + + /* Keep only a prefix from newdir if nm starts with slash + (//server/share for UNC, nothing otherwise). */ + if (IS_DIRECTORY_SEP (nm[0]) && collapse_newdir) + { +#ifdef WINDOWSNT + if (IS_DIRECTORY_SEP (newdir[0]) && IS_DIRECTORY_SEP (newdir[1])) + { + newdir = strcpy (alloca (strlen (newdir) + 1), newdir); + p = newdir + 2; + while (*p && !IS_DIRECTORY_SEP (*p)) p++; + p++; + while (*p && !IS_DIRECTORY_SEP (*p)) p++; + *p = 0; + } + else +#endif + newdir = ""; + } + } #endif /* DOS_NT */ if (newdir != 0) { - /* Get rid of any slash at the end of newdir. */ + /* Get rid of any slash at the end of newdir, unless newdir is + just // (an incomplete UNC name). */ int length = strlen ((char *) newdir); /* Adding `length > 1 &&' makes ~ expand into / when homedir is the root dir. People disagree about whether that is right. Anyway, we can't take the risk of this change now. */ -#ifdef DOS_NT - if (newdir[1] != ':' && length > 1) + /* Syncing with FSF 19.34.6 note: FSF does the above. */ + if (IS_DIRECTORY_SEP (newdir[length - 1]) +#ifdef WINDOWSNT + && !(length == 2 && IS_DIRECTORY_SEP (newdir[0])) #endif - if (IS_DIRECTORY_SEP (newdir[length - 1])) + ) { Bufbyte *temp = (Bufbyte *) alloca (length); memcpy (temp, newdir, length - 1); @@ -924,7 +1167,7 @@ target += 2; #else /* not DOS_NT */ target = (Bufbyte *) alloca (tlen); -#endif /* not DOS_NT */ +#endif /* DOS_NT */ *target = 0; if (newdir) @@ -953,7 +1196,7 @@ /* // at start of filename is meaningful in Apollo and WindowsNT systems */ && o != target -#endif /* APOLLO */ +#endif /* APOLLO || WINDOWSNT */ ) { o = target; @@ -977,13 +1220,11 @@ { while (o != target && (--o) && !IS_DIRECTORY_SEP (*o)) ; -#if defined (APOLLO) || defined (WINDOWSNT) - if (o == target + 1 - && IS_DIRECTORY_SEP (o[-1]) && IS_DIRECTORY_SEP (o[0])) - ++o; - else -#endif /* APOLLO || WINDOWSNT */ - if (o == target && IS_ANY_SEP (*o)) + if (o == target && IS_ANY_SEP (*o) +#ifdef DOS_NT + && p[3] == 0 +#endif + ) ++o; p += 3; } @@ -994,18 +1235,18 @@ } #ifdef DOS_NT - /* at last, set drive name. */ - if (target[1] != ':' + /* At last, set drive name. */ #ifdef WINDOWSNT - /* Allow network paths that look like "\\foo" */ - && !(IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1])) + /* Except for network file name. */ + if (!(IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1]))) #endif /* WINDOWSNT */ - ) { + if (!drive) abort (); target -= 2; - target[0] = (drive < 0 ? getdisk () + 'A' : drive); + target[0] = DRIVE_LETTER (drive); target[1] = ':'; } + CORRECT_DIR_SEPS (target); #endif /* DOS_NT */ return make_string (target, o - target); @@ -1165,9 +1406,10 @@ string); nm = XSTRING_DATA (string); -#ifdef MSDOS - dostounix_filename (nm = strcpy (alloca (strlen (nm) + 1), nm)); - substituted = !strcmp (nm, XSTRING_DATA (string)); +#ifdef DOS_NT + nm = strcpy (alloca (strlen (nm) + 1), nm); + CORRECT_DIR_SEPS (nm); + substituted = (strcmp (nm, XSTRING_DATA (string)) != 0); #endif endp = nm + XSTRING_LENGTH (string); @@ -1175,17 +1417,14 @@ for (p = nm; p != endp; p++) { - if ((p[0] == '~' || -#ifdef APOLLO - /* // at start of file name is meaningful in Apollo system */ - (p[0] == '/' && p - 1 != nm) -#else /* not APOLLO */ -#ifdef WINDOWSNT - (IS_DIRECTORY_SEP (p[0]) && p - 1 != nm) -#else /* not WINDOWSNT */ - p[0] == '/' -#endif /* not WINDOWSNT */ -#endif /* not APOLLO */ + if ((p[0] == '~' +#if defined (APOLLO) || defined (WINDOWSNT) + /* // at start of file name is meaningful in Apollo and + WindowsNT systems */ + || (IS_DIRECTORY_SEP (p[0]) && p - 1 != nm) +#else /* not (APOLLO || WINDOWSNT) */ + || IS_DIRECTORY_SEP (p[0]) +#endif /* not (APOLLO || WINDOWSNT) */ ) && p != nm && (IS_DIRECTORY_SEP (p[-1]))) @@ -1194,7 +1433,9 @@ substituted = 1; } #ifdef DOS_NT - if (p[0] && p[1] == ':') + /* see comment in expand-file-name about drive specifiers */ + else if (IS_DRIVE (p[0]) && p[1] == ':' + && p > nm && IS_DIRECTORY_SEP (p[-1])) { nm = p; substituted = 1; @@ -1309,22 +1550,18 @@ for (p = xnm; p != x; p++) if ((p[0] == '~' -#ifdef APOLLO - /* // at start of file name is meaningful in Apollo system */ - || (p[0] == '/' && p - 1 != xnm) -#else /* not APOLLO */ -#ifdef WINDOWSNT +#if defined (APOLLO) || defined (WINDOWSNT) || (IS_DIRECTORY_SEP (p[0]) && p - 1 != xnm) -#else /* not WINDOWSNT */ - || p[0] == '/' -#endif /* not WINDOWSNT */ -#endif /* not APOLLO */ +#else /* not (APOLLO || WINDOWSNT) */ + || IS_DIRECTORY_SEP (p[0]) +#endif /* APOLLO || WINDOWSNT */ ) /* don't do p[-1] if that would go off the beginning --jwz */ && p != nm && p > xnm && IS_DIRECTORY_SEP (p[-1])) xnm = p; #ifdef DOS_NT - else if (p[0] && p[1] == ':') + else if (IS_DRIVE (p[0]) && p[1] == ':' + && p > nm && IS_DIRECTORY_SEP (p[-1])) xnm = p; #endif @@ -1342,7 +1579,8 @@ return Qnil; /* suppress compiler warning */ } -/* (directory-file-name (expand-file-name FOO)) */ +/* A slightly faster and more convenient way to get + (directory-file-name (expand-file-name FOO)). */ Lisp_Object expand_and_dir_to_file (Lisp_Object filename, Lisp_Object defdir) @@ -1752,9 +1990,9 @@ barf_or_query_if_file_exists (newname, "rename to it", INTP (ok_if_already_exists), 0); -#ifdef WINDOWSNT - if (!MoveFile (XSTRING (filename)->_data, XSTRING (newname)->_data)) -#else /* not WINDOWSNT */ +/* Syncing with FSF 19.34.6 note: FSF does not have conditional code for + WINDOWSNT here; I've removed it. --marcpa */ + /* FSFmacs only calls rename() here under BSD 4.1, and calls link() and unlink() otherwise, but that's bogus. Sometimes rename() succeeds where link()/unlink() fail, and we have @@ -1762,15 +2000,8 @@ if necessary. */ if (0 > rename ((char *) XSTRING_DATA (filename), (char *) XSTRING_DATA (newname))) -#endif /* not WINDOWSNT */ { -#ifdef WINDOWSNT - /* Why two? And why doesn't MS document what MoveFile will return? */ - if (GetLastError () == ERROR_FILE_EXISTS - || GetLastError () == ERROR_ALREADY_EXISTS) -#else /* not WINDOWSNT */ if (errno == EXDEV) -#endif /* not WINDOWSNT */ { Fcopy_file (filename, newname, /* We have already prompted if it was an integer, @@ -1826,10 +2057,12 @@ || INTP (ok_if_already_exists)) barf_or_query_if_file_exists (newname, "make it a new name", INTP (ok_if_already_exists), 0); -#ifdef WINDOWSNT +/* Syncing with FSF 19.34.6 note: FSF does not report a file error + on NT here. --marcpa */ +#if 0 /* defined(WINDOWSNT) */ /* Windows does not support this operation. */ report_file_error ("Adding new name", Flist (2, &filename)); -#else /* not WINDOWSNT */ +#else /* not 0 -- defined(WINDOWSNT) */ unlink ((char *) XSTRING_DATA (newname)); if (0 > link ((char *) XSTRING_DATA (filename), @@ -1838,7 +2071,7 @@ report_file_error ("Adding new name", list2 (filename, newname)); } -#endif /* not WINDOWSNT */ +#endif /* 0 -- defined(WINDOWSNT) */ UNGCPRO; return Qnil; @@ -1865,7 +2098,7 @@ /* If the link target has a ~, we must expand it to get a truly valid file name. Otherwise, do not expand; we want to permit links to relative file names. */ - if (XSTRING_BYTE (filename, 0) == '~') /* #### Un*x-specific */ + if (XSTRING_BYTE (filename, 0) == '~') filename = Fexpand_file_name (filename, Qnil); linkname = Fexpand_file_name (linkname, Qnil); @@ -1944,7 +2177,7 @@ ptr = XSTRING_DATA (filename); if (IS_DIRECTORY_SEP (*ptr) || *ptr == '~' #ifdef DOS_NT - || (*ptr != 0 && ptr[1] == ':' && (ptr[2] == '/' || ptr[2] == '\\')) + || (IS_DRIVE (*ptr) && ptr[1] == ':' && IS_DIRECTORY_SEP (ptr[2])) #endif ) return Qt; @@ -1963,12 +2196,16 @@ struct stat st; if (stat (filename, &st) < 0) return 0; +#if defined (WINDOWSNT) + return ((st.st_mode & S_IEXEC) != 0); +#else return (S_ISREG (st.st_mode) && len >= 5 && (stricmp ((suffix = filename + len-4), ".com") == 0 || stricmp (suffix, ".exe") == 0 || stricmp (suffix, ".bat") == 0) || (st.st_mode & S_IFMT) == S_IFDIR); +#endif /* not WINDOWSNT */ #else /* not DOS_NT */ #ifdef HAVE_EACCESS return eaccess (filename, 1) >= 0; @@ -2084,11 +2321,18 @@ if (!NILP (handler)) return call2 (handler, Qfile_readable_p, abspath); +#ifdef DOS_NT + /* Under MS-DOS and Windows, open does not work for directories. */ + if (access (XSTRING_DATA (abspath), 0) == 0) + return Qt; + return Qnil; +#else /* not DOS_NT */ desc = open ((char *) XSTRING_DATA (abspath), O_RDONLY, 0); if (desc < 0) return Qnil; close (desc); return Qt; +#endif /* not DOS_NT */ } /* Having this before file-symlink-p mysteriously caused it to be forgotten @@ -2238,10 +2482,28 @@ return call2 (handler, Qfile_accessible_directory_p, filename); +#if !defined(DOS_NT) if (NILP (Ffile_directory_p (filename))) return (Qnil); else return Ffile_executable_p (filename); +#else + { + int tem; + struct gcpro gcpro1; + /* It's an unlikely combination, but yes we really do need to gcpro: + Suppose that file-accessible-directory-p has no handler, but + file-directory-p does have a handler; this handler causes a GC which + relocates the string in `filename'; and finally file-directory-p + returns non-nil. Then we would end up passing a garbaged string + to file-executable-p. */ + GCPRO1 (filename); + tem = (NILP (Ffile_directory_p (filename)) + || NILP (Ffile_executable_p (filename))); + UNGCPRO; + return tem ? Qnil : Qt; + } +#endif /* !defined(DOS_NT) */ } DEFUN ("file-regular-p", Ffile_regular_p, 1, 1, 0, /* @@ -2299,10 +2561,13 @@ if (stat ((char *) XSTRING_DATA (abspath), &st) < 0) return Qnil; + /* Syncing with FSF 19.34.6 note: not in FSF, #if 0'ed out here. */ +#if 0 #ifdef DOS_NT if (check_executable (XSTRING (abspath)->_data)) st.st_mode |= S_IEXEC; #endif /* DOS_NT */ +#endif /* 0 */ return make_int (st.st_mode & 07777); } @@ -2430,6 +2695,56 @@ #ifdef DOS_NT Lisp_Object Qfind_buffer_file_type; + +/* Return 1 if buffer is text, 0 if binary. */ +static int +decide_buffer_type (unsigned char * buffer, int nbytes) +{ + /* Buffer is binary if we find any LF chars not preceeded by CR or if + the buffer doesn't contain at least 1 line. */ + unsigned lines = 0; + unsigned char *p, *q; + + for (p = buffer; nbytes > 0 && (q = memchr (p, '\n', nbytes)) != NULL; + p = q + 1 ) + { + nbytes -= (q + 1 - p); + lines++; + if (q > buffer && q[-1] != '\r') + return 0; + } + + /* If we haven't seen any line endings yet, return -1 (meaning type is + undecided) so we can examine the next bufferful as well. */ + return (lines > 0) ? 1 : -1; +} + +/* XEmacs addition: like decide_buffer_type(), but working on a XEmacs buffer: + first arg is a byte index position instead of a char pointer; + we check each char sequentially. --marcpa */ +static int +buf_decide_buffer_type (struct buffer *buf, Bytind start, int nbytes) +{ + /* Buffer is binary if we find any LF chars not preceeded by CR or if + the buffer doesn't contain at least 1 line. */ + unsigned lines = 0; + Bytind cur = start; + + while (nbytes) + { + if (BI_BUF_FETCH_CHAR(buf, cur) == '\n') + { + lines++; + if (cur != start && BI_BUF_FETCH_CHAR(buf, cur - 1) != '\r') + return 0; + } + nbytes--; + } + + /* If we haven't seen any line endings yet, return -1 (meaning type is + undecided) so we can examine the next bufferful as well. */ + return (lines > 0) ? 1 : -1; +} #endif /* DOS_NT */ /* Stack sizes > 2**16 is a good way to elicit compiler bugs */ @@ -2470,6 +2785,11 @@ struct buffer *buf = current_buffer; Lisp_Object curbuf; int not_regular = 0; +#ifdef DOS_NT + int crlf_conversion_required = 0; + unsigned crlf_count = 0; + unsigned lf_count = 0; +#endif if (buf->base_buffer && ! NILP (visit)) error ("Cannot do file visiting in an indirect buffer"); @@ -2586,17 +2906,30 @@ if (XINT (end) != st.st_size) error ("Maximum buffer size exceeded"); } + +#ifdef DOS_NT + /* Permit old behaviour if desired. */ + if (NILP (Vinsert_file_contents_allow_replace) && !NILP (replace)) + { + replace = Qnil; + /* Surely this was never right! */ + /* XSETFASTINT (beg, 0); + XSETFASTINT (end, st.st_size); */ + buffer_delete_range (buf, BUF_BEGV(buf), BUF_ZV(buf), + !NILP (visit) ? INSDEL_NO_LOCKING : 0); + } +#endif /* DOS_NT */ } /* If requested, replace the accessible part of the buffer with the file contents. Avoid replacing text at the beginning or end of the buffer that matches the file contents; that preserves markers pointing to the unchanged parts. */ -#if !defined (DOS_NT) && !defined (MULE) +#if !defined (MULE) /* The replace-mode code currently only works when the assumption - 'one byte == one char' holds true. This fails under MSDOS and - Windows NT (because newlines are represented as CR-LF in text - files) and under Mule because files may contain multibyte characters. */ + 'one byte == one char' holds true. This fails Mule because + files may contain multibyte characters. It holds under Windows NT + provided we convert CRLF into LF. */ # define FSFMACS_SPEEDY_INSERT #endif #ifndef FSFMACS_SPEEDY_INSERT @@ -2612,6 +2945,38 @@ Bufpos same_at_start = BUF_BEGV (buf); Bufpos same_at_end = BUF_ZV (buf); int overlap; +#ifdef DOS_NT + /* Syncing with 19.34.6 note: same_at_start_in_file and + same_at_end_in_file are not in XEmacs 20.4. + First try to introduce them as-is and see what happens. + Might be necessary to use constructs like + st.st_size - (BUF_ZV (buf) - same_at_end) + instead. + --marcpa + */ + /* Offset into the file where discrepancy begins. */ + int same_at_start_in_file = 0; + /* Offset into the file where discrepancy ends. */ + int same_at_end_in_file = st.st_size; + /* DOS_NT only: is there a `\r' character left in the buffer? */ + int cr_left_in_buffer = 0; + /* DOS_NT only: was `\n' the first character in previous bufferful? */ + int last_was_lf = 0; + + /* Demacs 1.1.1 91/10/16 HIRANO Satoshi, MW July 1993 */ + /* Determine file type (text/binary) from its name. + Note that the buffer_file_type changes here when the file + being inserted is not of the same type as the original buffer. */ + current_buffer->buffer_file_type = call1 (Qfind_buffer_file_type, filename); + if (NILP (current_buffer->buffer_file_type)) + crlf_conversion_required = 1; + else if (current_buffer->buffer_file_type != Qt) + /* Use heuristic to decide whether file is text or binary (based + on the first bufferful) if buffer-file-type is not nil or t. + If no decision is made (because no line endings were ever + seen) then let buffer-file-type default to nil. */ + crlf_conversion_required = -1; +#endif /* DOS_NT */ /* Count how many chars at the start of the file match the text at the beginning of the buffer. */ @@ -2619,7 +2984,16 @@ { int nread; Bufpos bufpos; - +#ifdef DOS_NT + if (cr_left_in_buffer) + { + nread = read_allowing_quit (fd, buffer + 1, sizeof(buffer) - 1); + cr_left_in_buffer = 0; + if (nread >= 0) + nread++; + } + else +#endif /* DOS_NT */ nread = read_allowing_quit (fd, buffer, sizeof buffer); if (nread < 0) error ("IO error reading %s: %s", @@ -2627,17 +3001,73 @@ else if (nread == 0) break; bufpos = 0; +#ifdef DOS_NT + /* If requested, we do a simple check on the first bufferful + to decide whether the file is binary or text. (If text, we + count LF and CRLF occurences to determine whether the file + was in Unix or DOS format.) */ + if (crlf_conversion_required < 0) + { + crlf_conversion_required = decide_buffer_type (buffer, nread); + current_buffer->buffer_file_type = + crlf_conversion_required ? Qnil : Qt; + } + + /* DOS_NT text files require that we ignore a `\r' before a `\n'. */ + if (crlf_conversion_required > 0) + while (bufpos < nread && same_at_start < BUF_ZV (buf)) + { + int filec = buffer[bufpos]; + int bufc = BUF_FETCH_CHAR (buf, same_at_start); + + if (filec == '\n') + lf_count++; + + if (filec == bufc) + same_at_start++, bufpos++, same_at_start_in_file++; + else if (filec == '\r' && bufc == '\n') + { + /* If the `\r' is the last character in this buffer, + it will be examined with the next bufferful. */ + if (bufpos == nread) + { + buffer[0] = filec; + cr_left_in_buffer = 1; + } + else if (buffer[bufpos + 1] == bufc) + { + bufpos += 2; + same_at_start_in_file += 2; + same_at_start++; + crlf_count++; + lf_count++; + } + else + break; + } + else + break; + } + else +#endif /* DOS_NT */ while (bufpos < nread && same_at_start < BUF_ZV (buf) && BUF_FETCH_CHAR (buf, same_at_start) == buffer[bufpos]) +#ifdef DOS_NT + same_at_start_in_file++, +#endif same_at_start++, bufpos++; /* If we found a discrepancy, stop the scan. - Otherwise loop around and scan the next bufferfull. */ + Otherwise loop around and scan the next bufferful. */ if (bufpos != nread) break; } /* If the file matches the buffer completely, there's no need to replace anything. */ +#ifdef DOS_NT + if (same_at_start_in_file == st.st_size) +#else if (same_at_start - BUF_BEGV (buf) == st.st_size) +#endif /* DOS_NT */ { close (fd); unbind_to (speccount, Qnil); @@ -2654,7 +3084,11 @@ Bufpos bufpos, curpos, trial; /* At what file position are we now scanning? */ +#ifdef DOS_NT + curpos = same_at_end_in_file; +#else curpos = st.st_size - (BUF_ZV (buf) - same_at_end); +#endif /* DOS_NT */ /* If the entire file matches the buffer tail, stop the scan. */ if (curpos == 0) break; @@ -2674,17 +3108,64 @@ XSTRING_DATA (filename), strerror (errno)); total_read += nread; } - /* Scan this bufferfull from the end, comparing with + /* Scan this bufferful from the end, comparing with the Emacs buffer. */ bufpos = total_read; +#ifdef DOS_NT + /* DOS_NT text files require that we ignore a `\r' before a `\n'. */ + if (crlf_conversion_required) +#endif /* DOS_NT */ /* Compare with same_at_start to avoid counting some buffer text as matching both at the file's beginning and at the end. */ +#if !defined(DOS_NT) while (bufpos > 0 && same_at_end > same_at_start && BUF_FETCH_CHAR (buf, same_at_end - 1) == buffer[bufpos - 1]) same_at_end--, bufpos--; +#else /* DOS_NT */ + while (bufpos > 0 && same_at_end > same_at_start + && same_at_end_in_file > same_at_start_in_file) + { + int filec = buffer[bufpos - 1]; + int bufc = BUF_FETCH_CHAR (buf, same_at_end - 1); + + /* Account for `\n' in previous bufferful. */ + if (last_was_lf && filec == '\r') + { + same_at_end_in_file--, bufpos--; + last_was_lf = 0; + crlf_count++; + } + else if (filec == bufc) + { + last_was_lf = 0; + same_at_end--, same_at_end_in_file--, bufpos--; + if (bufc == '\n') + { + lf_count++; + if (bufpos <= 0) + last_was_lf = 1; + else if (same_at_end_in_file <= same_at_start_in_file) + break; + else if (buffer[bufpos - 1] == '\r') + same_at_end_in_file--, bufpos--, crlf_count++; + } + } + else + { + last_was_lf = 0; + break; + } + } + else + while (bufpos > 0 && same_at_end > same_at_start + && same_at_end_in_file > same_at_start_in_file + && BUF_FETCH_CHAR (buf, same_at_end - 1) == + buffer[bufpos - 1]) + same_at_end--, same_at_end_in_file--, bufpos--; +#endif /* !defined(DOS_NT) */ /* If we found a discrepancy, stop the scan. - Otherwise loop around and scan the preceding bufferfull. */ + Otherwise loop around and scan the preceding bufferful. */ if (bufpos != 0) break; /* If display current starts at beginning of line, @@ -2701,8 +3182,13 @@ same_at_end += overlap; /* Arrange to read only the nonmatching middle part of the file. */ +#ifdef DOS_NT + beg = make_int (same_at_start_in_file); + end = make_int (same_at_end_in_file); +#else beg = make_int (same_at_start - BUF_BEGV (buf)); end = make_int (st.st_size - (BUF_ZV (buf) - same_at_end)); +#endif /* DOS_NT */ buffer_delete_range (buf, same_at_start, same_at_end, !NILP (visit) ? INSDEL_NO_LOCKING : 0); @@ -2775,6 +3261,85 @@ saverrno = errno; break; } +#ifdef DOS_NT + /* XEmacs (--marcpa) change: FSF does buffer_insert_raw_string_1() first + then checks if conversion is needed, calling lisp + (find-buffer-file-type) which can call a user-function that + might look at the unconverted buffer to decide if + conversion is needed. + I removed the possibility for lisp functions called from + find-buffer-file-type to look at the buffer's content, for + simplicity reasons: it is easier to do the CRLF -> LF + conversion on read_buf than on buffer contents because + BUF_FETCH_CHAR does not return a pointer to an unsigned + char memory location, and because we must cope with bytind + VS bufpos in XEmacs, thus complicating crlf_to_lf(). + This decision (of doing Lstream_read(), crlf_to_lf() then + buffer_insert_raw_string_1()) is debatable. + --marcpa + */ + /* Following FSF note no longer apply now. See comment above. + --marcpa*/ + /* For compatability with earlier versions that did not support the + REPLACE funtionality, we call find-buffer-file-type after inserting + the contents to allow it to inspect the inserted data. (This was + not intentional usage, but proved to be quite useful.) */ + if (NILP (replace)) + { + /* Demacs 1.1.1 91/10/16 HIRANO Satoshi, MW July 1993 */ + /* Determine file type (text/binary) from its name. + Note that the buffer_file_type changes here when the file + being inserted is not of the same type as the original buffer. */ + current_buffer->buffer_file_type = call1 (Qfind_buffer_file_type, filename); + if (NILP (current_buffer->buffer_file_type)) + crlf_conversion_required = 1; + else if (current_buffer->buffer_file_type != Qt) + /* Use heuristic to decide whether file is text or binary (based + on the first bufferful) if buffer-file-type is not nil or t. + If no decision is made (because no line endings were ever + seen) then let buffer-file-type default to nil. */ + crlf_conversion_required = -1; + } + + /* If requested, we check the inserted data to decide whether the file + is binary or text. (If text, we count LF and CRLF occurences to + determine whether the file was in Unix or DOS format.) */ + if (crlf_conversion_required < 0) + { + crlf_conversion_required = + decide_buffer_type (read_buf, this_len); + current_buffer->buffer_file_type = + crlf_conversion_required ? Qnil : Qt; + } + + /* Demacs 1.1.1 91/10/16 HIRANO Satoshi, MW July 1993 */ + /* Remove CRs from CR-LFs if the file is deemed to be a text file. */ + if (crlf_conversion_required) + { + int reduced_size + = this_len - crlf_to_lf (this_len, read_buf, + &lf_count); + crlf_count += reduced_size; + /* XEmacs (--marcpa) change: No need for this since we havent + inserted in buffer yet. */ +#if 0 + ZV -= reduced_size; + Z -= reduced_size; + GPT -= reduced_size; + GAP_SIZE += reduced_size; + inserted -= reduced_size; +#endif + this_len -= reduced_size; + + /* Change buffer_file_type back to binary if Unix eol format. */ + if (crlf_count == 0 && lf_count > 0) + current_buffer->buffer_file_type = Qt; + } + + /* Make crlf_count and lf_count available for inspection. */ + Fset (intern ("buffer-file-lines"), make_int (lf_count)); + Fset (intern ("buffer-file-dos-lines"), make_int (crlf_count)); +#endif /* DOS_NT */ cc_inserted = buffer_insert_raw_string_1 (buf, cur_point, read_buf, this_len, @@ -2793,25 +3358,6 @@ NUNGCPRO; } -#if 0 -/* XXXX Why the #### ? Bogus anyway. If they are there, display em! */ -#ifdef DOS_NT - /* Determine file type from name and remove LFs from CR-LFs if the file - is deemed to be a text file. */ - { - struct gcpro gcpro1; - GCPRO1 (filename); - buf->buffer_file_type - = call1_in_buffer (buf, Qfind_buffer_file_type, filename); - UNGCPRO; - if (NILP (buf->buffer_file_type)) - { - buffer_do_msdos_crlf_to_lf (buf, ####); - } - } -#endif -#endif /* 0 */ - /* Close the file/stream */ unbind_to (speccount, Qnil); @@ -2958,12 +3504,10 @@ to protect the current_buffer from being destroyed, but the multiple return points make this a pain in the butt. */ -#if 0 #ifdef DOS_NT int buffer_file_type = NILP (current_buffer->buffer_file_type) ? O_TEXT : O_BINARY; #endif /* DOS_NT */ -#endif /* 0 */ #ifdef MULE codesys = Fget_coding_system (codesys); @@ -3050,7 +3594,7 @@ if (!NILP (append)) #ifdef DOS_NT desc = open ((char *) XSTRING_DATA (fn), - (O_WRONLY | O_BINARY), 0); + (O_WRONLY | buffer_file_type), 0); #else /* not DOS_NT */ desc = open ((char *) XSTRING_DATA (fn), O_WRONLY, 0); #endif /* not DOS_NT */ @@ -3059,7 +3603,7 @@ { #ifdef DOS_NT desc = open ((char *) XSTRING_DATA (fn), - (O_WRONLY | O_TRUNC | O_CREAT | O_BINARY), + (O_WRONLY | O_TRUNC | O_CREAT | buffer_file_type), (S_IREAD | S_IWRITE)); #else /* not DOS_NT */ desc = creat ((char *) XSTRING_DATA (fn), @@ -4221,4 +4765,24 @@ Saving the buffer normally turns auto-save back on. */ ); disable_auto_save_when_buffer_shrinks = 1; +#ifdef DOS_NT + DEFVAR_LISP ("directory-sep-char", &Vdirectory_sep_char /* + *Directory separator character for built-in functions that return file names. +The value should be either ?/ or ?\\ (any other value is treated as ?\\). +This variable affects the built-in functions only on Windows, +on other platforms, it is initialized so that Lisp code can find out +what the normal separator is. +*/ ); + Vdirectory_sep_char = '/'; + + DEFVAR_LISP ("insert-file-contents-allow-replace", &Vinsert_file_contents_allow_replace /* + *Allow REPLACE option of insert-file-contents to preserve markers. +If non-nil, the REPLACE option works as described, preserving markers. +If nil, the REPLACE option is implemented by deleting the visible region +then inserting the file contents as if REPLACE was nil. + +This option is only meaningful on Windows. +*/ ); + Vinsert_file_contents_allow_replace = Qt; +#endif }
--- a/src/fns.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/fns.c Mon Aug 13 10:05:51 2007 +0200 @@ -2738,7 +2738,7 @@ else if (LRECORDP (object)) { CONST struct lrecord_implementation - *imp = XRECORD_LHEADER (object)->implementation; + *imp = XRECORD_LHEADER_IMPLEMENTATION (object); if (imp->getprop) { val = (imp->getprop) (object, propname); @@ -2780,7 +2780,7 @@ else if (LRECORDP (object)) { CONST struct lrecord_implementation - *imp = XRECORD_LHEADER (object)->implementation; + *imp = XRECORD_LHEADER_IMPLEMENTATION (object); if (imp->putprop) { if (! (imp->putprop) (object, propname, value)) @@ -2825,7 +2825,7 @@ else if (LRECORDP (object)) { CONST struct lrecord_implementation - *imp = XRECORD_LHEADER (object)->implementation; + *imp = XRECORD_LHEADER_IMPLEMENTATION (object); if (imp->remprop) { retval = (imp->remprop) (object, propname); @@ -2861,7 +2861,7 @@ else if (LRECORDP (object)) { CONST struct lrecord_implementation - *imp = XRECORD_LHEADER (object)->implementation; + *imp = XRECORD_LHEADER_IMPLEMENTATION (object); if (imp->plist) return (imp->plist) (object); else @@ -2928,8 +2928,8 @@ else if (LRECORDP (o1)) { CONST struct lrecord_implementation - *imp1 = XRECORD_LHEADER (o1)->implementation, - *imp2 = XRECORD_LHEADER (o2)->implementation; + *imp1 = XRECORD_LHEADER_IMPLEMENTATION (o1), + *imp2 = XRECORD_LHEADER_IMPLEMENTATION (o2); if (imp1 != imp2) return 0; else if (imp1->equal == 0) @@ -3000,8 +3000,8 @@ else if (LRECORDP (o1)) { CONST struct lrecord_implementation - *imp1 = XRECORD_LHEADER (o1)->implementation, - *imp2 = XRECORD_LHEADER (o2)->implementation; + *imp1 = XRECORD_LHEADER_IMPLEMENTATION (o1), + *imp2 = XRECORD_LHEADER_IMPLEMENTATION (o2); if (imp1 != imp2) return 0; else if (imp1->equal == 0)
--- a/src/frame-x.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/frame-x.c Mon Aug 13 10:05:51 2007 +0200 @@ -1,5 +1,5 @@ /* Functions for the X window system. - Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. + Copyright (C) 1989, 1992-5, 1997 Free Software Foundation, Inc. Copyright (C) 1995, 1996 Ben Wing. This file is part of XEmacs. @@ -1224,7 +1224,7 @@ } len = XSTRING_LENGTH (XCAR (run)) + 1; dnd_data = xrealloc (dnd_data, dnd_len + len); - strcpy (dnd_data + dnd_len - 1, XSTRING_DATA (XCAR (run))); + strcpy (dnd_data + dnd_len - 1, (CONST char *)XSTRING_DATA (XCAR (run))); dnd_len += len; run = XCDR (run); } @@ -1239,7 +1239,7 @@ return Qnil; /* and whats with MULE data ??? */ - dnd_data = XSTRING_DATA (data); + dnd_data = (char *)XSTRING_DATA (data); dnd_len = XSTRING_LENGTH (data) + 1; /* the zero */ } @@ -1275,7 +1275,7 @@ x_event.xbutton.button = lisp_event->event.button.button; x_event.xkey.same_screen = True; - DndSetData(dnd_typ, dnd_data, dnd_len); + DndSetData(dnd_typ, (unsigned char *)dnd_data, dnd_len); if (dnd_dealloc) xfree (dnd_data);
--- a/src/insdel.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/insdel.c Mon Aug 13 10:05:51 2007 +0200 @@ -208,6 +208,7 @@ #include "insdel.h" #include "lstream.h" #include "redisplay.h" +#include "line-number.h" /* We write things this way because it's very important the MAX_BYTIND_GAP_SIZE_3 is a multiple of 3. (As it happens, @@ -2438,6 +2439,8 @@ make_gap (buf, length - BUF_GAP_SIZE (buf)); } + insert_invalidate_line_number_cache (buf, pos, nonreloc + offset, length); + record_insert (buf, pos, cclen); BUF_MODIFF (buf)++; MARK_BUFFERS_CHANGED; @@ -2625,6 +2628,8 @@ bi_to = bufpos_to_bytind (buf, to); bc_numdel = bi_to - bi_from; + delete_invalidate_line_number_cache (buf, from, to); + if (to == BUF_Z (buf) && bi_from > BI_BUF_GPT (buf)) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/line-number.c Mon Aug 13 10:05:51 2007 +0200 @@ -0,0 +1,300 @@ +/* Line number cache routines. + Copyright (C) 1997 Free Software Foundation, Inc. + +This file is part of XEmacs. + +XEmacs is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +XEmacs is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with XEmacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Synched up with: Not in FSF. */ + +/* To calculate the line numbers, redisplay must count the newlines + from a known position. This used to be BUF_BEGV, but this made the + redisplay extremely slow for large buffers, because Emacs must + rescan the whole buffer at each redisplay, just to count the + newlines. + + To make line numbering efficient, we maintain a simple-minded + cache. Each buffer contains a small ring of known positions, each + element of the ring being a Lisp_Object -- either nil or a cons of + a buffer position and the line number (beginning with 0). + + When calculating the line numbers, this cache is consulted if it + would otherwise take too much time to count the newlines in the + buffer (see the comment to window_line_number.) + + Insertion and deletions that contain/delete newlines invalidate the + cached positions after the insertion point. This guarantees + relatively fast line numbers caching (even in buffers where point + moves a lot), and low memory usage. + + NOTE: line-number cache should not be confused with line-start + cache. Line-start cache (a part of redisplay) works with the + display lines, whereas this works with the buffer lines (literally + counting the newlines). */ + +#include <config.h> +#include "lisp.h" +#include "buffer.h" +#include "insdel.h" + +#include "line-number.h" + + +/* #### The following three values could use some tweaking, to get the + best performance. */ + +/* Size of the ring. The current code expects this to be a small + number. If you make it much bigger, you should probably tr yto + optimize the various routines to keep it sorted. */ +#define LINE_NUMBER_RING_SIZE 8 + +/* How much traversal has to be exceeded for two points to be + considered "far" from each other. When two points are far, cache + will be used. You can set this to a small value for debugging + purposes. */ +#define LINE_NUMBER_FAR 16384 + +/* How large a string has to be to give up searching it for newlines, + before change. */ +#define LINE_NUMBER_LARGE_STRING 256 + +/* To be used only when you *know* the cache has been allocated! */ +#define LINE_NUMBER_RING(b) (XCAR ((b)->line_number_cache)) +#define LINE_NUMBER_BEGV(b) (XCDR ((b)->line_number_cache)) + + +/* Initialize the cache. Cache is (in pseudo-BNF): + + CACHE = nil | INITIALIZED-CACHE + INITITIALIZED-CACHE = cons (RING, BEGV-LINE) + RING = vector (*RING-ELEMENT) + RING-ELEMENT = nil | RING-PAIR + RING-PAIR = cons (marker, integer) + BEGV-LINE = integer + + Line number cache should never, ever, be visible to Lisp (because + destructively modifying its elements can cause crashes.) Debug it + using debug_print (current_buffer->last_number_cache). */ +static void +allocate_line_number_cache (struct buffer *b) +{ + b->line_number_cache = Fcons (make_vector (LINE_NUMBER_RING_SIZE, Qnil), + Qzero); + narrow_line_number_cache (b); +} + +/* Update line_number_begv. Do it only if the line number cache is + already initialized. */ +void +narrow_line_number_cache (struct buffer *b) +{ + EMACS_INT lots = 999999999, shortage; + + if (NILP (b->line_number_cache)) + return; + /* Optimization: if BUF_BEG == BUF_BEGV (as is the case after Fwiden + and save_restriction_restore), don't bother calling scan_buffer. */ + if (BUF_BEG (b) == BUF_BEGV (b)) + { + LINE_NUMBER_BEGV (b) = Qzero; + return; + } + /* Count the newlines between beginning of buffer and beginning of + the visible portion of the buffer. */ + scan_buffer (b, '\n', BUF_BEG (b), BUF_BEGV (b), lots, + (int *)&shortage, 0); + LINE_NUMBER_BEGV (b) = make_int (lots - shortage); +} + +/* Invalidate the line number cache positions that lie after POS. */ +static void +invalidate_line_number_cache (struct buffer *b, Bufpos pos) +{ + EMACS_INT i, j; + Lisp_Object *ring = XVECTOR_DATA (LINE_NUMBER_RING (b)); + Lisp_Object lisp_buffer = make_buffer (b); + + for (i = 0; i < LINE_NUMBER_RING_SIZE; i++) + { + if (!CONSP (ring[i])) + break; + if (marker_position (XCAR (ring[i])) > pos) + { + /* Get the marker out of the way. */ + Fset_marker (XCAR (ring[i]), Qnil, lisp_buffer); + /* ...and shift the ring elements, up to the first nil. */ + for (j = i; !NILP (ring[j]) && j < LINE_NUMBER_RING_SIZE - 1; j++) + ring[j] = ring[j + 1]; + ring[j] = Qnil; + /* Must reevaluate the thing at position i. */ + i--; + } + } +} + +/* Invalidate the cache positions after POS, if the string to be + inserted contains a newline. If the string is too large (larger + than LINE_NUMBER_LARGE_STRING), invalidate the cache positions + after POS without prior search. + + This will do nothing, if cache is uninitialized. */ +void +insert_invalidate_line_number_cache (struct buffer *b, Bufpos pos, + CONST Bufbyte *nonreloc, Bytecount length) +{ + if (NILP (b->line_number_cache)) + return; + + if (length > LINE_NUMBER_LARGE_STRING + || + /* We could also count how many newlines are in the string, and + update the cache accordingly, but it would be too much work + for too little gain. */ + memchr ((void *)nonreloc, '\n', (size_t) length)) + invalidate_line_number_cache (b, pos); +} + +/* Invalidate the cache positions after FROM, if the region to be + deleted contains a newline. If the region is too large (larger + than LINE_NUMBER_LARGE_STRING), invalidate the cache positions + after FROM without prior search. + + This will do nothing, if cache is uninitialized. */ +void +delete_invalidate_line_number_cache (struct buffer *b, Bufpos from, Bufpos to) +{ + if (NILP (b->line_number_cache)) + return; + + if ((to - from) > LINE_NUMBER_LARGE_STRING) + invalidate_line_number_cache (b, from); + else + { + int shortage; + scan_buffer (b, '\n', from, to, 1, &shortage, 0); + if (!shortage) + /* The same as above applies. */ + invalidate_line_number_cache (b, from); + } +} + + +/* Get the nearest known position we know the line number of + (i.e. BUF_BEGV, and cached positions). The return position will be + either closer than BEG, or BEG. + + *LINE should be initialized to the line number of BEG (normally, + BEG will be BUF_BEGV, and *LINE will be XINT (LINE_NUMBER_BEGV). + This will initialize the cache, if necessary. */ +static void +get_nearest_line_number (struct buffer *b, Bufpos *beg, Bufpos pos, + EMACS_INT *line) +{ + Lisp_Object *ring = XVECTOR_DATA (LINE_NUMBER_RING (b)); + EMACS_INT i; + Charcount length, howfar; + Bufpos newpos; + + length = pos - *beg; + if (length < 0) + length = -length; + + /* Look for the nearest match. */ + for (i = 0; i < LINE_NUMBER_RING_SIZE; i++) + { + if (!CONSP (ring[i])) + break; + newpos = marker_position (XCAR (ring[i])); + howfar = newpos - pos; + if (howfar < 0) + howfar = -howfar; + if (howfar < length) + { + length = howfar; + *beg = newpos; + *line = XINT (XCDR (ring[i])); + } + } +} + +/* Add a (pos, line) pair to the ring, and rotate it. */ +static void +add_line_number (struct buffer *b, Bufpos pos, int line) +{ + Lisp_Object *ring = XVECTOR_DATA (LINE_NUMBER_RING (b)); + Lisp_Object marker; + int i; + + for (i = LINE_NUMBER_RING_SIZE - 1; i > 0; i--) + ring[i] = ring[i - 1]; + marker = Fmake_marker (); + Fset_marker (marker, make_int (pos), make_buffer (b)); + ring[0] = Fcons (marker, make_int (line)); +} + +/* Calculate the buffer line number. If CACHEP is non-zero, + initialize the line-number cache for future use. The line number + of the first line is 0. If narrowing is in effect, count the lines + from the beginning of the visible portion of the buffer. + + The cache works as follows: To calculate the line number, we need + two positions: position of point (POS) and the position from which + to count newlines (BEG). We start by setting BEG to BUF_BEGV. If + this would require too much searching (i.e. pos - BUF_BEGV > + LINE_NUMBER_FAR), try to find a closer position in the ring. If it + is found, use that position for BEG, and increment the line number + appropriately. + + If the calculation (with or without the cache lookup) required more + than LINE_NUMBER_FAR bytes of traversal, update the cache. */ +EMACS_INT +buffer_line_number (struct buffer *b, Bufpos pos, int cachep) +{ + Bufpos beg = BUF_BEGV (b); + EMACS_INT cached_lines = 0; + EMACS_INT lots = 999999999; + EMACS_INT shortage, line; + + if (cachep) + { + if (NILP (b->line_number_cache)) + allocate_line_number_cache (b); + cached_lines = XINT (LINE_NUMBER_BEGV (b)); + get_nearest_line_number (b, &beg, pos, &cached_lines); + } + + scan_buffer (b, '\n', beg, pos, pos > beg ? lots : -lots, + (int *)&shortage, 0); + + line = lots - shortage; + if (beg > pos) + line = -line; + line += cached_lines; + + if (cachep) + { + /* If too far, update the cache. */ + if ((pos > beg ? pos - beg : beg - pos) > LINE_NUMBER_FAR) + add_line_number (b, pos, line); + /* Account for narrowing. If CACHEP is nil, this is + unnecessary, because we counted from BUF_BEGV anyway. */ + if (cachep) + line -= XINT (LINE_NUMBER_BEGV (b)); + } + + return line; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/line-number.h Mon Aug 13 10:05:51 2007 +0200 @@ -0,0 +1,28 @@ +/* Copyright (C) 1997, Free Software Foundation, Inc. + +This file is part of XEmacs. + +XEmacs is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +XEmacs is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with XEmacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Synched up with: Not in FSF. */ + +void mark_line_number_cache (void *, void (*)(Lisp_Object)); +void narrow_line_number_cache (struct buffer *); +void insert_invalidate_line_number_cache (struct buffer *, Bufpos, + CONST Bufbyte *, Bytecount); +void delete_invalidate_line_number_cache (struct buffer *, Bufpos, Bufpos); + +EMACS_INT buffer_line_number (struct buffer *, Bufpos, int);
--- a/src/lisp.h Mon Aug 13 10:05:01 2007 +0200 +++ b/src/lisp.h Mon Aug 13 10:05:51 2007 +0200 @@ -1532,9 +1532,15 @@ /* Can't be const, because then subr->doc is read-only and Snarf_documentation chokes */ +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION +# define subr_lheader_initializer { 0, 0, 0 } +#else +# define subr_lheader_initializer { lrecord_subr } +#endif + #define DEFUN(lname, Fname, minargs, maxargs, prompt, arglist) \ Lisp_Object Fname (DEFUN_##maxargs arglist) ; /* See below */ \ - static struct Lisp_Subr S##Fname = { {lrecord_subr}, \ + static struct Lisp_Subr S##Fname = { subr_lheader_initializer, \ minargs, maxargs, prompt, 0, lname, (lisp_fn_t) Fname }; \ Lisp_Object Fname (DEFUN_##maxargs arglist)
--- a/src/lrecord.h Mon Aug 13 10:05:01 2007 +0200 +++ b/src/lrecord.h Mon Aug 13 10:05:51 2007 +0200 @@ -29,23 +29,25 @@ implemented but only a few bits required in a Lisp object for type information. (The tradeoff is that each object has its type marked in it, thereby increasing its size.) The first - four bytes of all lrecords is a pointer to a struct - lrecord_implementation, which contains methods describing - how to process this object. + four bytes of all lrecords is either a pointer to a struct + lrecord_implementation, which contains methods describing how + to process this object, or an index into an array of pointers + to struct lrecord_implementations plus some other data bits. lrecords are of two types: straight lrecords, and lcrecords. Straight lrecords are used for those types of objects that - have their own allocation routines (typically allocated out - of 2K chunks of memory). These objects have a - `struct lrecord_header' at the top, containing only the - implementation pointer. There are special routines in alloc.c - to deal with each such object type. + have their own allocation routines (typically allocated out of + 2K chunks of memory). These objects have a `struct + lrecord_header' at the top, containing only the bits needed to + find the lrecord_implementation for the object. There are + special routines in alloc.c to deal with each such object + type. Lcrecords are used for less common sorts of objects that don't do their own allocation. Each such object is malloc()ed individually, and the objects are chained together through a `next' pointer. Lcrecords have a `struct lcrecord_header' - at the top, which contains an implementation pointer and + at the top, which contains a `struct lrecord_header' and a `next' pointer, and are allocated using alloc_lcrecord(). Creating a new lcrecord type is fairly easy; just follow the @@ -80,9 +82,33 @@ type-code table dynamically rather that pre-defining them.) I think I remember that Elk Lisp does something like this. Gee, I wonder if some cretin has patented it? */ + + /* + * If USE_INDEXED_LRECORD_IMPLEMENTATION is defined, we are + * implementing the scheme described in the 'It would be better + * ...' paragraph above. + */ +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION + /* index into lrecord_implementations_table[] */ + unsigned type:8; + /* 1 if the object is marked during GC, 0 otherwise. */ + unsigned mark:1; + /* 1 if the object was resides in pure (read-only) space */ + unsigned pure:1; +#else CONST struct lrecord_implementation *implementation; +#endif }; -#define set_lheader_implementation(header,imp) (header)->implementation=(imp) + +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION +# define set_lheader_implementation(header,imp) \ + do { (header)->type = lrecord_type_index((imp)) \ + (header)->mark = 0; \ + (header)->pure = 0; \ + } while (0) +#else +# define set_lheader_implementation(header,imp) (header)->implementation=(imp) +#endif struct lcrecord_header { @@ -178,23 +204,48 @@ int basic_p; }; +extern CONST struct lrecord_implementation *lrecord_implementations_table[]; + +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION +# define XRECORD_LHEADER_IMPLEMENTATION(obj) \ + (lrecord_implementations_table[XRECORD_LHEADER (obj)->type]) +# define LHEADER_IMPLEMENTATION(lh) (lrecord_implementations_table[(lh)->type]) +#else +# define XRECORD_LHEADER_IMPLEMENTATION(obj) \ + (XRECORD_LHEADER (obj)->implementation) +# define LHEADER_IMPLEMENTATION(lh) ((lh)->implementation) +#endif + extern int gc_in_progress; -#define MARKED_RECORD_P(obj) (gc_in_progress && \ +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION +# define MARKED_RECORD_P(obj) (gc_in_progress && XRECORD_LHEADER (obj)->mark) +#else +# define MARKED_RECORD_P(obj) (gc_in_progress && \ XRECORD_LHEADER (obj)->implementation->finalizer == \ this_marks_a_marked_record) +#endif +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION -/* moved here from alloc.c so that lisp.h macros can use them. */ -#define MARKED_RECORD_HEADER_P(lheader) \ +# define MARKED_RECORD_HEADER_P(lheader) (lheader)->mark +# define MARK_RECORD_HEADER(lheader) (lheader)->mark = 1 +# define UNMARK_RECORD_HEADER(lheader) (lheader)->mark = 0 + +#else /* ! USE_INDEXED_LRECORD_IMPLEMENTATION */ + +# define MARKED_RECORD_HEADER_P(lheader) \ (((lheader)->implementation->finalizer) == this_marks_a_marked_record) -#define UNMARKABLE_RECORD_HEADER_P(lheader) \ - (((lheader)->implementation->marker) == this_one_is_unmarkable) -#define MARK_RECORD_HEADER(lheader) \ +# define MARK_RECORD_HEADER(lheader) \ do { (((lheader)->implementation)++); } while (0) -#define UNMARK_RECORD_HEADER(lheader) \ +# define UNMARK_RECORD_HEADER(lheader) \ do { (((lheader)->implementation)--); } while (0) +#endif /* ! USE_INDEXED_LRECORD_IMPLEMENTATION */ + +#define UNMARKABLE_RECORD_HEADER_P(lheader) \ + ((LHEADER_IMPLEMENTATION (lheader)->marker) \ + == this_one_is_unmarkable) /* Declaring the following structures as const puts them in the text (read-only) segment, which makes debugging inconvenient @@ -273,8 +324,15 @@ #define LRECORDP(a) (XTYPE ((a)) == Lisp_Type_Record) #define XRECORD_LHEADER(a) ((struct lrecord_header *) XPNTR (a)) -#define RECORD_TYPEP(x, ty) \ + +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION +# define RECORD_TYPEP(x, ty) \ + (LRECORDP (x) && \ + lrecord_implementations_table[XRECORD_LHEADER (x)->type] == (ty)) +#else +# define RECORD_TYPEP(x, ty) \ (LRECORDP (x) && XRECORD_LHEADER (x)->implementation == (ty)) +#endif /* NOTE: the DECLARE_LRECORD() must come before the associated DEFINE_LRECORD_*() or you will get compile errors.
--- a/src/nt.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/nt.c Mon Aug 13 10:05:51 2007 +0200 @@ -1461,8 +1461,15 @@ int sys_open (const char * path, int oflag, int mode) { + int fd; + /* Force all file handles to be non-inheritable. */ - return _open (map_win32_filename (path, NULL), oflag | _O_NOINHERIT, mode); + fd = _open (map_win32_filename (path, NULL), oflag | _O_NOINHERIT, mode); + if (fd >= 0) + { + fd_info[fd].cp = 0; + } + return (fd); } int @@ -1740,7 +1747,8 @@ BY_HANDLE_FILE_INFORMATION info; /* No access rights required to get info. */ - fh = CreateFile (name, 0, 0, NULL, OPEN_EXISTING, 0, NULL); + fh = CreateFile (name, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, 0, NULL); if (GetFileInformationByHandle (fh, &info)) {
--- a/src/nt.h Mon Aug 13 10:05:01 2007 +0200 +++ b/src/nt.h Mon Aug 13 10:05:51 2007 +0200 @@ -40,8 +40,11 @@ /* File descriptor set emulation. */ -/* MSVC runtime library has limit of 64 descriptors by default */ -#define FD_SETSIZE 64 +/* The MSVC multithreaded statically-linked runtime library has limit + of 256 descriptors by default (the single-threaded static library + has a limit of 64 descriptors, and the DLL versions both have a + limit of 512). Beware. Should this be set to 512? */ +#define FD_SETSIZE 256 typedef struct { unsigned int bits[FD_SETSIZE / 32]; } fd_set;
--- a/src/offix.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/offix.c Mon Aug 13 10:05:51 2007 +0200 @@ -56,7 +56,7 @@ typedef struct { int Width,Height; - char *ImageData,*MaskData; + unsigned char *ImageData,*MaskData; int HotSpotX,HotSpotY; Pixmap ImagePixmap,MaskPixmap; Cursor CursorID;
--- a/src/print.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/print.c Mon Aug 13 10:05:51 2007 +0200 @@ -995,9 +995,11 @@ if (print_readably) error ("printing unreadable object #<%s 0x%x>", - header->lheader.implementation->name, header->uid); + LHEADER_IMPLEMENTATION (&header->lheader)->name, + header->uid); - sprintf (buf, "#<%s 0x%x>", header->lheader.implementation->name, + sprintf (buf, "#<%s 0x%x>", + LHEADER_IMPLEMENTATION (&header->lheader)->name, header->uid); write_c_string (buf, printcharfun); } @@ -1008,7 +1010,7 @@ { char buf[200]; sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (%s) 0x%p>", - XRECORD_LHEADER (obj)->implementation->name, + XRECORD_LHEADER_IMPLEMENTATION (obj)->name, (void *) XPNTR (obj)); write_c_string (buf, printcharfun); } @@ -1191,8 +1193,8 @@ #endif GCPRO2 (obj, printcharfun); - if (lheader->implementation->printer) - ((lheader->implementation->printer) + if (LHEADER_IMPLEMENTATION (lheader)->printer) + ((LHEADER_IMPLEMENTATION (lheader)->printer) (obj, printcharfun, escapeflag)); else default_object_printer (obj, printcharfun, escapeflag); @@ -1546,7 +1548,7 @@ debug_print (Lisp_Object debug_print_obj) { debug_print_no_newline (debug_print_obj); - stderr_out ("\n"); + stderr_out ("\r\n"); fflush (stderr); }
--- a/src/redisplay.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/redisplay.c Mon Aug 13 10:05:51 2007 +0200 @@ -56,6 +56,7 @@ #include "redisplay.h" #include "toolbar.h" #include "window.h" +#include "line-number.h" #ifdef MULE #include "mule-coding.h" @@ -5674,34 +5675,36 @@ #endif /* INHIBIT_REDISPLAY_HOOKS */ } -/* Inefficiently determine the line number of the line point is on and - return it as a string. Always do this regardless of whether - line_number_mode is true. */ - -static char window_line_number_buf[100]; + +static char window_line_number_buf[16]; + +/* Efficiently determine the window line number, and return a pointer + to its printed representation. Do this regardless of whether + line-number-mode is on. The first line in the buffer is counted as + 1. If narrowing is in effect, the lines are counted from the + beginning of the visible portion of the buffer. */ static char * window_line_number (struct window *w, int type) { struct device *d = XDEVICE (XFRAME (w->frame)->device); struct buffer *b = XBUFFER (w->buffer); - Bufpos end = + Bufpos pos = (((w == XWINDOW (FRAME_SELECTED_WINDOW (device_selected_frame (d)))) && EQ(DEVICE_CONSOLE(d), Vselected_console) && XDEVICE(CONSOLE_SELECTED_DEVICE(XCONSOLE(DEVICE_CONSOLE(d)))) == d && EQ(DEVICE_SELECTED_FRAME(d), w->frame)) ? BUF_PT (b) : marker_position (w->pointm[type])); - int lots = 999999999; - int shortage, line; - - scan_buffer (b, '\n', end, 0, -lots, &shortage, 0); - line = lots - shortage + 1; - - sprintf (window_line_number_buf, "%d", line); + EMACS_INT line; + + line = buffer_line_number (b, pos, 1); + + sprintf (window_line_number_buf, "%d", line + 1); return window_line_number_buf; } + /* Given a character representing an object in a modeline specification, return a string (stored into the global array `mode_spec_bufbyte_string') with the information that object
--- a/src/s/windowsnt.h Mon Aug 13 10:05:01 2007 +0200 +++ b/src/s/windowsnt.h Mon Aug 13 10:05:51 2007 +0200 @@ -209,6 +209,8 @@ #endif #endif +#include <stdio.h> + /* IO calls that are emulated or shadowed */ #define pipe sys_pipe @@ -226,6 +228,7 @@ #define select sys_select /* map to MSVC names */ +#define chdir _chdir #define execlp _execlp #define execvp _execvp #define fcloseall _fcloseall
--- a/src/symbols.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/symbols.c Mon Aug 13 10:05:51 2007 +0200 @@ -3109,7 +3109,8 @@ /* some losing systems can't have static vars at function scope... */ static struct symbol_value_magic guts_of_unbound_marker = - { { { lrecord_symbol_value_forward }, 0, 69}, SYMVAL_UNBOUND_MARKER }; + { { symbol_value_forward_lheader_initializer, 0, 69}, + SYMVAL_UNBOUND_MARKER }; void init_symbols_once_early (void)
--- a/src/symeval.h Mon Aug 13 10:05:01 2007 +0200 +++ b/src/symeval.h Mon Aug 13 10:05:51 2007 +0200 @@ -76,7 +76,7 @@ }; #define SYMBOL_VALUE_MAGIC_P(x) \ (LRECORDP (x) \ - && (XRECORD_LHEADER (x)->implementation->printer \ + && (XRECORD_LHEADER_IMPLEMENTATION (x)->printer \ == print_symbol_value_magic)) #define XSYMBOL_VALUE_MAGIC_TYPE(v) \ (((struct symbol_value_magic *) XPNTR (v))->type) @@ -300,9 +300,16 @@ extern void defvar_mumble (CONST char *names, CONST void *magic, int sizeof_magic); +#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION +# define symbol_value_forward_lheader_initializer { 1, 0, 0 } +#else +# define symbol_value_forward_lheader_initializer \ + { lrecord_symbol_value_forward } +#endif + #define DEFVAR_HEADER(lname, c_location, forward_type) do { \ static CONST struct symbol_value_forward I_hate_C \ - = { { { { lrecord_symbol_value_forward }, \ + = { { { symbol_value_forward_lheader_initializer, \ (struct lcrecord_header *) (c_location), 69 }, \ forward_type }, 0 }; \ defvar_mumble ((lname), &I_hate_C, sizeof (I_hate_C)); \ @@ -310,7 +317,7 @@ #define DEFVAR_MAGIC_HEADER(lname, c_location, forward_type, magicfun) do { \ static CONST struct symbol_value_forward I_hate_C \ - = { { { { lrecord_symbol_value_forward }, \ + = { { { symbol_value_forward_lheader_initializer, \ (struct lcrecord_header *) (c_location), 69 }, \ forward_type }, magicfun }; \ defvar_mumble ((lname), &I_hate_C, sizeof (I_hate_C)); \
--- a/src/symsinit.h Mon Aug 13 10:05:01 2007 +0200 +++ b/src/symsinit.h Mon Aug 13 10:05:51 2007 +0200 @@ -204,6 +204,7 @@ void vars_of_device_w32 (void); void vars_of_device_x (void); void vars_of_dialog (void); +void vars_of_dialog_x (void); void vars_of_dired (void); void vars_of_doc (void); void vars_of_editfns (void);
--- a/src/sysdep.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/sysdep.c Mon Aug 13 10:05:51 2007 +0200 @@ -594,7 +594,7 @@ pid = -1; #else /* not WINDOWSNT */ - pid = vfork (); + pid = fork (); if (pid == -1) error ("Can't spawn subshell");
--- a/src/window.c Mon Aug 13 10:05:01 2007 +0200 +++ b/src/window.c Mon Aug 13 10:05:51 2007 +0200 @@ -2926,7 +2926,6 @@ else if (!NILP (major_kid)) { int last_pos, last_old_pos, pos, old_pos, first; - int pixel_adj_left = new_pixsize - old_pixsize; int div_val = old_pixsize << 1; /*
--- a/version.sh Mon Aug 13 10:05:01 2007 +0200 +++ b/version.sh Mon Aug 13 10:05:51 2007 +0200 @@ -1,5 +1,5 @@ #!/bin/sh emacs_major_version=20 emacs_minor_version=4 -emacs_beta_version=3 -xemacs_codename="Altai Mountain" +emacs_beta_version=4 +xemacs_codename="American Cashmere"
--- a/w32/ChangeLog Mon Aug 13 10:05:01 2007 +0200 +++ b/w32/ChangeLog Mon Aug 13 10:05:51 2007 +0200 @@ -1,94 +1,140 @@ -Wed November 05 23:40:00 1997 <jhar@tardis.ed.ac.uk> +Thu September 25 23:06:44 1997 davidh + + * xemacs.mak updated to make the build as simple as typing + nmake -f xemacs.mak. Also support for native gui included + which should mean the w32 directory is no longer required. + + * config.h synced with config.h.in from 20.3-b2 + + * synced in changes to support native gui. - * faces.el: init-other-random-faces - Reinstated code that uses (mono x) as a specifer tag, but - conditioned it on (featurep 'x) because x is not a valid - specifier tag under native-win32. - - * fileio.c: insert-file-contents-internal - Added a bodge to do CRLF->LF conversion of text files, - conditioned on DOS_NT. This is currently only one-way, so all - text files written by XEmacs will be UNIXified. CRLF conversion - is required to make bytecompile work. - - * w32/xemacs.mak: moved building the DOC file to after the .elcs. - - * Added file headers to: - w32-faces.el, w32-init.el, console-w32.c, console-w32.h, - device-w32.c, event-w32.c, event-w32.h, frame-w32.c, - objects-w32.c, objects-w32.h, redisplay-w32.c, w32-proc.c +Thu September 25 23:06:44 1997 davidh + + * August Hill provided a patch to xemacs.mak to greatly simplify + the build - the DOC file gets created correctly. + +Tue September 22 23:06:44 1997 davidh + + * August Hill provided some more patches - to expand ~ correctly + and to correctly deal with drive letters in the path. + + * emacs.c patched to call init_ntproc() -Sun November 01 12:00:00 1997 <jhar@tardis.ed.ac.uk> - - * make-docfile.el: Fixed typo when dumped file does not exist. +Tue July 15 19:32:21 1997 davidh - * redisplay-x.c: x_output_vertical_divider: - If HAVE_SCROLLBARS was not defined, coordinate of the right of - the divider was being used unitialised. + * August Hill provided some more patches to make things better + - there is a workaround for dired to make the ^M's disappear + - a patch to fix shell-command - * device.el: make-w32-device added. - - * dumped-lisp: added w32-faces and w32-init to list. +Tue July 08 22:01:36 1997 davidh - * faces.el: - - make-face-*: Added calls to appropriate w32 functions - conditioned on (featurep 'w32). Made existing X calls - conditioned on (featurep 'x). - - init-other-random-faces: Hacked out a piece of code which used - (mono x) as a specifier because it made w32 unhappy. - - * console.h: Added Qw32 and CONSOLE_W32* macros, conditioned on - HAVE_W32GUI. + * #ifdef'd call to vfork and replaced with spawn as per GNU Emacs; + as a result, removed /force - XEmacs now links normally. - * emacs.c: Added calls to the following, conditioned on HAVE_W32GUI: - syms_of_*_w32, vars_of_*_w32, console_type_create_*w32. - - * event-stream.c: Conditioned on HAVE_W32GUI: - - vars_of_event_stream calls vars_of_event_w32. - - init_event_stream calls init_event_w32_late. +Thu June 31 21:16:21 1997 davidh - * events-mod.h: Removed comment about having alternative making - MOD_* constants for different windowing systems. + * nt/TODO created. - * events.c: Conditioned on HAVE_W32GUI: - - event-equal: Added case for w32 magic events. - - event-hash: Added case for w32 magic events. + * nt/X11.patch created to help with the X build. - * events.h: Conditioned on HAVE_W32GUI: - Added struct underlying_w32_event to magic_data. + * August Hill provided: + a patch to fix the _WRETCODE undefined symbol, + a patch to fix a problem with dired + + and generally helped clarify the build instructions. + + * Synced with 20.3b10 (Athens). + + * Made DIRECTORY_SEP be '\\'. Until I can change all code to + use the macro, I decided this would be easiest. - * faces.c: complex_vars_of_faces - Added fallbacks for w32 faces, conditioned on HAVE_W32GUI. + * Modified src/fileio.c to only open files in O_BINARY. This + causes files to be opened and written without automatically + writing ^M 's to the end of each line. MULE ought to sort this + in theory, but I am less than convinced. + + * Updated the nt/README to provide a little more help. + +Thu May 29 23:11:21 1997 davidh + + * Synced with 20.3b2. - * frame.c: set-frame-properties - Added reference to default-w32-frame-plist to docstring. + * Removed nt/README.src, nt/src.m.windowsnt.h nt/src.s.windowsnt.h. + + * Updated README from marcpa. + + * Added example Win32.cf and site.def files for X. - * general.c: Added new Lisp_Object Qw32 and defsymbol. + * Added sed.exe into nt/. + + * Modified nt/xemacs.mak to pass correct flags to lwlib compile. + + * Added extra .elc files to ensure make-docfile gets all symbols. - * redisplay-output.c: redisplay_update_line - Conditioned reference to stupid_vertical_scrollbar_drag_hack on - HAVE_X_WINDOWS. This will need a proper fix when w32 gets - scrollbars. + * Modified balloon_help.c to compile (#if'd max definition) + + * Modified src/event-Xt.c so as not to add signal_event_pipe to + be selected on - this is a hack until I can work out a better + way. Thanks to Ben Wing for help on this. + +Thu Mar 27 20:56:21 1997 marcpa (marcpa at MARCPA) + + * Synced with 20.1b9. + +Sun Mar 16 00:32:15 1997 marcpa (marcpa at MARCPA) - * redisplay-tty.c: init_tty_for_redisplay - Conditioned blocking and unblocking of SIGTTOU on !WIN32 because - these signals don't exist under win32. + * lisp/eterm/README.term is truncated: is it just me (because + I'm on NT) or everyone else sees this ? + Answer: it is because it contains a ^Z embedded in it, therefore + it needs to be inserted in binary mode in CVS. + +Thu Mar 13 00:19:25 1997 marcpa (marcpa at MARCPA) + + * At end of compilation, there are some unresolved symbols: - * redisplay.c: init_redisplay - Initialise window system to w32, conditioned on HAVE_W32GUI. - - * symsinit.h: Added syms_of_*_w32, vars_of_*_w32 and - init_event_w32_late. +link.exe @C:\TEMP\nma00115. +sysdep.obj : error LNK2001: unresolved external symbol _vfork +../src/temacs.exe : warning LNK4088: image being generated due to /FORCE +option; image may not run + + +Wed Mar 12 23:18:53 1997 marcpa (marcpa at MARCPA) + + * Need to copy the nt/inc directory David originally submitted or + NT code won't compile. + + * Need to copy nt/{config.h,paths.h,ad2c.sed,xemacs.mak} in src. + + * Had to modify XEmacs sources here and there : see the diffs + between NT_FIRST_COMPILE and V20_1_beta9. - * sysdep.c: Conditioned various things on WIN32 in addition to - MSDOS. - - * New files: - w32-faces.el, w32-init.el, console-w32.c, console-w32.h, - device-w32.c, event-w32.c, event-w32.h, frame-w32.c, - objects-w32.c, objects-w32.h, redisplay-w32.c, w32-proc.c + * Needed to patch X11R6.3 sources: (include/x11/Xmd.h:155) BOOL is + already defined by Windows and is a long, while X wants it to be + an unsigned char. + +--- Xmd.h~ Thu Jun 08 23:20:40 1995 ++++ Xmd.h Sun Mar 16 13:09:10 1997 +@@ -150,8 +150,9 @@ + typedef CARD16 BITS16; + typedef CARD8 BYTE; + ++#ifndef WIN32 + typedef CARD8 BOOL; +- ++#endif - * Files split from nt to new w32 directory: - ChangeLog, README, Todo, paths.h, config.h, inc/*, runemacs.c, - xemacs.mak. + * cpp.exe not used: cl.exe from VC++4.2 seems to handle everything + properly. + +NOTES: + +Compilation with nmake -f xemacs.mak. + +Using X11R6.3 for NT. + +Work started with 20.1b2. + +Local Variables: +mode: change-log +End:
--- a/w32/README Mon Aug 13 10:05:01 2007 +0200 +++ b/w32/README Mon Aug 13 10:05:51 2007 +0200 @@ -2,55 +2,74 @@ David Hobley Marc Paquette - Jonathan Harris + Jonathon Harris -Currently XEmacs for win32 is in an early stage of development. +Currently XEmacs for Win32 is in an early stage of development. The port was made much easier by the groundbreaking work of Geoff Voelker and others who worked on the GNU Emacs port to NT. Their version is available from http://www.cs.washington.edu/homes/voelker/ntemacs.html -(jhar) I split the native-win32 build directory off from the nt build -directory. This is probably(?) a bad thing and I intend to try to merge the -w32 changes back in. - To get it working you will need: 1. You will need Visual C++ V4.2 or later to compile everything. Personally we have tested V4.2 and V5.0. -2. Grab the latest XEmacs beta from ftp.xemacs.org if necessary. All - native-win32 support is in the w32/ subdirectory. +2. Grab the latest XEmacs beta from ftp.xemacs.org if necessary. All Win32 + support is in the nt/ subdirectory. 3. Edit the xemacs.mak file and ensure variables point to the correct place. Note that Visual C++ assumes a couple of environment variables INCLUDE and LIB to be set which specify the location of the includes and libraries. -4. Copy the files config.h and paths.h from w32/ to src/. - "nmake -f xemacs.mak distclean" will delete these files, so always edit - them in the w32 direvctory and copy them over. -5. "nmake -f xemacs.mak" Build temacs.exe. - "nmake -f xemacs.mak dump-elcs" Update the .elc files. - "nmake -f xemacs.mak dump-xemacs" Build xemacs.exe. -6. Ensure your HOME environment variable is set correctly. -7. The build process creates debugging and "Source Browser" information for + At this point you can select X or Win32 native support. +4. Run make. I simply use nmake -f xemacs.mak. This will build temacs, the + DOC file, if startup.elc does not exist it will update the elc's and + then it will dump xemacs. +5. The build process creates debugging and "Source Browser" information for use with MS DevStudio. To use this create a new "console" project and set the Project/Settings/Debug executable name to the full path of src\xemacs.exe. Remember to close the Source Browser file in DevStudio before rebuilding. -8. If you're going to edit sources I recommend that you first get a copy of +6. If you're going to edit sources I recommend that you first get a copy of makedepend and make a list of dependencies in the makefile by doing "nmake -f xemacs.mak depend". I (jhar) have a hacked-up copy of X11R5 makedepend which I can distribute if anyone wants it. Is there a real version anywhere which handles '\' as the path delimiter? +If you want support for X you will need: +1. An X server. MI/X is available on the Internet for free; It is + available from: http://www.microimages.com/www/html/freestuf/mixdlfrm.htm +2. The MIT X11R6.3 libraries available from: ftp.x.org +3. You'll need to compile the MIT libraries without multi-thread support. + To do this, there is an example Win32.cf and site.def provided which + set the relevant flags. You will also need to apply the patch in + nt/X11.patch in the xc/lib/X11 directory which will fix the DLL definition + file. Once compiled and installed, you will need to apply the following + patch to Xmd.h. This is messy and better solutions would be appreciated. + +--- Xmd.h~ Thu Jun 08 23:20:40 1995 ++++ Xmd.h Sun Mar 16 13:09:10 1997 +@@ -150,8 +150,9 @@ + typedef CARD16 BITS16; + typedef CARD8 BYTE; + ++#ifndef WIN32 + typedef CARD8 BOOL; +- ++#endif + Known Problems: Please look at the TODO list for the current list of problems and people working on them. -David Hobley david_hobley@optusvision.com.au -- work email. - davidh@wr.com.au -- home account. +Any other problems you need clarified, please email us and we will endeavour +to provide any assistance we can: + +The XEmacs NT Mailing List: xemacs-nt@xemacs.org +Subscribe address: xemacs-nt-request@xemacs.org -Marc Paquette marcpa@cam.org -- home account. +David Hobley +Marc Paquette +August Hill +Jonathon Harris -August Hill awhill@inlink.com - -Jonathan Harris jhar@tardis.ed.ac.uk +and others.
--- a/w32/Todo Mon Aug 13 10:05:01 2007 +0200 +++ b/w32/Todo Mon Aug 13 10:05:51 2007 +0200 @@ -1,24 +1,44 @@ -Known Bugs ----------- -1. Mouse drags can cause aborts. I think this is because the timeout - implementation is broken and can cause the same timeout to go - off twice (especially during mouse drags?), which makes XEmacs abort. - Windows95 doesn't appear to provide any one-shot timers (NT does). -2. Saving text files doesn't translate LFs back to CRLFs. -3. XEmacs starts-up with an error or errors. +# List of problems with XEmacs. If anyone wants to work on these, please +# mail me and I'll update the table below. +# Core NT issues + 1. Subprocess support is completely broken. + 2. Networking support is completely broken. This is due to the fact that + the model relies on the subprocess support also working. + 4. No binary release. We know a binary release would be A Good Thing. + However we want to make things stable before producing one so we don't + have to field too many problems. Sorry. + 5. Support for dired is perhaps not quite there. We need to port ls-lisp.el + from FSF Emacs. + 6. Currently the backup files do not get the same permissions as the file + being edited. August Hill is looking at this one. + 7. Verify that CRLF issues are dealt with correctly. Marc Paquette is + looking at this. + +# X issues + 1. Redrawing on my (davidh) system seems fairly broken - I don't know if + this is the XEmacs redraw functionality, my X server or just something + strange with X under NT. Has anyone else experiences with this ? -ToDo ----- -1. w32-make-font-foo in w32/w32-faces.el need to be written. -2. Calling mouse_[enter|leave]_frame_hook. -3. CRLF text file handling. -4. Subprocess and socket support. -5. Eliminate resizing funnies -6. Scrollbar -7. Menubar -8. Larger color database. Palette handling -9. Middle mouse button emulation. Dragging off-frame. -10. Images -11. Toolbar +# Native GUI issues + 1. Mouse drags can cause aborts. I think this is because the timeout + implementation is broken and can cause the same timeout to go + off twice (especially during mouse drags?), which makes XEmacs abort. + Windows95 doesn't appear to provide any one-shot timers (NT does). + 2. XEmacs starts-up with "Arithmetic error". + 3. It might be a good idea if someone sanity-checked my (jhar) changes to + faces.el. + 4. w32-make-font-foo in w32/w32-faces.el need to be written. + 5. Calling mouse_[enter|leave]_frame_hook. + 6. Eliminate resizing funnies + 7. Scrollbar + 8. Menubar + 9. Palette handling + 10. Middle mouse button emulation. Dragging off-frame. + 11. Images + 12. Toolbar +Old Issues. + + 1. For some reason, HOME is a required environment variable. +
--- a/w32/config.h Mon Aug 13 10:05:01 2007 +0200 +++ b/w32/config.h Mon Aug 13 10:05:51 2007 +0200 @@ -23,16 +23,45 @@ /* No code in XEmacs #includes config.h twice, but some of the code intended to work with other packages as well (like gmalloc.c) think they can include it as many times as they like. */ -#ifndef _CONFIG_H_ -#define _CONFIG_H_ +#ifndef _SRC_CONFIG_H_ +#define _SRC_CONFIG_H_ -/* #### This will be removed in 19.15. */ +#define NTHEAP_PROBE_BASE 1 #define LOSING_BYTECODE -#define NTHEAP_PROBE_BASE 1 +/* Use this to add code in a structured way to FSF-maintained source + files so as to make it obvious where XEmacs changes are. */ +#define XEMACS + +/* Allow s&m files to differentiate OS versions without having + multiple files to maintain. */ +#undef OS_RELEASE + +/* The configuration name. This is used as the install directory name + for the lib-src programs. */ +#undef EMACS_CONFIGURATION + +/* The configuration options. This is exported to Lisp. */ +#undef EMACS_CONFIG_OPTIONS -/* These are all defined in the top-level Makefile by configure. - They're here only for reference. */ +/* The version info from xemacs.mak via version.sh. Used in #pragma ident + in emacs.c */ +#if 0 +#undef EMACS_MAJOR_VERSION +#undef EMACS_MINOR_VERSION +#undef EMACS_BETA_VERSION +#undef EMACS_VERSION +#undef XEMACS_CODENAME +#endif + +/* Make all functions available on AIX. See AC_AIX. */ +#undef _ALL_SOURCE + +/* Used to identify the XEmacs version in stack traces. */ +#undef STACK_TRACE_EYE_CATCHER + +/* Allow the configurer to specify (additional) package directories. */ +#undef PACKAGE_PATH /* Define LISP_FLOAT_TYPE if you want XEmacs to support floating-point numbers. */ @@ -47,14 +76,57 @@ /* Define HAVE_TTY if you want TTY support compiled in. */ #undef HAVE_TTY -/* Define HAVE_X_WINDOWS if you want to use the X window system. */ -#undef HAVE_X_WINDOWS /* XXX Jon */ +/* Compile in support for the X window system? */ +/* #undef HAVE_X_WINDOWS -- defined in xemacs.mak */ + +/* Defines for building X applications */ +#ifdef HAVE_X_WINDOWS +/* The following will be defined if xmkmf thinks they are necessary */ +#undef SVR4 +#undef SYSV +#undef AIXV3 +#undef _POSIX_SOURCE +#undef _BSD_SOURCE +#undef _GNU_SOURCE +#undef X_LOCALE +#undef NARROWPROTO +/* The following should always be defined, no matter what xmkmf thinks. */ +#ifndef NeedFunctionPrototypes +#define NeedFunctionPrototypes 1 +#endif +#ifndef FUNCPROTO +#define FUNCPROTO 15 +#endif + +/* Define this if you're using XFree386. */ +#undef HAVE_XFREE386 -/* Define HAVE_NEXTSTEP if you want to use the NeXTstep window system. */ -#undef HAVE_NEXTSTEP +#undef THIS_IS_X11R4 +#undef THIS_IS_X11R5 +#define THIS_IS_X11R6 + +/* Define HAVE_XPM if you have the `xpm' library and want XEmacs to use it. */ +#undef HAVE_XPM + +/* Define HAVE_XFACE if you have the `compface' library and want to use it. + This will permit X-face pixmaps in mail and news messages to display + quickly. */ +#undef HAVE_XFACE -/* Define HAVE_W32 if you want to use the MS win32 GUI. */ -#define HAVE_W32GUI +#define HAVE_IMAGEMAGICK + +/* Define HAVE_XMU if you have the Xmu library. This should always be + the case except on losing HPUX systems. */ +#define HAVE_XMU + +/* Define HAVE_XAUTH if the Xauth library is present. This will add + some extra functionality to gnuserv. */ +#undef HAVE_XAUTH + +/* Define HAVE_XLOCALE_H if X11/Xlocale.h is present. */ +#define HAVE_XLOCALE_H + +#endif /* HAVE_X_WINDOWS */ /* Define HAVE_WINDOW_SYSTEM if any windowing system is available. */ #if defined (HAVE_X_WINDOWS) || defined (HAVE_NEXTSTEP) || defined (HAVE_W32GUI) @@ -66,13 +138,6 @@ #define HAVE_UNIXOID_EVENT_LOOP #endif -/* Define this if you're using XFree386. */ -#undef HAVE_XFREE386 - -#undef THIS_IS_X11R4 -#undef THIS_IS_X11R5 -#undef THIS_IS_X11R6 /* XXX Jon */ - /* Define USER_FULL_NAME to return a string that is the user's full name. It can assume that the variable `pw' @@ -83,9 +148,6 @@ field contains the right thing, use pw_name, giving the user's login name, since that is better than nothing. */ #define USER_FULL_NAME pw->pw_gecos -#if 0 -#define USER_FULL_NAME unknown -#endif /* Define AMPERSAND_FULL_NAME if you use the convention that & in the full name stands for the login id. */ @@ -106,7 +168,9 @@ #define HAVE_SYS_TIME_H #define HAVE_LOCALE_H -#undef HAVE_X11_LOCALE_H /* XXX Jon */ +#ifdef HAVE_X_WINDOWS +#define HAVE_X11_LOCALE_H +#endif #define STDC_HEADERS #define HAVE_LIMITS_H #define HAVE_GETCWD @@ -117,6 +181,8 @@ #define CLASH_DETECTION #endif +#undef HAVE_LIBKSTAT +#undef HAVE_LIBINTL #undef HAVE_LIBDNET #undef HAVE_LIBRESOLV @@ -129,7 +195,6 @@ /* Define if `struct timeval' is declared by <sys/time.h>. */ #define HAVE_TIMEVAL - #undef TM_IN_SYS_TIME #undef HAVE_TM_ZONE #undef HAVE_TZNAME @@ -147,19 +212,19 @@ #undef GETTIMEOFDAY_ONE_ARGUMENT #endif -/* Define in keyword `inline' exists. */ -#undef HAVE_INLINE - -#undef HAVE_ALLOCA_H -#undef HAVE_VFORK_H -#undef vfork +/* Is the timezone variable already declared in system headers? */ +#undef HAVE_TIMEZONE_DECL #undef HAVE_MMAP #undef HAVE_STRCOLL +#undef HAVE_GETPGRP +#undef GETPGRP_VOID #undef SIZEOF_SHORT #undef SIZEOF_INT #undef SIZEOF_LONG +#undef SIZEOF_LONG_LONG +#undef SIZEOF_VOID_P #undef HAVE_ACOSH #undef HAVE_ASINH @@ -220,9 +285,6 @@ #undef NLIST_STRUCT -#undef UNEXEC_SRC -#undef AIX_SMT_EXP - /* Define HAVE_SOCKS if you have the `socks' library and want XEmacs to use it. */ #undef HAVE_SOCKS @@ -231,80 +293,23 @@ want XEmacs to use it. */ #undef HAVE_TERM -/* Define HAVE_XPM if you have the `xpm' library and want XEmacs to use it. */ -#undef HAVE_XPM - -/* Define HAVE_XFACE if you have the `compface' library and want to use it. - This will permit X-face pixmaps in mail and news messages to display - quickly. */ -#undef HAVE_XFACE - -/* Define HAVE_GIF if you want XEmacs to support converting GIF - (Graphics Interchange Format) images. */ -#undef HAVE_GIF - -/* Define HAVE_JPEG if you have the JPEG library and want XEmacs to use it. - This is for converting JPEG images. */ -#undef HAVE_JPEG - -/* Define HAVE_PNG if you have the PNG library and want XEmacs to use it. - This is for converting PNG images. */ -#undef HAVE_PNG - -/* Define HAVE_PNG_GNUZ if you want to use -lgz instead of -lz for PNG. */ -#undef HAVE_PNG_GNUZ - -/* Define HAVE_TIFF if you have the TIFF library and want XEmacs to use it. - This is for converting TIFF images. */ -#undef HAVE_TIFF - -/* Define HAVE_XMU if you have the Xmu library. This should always be - the case except on losing HPUX systems. */ -#undef HAVE_XMU /* XXX Jon */ - /* Define HAVE_DBM if you want to use the DBM libraries */ #undef HAVE_DBM -/* Define HAVE_GNU_DBM if you want to use the GNU DBM libraries; - if you define this, you should also define HAVE_DBM */ -#undef HAVE_GNU_DBM - /* Define HAVE_BERKELEY_DB if you want to use the BerkDB libraries */ #undef HAVE_BERKELEY_DB - -/* Define HAVE_LIBGDBM if you have -lgdbm (separated from HAVE_DBM - stuff because FreeBSD has the DBM routines in libc) */ -#undef HAVE_LIBGDBM - -/* Define HAVE_LIBDBM if you have -ldbm */ -#undef HAVE_LIBDBM - -/* Define HAVE_LIBDB if you have -ldb */ -#undef HAVE_LIBDB +/* Full #include file path for Berkeley DB's db.h */ +#undef DB_H_PATH #if defined (HAVE_DBM) || defined (HAVE_BERKELEY_DB) # define HAVE_DATABASE #endif -/* Define HAVE_XAUTH if the Xauth library is present. This will add - some extra functionality to gnuserv. */ -#undef HAVE_XAUTH - -/* Define HAVE_XLOCALE_H if X11/Xlocale.h is present. */ -#undef HAVE_XLOCALE_H /* XXX Jon */ - /* Define HAVE_NCURSES if -lncurses is present. */ #undef HAVE_NCURSES - -/* Define HAVE_NCURSES_CURSES_H if ncurses/curses.h is present. */ -#undef HAVE_NCURSES_CURSES_H - -/* Define HAVE_NCURSES_TERM_H if ncurses/term.h is present. */ -#undef HAVE_NCURSES_TERM_H - -/* Define EPOCH to include extra functionality that was present in Epoch. - This code has received only limited testing. */ -#undef EPOCH +/* Full #include file paths for ncurses' curses.h and term.h. */ +#undef CURSES_H_PATH +#undef TERM_H_PATH #define LOWTAGS @@ -322,6 +327,7 @@ /* Check the entire extent structure of a buffer each time an extent change is done, and do other extent-related checks. */ #define ERROR_CHECK_EXTENTS + /* Make sure that all X... macros are dereferencing the correct type, and that all XSET... macros (as much as possible) are setting the correct type of structure. Highly recommended for all @@ -338,7 +344,7 @@ /* Define DEBUG_XEMACS if you want extra debugging code compiled in. This is mainly intended for use by developers. */ -#define DEBUG_XEMACS 1 +#define DEBUG_XEMACS 0 /* Define MEMORY_USAGE_STATS if you want extra code compiled in to determine where XEmacs's memory is going. */ @@ -360,22 +366,42 @@ /* Allow the user to override the default value of PURESIZE at configure time. This must come before we include the sys files in order for it to be able to override any changes in them. */ -#undef PURESIZE +#undef RAW_PURESIZE +/* Define this if you want level 2 internationalization compliance + (localized collation and formatting). Generally this should be + defined, unless your system doesn't have the strcoll() and + setlocale() library routines. This really should be (NOT! -mrb) + defined in the appropriate s/ or m/ file. */ +#undef I18N2 -/* Define this if you want to use the Common Desktop Environment -*/ +/* Define this if you want level 3 internationalization compliance + (localized messaging). This will cause a small runtime performance + penalty, as the strings are read from the message catalog(s). + For this you need the gettext() and dgetext() library routines. + WARNING, this code is under construction. */ +#undef I18N3 + +/* Compile in support for CDE (Common Desktop Environment) drag and drop? + Requires libDtSvc, which typically must be present at runtime. */ #undef HAVE_CDE +/* Compile in support for OffiX Drag and Drop? */ +#undef HAVE_OFFIX_DND + +/* Compile in support for proper session-management. */ +#undef HAVE_SESSION + /* Define this if you want Mule support (multi-byte character support). There may be some performance penalty, although it should be small if you're working with ASCII files. */ -#undef MULE /* XXX Jon */ +/* #undef MULE */ +#ifdef MULE /* Do we want to use X window input methods for use with Mule? (requires X11R5) If so, use raw Xlib or higher level Motif interface? */ -#undef HAVE_XIM /* XXX Jon */ -#undef XIM_XLIB /* XXX Jon */ +#undef HAVE_XIM +#undef XIM_XLIB #undef XIM_MOTIF /* Non-XIM input methods for use with Mule. */ @@ -383,6 +409,8 @@ #undef HAVE_WNN #undef WNN6 +#endif + /* enable special GNU Make features in the Makefiles. */ #undef USE_GNU_MAKE @@ -434,38 +462,10 @@ #define SYSTEM_MALLOC #endif -/* The configuration name. This is used as the install directory name - for the lib-src programs. */ -#undef EMACS_CONFIGURATION - /* Define REL_ALLOC if you want to use the relocating allocator for buffer space. */ #undef REL_ALLOC -/* Define LD_SWITCH_SITE to contain any special flags your loader may need. */ -#undef LD_SWITCH_SITE - -/* Define C_SWITCH_SITE to contain any special flags your compiler needs. */ -#undef C_SWITCH_SITE - -/* Define LD_SWITCH_X_SITE to contain any special flags your loader - may need to deal with X Windows. For instance, if you've defined - HAVE_X_WINDOWS above and your X libraries aren't in a place that - your loader can find on its own, you might want to add "-L/..." or - something similar. */ -#undef LD_SWITCH_X_SITE - -/* Define LD_SWITCH_X_SITE_AUX with an -R option - in case it's needed (for Solaris, for example). */ -#undef LD_SWITCH_X_SITE_AUX - -/* Define C_SWITCH_X_SITE to contain any special flags your compiler - may need to deal with X Windows. For instance, if you've defined - HAVE_X_WINDOWS above and your X include files aren't in a place - that your compiler can find on its own, you might want to add - "-I/..." or something similar. */ -#undef C_SWITCH_X_SITE - /* Define the return type of signal handlers if the s-xxx file did not already do so. */ #define RETSIGTYPE void @@ -476,15 +476,18 @@ #define SIGRETURN return #endif +/* Allow the source to use standard types */ +#undef size_t +#undef pid_t +#undef mode_t +#undef off_t +#undef uid_t +#undef gid_t + /* Define DYNODUMP if it is necessary to properly dump on this system. Currently this is only Solaris. */ #undef DYNODUMP -/* Define NEED_XILDOFF if the -xildoff flag must be passed to cc to - avoid invoking the incremental linker ild which is incompatible - with dynodump. This is needed for recent Sunsoft compilers. */ -#undef NEED_XILDOFF - /* Define ENERGIZE to compile with support for the Energize Programming System. If you do this, don't forget to define ENERGIZE in lwlib/Imakefile as well. You will need to set your C_SWITCH_SITE and LD_SWITCH_SITE to point at the @@ -520,21 +523,24 @@ /* Define TOOLTALK if your site supports the ToolTalk library. */ #undef TOOLTALK +#ifdef HAVE_X_WINDOWS + #undef LWLIB_USES_MOTIF -#undef LWLIB_MENUBARS_LUCID +#define LWLIB_MENUBARS_LUCID #undef LWLIB_MENUBARS_MOTIF -#undef LWLIB_SCROLLBARS_LUCID +#define LWLIB_SCROLLBARS_LUCID #undef LWLIB_SCROLLBARS_MOTIF #undef LWLIB_SCROLLBARS_ATHENA #undef LWLIB_DIALOGS_MOTIF -#undef LWLIB_DIALOGS_ATHENA +#define LWLIB_DIALOGS_ATHENA /* Other things that can be disabled by configure. */ -#undef HAVE_MENUBARS -#undef HAVE_SCROLLBARS -#undef HAVE_DIALOGS +#define HAVE_MENUBARS +#define HAVE_SCROLLBARS +#define HAVE_DIALOGS #undef HAVE_TOOLBARS +#endif #if defined (HAVE_MENUBARS) || defined (HAVE_DIALOGS) #define HAVE_POPUPS @@ -668,4 +674,24 @@ # define JMP_BUF jmp_buf #endif -#endif /* _CONFIG_H_ */ +/* movemail options */ +/* Should movemail use POP3 for mail access? */ +#undef MAIL_USE_POP +/* Should movemail use kerberos for POP authentication? */ +#undef KERBEROS +/* Should movemail use hesiod for getting POP server host? */ +#undef HESIOD +/* Determine type of mail locking. */ +/* Play preprocessor games so that configure options override s&m files */ +#undef REAL_MAIL_USE_LOCKF +#undef REAL_MAIL_USE_FLOCK +#undef MAIL_USE_LOCKF +#undef MAIL_USE_FLOCK +#ifdef REAL_MAIL_USE_FLOCK +#define MAIL_USE_FLOCK +#endif +#ifdef REAL_MAIL_USE_LOCKF +#define MAIL_USE_LOCKF +#endif + +#endif /* _SRC_CONFIG_H_ */
--- a/w32/xemacs.mak Mon Aug 13 10:05:01 2007 +0200 +++ b/w32/xemacs.mak Mon Aug 13 10:05:51 2007 +0200 @@ -1,19 +1,45 @@ +MSDEV=c:\msdev XEMACS=.. LISP=$(XEMACS)\lisp -CC=cl + +HAVE_X=0 +HAVE_W32=1 + +HAVE_MULE=0 OPT=-Od -Zi #OPT=-O2 -G5 -Zi -include ..\version.sh +#------------------------------------------------------------------------------ + +!if $(HAVE_X) +MAGICK=e:\utils\ImageMagick +X11R6=e:\utils\X11R6 + +X_DEFINES=-DHAVE_X_WINDOWS +X_INCLUDES=-I$(X11R6)\include -I$(MAGICK)\Magick +X_LIBS=Magick.dll.lib Xaw.lib Xmu.lib Xt.lib SM.lib ICE.lib Xext.lib X11.lib +!endif + +!if $(HAVE_W32) +W32_DEFINES=-DHAVE_W32GUI +!endif + +!if $(HAVE_MULE) +MULE_DEFINES=-DMULE +!endif + +!include "..\version.sh" #------------------------------------------------------------------------------ # Generic variables -INCLUDES=-I$(X11R6)\include -I.\inc -I$(XEMACS)\src\ - -I$(XEMACS)\lwlib -I"$(MSVCDIR)\include" -LIBRARIES= +INCLUDES=$(X_INCLUDES) -I$(XEMACS)\nt\inc -I$(XEMACS)\src -I$(XEMACS)\lwlib +DEFINES=$(X_DEFINES) $(W32_DEFINES) $(MULE_DEFINES) -DWIN32 -D_WIN32 \ + -D_M_IX86 -D_X86_ \ + -DWIN32_LEAN_AND_MEAN -DWINDOWSNT -Demacs -DHAVE_CONFIG_H \ + -D_MSC_VER=999 -D_DEBUG -DDEBUG_XEMACS OUTDIR=obj @@ -30,7 +56,7 @@ $(XEMACS)\src\paths.h $(XEMACS_INCLUDES): - !"copy *.h $(XEMACS)\src" + !copy *.h $(XEMACS)\src #------------------------------------------------------------------------------ @@ -50,15 +76,16 @@ #------------------------------------------------------------------------------ +!if $(HAVE_X) + # LWLIB Library LWLIB=$(OUTDIR)\lwlib.lib LWLIB_SRC=$(XEMACS)\lwlib -LWLIB_FLAGS=-nologo -w $(OPT) $(INCLUDES) -D "WIN32" -D "_DEBUG" \ - -D "_NTSDK" -D "_M_IX86" -D "_X86_" \ - -D "NEED_ATHENA" -D "NEED_LUCID" \ - -D "_WINDOWS" -D "MENUBARS_LUCID" -D "SCROLLBARS_LUCID" -D "DIALOGS_ATHENA" \ - -D "WINDOWSNT" -Fo$@ -c +LWLIB_FLAGS=-nologo -w $(OPT) $(INCLUDES) $(DEFINES) \ + -DNEED_ATHENA -DNEED_LUCID \ + -D_WINDOWS -DMENUBARS_LUCID -DSCROLLBARS_LUCID -DDIALOGS_ATHENA \ + -Fo$@ -c LWLIB_OBJS= \ $(OUTDIR)\lwlib-config.obj \ $(OUTDIR)\lwlib-utils.obj \ @@ -69,7 +96,7 @@ $(OUTDIR)\xlwscrollbar.obj $(LWLIB): $(XEMACS_INCLUDES) $(LWLIB_OBJS) - link.exe -lib -nologo -debug -debugtype:both -out:$@ $(LWLIB_OBJS) + link.exe -lib -nologo -debugtype:both -out:$@ $(LWLIB_OBJS) $(OUTDIR)\lwlib-config.obj: $(LWLIB_SRC)\lwlib-config.c $(CC) $(LWLIB_FLAGS) $** @@ -92,22 +119,22 @@ $(OUTDIR)\xlwscrollbar.obj: $(LWLIB_SRC)\xlwscrollbar.c $(CC) $(LWLIB_FLAGS) $** +!endif #------------------------------------------------------------------------------ # lib-src programs LIB_SRC=$(XEMACS)\lib-src -LIB_SRC_FLAGS=$(INCLUDES) -D_DEBUG -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN \ - -D_NTSDK -D_M_IX86 -ML -D_X86_ -Demacs -DHAVE_CONFIG_H -D_MSC_VER=999 +LIB_SRC_FLAGS=$(INCLUDES) $(DEFINES) -ML LIB_SRC_LIBS= kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libc.lib + advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib \ + odbccp32.lib libc.lib LIB_SRC_LFLAGS=-nologo $(LIB_SRC_LIBS) -base:0x1000000\ -subsystem:console -pdb:none -debugtype:both -machine:I386\ -nodefaultlib -out:$@ -debug:full - DOC=$(LIB_SRC)\DOC -DOC_SRCS=\ +DOC_SRC1=\ $(XEMACS)\src\abbrev.c \ $(XEMACS)\src\alloc.c \ $(XEMACS)\src\alloca.c \ @@ -122,14 +149,12 @@ $(XEMACS)\src\cmdloop.c \ $(XEMACS)\src\cmds.c \ $(XEMACS)\src\console-stream.c \ - $(XEMACS)\src\console-w32.c \ $(XEMACS)\src\console.c \ $(XEMACS)\src\data.c \ $(XEMACS)\src\debug.c \ - $(XEMACS)\src\device-w32.c + $(XEMACS)\src\device.c \ + $(XEMACS)\src\dgif_lib.c DOC_SRC2=\ - $(XEMACS)\src\device.c \ - $(XEMACS)\src\dgif_lib.c \ $(XEMACS)\src\dialog.c \ $(XEMACS)\src\dired.c \ $(XEMACS)\src\doc.c \ @@ -141,8 +166,6 @@ $(XEMACS)\src\eval.c \ $(XEMACS)\src\event-stream.c \ $(XEMACS)\src\event-unixoid.c \ - $(XEMACS)\src\event-w32.c -DOC_SRC3=\ $(XEMACS)\src\events.c \ $(XEMACS)\src\extents.c \ $(XEMACS)\src\faces.c \ @@ -150,9 +173,9 @@ $(XEMACS)\src\filelock.c \ $(XEMACS)\src\filemode.c \ $(XEMACS)\src\floatfns.c \ - $(XEMACS)\src\fns.c \ + $(XEMACS)\src\fns.c +DOC_SRC3=\ $(XEMACS)\src\font-lock.c \ - $(XEMACS)\src\frame-w32.c \ $(XEMACS)\src\frame.c \ $(XEMACS)\src\free-hook.c \ $(XEMACS)\src\general.c \ @@ -160,8 +183,7 @@ $(XEMACS)\src\gifalloc.c \ $(XEMACS)\src\glyphs.c \ $(XEMACS)\src\gmalloc.c \ - $(XEMACS)\src\gui.c -DOC_SRC4=\ + $(XEMACS)\src\gui.c \ $(XEMACS)\src\hash.c \ $(XEMACS)\src\indent.c \ $(XEMACS)\src\inline.c \ @@ -171,41 +193,85 @@ $(XEMACS)\src\lread.c \ $(XEMACS)\src\lstream.c \ $(XEMACS)\src\macros.c \ - $(XEMACS)\src\marker.c \ + $(XEMACS)\src\marker.c +DOC_SRC4=\ $(XEMACS)\src\md5.c \ $(XEMACS)\src\minibuf.c \ $(XEMACS)\src\nt.c \ $(XEMACS)\src\ntheap.c \ $(XEMACS)\src\ntproc.c \ $(XEMACS)\src\objects.c \ - $(XEMACS)\src\objects-w32.c \ - $(XEMACS)\src\opaque.c -DOC_SRC5=\ + $(XEMACS)\src\opaque.c \ $(XEMACS)\src\print.c \ $(XEMACS)\src\process.c \ $(XEMACS)\src\pure.c \ $(XEMACS)\src\rangetab.c \ $(XEMACS)\src\realpath.c \ $(XEMACS)\src\redisplay-output.c \ - $(XEMACS)\src\redisplay-w32.c \ $(XEMACS)\src\redisplay.c \ $(XEMACS)\src\regex.c \ + $(XEMACS)\src\scrollbar.c \ $(XEMACS)\src\search.c \ $(XEMACS)\src\signal.c \ - $(XEMACS)\src\sound.c \ + $(XEMACS)\src\sound.c +DOC_SRC5=\ $(XEMACS)\src\specifier.c \ $(XEMACS)\src\strftime.c \ $(XEMACS)\src\symbols.c \ $(XEMACS)\src\syntax.c \ - $(XEMACS)\src\sysdep.c -DOC_SRC6=\ + $(XEMACS)\src\sysdep.c \ + $(XEMACS)\src\termcap.c \ $(XEMACS)\src\tparam.c \ $(XEMACS)\src\undo.c \ $(XEMACS)\src\unexnt.c \ $(XEMACS)\src\vm-limit.c \ - $(XEMACS)\src\w32-proc.c \ - $(XEMACS)\src\widget.c \ - $(XEMACS)\src\window.c + $(XEMACS)\src\window.c \ + $(XEMACS)\src\xgccache.c \ + $(XEMACS)\src\xmu.c \ + $(XEMACS)\src\widget.c + +!if $(HAVE_X) +DOC_SRC6=\ + $(XEMACS)\src\balloon_help.c \ + $(XEMACS)\src\console-x.c \ + $(XEMACS)\src\device-x.c \ + $(XEMACS)\src\dialog-x.c \ + $(XEMACS)\src\EmacsFrame.c \ + $(XEMACS)\src\EmacsManager.c \ + $(XEMACS)\src\EmacsShell-sub.c\ + $(XEMACS)\src\EmacsShell.c \ + $(XEMACS)\src\event-Xt.c \ + $(XEMACS)\src\frame-x.c \ + $(XEMACS)\src\glyphs-x.c \ + $(XEMACS)\src\gui-x.c \ + $(XEMACS)\src\menubar.c \ + $(XEMACS)\src\menubar-x.c \ + $(XEMACS)\src\objects-x.c \ + $(XEMACS)\src\redisplay-x.c \ + $(XEMACS)\src\scrollbar-x.c \ + $(XEMACS)\src\balloon-x.c \ + $(XEMACS)\src\xselect.c +!endif + +!if $(HAVE_W32) +DOC_SRCS_7=\ + $(XEMACS)\src\console-w32.c \ + $(XEMACS)\src\device-w32.c \ + $(XEMACS)\src\event-w32.c \ + $(XEMACS)\src\frame-w32.c \ + $(XEMACS)\src\objects-w32.c \ + $(XEMACS)\src\redisplay-w32.c \ + $(XEMACS)\src\w32-proc.c +!endif + +!if $(HAVE_MULE) +DOC_SRCS_8=\ + $(XEMACS)\src\input-method-xlib.c \ + $(XEMACS)\src\mule.c \ + $(XEMACS)\src\mule-charset.c \ + $(XEMACS)\src\mule-ccl.c \ + $(XEMACS)\src\mule-coding.c +!endif MAKE_DOCFILE=$(LIB_SRC)\make-docfile.exe @@ -221,12 +287,13 @@ link.exe -out:$@ -subsystem:windows -entry:WinMainCRTStartup \ -pdb:none -release -incremental:no $** \ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib \ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libc.lib + advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib \ + odbccp32.lib libc.lib -$(OUTDIR)\runemacs.obj: .\runemacs.c +$(OUTDIR)\runemacs.obj: $(XEMACS)\nt\runemacs.c $(CC) -nologo -ML -w $(OPT) -c \ -D_DEBUG -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN \ - -D_NTSDK -D_M_IX86 -D_X86_ -Demacs -DHAVE_CONFIG_H -D_MSC_VER=999 \ + -D_M_IX86 -D_X86_ -Demacs -DHAVE_CONFIG_H -D_MSC_VER=999 \ $** -Fo$@ SUPPORT_PROGS=$(MAKE_DOCFILE) $(RUNEMACS) @@ -238,23 +305,72 @@ TEMACS_DIR=$(XEMACS)\src TEMACS=$(TEMACS_DIR)\temacs.exe TEMACS_SRC=$(XEMACS)\src -TEMACS_LIBS=$(LASTFILE) kernel32.lib user32.lib gdi32.lib \ +TEMACS_LIBS=$(LASTFILE) $(LWLIB) $(X_LIBS) kernel32.lib user32.lib gdi32.lib \ winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ - uuid.lib wsock32.lib libc.lib + uuid.lib odbc32.lib odbccp32.lib wsock32.lib libc.lib TEMACS_LFLAGS=-nologo $(LIBRARIES) -base:0x1000000\ -stack:0x800000 -entry:_start -subsystem:console\ -pdb:$(TEMACS_DIR)\temacs.pdb -map:$(TEMACS_DIR)\temacs.map -debug:full\ - -heap:0x00100000 -out:$@ + -heap:0x00100000 -out:$@\ -TEMACS_CPP_FLAGS= $(INCLUDES) -D_DEBUG -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN \ - -D_NTSDK -D_M_IX86 -D_X86_ -Demacs -DHAVE_CONFIG_H -D_MSC_VER=999 \ +TEMACS_CPP_FLAGS= $(INCLUDES) $(DEFINES) \ -DEMACS_MAJOR_VERSION=$(emacs_major_version) \ -DEMACS_MINOR_VERSION=$(emacs_minor_version) \ -DXEMACS_CODENAME=\"$(xemacs_codename)\" \ -DPATH_PREFIX=\"$(XEMACS)\" -TEMACS_FLAGS=-nologo -ML $(OPT) -c $(TEMACS_CPP_FLAGS) +TEMACS_FLAGS=-nologo -ML -w $(OPT) -c $(TEMACS_CPP_FLAGS) + +!if $(HAVE_X) +TEMACS_X_OBJS=\ + $(OUTDIR)\balloon-x.obj \ + $(OUTDIR)\balloon_help.obj \ + $(OUTDIR)\console-x.obj \ + $(OUTDIR)\device-x.obj \ + $(OUTDIR)\dialog-x.obj \ + $(OUTDIR)\EmacsFrame.obj \ + $(OUTDIR)\EmacsManager.obj \ + $(OUTDIR)\EmacsShell.obj \ + $(OUTDIR)\TopLevelEmacsShell.obj\ + $(OUTDIR)\TransientEmacsShell.obj\ + $(OUTDIR)\event-Xt.obj \ + $(OUTDIR)\frame-x.obj \ + $(OUTDIR)\glyphs-x.obj \ + $(OUTDIR)\gui-x.obj \ + $(OUTDIR)\menubar.obj \ + $(OUTDIR)\menubar-x.obj \ + $(OUTDIR)\objects-x.obj \ + $(OUTDIR)\redisplay-x.obj \ + $(OUTDIR)\scrollbar.obj \ + $(OUTDIR)\scrollbar-x.obj \ + $(OUTDIR)\xgccache.obj \ + $(OUTDIR)\xmu.obj \ + $(OUTDIR)\xselect.obj +!endif + +!if $(HAVE_W32) +TEMACS_W32_OBJS=\ + $(OUTDIR)\console-w32.obj \ + $(OUTDIR)\device-w32.obj \ + $(OUTDIR)\event-w32.obj \ + $(OUTDIR)\frame-w32.obj \ + $(OUTDIR)\objects-w32.obj \ + $(OUTDIR)\redisplay-w32.obj \ + $(OUTDIR)\w32-proc.obj +!endif + +!if $(HAVE_MULE) +TEMACS_MULE_OBJS=\ + $(OUTDIR)\input-method-xlib.obj \ + $(OUTDIR)\mule.obj \ + $(OUTDIR)\mule-charset.obj \ + $(OUTDIR)\mule-ccl.obj \ + $(OUTDIR)\mule-coding.obj \ +!endif TEMACS_OBJS= \ + $(TEMACS_X_OBJS)\ + $(TEMACS_W32_OBJS)\ + $(TEMACS_MULE_OBJS)\ $(OUTDIR)\abbrev.obj \ $(OUTDIR)\alloc.obj \ $(OUTDIR)\alloca.obj \ @@ -269,11 +385,9 @@ $(OUTDIR)\cmdloop.obj \ $(OUTDIR)\cmds.obj \ $(OUTDIR)\console-stream.obj \ - $(OUTDIR)\console-w32.obj \ $(OUTDIR)\console.obj \ $(OUTDIR)\data.obj \ $(OUTDIR)\debug.obj \ - $(OUTDIR)\device-w32.obj \ $(OUTDIR)\device.obj \ $(OUTDIR)\dgif_lib.obj \ $(OUTDIR)\dialog.obj \ @@ -287,7 +401,6 @@ $(OUTDIR)\eval.obj \ $(OUTDIR)\event-stream.obj \ $(OUTDIR)\event-unixoid.obj \ - $(OUTDIR)\event-w32.obj \ $(OUTDIR)\events.obj \ $(OUTDIR)\extents.obj \ $(OUTDIR)\faces.obj \ @@ -297,7 +410,6 @@ $(OUTDIR)\floatfns.obj \ $(OUTDIR)\fns.obj \ $(OUTDIR)\font-lock.obj \ - $(OUTDIR)\frame-w32.obj \ $(OUTDIR)\frame.obj \ $(OUTDIR)\free-hook.obj \ $(OUTDIR)\general.obj \ @@ -321,7 +433,6 @@ $(OUTDIR)\nt.obj \ $(OUTDIR)\ntheap.obj \ $(OUTDIR)\ntproc.obj \ - $(OUTDIR)\objects-w32.obj \ $(OUTDIR)\objects.obj \ $(OUTDIR)\opaque.obj \ $(OUTDIR)\print.obj \ @@ -330,7 +441,6 @@ $(OUTDIR)\rangetab.obj \ $(OUTDIR)\realpath.obj \ $(OUTDIR)\redisplay-output.obj \ - $(OUTDIR)\redisplay-w32.obj \ $(OUTDIR)\redisplay.obj \ $(OUTDIR)\regex.obj \ $(OUTDIR)\search.obj \ @@ -345,23 +455,18 @@ $(OUTDIR)\undo.obj \ $(OUTDIR)\unexnt.obj \ $(OUTDIR)\vm-limit.obj \ - $(OUTDIR)\w32-proc.obj \ $(OUTDIR)\widget.obj \ $(OUTDIR)\window.obj -#------------------------------------------------------------------------------ - # Rules .SUFFIXES: .SUFFIXES: .c # nmake rule -{$(TEMACS_SRC)}.c{$(OUTDIR)}.obj: +{$(TEMACS_SRC)}.c{$(OUTDIR)}.obj: $(CC) $(TEMACS_FLAGS) $< -Fo$@ -Fr$*.sbr -# Specific builds - $(OUTDIR)\TopLevelEmacsShell.obj: $(TEMACS_SRC)\EmacsShell-sub.c $(CC) $(TEMACS_FLAGS) -DDEFINE_TOP_LEVEL_EMACS_SHELL $** -Fo$@ @@ -374,78 +479,69 @@ #$(TEMACS_SRC)\paths.h: $(TEMACS_SRC)\paths.h.in # !"cd $(TEMACS_SRC); cp paths.h.in paths.h" -$(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) $(LASTFILE) - link.exe $(TEMACS_LFLAGS) @<< -$(TEMACS_OBJS) $(TEMACS_LIBS) +$(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) + link.exe @<< + $(TEMACS_LFLAGS) $(TEMACS_OBJS) $(TEMACS_LIBS) << - dir /b/s obj\*.sbr > bscmake.tmp - bscmake -o$*.bsc @bscmake.tmp - #------------------------------------------------------------------------------ # LISP bits 'n bobs -$(DOC): $(MAKE_DOCFILE) $(DOC_SRCS) $(DOC_SRC1) $(DOC_SRC2) $(DOC_SRC3) $(DOC_SRC4) $(DOC_SRC5) $(DOC_SRC6) - cd $(TEMACS_DIR) - del $(DOC) - !$(TEMACS) -batch -l make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages - !$(MAKE_DOCFILE) -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRCS) - !$(MAKE_DOCFILE) -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC1) - !$(MAKE_DOCFILE) -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC2) - !$(MAKE_DOCFILE) -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC3) - !$(MAKE_DOCFILE) -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC4) - !$(MAKE_DOCFILE) -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC4) - !$(MAKE_DOCFILE) -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC5) - LOADPATH=$(LISP)\prim -dump-elcs: $(TEMACS) - cd $(TEMACS_DIR) +$(DOC): $(LOADPATH)\startup.elc $(LIB_SRC)\make-docfile.exe + !$(TEMACS) -batch -l make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages + !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC1) + !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC2) + !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC3) + !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC4) + !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC5) + !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC6) + !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC7) + !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC8) + +$(LOADPATH)\startup.elc: $(LOADPATH)\startup.el !$(TEMACS) -batch -l update-elc.el -dump-xemacs: $(TEMACS) $(SUPPORT_PROGS) $(DOC) +dump-xemacs: cd $(TEMACS_DIR) !$(TEMACS) -batch -l loadup.el dump #------------------------------------------------------------------------------ -all: $(LASTFILE) $(TEMACS) $(SUPPORT_PROGS) +# use this rule to build the complete system +all: $(LASTFILE) $(LWLIB) $(SUPPORT_PROGS) $(TEMACS) $(DOC) dump-xemacs # use this rule to install the system install: # The last line demands that you have a semi-decent shell -distclean: $(OUTDIR)\nul - del *.bak - del *.orig - del *.rej - del *.pdb - del *.tmp - cd $(OUTDIR) - del *.obj - del *.sbr - del *.lib - cd ..\$(TEMACS_DIR) - del config.h - del paths.h - del puresize-adjust.h - del *.bak - del *.orig - del *.rej - del *.exe - del *.map - del *.bsc - del *.pdb - cd $(LIB_SRC) - del DOC - del *.bak - del *.orig - del *.exe - cd $(LISP) - -del /s /q *.bak *.elc *.orig *.rej +distclean: + del *.bak + del *.pdb + del *.tmp + cd $(OUTDIR) + del *.obj + del *.sbr + del *.lib + cd ..\$(TEMACS_DIR) + del config.h + del paths.h + del puresize-adjust.h + del *.bak + del *.exe + del *.map + del *.bsc + del *.pdb + cd $(LIB_SRC) + del DOC + del *.bak + del *.exe + cd $(LISP) + del /s /q *.elc depend: - mkdepend -f xemacs.mak -p$(OUTDIR)\ -o.obj -w9999 -- $(TEMACS_CPP_FLAGS) -- $(DOC_SRCS) $(DOC_SRC1) $(DOC_SRC2) $(DOC_SRC3) $(DOC_SRC4) $(DOC_SRC5) $(DOC_SRC6) $(LASTFILE_SRC)\lastfile.c $(LIB_SRC)\make-docfile.c .\runemacs.c + mkdepend -f xemacs.mak -p$(OUTDIR)\ -o.obj -w9999 -- $(TEMACS_CPP_FLAGS) -- $(DOC_SRC1) $(DOC_SRC2) $(DOC_SRC3) $(DOC_SRC4) $(DOC_SRC5) $(DOC_SRC6) $(DOC_SRC7) $(LASTFILE_SRC)\lastfile.c $(LIB_SRC)\make-docfile.c .\runemacs.c # DO NOT DELETE THIS LINE -- make depend depends on it.